mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-11-27 04:25:21 +01:00
Fixed error on pickup item event in 1.8
This commit is contained in:
parent
6d0ee6c5e0
commit
27f5d6bc44
@ -16,6 +16,7 @@ import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
import org.bukkit.event.entity.EntityPickupItemEvent;
|
||||
import org.bukkit.event.entity.ItemSpawnEvent;
|
||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -77,8 +78,7 @@ public class EntityListeners implements Listener {
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPickup(EntityPickupItemEvent event) {
|
||||
if (!(event.getEntity() instanceof Player)) return;
|
||||
public void onPickup(PlayerPickupItemEvent event) {
|
||||
event.getItem().setItemStack(instance.getStackingTask().setMax(event.getItem().getItemStack(), 0, true));
|
||||
|
||||
ItemStack item = event.getItem().getItemStack();
|
||||
|
Loading…
Reference in New Issue
Block a user