Last active
July 16, 2017 16:38
-
-
Save JamiesWhiteShirt/c82699be330151414e0b6b6cb1f01c98 to your computer and use it in GitHub Desktop.
Incorrect command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CommandPing extends CommandBase { | |
@Override | |
public String getCommandName() { | |
return "ping"; | |
} | |
@Override | |
public String getCommandUsage(ICommandSender sender) { | |
return "/ping <something>"; | |
} | |
@Override | |
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { | |
if (args.length == 1) { | |
sender.addChatMessage(new TextComponentString(I18n.translateToLocal("commands.ping.success"))); | |
} else { | |
throw new WrongUsageException(this.getCommandUsage(sender)); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commands.ping.success=The server says pong |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commands.ping.success=El servidor dice pong |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment