diff --git a/src/main/java/fr/moribus/imageonmap/commands/IoMCommand.java b/src/main/java/fr/moribus/imageonmap/commands/IoMCommand.java index b4c790a..9623b98 100644 --- a/src/main/java/fr/moribus/imageonmap/commands/IoMCommand.java +++ b/src/main/java/fr/moribus/imageonmap/commands/IoMCommand.java @@ -53,7 +53,7 @@ import org.bukkit.entity.Player; public abstract class IoMCommand extends Command { - protected void consumePlayerCommand(String arg, Consumer consumer) { + protected void retrieveUUID(String arg, Consumer consumer) { UUID uuid; OfflinePlayer offlinePlayer; 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 e94c231..1ea4e59 100644 --- a/src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteCommand.java +++ b/src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteCommand.java @@ -101,7 +101,7 @@ public class DeleteCommand extends IoMCommand { mapName = arguments.get(0); } - consumePlayerCommand(playerName, uuid -> { + retrieveUUID(playerName, uuid -> { ImageMap map = MapManager.getMap(uuid, mapName); if (map == null) { 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 1e9958b..ae05a3d 100644 --- a/src/main/java/fr/moribus/imageonmap/commands/maptool/ExploreCommand.java +++ b/src/main/java/fr/moribus/imageonmap/commands/maptool/ExploreCommand.java @@ -74,7 +74,7 @@ public class ExploreCommand extends IoMCommand { playerName = sender.getName(); } - consumePlayerCommand(playerName, uuid -> { + retrieveUUID(playerName, uuid -> { OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(uuid); if (sender.isOnline()) { 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 c00fcfe..e527a31 100644 --- a/src/main/java/fr/moribus/imageonmap/commands/maptool/GetCommand.java +++ b/src/main/java/fr/moribus/imageonmap/commands/maptool/GetCommand.java @@ -83,7 +83,7 @@ public class GetCommand extends IoMCommand { - consumePlayerCommand(playerName, uuid -> { + retrieveUUID(playerName, uuid -> { if (!sender.isOnline()) { 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 a57f9f8..2751ab2 100644 --- a/src/main/java/fr/moribus/imageonmap/commands/maptool/GiveCommand.java +++ b/src/main/java/fr/moribus/imageonmap/commands/maptool/GiveCommand.java @@ -102,7 +102,7 @@ public class GiveCommand extends IoMCommand { final Player sender = playerSender(); - consumePlayerCommand(from, uuid -> { + retrieveUUID(from, uuid -> { final ImageMap map = MapManager.getMap(uuid, mapName); if (map == null) { @@ -110,7 +110,7 @@ public class GiveCommand extends IoMCommand { return; } - consumePlayerCommand(playerName, uuid2 -> { + retrieveUUID(playerName, uuid2 -> { if (Bukkit.getPlayer((uuid2)) != null && Bukkit.getPlayer((uuid2)).isOnline() && map.give(Bukkit.getPlayer(uuid2))) { info(I.t("The requested map was too big to fit in your inventory.")); 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 0a65f1b..b1fdc33 100644 --- a/src/main/java/fr/moribus/imageonmap/commands/maptool/ListCommand.java +++ b/src/main/java/fr/moribus/imageonmap/commands/maptool/ListCommand.java @@ -78,7 +78,7 @@ public class ListCommand extends IoMCommand { final Player sender = playerSender(); - consumePlayerCommand(playerName, uuid -> { + retrieveUUID(playerName, uuid -> { List mapList = MapManager.getMapList(uuid); if (mapList.isEmpty()) { info(sender, I.t("No map found.")); diff --git a/src/main/java/fr/moribus/imageonmap/commands/maptool/UpdateCommand.java b/src/main/java/fr/moribus/imageonmap/commands/maptool/UpdateCommand.java index 8ed8adf..dc3baa3 100644 --- a/src/main/java/fr/moribus/imageonmap/commands/maptool/UpdateCommand.java +++ b/src/main/java/fr/moribus/imageonmap/commands/maptool/UpdateCommand.java @@ -156,7 +156,7 @@ public class UpdateCommand extends IoMCommand { //TODO passer en static //ImageOnMap.getPlugin().getCommandWorker().offlineNameFetch(playerName, uuid -> { - consumePlayerCommand(playerName, uuid -> { + retrieveUUID(playerName, uuid -> { ImageMap map = MapManager.getMap(uuid, mapName);