Disguise params extra information

This commit is contained in:
libraryaddict
2018-09-23 11:02:53 +12:00
parent 32626f9747
commit 14ca1b1e36
12 changed files with 204 additions and 33 deletions

View File

@@ -615,8 +615,9 @@ public class DisguiseParser {
}
// Construct the disguise
if (disguisePerm.getType() == DisguiseType.DROPPED_ITEM) {
disguise = new MiscDisguise(itemStack);
if (disguisePerm.getType() == DisguiseType.DROPPED_ITEM ||
disguisePerm.getType() == DisguiseType.FALLING_BLOCK) {
disguise = new MiscDisguise(disguisePerm.getType(), itemStack);
} else {
disguise = new MiscDisguise(disguisePerm.getType(), miscId, miscData);
}
@@ -682,6 +683,9 @@ public class DisguiseParser {
// We've found a method which will accept a valid value, break
break;
}
catch (DisguiseParseException ex) {
parseException = ex;
}
catch (Exception ignored) {
parseException = new DisguiseParseException(LibsMsg.PARSE_EXPECTED_RECEIVED,
paramInfo.getDescriptiveName(), list.isEmpty() ? null : list.get(0),