Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.command.server;
- import net.minecraft.command.CommandBase;
- import net.minecraft.command.CommandException;
- import net.minecraft.command.ICommandSender;
- import net.minecraft.entity.player.EntityPlayerMP;
- import net.minecraft.server.MinecraftServer;
- import net.minecraft.util.text.TextComponentTranslation;
- public class CommandLeaveServer extends CommandBase {
- public String getName()
- {
- return "l";
- }
- public String getUsage(ICommandSender sender)
- {
- return "command.usage.l";
- }
- public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException
- {
- EntityPlayerMP player = getCommandSenderAsPlayer(sender);
- player.connection.disconnect(new TextComponentTranslation("You've left the server."));
- }
- public boolean checkPermission(MinecraftServer server, ICommandSender sender) {
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement