From 360cda5a1c41e44da74f6d639aa8f43f5a465d2c Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 2 Feb 2019 18:26:12 -0800 Subject: [PATCH] Uses translations for the confirmation call --- .../bentobox/api/commands/admin/AdminSetspawnCommand.java | 8 ++++---- .../api/commands/island/IslandSethomeCommand.java | 2 +- .../island/team/IslandTeamInviteAcceptCommand.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/world/bentobox/bentobox/api/commands/admin/AdminSetspawnCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/admin/AdminSetspawnCommand.java index ff0c34bfa..62001dd5a 100644 --- a/src/main/java/world/bentobox/bentobox/api/commands/admin/AdminSetspawnCommand.java +++ b/src/main/java/world/bentobox/bentobox/api/commands/admin/AdminSetspawnCommand.java @@ -1,13 +1,13 @@ package world.bentobox.bentobox.api.commands.admin; +import java.util.List; +import java.util.Optional; + import world.bentobox.bentobox.api.commands.CompositeCommand; import world.bentobox.bentobox.api.commands.ConfirmableCommand; import world.bentobox.bentobox.api.user.User; import world.bentobox.bentobox.database.objects.Island; -import java.util.List; -import java.util.Optional; - /** * Admin command (only player) to set an island as the world's spawn. * @author Poslovitch @@ -38,7 +38,7 @@ public class AdminSetspawnCommand extends ConfirmableCommand { } // Everything's fine, we can set the island as spawn :) - askConfirmation(user, "commands.admin.setspawn.confirmation", () -> { + askConfirmation(user, user.getTranslation("commands.admin.setspawn.confirmation"), () -> { getIslands().setSpawn(island.get()); user.sendMessage("general.success"); }); diff --git a/src/main/java/world/bentobox/bentobox/api/commands/island/IslandSethomeCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/island/IslandSethomeCommand.java index bbfb70152..2db403e3a 100644 --- a/src/main/java/world/bentobox/bentobox/api/commands/island/IslandSethomeCommand.java +++ b/src/main/java/world/bentobox/bentobox/api/commands/island/IslandSethomeCommand.java @@ -92,7 +92,7 @@ public class IslandSethomeCommand extends ConfirmableCommand { // Check if a confirmation is required if (getIWM().getWorldSettings(user.getLocation().getWorld()).isRequireConfirmationToSetHomeInTheEnd()) { - askConfirmation(user, "commands.island.sethome.the-end.confirmation", setHomeRunnable); + askConfirmation(user, user.getTranslation("commands.island.sethome.the-end.confirmation"), setHomeRunnable); } else { setHomeRunnable.run(); } diff --git a/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamInviteAcceptCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamInviteAcceptCommand.java index 99a258fe3..3816c01ab 100644 --- a/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamInviteAcceptCommand.java +++ b/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamInviteAcceptCommand.java @@ -64,7 +64,7 @@ public class IslandTeamInviteAcceptCommand extends ConfirmableCommand { return true; } - askConfirmation(user, "commands.island.team.invite.accept.confirmation", () -> { + askConfirmation(user, user.getTranslation("commands.island.team.invite.accept.confirmation"), () -> { // Remove the invite itc.getInviteCommand().getInviteList().remove(playerUUID); // Put player into Spectator mode