public abstract class CommandBlockBaseLogic extends java.lang.Object implements ICommandSender
| Constructor and Description |
|---|
CommandBlockBaseLogic() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canUseCommand(int permLevel,
java.lang.String commandName)
Returns
true if the CommandSender is allowed to execute the command, false if not |
abstract void |
fillInInfo(ByteBuf buf)
Fills in information about the command block for the packet.
|
java.lang.String |
getCommand()
Returns the command of the command block.
|
abstract int |
getCommandBlockType()
Currently this returns 0 for the traditional command block, and 1 for the minecart command block
|
CommandResultStats |
getCommandResultStats() |
ITextComponent |
getLastOutput()
Returns the lastOutput.
|
java.lang.String |
getName()
Get the name of this object.
|
int |
getSuccessCount()
returns the successCount int.
|
void |
readDataFromNBT(NBTTagCompound nbt)
Reads NBT formatting and stored data into variables.
|
boolean |
sendCommandFeedback()
Returns true if the command sender should be sent feedback about executed commands
|
void |
sendMessage(ITextComponent component)
Send a chat message to the CommandSender
|
void |
setCommand(java.lang.String command)
Sets the command.
|
void |
setCommandStat(CommandResultStats.Type type,
int amount) |
void |
setLastOutput(ITextComponent lastOutputMessage) |
void |
setName(java.lang.String name) |
void |
setSuccessCount(int successCountIn) |
void |
setTrackOutput(boolean shouldTrackOutput) |
boolean |
shouldTrackOutput() |
boolean |
trigger(World worldIn) |
boolean |
tryOpenEditCommandBlock(EntityPlayer playerIn) |
abstract void |
updateCommand() |
NBTTagCompound |
writeToNBT(NBTTagCompound p_189510_1_) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCommandSenderEntity, getDisplayName, getEntityWorld, getPosition, getPositionVector, getServerpublic int getSuccessCount()
public void setSuccessCount(int successCountIn)
public ITextComponent getLastOutput()
public NBTTagCompound writeToNBT(NBTTagCompound p_189510_1_)
public void readDataFromNBT(NBTTagCompound nbt)
public boolean canUseCommand(int permLevel,
java.lang.String commandName)
true if the CommandSender is allowed to execute the command, false if notcanUseCommand in interface ICommandSenderpublic void setCommand(java.lang.String command)
public java.lang.String getCommand()
public boolean trigger(World worldIn)
public java.lang.String getName()
getName in interface ICommandSenderpublic void setName(java.lang.String name)
public void sendMessage(ITextComponent component)
sendMessage in interface ICommandSenderpublic boolean sendCommandFeedback()
sendCommandFeedback in interface ICommandSenderpublic void setCommandStat(CommandResultStats.Type type, int amount)
setCommandStat in interface ICommandSenderpublic abstract void updateCommand()
public abstract int getCommandBlockType()
public abstract void fillInInfo(ByteBuf buf)
public void setLastOutput(ITextComponent lastOutputMessage)
public void setTrackOutput(boolean shouldTrackOutput)
public boolean shouldTrackOutput()
public boolean tryOpenEditCommandBlock(EntityPlayer playerIn)
public CommandResultStats getCommandResultStats()