Added missing if statement to NoDesync

This commit is contained in:
noil 2020-12-01 20:47:49 -05:00
parent ad61fbc157
commit 3057d6cfb8
1 changed files with 9 additions and 7 deletions

View File

@ -73,13 +73,15 @@ public final class NoDesyncModule extends Module {
@Listener
public void onDestroyBlock(EventDestroyBlock event) {
this.pos = event.getPos();
if (this.destroy) {
event.setCanceled(false);
this.destroy = false;
this.pos = null;
} else {
event.setCanceled(true);
if (this.destroyedBlocks.getValue()) {
this.pos = event.getPos();
if (this.destroy) {
event.setCanceled(false);
this.destroy = false;
this.pos = null;
} else {
event.setCanceled(true);
}
}
}
}