public class PermissionsChecker extends Object
Constructor and Description |
---|
PermissionsChecker() |
Modifier and Type | Method and Description |
---|---|
boolean |
has(Sender sender,
String perm,
boolean msg)
Checks if a user (no console) has a specific permission (globally).
|
boolean |
hasOnServer(Sender sender,
String perm,
boolean msg)
Checks if a user (no console) has a specific permission on the current server.
|
boolean |
hasOnServerInWorld(Sender sender,
String perm,
boolean msg)
Checks if a user (no console) has a specific permission on the current server and in the current world.
|
boolean |
hasOrConsole(Sender sender,
String perm,
boolean msg)
Checks if a user (or console) has a specific permission (globally).
|
boolean |
hasOrConsoleOnServer(Sender sender,
String perm,
boolean msg)
Checks if a user (or console) has a specific permission on the current server.
|
boolean |
hasOrConsoleOnServerInWorld(Sender sender,
String perm,
boolean msg)
Checks if a user (or console) has a specific permission on the current server and in the current world.
|
boolean |
hasPerm(Sender sender,
String permission)
Checks if a user (no console) has a specific permission (globally).
|
boolean |
hasPerm(String sender,
String permission)
Checks if a user (no console) has a specific permission (globally).
|
boolean |
hasPermOnServer(Sender sender,
String permission)
Checks if a user (no console) has a specific permission.
|
boolean |
hasPermOnServer(String sender,
String permission,
String server)
Checks if a user (no console) has a specific permission on the given server.
|
boolean |
hasPermOnServerInWorld(Sender sender,
String permission)
Checks if a user (no console) has a specific permission.
|
boolean |
hasPermOnServerInWorld(String sender,
String permission,
String server,
String world)
Checks if a user (no console) has a specific permission on the given server and in the given world.
|
boolean |
hasPermOrConsole(Sender sender,
String permission)
Checks if a user (or console) has a specific permission (globally).
|
boolean |
hasPermOrConsoleOnServer(Sender sender,
String permission)
Checks if a user (or console) has a specific permission.
|
boolean |
hasPermOrConsoleOnServerInWorld(Sender sender,
String permission)
Checks if a user (or console) has a specific permission.
|
protected PermissionsManager |
pm() |
public boolean hasPerm(String sender, String permission)
sender
- the command sender to check a permission forpermission
- the permission to checkpublic boolean hasPermOnServer(String sender, String permission, String server)
sender
- the command sender to check a permission forpermission
- the permission to checkserver
- the server for additional permissionspublic boolean hasPermOnServerInWorld(String sender, String permission, String server, String world)
sender
- the command sender to check a permission forpermission
- the permission to checkserver
- the server for additional permissionsworld
- the world for additional permissionspublic boolean hasPerm(Sender sender, String permission)
sender
- the command sender to check a permission forpermission
- the permission to checkpublic boolean hasPermOrConsole(Sender sender, String permission)
sender
- the command sender to check a permission forpermission
- the permission to checkpublic boolean hasPermOnServer(Sender sender, String permission)
sender
- the command sender to check a permission forpermission
- the permission to checkpublic boolean hasPermOrConsoleOnServer(Sender sender, String permission)
sender
- the command sender to check a permission forpermission
- the permission to checkpublic boolean hasPermOnServerInWorld(Sender sender, String permission)
sender
- the command sender to check a permission forpermission
- the permission to checkpublic boolean hasPermOrConsoleOnServerInWorld(Sender sender, String permission)
sender
- the command sender to check a permission forpermission
- the permission to checkpublic boolean has(Sender sender, String perm, boolean msg)
sender
- the command sender to check a permission forperm
- the permission to checkmsg
- if a no-permission message is send to the senderpublic boolean hasOrConsole(Sender sender, String perm, boolean msg)
sender
- the command sender to check a permission forperm
- the permission to checkmsg
- if a no-permission message is send to the senderpublic boolean hasOnServer(Sender sender, String perm, boolean msg)
sender
- the command sender to check a permission forperm
- the permission to checkmsg
- if a no-permission message is send to the senderpublic boolean hasOrConsoleOnServer(Sender sender, String perm, boolean msg)
sender
- the command sender to check a permission forperm
- the permission to checkmsg
- if a no-permission message is send to the senderpublic boolean hasOnServerInWorld(Sender sender, String perm, boolean msg)
sender
- the command sender to check a permission forperm
- the permission to checkmsg
- if a no-permission message is send to the senderpublic boolean hasOrConsoleOnServerInWorld(Sender sender, String perm, boolean msg)
sender
- the command sender to check a permission forperm
- the permission to checkmsg
- if a no-permission message is send to the senderprotected PermissionsManager pm()
Copyright © 2019. All rights reserved.