Renamed messages from "option" to "method" to make things clearer

Added better support for tab completion and ignoring the first arg of falling blocks and item disguises, so /disguise fallingblock setburning - Is now possible
Fixed itemstack parsing returning illegal/unwanted air block
This commit is contained in:
libraryaddict
2020-04-04 19:58:21 +13:00
parent 269a5c3aef
commit efbd6e29e3
12 changed files with 62 additions and 53 deletions

View File

@@ -31,7 +31,7 @@ public class ParamInfoItemBlock extends ParamInfoItemStack {
material = Material.getMaterial(split[0].toUpperCase());
}
if (material == null) {
if (material == null || (material == Material.AIR && !split[0].equalsIgnoreCase("air"))) {
throw new IllegalArgumentException();
}

View File

@@ -131,7 +131,7 @@ public class ParamInfoItemStack extends ParamInfoEnum {
material = Material.getMaterial(split[0].toUpperCase());
}
if (material == null) {
if (material == null || (material == Material.AIR && !split[0].equalsIgnoreCase("air"))) {
throw new IllegalArgumentException();
}
@@ -161,7 +161,7 @@ public class ParamInfoItemStack extends ParamInfoEnum {
Material material = Material.getMaterial(split[0].toUpperCase());
if (material == null) {
if (material == null || (material == Material.AIR && !split[0].equalsIgnoreCase("air"))) {
throw new IllegalArgumentException();
}