use of net.dyeo.teleporter.capabilities.ITeleportHandler in project VanillaTeleporter by dyeo.
the class CommandTeleportReset method execute.
@Override
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException {
EntityPlayerMP entity = getCommandSenderAsPlayer(sender);
if (entity.hasCapability(CapabilityTeleportHandler.TELEPORT_CAPABILITY, null)) {
ITeleportHandler handler = ((ITeleportHandler) entity.getCapability(CapabilityTeleportHandler.TELEPORT_CAPABILITY, null));
handler.setOnTeleporter(false);
handler.setTeleportStatus(EnumTeleportStatus.INACTIVE);
}
}
Aggregations