mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 20:16:19 +01:00
19 lines
808 B
Diff
19 lines
808 B
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Mon, 30 Apr 2018 19:27:31 -0400
|
|
Subject: [PATCH] Location.isChunkLoaded() API
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
|
|
index 85c342fc50f2fe0ce9a1b3980df9e088c3dea92d..251d26e6870490abd3e915c5e7c06ce1075a24ab 100644
|
|
--- a/src/main/java/org/bukkit/Location.java
|
|
+++ b/src/main/java/org/bukkit/Location.java
|
|
@@ -533,6 +533,7 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
|
|
return this;
|
|
}
|
|
|
|
+ public boolean isChunkLoaded() { return this.getWorld().isChunkLoaded(locToBlock(x) >> 4, locToBlock(z) >> 4); } // Paper
|
|
@Override
|
|
public boolean equals(Object obj) {
|
|
if (obj == null) {
|