Created
August 27, 2016 10:39
-
-
Save Waterpicker/2c42fbd4ebfea09175b368f4b2690b7e 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
public void onChestDrops(DropItemEvent.Destruct event) { | |
Optional<BlockSnapshot> blockSnapshot = event.getCause().first(BlockSnapshot.class); | |
if(blockSnapshot.isPresent()) | |
if(blockSnapshot.get().getState().getType() == BlockTypes.CHEST) | |
event.setCancelled(true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment