Remove stack limit on blacklisted items.

This commit is contained in:
Brianna 2019-08-12 23:29:43 -04:00
parent f54eecfd28
commit af64e54ecd

View File

@ -56,7 +56,9 @@ public class Methods {
String name = Methods.convertToInvisibleString("IS") + String name = Methods.convertToInvisibleString("IS") +
compileItemName(itemStack, newAmount); compileItemName(itemStack, newAmount);
if (newAmount > 32) { boolean blacklisted = isMaterialBlacklisted(itemStack.getType());
if (newAmount > 32 && !blacklisted) {
item.setMetadata("US_AMT", new FixedMetadataValue(plugin, newAmount)); item.setMetadata("US_AMT", new FixedMetadataValue(plugin, newAmount));
itemStack.setAmount(32); itemStack.setAmount(32);
} else { } else {
@ -64,7 +66,7 @@ public class Methods {
itemStack.setAmount(newAmount); itemStack.setAmount(newAmount);
} }
if ((isMaterialBlacklisted(itemStack.getType()) && !Setting.ITEM_HOLOGRAM_BLACKLIST.getBoolean()) if ((blacklisted && !Setting.ITEM_HOLOGRAM_BLACKLIST.getBoolean())
|| !plugin.getItemFile().getConfig().getBoolean("Items." + material + ".Has Hologram") || !plugin.getItemFile().getConfig().getBoolean("Items." + material + ".Has Hologram")
|| !Setting.ITEM_HOLOGRAMS.getBoolean() || !Setting.ITEM_HOLOGRAMS.getBoolean()
|| newAmount == 1 && !Setting.ITEM_HOLOGRAM_SINGLE.getBoolean()) return; || newAmount == 1 && !Setting.ITEM_HOLOGRAM_SINGLE.getBoolean()) return;