Added XP-removing on drop prevention

This commit is contained in:
Jascha Starke 2013-07-28 21:13:14 +02:00
parent b823dc24a1
commit cf028eb2dd

View file

@ -59,6 +59,8 @@ public class BlockListener extends Listener {
// prevent any drops for survival players in creative regions // prevent any drops for survival players in creative regions
if (player.getGameMode() != GameMode.CREATIVE && getRM().getRegionSet(block).getFlag(Flags.GAMEMODE) == GameMode.CREATIVE) { if (player.getGameMode() != GameMode.CREATIVE && getRM().getRegionSet(block).getFlag(Flags.GAMEMODE) == GameMode.CREATIVE) {
mod.getBlockSpawn().block(block, player); mod.getBlockSpawn().block(block, player);
if (event instanceof BlockBreakEvent)
((BlockBreakEvent) event).setExpToDrop(0);
} }
} }
} }