mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-09-11 21:45:26 -04:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user