public class RConConsoleSource extends java.lang.Object implements ICommandSender
| Modifier and Type | Field and Description |
|---|---|
private java.lang.StringBuffer |
buffer
RCon string buffer for log.
|
private static RConConsoleSource |
instance
Single instance of RConConsoleSource
|
| Constructor and Description |
|---|
RConConsoleSource() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChatMessage(IChatComponent component)
Send a chat message to the CommandSender
|
boolean |
canCommandSenderUseCommand(int permLevel,
java.lang.String commandName)
Returns
true if the CommandSender is allowed to execute the command, false if not |
Entity |
getCommandSenderEntity()
Returns the entity associated with the command sender.
|
IChatComponent |
getDisplayName()
Get the formatted ChatComponent that will be used for the sender's username in chat
|
World |
getEntityWorld()
Get the world, if available.
|
java.lang.String |
getName()
Gets the name of this command sender (usually username, but possibly "Rcon")
|
BlockPos |
getPosition()
Get the position in the world.
|
Vec3 |
getPositionVector()
Get the position vector.
|
boolean |
sendCommandFeedback()
Returns true if the command sender should be sent feedback about executed commands
|
void |
setCommandStat(CommandResultStats.Type type,
int amount) |
private static final RConConsoleSource instance
private java.lang.StringBuffer buffer
public java.lang.String getName()
getName in interface ICommandSenderpublic IChatComponent getDisplayName()
getDisplayName in interface ICommandSenderpublic void addChatMessage(IChatComponent component)
addChatMessage in interface ICommandSenderpublic boolean canCommandSenderUseCommand(int permLevel,
java.lang.String commandName)
true if the CommandSender is allowed to execute the command, false if notcanCommandSenderUseCommand in interface ICommandSenderpublic BlockPos getPosition()
null is not allowed! If you are not an entity in the world, return
the coordinates 0, 0, 0getPosition in interface ICommandSenderpublic Vec3 getPositionVector()
null is not allowed! If you are not an entity in the world, return 0.0D,
0.0D, 0.0DgetPositionVector in interface ICommandSenderpublic World getEntityWorld()
null is not allowed! If you are not an entity in the world, return
the overworldgetEntityWorld in interface ICommandSenderpublic Entity getCommandSenderEntity()
getCommandSenderEntity in interface ICommandSenderpublic boolean sendCommandFeedback()
sendCommandFeedback in interface ICommandSenderpublic void setCommandStat(CommandResultStats.Type type, int amount)
setCommandStat in interface ICommandSender