From 12265521c84cdb8a62f91439250e5717ca99a24f Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Fri, 3 Aug 2018 11:55:44 +1000 Subject: [PATCH] Allow rollbacks of all users --- .../java/com/sk89q/worldedit/command/HistoryCommands.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/sk89q/worldedit/command/HistoryCommands.java b/core/src/main/java/com/sk89q/worldedit/command/HistoryCommands.java index d5cd0ccb..b10a0042 100644 --- a/core/src/main/java/com/sk89q/worldedit/command/HistoryCommands.java +++ b/core/src/main/java/com/sk89q/worldedit/command/HistoryCommands.java @@ -148,8 +148,8 @@ public class HistoryCommands extends MethodCommands { return; } } - UUID other = Fawe.imp().getUUID(user); - if (other == null) { + UUID other = user.equalsIgnoreCase("*") ? null : Fawe.imp().getUUID(user); + if (other == null && !user.equalsIgnoreCase("*")) { BBC.PLAYER_NOT_FOUND.send(player, user); return; } @@ -189,7 +189,8 @@ public class HistoryCommands extends MethodCommands { database.getPotentialEdits(other, System.currentTimeMillis() - timeDiff, bot, top, new RunnableVal() { @Override public void run(DiskStorageHistory edit) { - edit.undo(fp, allowedRegions); + if (restore) edit.redo(fp, allowedRegions); + else edit.undo(fp, allowedRegions); BBC.ROLLBACK_ELEMENT.send(player, Fawe.imp().getWorldName(edit.getWorld()) + "/" + user + "-" + edit.getIndex()); count.incrementAndGet(); }