Last active
August 29, 2015 14:03
-
-
Save anna-is-cute/c2e3f144eedc18bd3d65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final AbstractEventRegistrar aer = new AbstractEventRegistrar(this); | |
aer.registerAbstractListener(InventoryEvent.class, new Listener() { | |
@EventHandler | |
public <T extends InventoryEvent> void onInventoryEvent(T e) { | |
if (e instanceof Cancellable) { | |
final Cancellable c = (Cancellable) e; | |
c.setCancelled(true); | |
} | |
} | |
}, EventPriority.HIGHEST); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment