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.
This commit is contained in:
wallaceg09
2015-04-06 11:57:14 -05:00
parent 79cc2c0b77
commit ca14ca00c1
+1 -1
View File
@@ -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