mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-07 00:48:34 +01:00
Uses translations for the confirmation call
This commit is contained in:
parent
ae9e030aae
commit
360cda5a1c
@ -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");
|
||||
});
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user