Uses translations for the confirmation call

This commit is contained in:
tastybento 2019-02-02 18:26:12 -08:00
parent ae9e030aae
commit 360cda5a1c
3 changed files with 6 additions and 6 deletions

View File

@ -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");
});

View File

@ -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();
}

View File

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