Add backwards compatibility for 1.14

This commit is contained in:
libraryaddict
2020-02-06 12:15:20 +13:00
parent 7661635eb9
commit 9656ed4249
15 changed files with 283 additions and 65 deletions

View File

@@ -64,6 +64,10 @@ public class DisguiseModifyRadiusCommand extends DisguiseBaseCommand implements
ArrayList<String> classes = new ArrayList<>();
for (DisguiseType type : DisguiseType.values()) {
if (type.getEntityType() == null) {
continue;
}
classes.add(type.toReadable());
}
@@ -79,6 +83,10 @@ public class DisguiseModifyRadiusCommand extends DisguiseBaseCommand implements
if (!isInteger(args[0])) {
for (DisguiseType t : DisguiseType.values()) {
if (t.getEntityType() == null) {
continue;
}
if (t.toReadable().replaceAll(" ", "").equalsIgnoreCase(args[0].replaceAll("_", ""))) {
baseType = t;
starting = 1;
@@ -193,6 +201,10 @@ public class DisguiseModifyRadiusCommand extends DisguiseBaseCommand implements
if (args.length == 0) {
for (DisguiseType type : DisguiseType.values()) {
if (type.getEntityType() == null) {
continue;
}
tabs.add(type.toReadable().replaceAll(" ", "_"));
}
@@ -203,6 +215,10 @@ public class DisguiseModifyRadiusCommand extends DisguiseBaseCommand implements
if (!isInteger(args[0])) {
for (DisguiseType t : DisguiseType.values()) {
if (t.getEntityType() == null) {
continue;
}
if (t.toReadable().replaceAll(" ", "").equalsIgnoreCase(args[0].replaceAll("_", ""))) {
starting = 2;
break;