mirror of
https://github.com/Maxlego08/zKoth.git
synced 2024-11-22 11:55:12 +01:00
📝 Add version command
This commit is contained in:
parent
5489150d3b
commit
326d18f298
@ -17,6 +17,7 @@ public class CommandKoth extends VCommand {
|
||||
this.addSubCommand(new CommandKothSpawn(plugin));
|
||||
this.addSubCommand(new CommandKothStop(plugin));
|
||||
this.addSubCommand(new CommandKothMove(plugin));
|
||||
this.addSubCommand(new CommandKothVersion(plugin));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -14,6 +14,7 @@ public class CommandKothAxe extends VCommand {
|
||||
this.setPermission(Permission.ZKOTH_AXE);
|
||||
this.addSubCommand("axe");
|
||||
this.setDescription(Message.DESCRIPTION_AXE);
|
||||
this.onlyPlayers();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -24,6 +24,7 @@ public class CommandKothCreate extends VCommand {
|
||||
this.addRequireArg("name");
|
||||
this.addOptionalArg("type", (a, b) -> Arrays.stream(KothType.values()).map(e -> e.name().toLowerCase()).collect(Collectors.toList()));
|
||||
this.addOptionalArg("capture/score", (a, b) -> Arrays.asList("10", "20", "30", "40", "50", "60"));
|
||||
this.onlyPlayers();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -0,0 +1,29 @@
|
||||
package fr.maxlego08.koth.command.commands;
|
||||
|
||||
import fr.maxlego08.koth.KothPlugin;
|
||||
import fr.maxlego08.koth.command.VCommand;
|
||||
import fr.maxlego08.koth.zcore.enums.Message;
|
||||
import fr.maxlego08.koth.zcore.enums.Permission;
|
||||
import fr.maxlego08.koth.zcore.utils.commands.CommandType;
|
||||
|
||||
public class CommandKothVersion extends VCommand {
|
||||
|
||||
public CommandKothVersion(KothPlugin plugin) {
|
||||
super(plugin);
|
||||
this.addSubCommand("version", "?", "v");
|
||||
this.setDescription(Message.DESCRIPTION_SPAWN);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandType perform(KothPlugin plugin) {
|
||||
|
||||
message(this.sender, "§aVersion du plugin§7: §2" + plugin.getDescription().getVersion());
|
||||
message(this.sender, "§aAuteur§7: §2Maxlego08");
|
||||
message(this.sender, "§aDiscord§7: §2http://discord.groupez.dev/");
|
||||
message(this.sender, "§aBuy it for §d8€§7: §2https://groupez.dev/resources/zKoth.9");
|
||||
message(this.sender, "§aSponsor§7: §chttps://serveur-minecraft-vote.fr/?ref=345");
|
||||
|
||||
return CommandType.SUCCESS;
|
||||
}
|
||||
|
||||
}
|
@ -46,6 +46,7 @@ public enum Message {
|
||||
DESCRIPTION_RELOAD("Reload configuration files"),
|
||||
DESCRIPTION_NOW("Spawn a koth without cooldown"),
|
||||
DESCRIPTION_SPAWN("Spawn a koth with cooldown"),
|
||||
DESCRIPTION_VERSION("Show plugin version"),
|
||||
DESCRIPTION_STOP("Stop a koth"),
|
||||
DESCRIPTION_MOVE("Move a koth"),
|
||||
DESCRIPTION_AXE("Getting the selection axe"),
|
||||
|
@ -16,6 +16,7 @@
|
||||
# /zkoth spawn <koth name> - zkoth.spawn - Spawn a koth
|
||||
# /zkoth stop <koth name> - zkoth.stop - Stop a koth
|
||||
# /zkoth move <koth name> - zkoth.stop - Move a koth
|
||||
# /zkoth version - no permission - Show plugin version
|
||||
#
|
||||
# Placeholders:
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user