mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-15 16:34:56 +01:00
Admin cmds, perms and descriptions for all cmds +
Additonal stuff: Fixed + refactored help command. Removed 'Usage: ' from all commands. Created 'player.hasPermission(permission)' function. Created default for Usage annotation. Created hashmap version of 'getHandlers' and renamed the original to getHandlersAsList()
This commit is contained in:
@@ -105,6 +105,10 @@ public class Account {
|
||||
if(this.permissions.contains(permission)) return false;
|
||||
this.permissions.add(permission); return true;
|
||||
}
|
||||
|
||||
public boolean hasPermission(String permission) {
|
||||
return this.permissions.contains(permission) || this.permissions.contains("*") ? true : false;
|
||||
}
|
||||
|
||||
public boolean removePermission(String permission) {
|
||||
return this.permissions.remove(permission);
|
||||
|
||||
Reference in New Issue
Block a user