2013-02-16 21:10:28 +01:00
|
|
|
package com.pahimar.ee3.command;
|
|
|
|
|
|
|
|
import net.minecraft.command.ICommandSender;
|
|
|
|
import net.minecraft.command.WrongUsageException;
|
|
|
|
|
2013-03-04 17:40:40 +01:00
|
|
|
import com.pahimar.ee3.core.helper.VersionHelper;
|
|
|
|
import com.pahimar.ee3.lib.Commands;
|
|
|
|
|
2013-02-16 21:10:28 +01:00
|
|
|
|
|
|
|
public class CommandVersion {
|
|
|
|
|
|
|
|
public static void processCommand(ICommandSender commandSender, String[] args) {
|
|
|
|
|
|
|
|
String subCommand;
|
|
|
|
|
|
|
|
if (args.length > 0) {
|
|
|
|
subCommand = args[0];
|
|
|
|
|
|
|
|
if (subCommand.toLowerCase().equals(Commands.COMMAND_VERSION)) {
|
|
|
|
processVersionCommand(commandSender);
|
|
|
|
}
|
|
|
|
else if (subCommand.toLowerCase().equals(Commands.COMMAND_CHANGELOG)) {
|
|
|
|
processChangelogCommand(commandSender);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
throw new WrongUsageException(Commands.COMMAND_VERSION_USAGE, new Object[0]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
throw new WrongUsageException(Commands.COMMAND_VERSION_USAGE, new Object[0]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private static void processVersionCommand(ICommandSender commandSender) {
|
|
|
|
|
|
|
|
commandSender.sendChatToPlayer(VersionHelper.getResultMessageForClient());
|
|
|
|
}
|
|
|
|
|
|
|
|
private static void processChangelogCommand(ICommandSender commandSender) {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|