Added logging for droppers adding items to other containers
This commit is contained in:
parent
37fc9af300
commit
aa2ee7225c
4 changed files with 18 additions and 7 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package net.coreprotect.utility;
|
||||
|
||||
import org.bukkit.block.DoubleChest;
|
||||
import org.bukkit.block.Dropper;
|
||||
import org.bukkit.block.Hopper;
|
||||
import org.bukkit.entity.minecart.HopperMinecart;
|
||||
import org.bukkit.inventory.BlockInventoryHolder;
|
||||
|
|
@ -16,6 +17,10 @@ public class Validate {
|
|||
return (inventoryHolder instanceof Hopper || inventoryHolder instanceof HopperMinecart);
|
||||
}
|
||||
|
||||
public static boolean isDropper(InventoryHolder inventoryHolder) {
|
||||
return (inventoryHolder instanceof Dropper);
|
||||
}
|
||||
|
||||
/* check if valid hopper destination */
|
||||
public static boolean isContainer(InventoryHolder inventoryHolder) {
|
||||
return (inventoryHolder instanceof BlockInventoryHolder || inventoryHolder instanceof DoubleChest);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue