mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-11-08 03:21:32 +01:00
Remove stack limit on blacklisted items.
This commit is contained in:
parent
f54eecfd28
commit
af64e54ecd
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user