diff --git a/src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteOtherCommand.java b/src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteOtherCommand.java index 7f95328..91d7680 100644 --- a/src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteOtherCommand.java +++ b/src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteOtherCommand.java @@ -44,12 +44,12 @@ public class DeleteOtherCommand extends IoMCommand @Override protected void run() throws CommandException { - if(args.length < 2) warning(I.t("Not enough parameters! Usage: /maptool deleteother ")); if(!playerSender().hasPermission("imageonmap.delete.other")) { warning(I.t("You do not have permission for this command. (imageonmap.delete.other)")); return; } - + if(args.length < 2) warning(I.t("Not enough parameters! Usage: /maptool deleteother ")); + Player player = null; UUID uuid = null; OfflinePlayer op = null; @@ -67,17 +67,16 @@ public class DeleteOtherCommand extends IoMCommand ImageMap map = MapManager.getMap(uuid, mapName); if(player != null) MapManager.clear(player.getInventory(), map); - //if(player == null) MapManager.clear(op.getPlayer().getInventory(), map); try { MapManager.deleteMap(map); - info(I.t("Map successfully deleted.")); + getPlayer().sendMessage(I.t("{gray}Map successfully deleted.")); } catch (MapManagerException ex) { - PluginLogger.warning("A non-existent map was requested to be deleted", ex); - warning(I.t("This map does not exist.")); + PluginLogger.warning(I.t("A non-existent map was requested to be deleted", ex)); + getPlayer().sendMessage(ChatColor.RED+(I.t("This map does not exist."))); } }