Permalink
Browse files

Fix crashing the server....

  • Loading branch information...
kenzierocks committed Jul 3, 2016
1 parent b147772 commit 82321f2525606790054dd37a4516b457386c0058
@@ -78,6 +78,9 @@ public boolean isEnabled() {
*/
public void setEnabled(boolean enabled) {
this.enabled = enabled;
if (!enabled) {
this.chunkChanges.clear();
}
}
@Override
@@ -98,6 +101,9 @@ protected Operation commitBefore() {
@Override
public Operation resume(RunContext run) throws WorldEditException {
if (chunkChanges.isEmpty()) {
return null;
}
BlockVector2D minimumChunk = chunkLocation(getMinimumPoint());
BlockVector2D maximumChunk = chunkLocation(getMaximumPoint());
for (int z = minimumChunk.getBlockZ(); z < maximumChunk.getBlockZ(); z++) {
@@ -109,6 +115,7 @@ public Operation resume(RunContext run) throws WorldEditException {
}
}
}
chunkChanges.clear();
return null;
}

0 comments on commit 82321f2

Please sign in to comment.