Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-07 20:10:06 +01:00
Disable undo if fastmode
Dieser Commit ist enthalten in:
Ursprung
fd735a6f60
Commit
f7cdae5e56
@ -93,6 +93,7 @@ public enum BBC {
|
||||
COMMAND_HISTORY_OTHER_ERROR("Unable to find session for %s0.", "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_DISABLED("Undo disabled, use: //fast", "WorldEdit.History"),
|
||||
COMMAND_UNDO_SUCCESS("Undo successful%s0.", "WorldEdit.History"),
|
||||
|
||||
OPERATION("Operation queued (%s0)", "WorldEdit.Operation"),
|
||||
|
@ -227,6 +227,10 @@ public class HistoryCommands extends MethodCommands {
|
||||
)
|
||||
@CommandPermissions("worldedit.history.undo")
|
||||
public void undo(Player player, LocalSession session, CommandContext context) throws WorldEditException {
|
||||
if (session.hasFastMode()) {
|
||||
BBC.COMMAND_UNDO_DISABLED.send(player);
|
||||
return;
|
||||
}
|
||||
int times = Math.max(1, context.getInteger(0, 1));
|
||||
FawePlayer.wrap(player).checkConfirmation(() -> {
|
||||
EditSession undone = null;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren