public class TridentConsole extends Object implements Console
Constructor and Description |
---|
TridentConsole() |
Modifier and Type | Method and Description |
---|---|
Player |
asPlayer()
Obtains this command issuer as a player
|
void |
grantPermission(String perm)
Offers the permission holder a permission which they can hold
|
void |
invokeCommand(String message)
Issues a command from this sender, forcing them to run it
|
String |
lastCommand()
Gets the last command executed by this CommandIssuer, without the preceding "/"
|
String |
lastMessage()
Gets the last message sent to this Messagable
|
boolean |
opped()
Checks if the permission holder has operator status
|
boolean |
ownsPermission(String perm)
Observes the holder to see if it holds the specified permission
|
void |
revokePermission(String perm)
Removes the permission tag from the holder such that the next invocation of
PermissionOwner.ownsPermission(String)
returns false |
void |
sendRaw(String... messages)
Send an array of messages to this recipient
|
public TridentConsole()
public void invokeCommand(String message)
CommandIssuer
invokeCommand
in interface CommandIssuer
public String lastCommand()
CommandIssuer
lastCommand
in interface CommandIssuer
public Player asPlayer()
CommandIssuer
asPlayer
in interface CommandIssuer
public void sendRaw(String... messages)
Messagable
sendRaw
in interface Messagable
messages
- String[] messages to be sentpublic String lastMessage()
Messagable
lastMessage
in interface Messagable
public void grantPermission(String perm)
PermissionOwner
This has no effect if the holder already has the given permission
grantPermission
in interface PermissionOwner
perm
- the new permission the holder should holdpublic void revokePermission(String perm)
PermissionOwner
PermissionOwner.ownsPermission(String)
returns false
revokePermission
in interface PermissionOwner
perm
- the permission to removepublic boolean ownsPermission(String perm)
PermissionOwner
ownsPermission
in interface PermissionOwner
perm
- the permission to check if heldtrue
if the permission is held, false
if it is notpublic boolean opped()
PermissionOwner
opped
in interface PermissionOwner
true
to indicate that the holder is an operatorCopyright © 2016. All rights reserved.