Skip to content

Commit

Permalink
Update to BentoBox 2.0.0 and Spigot 1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Jan 3, 2024
1 parent e3a9cbb commit 48c23d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@
<java.version>16</java.version>
<powermock.version>1.7.4</powermock.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.17-R0.1-SNAPSHOT</spigot.version>
<spigot.version>1.20-R0.1-SNAPSHOT</spigot.version>
<!-- BentoBox API version -->
<bentobox.version>1.21.0</bentobox.version>
<bentobox.version>2.0.0-SNAPSHOT</bentobox.version>
<bank.version>1.4.0</bank.version>
<vault.version>1.7</vault.version>
<!-- Panel Utils version -->
<panelutils.version>1.1.0</panelutils.version>
<panelutils.version>1.2.0</panelutils.version>
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- This allows to change between versions and snapshots. -->
Expand Down Expand Up @@ -137,8 +137,8 @@
<url>https://repo.codemc.io/repository/maven-public/</url>
</repository>
<repository>
<id>vault-repo</id>
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
<id>papermc</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
<repository>
<id>essentials-repo</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
package world.bentobox.visit.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;

Expand Down Expand Up @@ -63,7 +63,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 @@ -79,7 +79,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 @@ -312,7 +312,7 @@ public static void createStringListInput(Consumer<List<String>> consumer,
toLowerCase().replaceAll("\\s", "").
split(",");

if (ArrayUtils.contains(exit, input.toLowerCase()))
if (Arrays.asList(exit).contains(input.toLowerCase()))
{
return messagePrompt;
}
Expand Down

0 comments on commit 48c23d5

Please sign in to comment.