From d51da2cbe013a19657c1d774d6aa2df95af1b080 Mon Sep 17 00:00:00 2001 From: asofold Date: Tue, 31 Dec 2013 01:36:38 +0100 Subject: [PATCH] Random Chicken Inventory. --- .../checks/inventory/InventoryListener.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java index b2468d5b..dcdfc13b 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java @@ -29,6 +29,7 @@ import fr.neatmonster.nocheatplus.checks.CheckListener; import fr.neatmonster.nocheatplus.checks.CheckType; import fr.neatmonster.nocheatplus.checks.combined.Combined; import fr.neatmonster.nocheatplus.checks.combined.Improbable; +import fr.neatmonster.nocheatplus.components.JoinLeaveListener; import fr.neatmonster.nocheatplus.utilities.InventoryUtil; /* @@ -54,7 +55,7 @@ import fr.neatmonster.nocheatplus.utilities.InventoryUtil; * * @see InventoryEvent */ -public class InventoryListener extends CheckListener { +public class InventoryListener extends CheckListener implements JoinLeaveListener{ /** The drop check. */ private final Drop drop = addCheck(new Drop()); @@ -351,6 +352,16 @@ public class InventoryListener extends CheckListener { // Note: ignore cancelother setting. open.check(event.getPlayer()); } + + @Override + public void playerJoins(Player player) { + // Ignore + } + + @Override + public void playerLeaves(Player player) { + open.check(player); + } // @EventHandler(priority = EventPriority.MONITOR) // public void onVehicleDestroy(final VehicleDestroyEvent event) {