Cyclops (WIP) DO NOT PULL YET

- 10 tokens to enter the room, if they do not have the tokens then do not let them in and send a message.
This commit is contained in:
Badhad
2021-04-05 14:04:07 -04:00
parent f2636c95db
commit 9f44c02245
@@ -188,8 +188,13 @@ public final class CyclopesRoom extends MapZone implements Plugin<Object> {
* @param player The player.
*/
private static void enter(Player player) {
if (!PLAYERS.contains(player)) {
Item tokens = new Item(8851, 10);
if (!PLAYERS.contains(player) && player.getInventory().contains(8851, 10)) {
player.getInventory().remove(tokens);
player.getPacketDispatch().sendMessage("10 of your tokens crumble away as you enter the room.");
PLAYERS.add(player);
}else{
player.getPacketDispatch().sendMessage("You do not have the tokens to enter.");
}
if (!PULSE.isRunning()) {
PULSE.restart();