Fixed the confirmation warning message showing twice in AdminRegisterCommand

It will now only be sent once, when asking for confirmation
This commit is contained in:
Florian CUNY 2020-05-01 14:21:25 +02:00
parent c29b376d3b
commit d45be091bd

View File

@ -102,8 +102,7 @@ public class AdminRegisterCommand extends ConfirmableCommand {
return true;
}).orElse(false)) {
// Island does not exist - this is a reservation
user.sendMessage("commands.admin.register.no-island-here");
this.askConfirmation(user, () -> {
this.askConfirmation(user, user.getTranslation("commands.admin.register.no-island-here"), () -> {
// Make island here
Island i = getIslands().createIsland(closestIsland, targetUUID);
if (i == null) {