From 51fe99c720029b8ddc40f49cbe8c28e9e3a667a4 Mon Sep 17 00:00:00 2001 From: Frank Baumann Date: Sun, 11 Nov 2012 19:35:51 +0100 Subject: [PATCH] Fixed block Enderchest only for Dungeons --- .../com/dre/dungeonsxl/listener/PlayerListener.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/DungeonsXL/src/com/dre/dungeonsxl/listener/PlayerListener.java b/DungeonsXL/src/com/dre/dungeonsxl/listener/PlayerListener.java index 587469c8..de080a5f 100644 --- a/DungeonsXL/src/com/dre/dungeonsxl/listener/PlayerListener.java +++ b/DungeonsXL/src/com/dre/dungeonsxl/listener/PlayerListener.java @@ -45,11 +45,12 @@ public class PlayerListener implements Listener{ //Block Enderchests if(clickedBlock!=null){ - if(GameWorld.get(player.getWorld())!=null || EditWorld.get(player.getWorld())!=null) - if(event.getAction()!=Action.LEFT_CLICK_BLOCK){ - if(clickedBlock.getType()==Material.ENDER_CHEST){ - p.msg(player, ChatColor.RED+"Du kannst keine Enderchest in einem Dungeon verwenden!"); - event.setCancelled(true); + if(GameWorld.get(player.getWorld())!=null || EditWorld.get(player.getWorld())!=null){ + if(event.getAction()!=Action.LEFT_CLICK_BLOCK){ + if(clickedBlock.getType()==Material.ENDER_CHEST){ + p.msg(player, ChatColor.RED+"Du kannst keine Enderchest in einem Dungeon verwenden!"); + event.setCancelled(true); + } } } }