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:
Benjamin Elsdon
2022-04-19 18:17:19 +08:00
parent 2d43ae8166
commit 5cea728eb7
5 changed files with 202 additions and 51 deletions

View File

@@ -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);