mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-09-27 14:12:59 +02:00
Don't try and stack non stackable items.
This commit is contained in:
parent
dd01f22dc9
commit
c760238600
@ -95,6 +95,7 @@ public class ItemListeners implements Listener {
|
|||||||
|
|
||||||
Item item = event.getItem();
|
Item item = event.getItem();
|
||||||
ItemStack stack = item.getItemStack();
|
ItemStack stack = item.getItemStack();
|
||||||
|
if (stack.getMaxStackSize() == 1) return;
|
||||||
int amount = UltimateStacker.getActualItemAmount(item);
|
int amount = UltimateStacker.getActualItemAmount(item);
|
||||||
if (amount < (stack.getMaxStackSize() / 2)) return;
|
if (amount < (stack.getMaxStackSize() / 2)) return;
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@ import org.bukkit.entity.*;
|
|||||||
import org.bukkit.inventory.EntityEquipment;
|
import org.bukkit.inventory.EntityEquipment;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
public class EntityUtils {
|
public class EntityUtils {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user