Different message when all queued changes fail

This commit is contained in:
Jesse Boyd 2016-09-03 16:44:34 +10:00
parent 101b01cae9
commit 3d924f22b5

View File

@ -1124,9 +1124,13 @@ public class EditSession implements Extent {
public void flushQueue() { public void flushQueue() {
Operations.completeBlindly(commit()); Operations.completeBlindly(commit());
// Check fails // Check fails
int fails = getLimitUsed().MAX_FAILS; FaweLimit used = getLimitUsed();
if (fails > 0) { if (used.MAX_FAILS > 0) {
BBC.WORLDEDIT_SOME_FAILS.send(player, fails); 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 // Enqueue it
if (queue == null || queue.size() == 0) { if (queue == null || queue.size() == 0) {