Skip to content

Commit

Permalink
Merge branch 'develop' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Apr 15, 2023
2 parents 14c38ef + 6e9f9b3 commit 77e325d
Show file tree
Hide file tree
Showing 7 changed files with 1,206 additions and 490 deletions.
8 changes: 1 addition & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- This allows to change between versions and snapshots. -->
<build.version>2.1.0</build.version>
<build.version>2.2.0</build.version>
<build.number>-LOCAL</build.number>
<!-- Sonar Cloud -->
<sonar.projectKey>BentoBoxWorld_Biomes</sonar.projectKey>
Expand Down Expand Up @@ -154,12 +154,6 @@
<version>${spigot.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>plugin-annotations</artifactId>
<version>1.2.3-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>world.bentobox</groupId>
<artifactId>bentobox</artifactId>
Expand Down
12 changes: 1 addition & 11 deletions src/main/java/world/bentobox/biomes/BiomesPladdon.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,15 @@
package world.bentobox.biomes;


import org.bukkit.plugin.java.annotation.dependency.Dependency;
import org.bukkit.plugin.java.annotation.plugin.ApiVersion;
import org.bukkit.plugin.java.annotation.plugin.Plugin;

import world.bentobox.bentobox.api.addons.Addon;
import world.bentobox.bentobox.api.addons.Pladdon;


/**
* @author tastybento
*/
@Plugin(name = "Pladdon", version = "1.0")
@ApiVersion(ApiVersion.Target.v1_19)
@Dependency(value = "BentoBox")
public class BiomesPladdon extends Pladdon
{
@Override
public Addon getAddon()
{
return new BiomesAddon();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
package world.bentobox.biomes.panels;


import org.apache.commons.lang.ArrayUtils;
import org.bukkit.ChatColor;
import org.bukkit.conversations.*;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.Consumer;
import java.util.function.Function;
Expand Down Expand Up @@ -68,7 +68,7 @@ protected boolean isInputValid(@NotNull ConversationContext context, @NotNull St

// Split and check if they exist in valid entries.
String[] accepted = validEntry.toLowerCase().replaceAll("\\s", "").split(",");
return ArrayUtils.contains(accepted, input.toLowerCase());
return Arrays.asList(accepted).contains(input.toLowerCase());
}


Expand All @@ -84,7 +84,7 @@ protected Prompt acceptValidatedInput(@NotNull ConversationContext context, @Not
{
String validEntry = user.getTranslation(Constants.CONVERSATIONS + "confirm-string").toLowerCase();

if (ArrayUtils.contains(validEntry.replaceAll("\\s", "").split(","), input.toLowerCase()))
if (Arrays.asList(validEntry.replaceAll("\\s", "").split(",")).contains(input.toLowerCase()))
{
// Add answer to consumer.
consumer.accept(true);
Expand Down Expand Up @@ -441,7 +441,7 @@ public Prompt acceptInput(@NotNull ConversationContext context, @Nullable String
toLowerCase().replaceAll("\\s", "").
split(",");

if (input != null && ArrayUtils.contains(exit, input.toLowerCase()))
if (input != null && Arrays.asList(exit).contains(input.toLowerCase()))
{
return messagePrompt;
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/biomesTemplate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ biomes:
environment: NORMAL
name: '&f&l Plains'
description: |-
&7 Flat but geen, the best
&7 Flat but green, the best
&7 starting biome.
icon: GRASS_BLOCK
change:
Expand Down Expand Up @@ -385,4 +385,4 @@ biomes:
mode: STATIC
cost: 1000
items:
- WARPED_FUNGUS:3
- WARPED_FUNGUS:3
Loading

0 comments on commit 77e325d

Please sign in to comment.