diff --git a/pom.xml b/pom.xml
index 9572b30..77a2fef 100644
--- a/pom.xml
+++ b/pom.xml
@@ -71,6 +71,11 @@
1.7.1
provided
+
+ org.apache.commons
+ commons-text
+ 1.15.0
+
diff --git a/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/ChanceFractionalRewardMatcher.java b/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/ChanceFractionalRewardMatcher.java
index 8f106b7..fe4b218 100644
--- a/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/ChanceFractionalRewardMatcher.java
+++ b/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/ChanceFractionalRewardMatcher.java
@@ -4,7 +4,6 @@
import io.minimum.minecraft.superbvote.util.PlayerVotes;
import io.minimum.minecraft.superbvote.votes.Vote;
import lombok.RequiredArgsConstructor;
-import org.bukkit.configuration.ConfigurationSection;
import java.util.Optional;
import java.util.Random;
diff --git a/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/PermissionRewardMatcher.java b/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/PermissionRewardMatcher.java
index 424011a..4a6f682 100644
--- a/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/PermissionRewardMatcher.java
+++ b/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/PermissionRewardMatcher.java
@@ -1,6 +1,5 @@
package io.minimum.minecraft.superbvote.votes.rewards.matchers;
-import com.google.common.base.Preconditions;
import io.minimum.minecraft.superbvote.util.PlayerVotes;
import io.minimum.minecraft.superbvote.votes.Vote;
import lombok.RequiredArgsConstructor;
diff --git a/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/RewardMatchers.java b/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/RewardMatchers.java
index 4f52fdd..b354dc6 100644
--- a/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/RewardMatchers.java
+++ b/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/RewardMatchers.java
@@ -5,7 +5,7 @@
import com.google.common.collect.ImmutableSet;
import io.minimum.minecraft.superbvote.SuperbVote;
import net.milkbowl.vault.permission.Permission;
-import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.text.similarity.LevenshteinDistance;
import org.bukkit.Bukkit;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.plugin.RegisteredServiceProvider;
@@ -45,7 +45,7 @@ public class RewardMatchers {
private static List closestMatch(String string) {
List matched = new ArrayList<>();
for (String availableMatcher : AVAILABLE_MATCHERS) {
- if (StringUtils.getLevenshteinDistance(string, availableMatcher) <= 2) {
+ if (LevenshteinDistance.getDefaultInstance().apply(string, availableMatcher) <= 2) {
matched.add(availableMatcher);
}
}
diff --git a/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/ScriptRewardMatcher.java b/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/ScriptRewardMatcher.java
index 8f8015b..04d578c 100644
--- a/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/ScriptRewardMatcher.java
+++ b/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/ScriptRewardMatcher.java
@@ -5,8 +5,6 @@
import io.minimum.minecraft.superbvote.votes.Vote;
import lombok.NonNull;
import lombok.Value;
-import org.bukkit.Bukkit;
-import org.bukkit.OfflinePlayer;
import javax.script.Invocable;
import javax.script.ScriptEngine;
diff --git a/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/ServiceRewardMatcher.java b/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/ServiceRewardMatcher.java
index 8047d52..6c4f391 100644
--- a/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/ServiceRewardMatcher.java
+++ b/src/main/java/io/minimum/minecraft/superbvote/votes/rewards/matchers/ServiceRewardMatcher.java
@@ -1,7 +1,6 @@
package io.minimum.minecraft.superbvote.votes.rewards.matchers;
import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
import io.minimum.minecraft.superbvote.util.PlayerVotes;
import io.minimum.minecraft.superbvote.votes.Vote;
import lombok.ToString;