mirror of
https://github.com/songoda/UltimateStacker.git
synced 2025-01-13 03:00:45 +01:00
added support for epicfarming.
This commit is contained in:
parent
c50832c19c
commit
cd7e5cab5d
@ -26,6 +26,8 @@ public class InteractListeners implements Listener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onAccept(InventoryPickupItemEvent event) {
|
public void onAccept(InventoryPickupItemEvent event) {
|
||||||
ItemStack item = event.getItem().getItemStack();
|
ItemStack item = event.getItem().getItemStack();
|
||||||
|
if (new ItemStack(item.getType()).getMaxStackSize() == item.getMaxStackSize()) return;
|
||||||
|
|
||||||
instance.getStackingTask().setMax(item, 0, true);
|
instance.getStackingTask().setMax(item, 0, true);
|
||||||
int amt = item.getAmount();
|
int amt = item.getAmount();
|
||||||
int max = item.getMaxStackSize();
|
int max = item.getMaxStackSize();
|
||||||
|
@ -60,6 +60,8 @@ public class StackingTask extends BukkitRunnable {
|
|||||||
if (entityO instanceof Item && instance.getConfig().getBoolean("Main.Stack Items")) {
|
if (entityO instanceof Item && instance.getConfig().getBoolean("Main.Stack Items")) {
|
||||||
ItemStack item = ((Item) entityO).getItemStack();
|
ItemStack item = ((Item) entityO).getItemStack();
|
||||||
|
|
||||||
|
if (entityO.hasMetadata("grabbed")) continue;
|
||||||
|
|
||||||
if (entityO.isCustomNameVisible() && !entityO.getCustomName().contains(TextComponent.convertToInvisibleString("IS")) || item.hasItemMeta() && item.getItemMeta().hasDisplayName())
|
if (entityO.isCustomNameVisible() && !entityO.getCustomName().contains(TextComponent.convertToInvisibleString("IS")) || item.hasItemMeta() && item.getItemMeta().hasDisplayName())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user