Minor code quality changes

Changed Lock to subclass ReentrantLock since that is the only subclass DelegateLock should be using. The lock should also never be null so I added an annotation in the constructor.
I also removed some code and replaced it with PaperLib code to just clean up things a little bit.
This commit is contained in:
MattBDev
2020-02-07 14:33:51 -05:00
parent 5feac07bf0
commit 0047f20d5d
5 changed files with 17 additions and 29 deletions

View File

@ -342,13 +342,7 @@ public class BukkitWorld extends AbstractWorld {
if (Fawe.isMainThread()) {
world.getChunkAt(X, Z);
} else if (!world.isChunkLoaded(X, Z)) {
if (PaperLib.isPaper()) {
world.getChunkAtAsync(X, Z, true);
} else {
Fawe.get().getQueueHandler().sync(() -> {
world.getChunkAt(X, Z);
});
}
PaperLib.getChunkAtAsync(world,X, Z, true);
}
}
}