Disable undo if fastmode

This commit is contained in:
Jesse Boyd
2019-04-06 00:53:00 +11:00
parent fd735a6f60
commit f7cdae5e56
2 changed files with 5 additions and 0 deletions

View File

@ -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;