From ca14ca00c11751d46eba5289c0c2de7cc2ca0a98 Mon Sep 17 00:00:00 2001 From: wallaceg09 Date: Mon, 6 Apr 2015 11:57:14 -0500 Subject: [PATCH] Adds a quick hack to prevent admin commands from being useable by non-admins. Certain Admin commands aren't based on godmode, but require an 'admin' ability. Abilities don't seem to be implemented yet. --- src/services/commands/CommandService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/commands/CommandService.java b/src/services/commands/CommandService.java index 7dcaad521..a92d34f9e 100644 --- a/src/services/commands/CommandService.java +++ b/src/services/commands/CommandService.java @@ -69,7 +69,7 @@ public class CommandService extends Service { if (player.getCreatureObject() == null) return; - if (command.getGodLevel() > 0 && player.getAccessLevel() == AccessLevel.PLAYER) + if ((command.getGodLevel() > 0 || command.getCharacterAbility().toLowerCase().equals("admin"))&& player.getAccessLevel() == AccessLevel.PLAYER)//HACK @Glen characterAbility check should be handled in the "has ability" TODO below. Not sure if abilities are implemented yet. return; // TODO: Check if the player has the ability