Add check for GameSigns

This commit is contained in:
Daniel Saukel 2016-03-22 12:17:32 +01:00
parent a3ee3c698c
commit 11a04feb11

View File

@ -29,6 +29,7 @@ import io.github.dre2n.dungeonsxl.event.dplayer.DPlayerKickEvent;
import io.github.dre2n.dungeonsxl.game.GameChest; import io.github.dre2n.dungeonsxl.game.GameChest;
import io.github.dre2n.dungeonsxl.game.GameWorld; import io.github.dre2n.dungeonsxl.game.GameWorld;
import io.github.dre2n.dungeonsxl.global.DPortal; import io.github.dre2n.dungeonsxl.global.DPortal;
import io.github.dre2n.dungeonsxl.global.GameSign;
import io.github.dre2n.dungeonsxl.global.GroupSign; import io.github.dre2n.dungeonsxl.global.GroupSign;
import io.github.dre2n.dungeonsxl.global.LeaveSign; import io.github.dre2n.dungeonsxl.global.LeaveSign;
import io.github.dre2n.dungeonsxl.player.DGroup; import io.github.dre2n.dungeonsxl.player.DGroup;
@ -246,6 +247,11 @@ public class PlayerListener implements Listener {
event.setCancelled(true); event.setCancelled(true);
} }
// Check Game Signs
if (GameSign.playerInteract(event.getClickedBlock(), player)) {
event.setCancelled(true);
}
// Leave Sign // Leave Sign
if (LeaveSign.playerInteract(event.getClickedBlock(), player)) { if (LeaveSign.playerInteract(event.getClickedBlock(), player)) {
event.setCancelled(true); event.setCancelled(true);
@ -285,7 +291,6 @@ public class PlayerListener implements Listener {
} }
} }
} }
} }
@EventHandler(priority = EventPriority.HIGH) @EventHandler(priority = EventPriority.HIGH)