From cf028eb2dd2aaad344d42c686c842ee60f3d96fe Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Sun, 28 Jul 2013 21:13:14 +0200 Subject: [PATCH] Added XP-removing on drop prevention --- .../minecraft/limitedcreative/regions/BlockListener.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/regions/BlockListener.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/regions/BlockListener.java index fe4bfbb..1aea99a 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/regions/BlockListener.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/regions/BlockListener.java @@ -59,6 +59,8 @@ public class BlockListener extends Listener { // prevent any drops for survival players in creative regions if (player.getGameMode() != GameMode.CREATIVE && getRM().getRegionSet(block).getFlag(Flags.GAMEMODE) == GameMode.CREATIVE) { mod.getBlockSpawn().block(block, player); + if (event instanceof BlockBreakEvent) + ((BlockBreakEvent) event).setExpToDrop(0); } } }