This commit is contained in:
Daniel Saukel 2015-09-07 18:15:43 +02:00
parent 39179b1eec
commit 9fcdba3d1c
2 changed files with 7 additions and 1 deletions

View File

@ -82,6 +82,7 @@ public class LanguageReader {
/* Errors */
defaults.put("Error_Enderchest", "&4You cannot use an enderchest while in a Dungeon!");
defaults.put("Error_Bed", "&4You cannot use a bed while in a Dungeon!");
defaults.put("Error_Dispenser", "&4You cannot access this dispenser!");
defaults.put("Error_Ready", "&4Choose your class first!");
defaults.put("Error_Cooldown", "&4You can only enter this Dungeon every &6&v1&4 hours!");

View File

@ -51,10 +51,15 @@ public class PlayerListener implements Listener {
if (GameWorld.get(player.getWorld()) != null || EditWorld.get(player.getWorld()) != null) {
if (event.getAction() != Action.LEFT_CLICK_BLOCK) {
if (clickedBlock.getType() == Material.ENDER_CHEST) {
if (!player.isOp()) {
if (!player.isOp()) {//TODO: Permission
p.msg(player, p.language.get("Error_Enderchest"));
event.setCancelled(true);
}
} else if (clickedBlock.getType() == Material.BED_BLOCK) {
if (!player.isOp()) {//TODO: Permission
p.msg(player, p.language.get("Error_Bed"));
event.setCancelled(true);
}
}
}
}