Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-24 18:10:08 +01:00
tweak undo message
Dieser Commit ist enthalten in:
Ursprung
1a12c065a1
Commit
888cbcedee
@ -90,9 +90,9 @@ public enum BBC {
|
||||
COMMAND_HISTORY_CLEAR("History cleared", "WorldEdit.History"),
|
||||
COMMAND_REDO_ERROR("Nothing left to redo. (See also `/inspect` and `/frb`)", "WorldEdit.History"),
|
||||
COMMAND_HISTORY_OTHER_ERROR("Unable to find session for %s0.", "WorldEdit.History"),
|
||||
COMMAND_REDO_SUCCESS("Redo successful.", "WorldEdit.History"),
|
||||
COMMAND_REDO_SUCCESS("Redo successful%s0.", "WorldEdit.History"),
|
||||
COMMAND_UNDO_ERROR("Nothing left to undo. (See also `/inspect` and `/frb`)", "WorldEdit.History"),
|
||||
COMMAND_UNDO_SUCCESS("Undo successful.", "WorldEdit.History"),
|
||||
COMMAND_UNDO_SUCCESS("Undo successful%s0.", "WorldEdit.History"),
|
||||
|
||||
OPERATION("Operation queued (%s0)", "WorldEdit.Operation"),
|
||||
|
||||
|
@ -226,8 +226,9 @@ public class HistoryCommands extends MethodCommands {
|
||||
public void undo(Player player, LocalSession session, CommandContext context) throws WorldEditException {
|
||||
int times = Math.max(1, context.getInteger(0, 1));
|
||||
FawePlayer.wrap(player).checkConfirmation(() -> {
|
||||
for (int i = 0; i < times; ++i) {
|
||||
EditSession undone;
|
||||
EditSession undone = null;
|
||||
int i = 0;
|
||||
for (; i < times; ++i) {
|
||||
if (context.argsLength() < 2) {
|
||||
undone = session.undo(session.getBlockBag(player), player);
|
||||
} else {
|
||||
@ -238,14 +239,16 @@ public class HistoryCommands extends MethodCommands {
|
||||
break;
|
||||
}
|
||||
undone = sess.undo(session.getBlockBag(player), player);
|
||||
if (undone == null) break;
|
||||
}
|
||||
if (undone != null) {
|
||||
BBC.COMMAND_UNDO_SUCCESS.send(player);
|
||||
worldEdit.flushBlockBag(player, undone);
|
||||
} else {
|
||||
BBC.COMMAND_UNDO_ERROR.send(player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (undone == null) i--;
|
||||
if (i > 0) {
|
||||
BBC.COMMAND_UNDO_SUCCESS.send(player, i == 1 ? "" : " x" + i);
|
||||
worldEdit.flushBlockBag(player, undone);
|
||||
}
|
||||
if (undone == null) {
|
||||
BBC.COMMAND_UNDO_ERROR.send(player);
|
||||
}
|
||||
}, getArguments(context), times, 50, context);
|
||||
}
|
||||
@ -262,8 +265,9 @@ public class HistoryCommands extends MethodCommands {
|
||||
|
||||
int times = Math.max(1, args.getInteger(0, 1));
|
||||
|
||||
for (int i = 0; i < times; ++i) {
|
||||
EditSession redone;
|
||||
EditSession redone = null;
|
||||
int i = 0;
|
||||
for (; i < times; ++i) {
|
||||
if (args.argsLength() < 2) {
|
||||
redone = session.redo(session.getBlockBag(player), player);
|
||||
} else {
|
||||
@ -274,13 +278,16 @@ public class HistoryCommands extends MethodCommands {
|
||||
break;
|
||||
}
|
||||
redone = sess.redo(session.getBlockBag(player), player);
|
||||
if (redone == null) break;
|
||||
}
|
||||
if (redone != null) {
|
||||
BBC.COMMAND_REDO_SUCCESS.send(player);
|
||||
worldEdit.flushBlockBag(player, redone);
|
||||
} else {
|
||||
BBC.COMMAND_REDO_ERROR.send(player);
|
||||
}
|
||||
}
|
||||
if (redone == null) i--;
|
||||
if (i > 0) {
|
||||
BBC.COMMAND_REDO_SUCCESS.send(player, i == 1 ? "" : " x" + i);
|
||||
worldEdit.flushBlockBag(player, redone);
|
||||
}
|
||||
if (redone == null) {
|
||||
BBC.COMMAND_REDO_ERROR.send(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren