Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Commit

Permalink
Fix mod command format (#531)
Browse files Browse the repository at this point in the history
The new format fits the /plugin command more
  • Loading branch information
LeStegii authored Mar 23, 2022
1 parent 5269561 commit a549e0d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public boolean execute(CommandSender sender, String commandLabel, String[] args)

switch (args[0].toLowerCase()) {
case "mods":
sender.sendMessage(ChatColor.GREEN + "" + ServerAPI.getModSize() + " " + ServerAPI.getModList());
sender.sendMessage(ChatColor.WHITE + "Mods (" + ServerAPI.getModSize() + "): "+ ChatColor.GREEN + ServerAPI.getModList().substring(1, ServerAPI.getModList().length() - 1));
break;
case "playermods":
if (args.length == 1) {
Expand All @@ -94,7 +94,7 @@ public boolean execute(CommandSender sender, String commandLabel, String[] args)

Player player = Bukkit.getPlayer(args[1].toString());
if (player != null) {
sender.sendMessage(ChatColor.GREEN + "" + PlayerAPI.getModSize(player) + " " + PlayerAPI.getModlist(player));
sender.sendMessage(ChatColor.WHITE + "Mods (" + PlayerAPI.getModSize(player) + "): "+ ChatColor.GREEN + PlayerAPI.getModlist(player).substring(1, PlayerAPI.getModlist(player).length() - 1));
} else {
sender.sendMessage(ChatColor.RED + "The player [" + args[1] + "] is not online.");
}
Expand Down

0 comments on commit a549e0d

Please sign in to comment.