mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-02 22:16:00 +00:00
prevent door from use when broken
This commit is contained in:
1 parent
12386ebe4b
commit
d139834169
2 files changed
+8
-5
No files matched your search
@@ -1,4 +1,4 @@
|
|||||||
#Minimum time in days a player must have joined ago to join any war or event.
|
#Minimum time in days a player must have joined ago to join any war or event.
|
||||||
minimumPlayerAge: 4
|
minimumPlayerAge: 4
|
||||||
#how long should a bettering ram open a door (in seconds)
|
#how long should a bettering ram open a door (in seconds)
|
||||||
batteringRamEffectiveness: 10
|
batteringRamEffectiveness: 600
|
||||||
@@ -89,12 +89,15 @@ public class PlayerInteractListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (brokenDoors.get(door) != null && brokenDoors.get(door) > System.currentTimeMillis()) {
|
|
||||||
player.sendMessage(Helper.chatLabel() + Helper.color("Door is broken! " + String.valueOf(System.currentTimeMillis()) + " " + brokenDoors.get(door)));
|
|
||||||
event.setCancelled(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (action == Action.RIGHT_CLICK_BLOCK && clicked.getType().toString().contains("DOOR")) {
|
||||||
|
Door door = (Door) clicked.getBlockData();
|
||||||
|
if (brokenDoors.get(door) != null && brokenDoors.get(door) > System.currentTimeMillis()) {
|
||||||
|
player.sendMessage(Helper.chatLabel() + Helper.color("Door is broken! " + String.valueOf(System.currentTimeMillis()) + " " + brokenDoors.get(door)));
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user