From 3d924f22b587c2ed702a8574a546217475c5eaea Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sat, 3 Sep 2016 16:44:34 +1000 Subject: [PATCH] Different message when all queued changes fail --- .../src/main/java/com/sk89q/worldedit/EditSession.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/sk89q/worldedit/EditSession.java b/core/src/main/java/com/sk89q/worldedit/EditSession.java index b77a27f5..c2efbb70 100644 --- a/core/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/core/src/main/java/com/sk89q/worldedit/EditSession.java @@ -1124,9 +1124,13 @@ public class EditSession implements Extent { public void flushQueue() { Operations.completeBlindly(commit()); // Check fails - int fails = getLimitUsed().MAX_FAILS; - if (fails > 0) { - BBC.WORLDEDIT_SOME_FAILS.send(player, fails); + FaweLimit used = getLimitUsed(); + if (used.MAX_FAILS > 0) { + if (used.MAX_CHANGES > 0 || used.MAX_ENTITIES > 0) { + BBC.WORLDEDIT_SOME_FAILS.send(player, used.MAX_FAILS); + } else { + BBC.WORLDEDIT_CANCEL_REASON_MAX_FAILS.send(player); + } } // Enqueue it if (queue == null || queue.size() == 0) {