added usage parameters in command info

This commit is contained in:
Vlammar 2021-02-07 12:31:17 +01:00
parent 3c3ca165db
commit de0390c046
5 changed files with 8 additions and 6 deletions

View File

@ -55,7 +55,7 @@ import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandInfo(name = "delete", usageParameters = "<map name> [--confirm]")
@CommandInfo(name = "delete", usageParameters = "[player name]:<map name> [--confirm]")
@WithFlags({"confirm"})
public class DeleteCommand extends IoMCommand {

View File

@ -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 {

View File

@ -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]:<map 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;

View File

@ -53,7 +53,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandInfo(name = "give", usageParameters = "<playername> [playerFrom]:<mapname>")
@CommandInfo(name = "give", usageParameters = "<player name> [playerFrom]:<map name>")
public class GiveCommand extends IoMCommand {
@Override

View File

@ -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 {