Update Bukkit/src/main/java/com/plotsquared/bukkit/queue/BukkitQueueCoordinator.java

Co-authored-by: Hannes Greule <SirYwell@users.noreply.github.com>
This commit is contained in:
Alexander Brandes 2022-05-10 09:02:57 +02:00 committed by GitHub
parent 9f3507ea85
commit 6aa3f7c1b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -269,8 +269,8 @@ public class BukkitQueueCoordinator extends BasicQueueCoordinator {
BlockData blockData = BukkitAdapter.adapt(block);
Block existing;
// Assume a chunk object has been given only when it should have been.
if (getChunkObject() instanceof Chunk) {
existing = ((Chunk) getChunkObject()).getBlock(x & 15, y, z & 15);
if (getChunkObject() instanceof Chunk chunkObject) {
existing = chunkObject.getBlock(x & 15, y, z & 15);
} else {
existing = getBukkitWorld().getBlockAt(x, y, z);
}