mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-14 14:45:31 +01:00
Fix #13
This commit is contained in:
parent
39179b1eec
commit
9fcdba3d1c
@ -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!");
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user