Skip to content

Commit

Permalink
remove lingering apache commons references
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Dec 2, 2021
1 parent 7836359 commit 5f9eac2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
@@ -1,6 +1,5 @@
package com.denizenscript.denizen.utilities.command.scripted;

import org.apache.commons.lang.Validate;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.help.HelpMap;
Expand All @@ -15,7 +14,9 @@ public DenizenAliasHelpTopic(String alias, String aliasFor, HelpMap helpMap) {
this.aliasFor = aliasFor.startsWith("/") ? aliasFor : "/" + aliasFor;
this.helpMap = helpMap;
this.name = alias.startsWith("/") ? alias : "/" + alias;
Validate.isTrue(!this.name.equals(this.aliasFor), "Command " + this.name + " cannot be alias for itself");
if (name.equals(aliasFor)) {
throw new IllegalArgumentException("Command " + this.name + " cannot be alias for itself");
}
this.shortText = ChatColor.YELLOW + "Alias for " + ChatColor.WHITE + this.aliasFor;
}

Expand Down
Expand Up @@ -29,7 +29,6 @@
import com.denizenscript.denizencore.utilities.ReflectionHelper;
import com.denizenscript.denizencore.utilities.debugging.Debuggable;
import com.denizenscript.denizencore.utilities.debugging.StrongWarning;
import org.apache.commons.lang.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.scheduler.BukkitRunnable;
Expand Down Expand Up @@ -297,28 +296,28 @@ public static String cleanseLog(String input) {
String esc = String.valueOf(esc_char);
String repc = String.valueOf(ChatColor.COLOR_CHAR);
if (input.indexOf(esc_char) != -1) {
input = StringUtils.replace(input, esc + "[0;30;22m", repc + "0");
input = StringUtils.replace(input, esc + "[0;34;22m", repc + "1");
input = StringUtils.replace(input, esc + "[0;32;22m", repc + "2");
input = StringUtils.replace(input, esc + "[0;36;22m", repc + "3");
input = StringUtils.replace(input, esc + "[0;31;22m", repc + "4");
input = StringUtils.replace(input, esc + "[0;35;22m", repc + "5");
input = StringUtils.replace(input, esc + "[0;33;22m", repc + "6");
input = StringUtils.replace(input, esc + "[0;37;22m", repc + "7");
input = StringUtils.replace(input, esc + "[0;30;1m", repc + "8");
input = StringUtils.replace(input, esc + "[0;34;1m", repc + "9");
input = StringUtils.replace(input, esc + "[0;32;1m", repc + "a");
input = StringUtils.replace(input, esc + "[0;36;1m", repc + "b");
input = StringUtils.replace(input, esc + "[0;31;1m", repc + "c");
input = StringUtils.replace(input, esc + "[0;35;1m", repc + "d");
input = StringUtils.replace(input, esc + "[0;33;1m", repc + "e");
input = StringUtils.replace(input, esc + "[0;37;1m", repc + "f");
input = StringUtils.replace(input, esc + "[5m", repc + "k");
input = StringUtils.replace(input, esc + "[21m", repc + "l");
input = StringUtils.replace(input, esc + "[9m", repc + "m");
input = StringUtils.replace(input, esc + "[4m", repc + "n");
input = StringUtils.replace(input, esc + "[3m", repc + "o");
input = StringUtils.replace(input, esc + "[m", repc + "r");
input = CoreUtilities.replace(input, esc + "[0;30;22m", repc + "0");
input = CoreUtilities.replace(input, esc + "[0;34;22m", repc + "1");
input = CoreUtilities.replace(input, esc + "[0;32;22m", repc + "2");
input = CoreUtilities.replace(input, esc + "[0;36;22m", repc + "3");
input = CoreUtilities.replace(input, esc + "[0;31;22m", repc + "4");
input = CoreUtilities.replace(input, esc + "[0;35;22m", repc + "5");
input = CoreUtilities.replace(input, esc + "[0;33;22m", repc + "6");
input = CoreUtilities.replace(input, esc + "[0;37;22m", repc + "7");
input = CoreUtilities.replace(input, esc + "[0;30;1m", repc + "8");
input = CoreUtilities.replace(input, esc + "[0;34;1m", repc + "9");
input = CoreUtilities.replace(input, esc + "[0;32;1m", repc + "a");
input = CoreUtilities.replace(input, esc + "[0;36;1m", repc + "b");
input = CoreUtilities.replace(input, esc + "[0;31;1m", repc + "c");
input = CoreUtilities.replace(input, esc + "[0;35;1m", repc + "d");
input = CoreUtilities.replace(input, esc + "[0;33;1m", repc + "e");
input = CoreUtilities.replace(input, esc + "[0;37;1m", repc + "f");
input = CoreUtilities.replace(input, esc + "[5m", repc + "k");
input = CoreUtilities.replace(input, esc + "[21m", repc + "l");
input = CoreUtilities.replace(input, esc + "[9m", repc + "m");
input = CoreUtilities.replace(input, esc + "[4m", repc + "n");
input = CoreUtilities.replace(input, esc + "[3m", repc + "o");
input = CoreUtilities.replace(input, esc + "[m", repc + "r");
}
return input;
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -11,7 +11,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<craftbukkit.version>1.18-R0.1-SNAPSHOT</craftbukkit.version>
<citizens.version>2.0.28-SNAPSHOT</citizens.version>
<citizens.version>2.0.29-SNAPSHOT</citizens.version>
<dcore.version>1.90-SNAPSHOT</dcore.version>
<BUILD_NUMBER>Unknown</BUILD_NUMBER>
<BUILD_CLASS>CUSTOM</BUILD_CLASS>
Expand Down

0 comments on commit 5f9eac2

Please sign in to comment.