mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-18 15:18:34 +01:00
Ignore durability for extreme values, untested. Fixes #620
This commit is contained in:
parent
e3f388e485
commit
03a866465c
@ -357,6 +357,10 @@ public class ItemStackPrompt extends FixedSetPrompt {
|
||||
return new ItemStackPrompt(oldPrompt);
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
if (input.equals("*")) {
|
||||
cc.setSessionData("tempData", Short.parseShort("999")); // wildcard value
|
||||
return new ItemStackPrompt(oldPrompt);
|
||||
}
|
||||
cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("itemCreateInvalidInput"));
|
||||
return new DataPrompt();
|
||||
}
|
||||
|
@ -62,8 +62,10 @@ public class ItemUtil {
|
||||
} else if ((one.getAmount() != two.getAmount()) && ignoreAmount == false) {
|
||||
return -2;
|
||||
} else if (one.getDurability() != two.getDurability()) {
|
||||
if (one.getDurability() >= 999 && two.getDurability() >= 999) { // wildcard value
|
||||
return -3;
|
||||
}
|
||||
}
|
||||
if (one.hasItemMeta() || two.hasItemMeta()) {
|
||||
if (one.hasItemMeta() && two.hasItemMeta() == false) {
|
||||
return -4;
|
||||
|
Loading…
Reference in New Issue
Block a user