public class CommandSenderWrapper extends java.lang.Object implements ICommandSender
Constructor and Description |
---|
CommandSenderWrapper(ICommandSender delegateIn,
Vec3d positionVectorIn,
BlockPos positionIn,
java.lang.Integer permissionLevelIn,
Entity entityIn,
java.lang.Boolean sendCommandFeedbackIn) |
Modifier and Type | Method and Description |
---|---|
boolean |
canUseCommand(int permLevel,
java.lang.String commandName) |
CommandSenderWrapper |
computePositionVector() |
static CommandSenderWrapper |
create(ICommandSender sender) |
Entity |
getCommandSenderEntity() |
ITextComponent |
getDisplayName() |
World |
getEntityWorld() |
java.lang.String |
getName() |
BlockPos |
getPosition() |
Vec3d |
getPositionVector() |
MinecraftServer |
getServer() |
boolean |
sendCommandFeedback() |
void |
sendMessage(ITextComponent component) |
void |
setCommandStat(CommandResultStats.Type type,
int amount) |
CommandSenderWrapper |
withEntity(Entity entityIn,
Vec3d p_193997_2_) |
CommandSenderWrapper |
withPermissionLevel(int level) |
CommandSenderWrapper |
withSendCommandFeedback(boolean sendCommandFeedbackIn) |
public CommandSenderWrapper(ICommandSender delegateIn, @Nullable Vec3d positionVectorIn, @Nullable BlockPos positionIn, @Nullable java.lang.Integer permissionLevelIn, @Nullable Entity entityIn, @Nullable java.lang.Boolean sendCommandFeedbackIn)
public static CommandSenderWrapper create(ICommandSender sender)
public CommandSenderWrapper withEntity(Entity entityIn, Vec3d p_193997_2_)
public CommandSenderWrapper withPermissionLevel(int level)
public CommandSenderWrapper withSendCommandFeedback(boolean sendCommandFeedbackIn)
public CommandSenderWrapper computePositionVector()
public java.lang.String getName()
getName
in interface ICommandSender
public ITextComponent getDisplayName()
getDisplayName
in interface ICommandSender
public void sendMessage(ITextComponent component)
sendMessage
in interface ICommandSender
public boolean canUseCommand(int permLevel, java.lang.String commandName)
canUseCommand
in interface ICommandSender
public BlockPos getPosition()
getPosition
in interface ICommandSender
public Vec3d getPositionVector()
getPositionVector
in interface ICommandSender
public World getEntityWorld()
getEntityWorld
in interface ICommandSender
@Nullable public Entity getCommandSenderEntity()
getCommandSenderEntity
in interface ICommandSender
public boolean sendCommandFeedback()
sendCommandFeedback
in interface ICommandSender
public void setCommandStat(CommandResultStats.Type type, int amount)
setCommandStat
in interface ICommandSender
@Nullable public MinecraftServer getServer()
getServer
in interface ICommandSender