Fixed block Enderchest only for Dungeons

This commit is contained in:
Frank Baumann 2012-11-11 19:35:51 +01:00
parent 9c1c8ff792
commit 51fe99c720

View File

@ -45,11 +45,12 @@ public class PlayerListener implements Listener{
//Block Enderchests //Block Enderchests
if(clickedBlock!=null){ if(clickedBlock!=null){
if(GameWorld.get(player.getWorld())!=null || EditWorld.get(player.getWorld())!=null) if(GameWorld.get(player.getWorld())!=null || EditWorld.get(player.getWorld())!=null){
if(event.getAction()!=Action.LEFT_CLICK_BLOCK){ if(event.getAction()!=Action.LEFT_CLICK_BLOCK){
if(clickedBlock.getType()==Material.ENDER_CHEST){ if(clickedBlock.getType()==Material.ENDER_CHEST){
p.msg(player, ChatColor.RED+"Du kannst keine Enderchest in einem Dungeon verwenden!"); p.msg(player, ChatColor.RED+"Du kannst keine Enderchest in einem Dungeon verwenden!");
event.setCancelled(true); event.setCancelled(true);
}
} }
} }
} }