2021-02-16 21:58:31 +01:00
|
|
|
package net.knarcraft.stargate.command;
|
|
|
|
|
|
|
|
import net.knarcraft.stargate.Stargate;
|
|
|
|
import org.bukkit.ChatColor;
|
|
|
|
import org.bukkit.command.Command;
|
|
|
|
import org.bukkit.command.CommandExecutor;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This command represents any command which starts with stargate
|
|
|
|
*
|
|
|
|
* <p>This prefix command should only be used for commands which are certain to collide with others and which relate to
|
|
|
|
* the plugin itself, not commands for functions of the plugin.</p>
|
|
|
|
*/
|
|
|
|
public class CommandStarGate implements CommandExecutor {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s,
|
2021-09-20 13:46:20 +02:00
|
|
|
@NotNull String[] args) {
|
|
|
|
if (args.length > 0) {
|
|
|
|
if (args[0].equalsIgnoreCase("about")) {
|
|
|
|
return new CommandAbout().onCommand(commandSender, command, s, args);
|
|
|
|
} else if (args[0].equalsIgnoreCase("reload")) {
|
2021-10-23 18:34:31 +02:00
|
|
|
return new CommandReload().onCommand(commandSender, command, s, args);
|
2021-02-16 21:58:31 +01:00
|
|
|
}
|
|
|
|
return false;
|
|
|
|
} else {
|
2021-10-11 20:16:36 +02:00
|
|
|
commandSender.sendMessage(ChatColor.GOLD + "Stargate version " +
|
|
|
|
ChatColor.GREEN + Stargate.getPluginVersion());
|
2021-02-16 21:58:31 +01:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|