From de0390c04623b903a3a8189fbf197d5102b6afd0 Mon Sep 17 00:00:00 2001 From: Vlammar Date: Sun, 7 Feb 2021 12:31:17 +0100 Subject: [PATCH] added usage parameters in command info --- .../moribus/imageonmap/commands/maptool/DeleteCommand.java | 2 +- .../moribus/imageonmap/commands/maptool/ExploreCommand.java | 2 +- .../fr/moribus/imageonmap/commands/maptool/GetCommand.java | 6 ++++-- .../fr/moribus/imageonmap/commands/maptool/GiveCommand.java | 2 +- .../fr/moribus/imageonmap/commands/maptool/ListCommand.java | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteCommand.java b/src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteCommand.java index 9136152..3c49c87 100644 --- a/src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteCommand.java +++ b/src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteCommand.java @@ -55,7 +55,7 @@ import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandInfo(name = "delete", usageParameters = " [--confirm]") +@CommandInfo(name = "delete", usageParameters = "[player name]: [--confirm]") @WithFlags({"confirm"}) public class DeleteCommand extends IoMCommand { diff --git a/src/main/java/fr/moribus/imageonmap/commands/maptool/ExploreCommand.java b/src/main/java/fr/moribus/imageonmap/commands/maptool/ExploreCommand.java index 007a14f..f57c2f7 100644 --- a/src/main/java/fr/moribus/imageonmap/commands/maptool/ExploreCommand.java +++ b/src/main/java/fr/moribus/imageonmap/commands/maptool/ExploreCommand.java @@ -52,7 +52,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandInfo(name = "explore") +@CommandInfo(name = "explore",usageParameters = "[player name]") public class ExploreCommand extends IoMCommand { @Override protected void run() throws CommandException { diff --git a/src/main/java/fr/moribus/imageonmap/commands/maptool/GetCommand.java b/src/main/java/fr/moribus/imageonmap/commands/maptool/GetCommand.java index 0127099..3486c3c 100644 --- a/src/main/java/fr/moribus/imageonmap/commands/maptool/GetCommand.java +++ b/src/main/java/fr/moribus/imageonmap/commands/maptool/GetCommand.java @@ -49,7 +49,7 @@ import java.util.List; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandInfo(name = "get") +@CommandInfo(name = "get",usageParameters = "[player name]:") public class GetCommand extends IoMCommand { @Override protected void run() throws CommandException { @@ -84,7 +84,9 @@ public class GetCommand extends IoMCommand { //TODO passer en static ImageOnMap.getPlugin().getCommandWorker().offlineNameFetch(playerName, uuid -> { - if (!sender.isOnline()) return; + if (!sender.isOnline()) { + return; + } if (uuid == null) { warning(sender, I.t("The player {0} does not exist.", playerName)); return; diff --git a/src/main/java/fr/moribus/imageonmap/commands/maptool/GiveCommand.java b/src/main/java/fr/moribus/imageonmap/commands/maptool/GiveCommand.java index fc95c10..1935a33 100644 --- a/src/main/java/fr/moribus/imageonmap/commands/maptool/GiveCommand.java +++ b/src/main/java/fr/moribus/imageonmap/commands/maptool/GiveCommand.java @@ -53,7 +53,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandInfo(name = "give", usageParameters = " [playerFrom]:") +@CommandInfo(name = "give", usageParameters = " [playerFrom]:") public class GiveCommand extends IoMCommand { @Override diff --git a/src/main/java/fr/moribus/imageonmap/commands/maptool/ListCommand.java b/src/main/java/fr/moribus/imageonmap/commands/maptool/ListCommand.java index d25277b..f64c11f 100644 --- a/src/main/java/fr/moribus/imageonmap/commands/maptool/ListCommand.java +++ b/src/main/java/fr/moribus/imageonmap/commands/maptool/ListCommand.java @@ -54,7 +54,7 @@ import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandInfo(name = "list") +@CommandInfo(name = "list", usageParameters = "[player name]") public class ListCommand extends IoMCommand { @Override protected void run() throws CommandException {