mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 02:55:47 +01:00
4e958e229f
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: zml <zml@stellardrift.ca> Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
19 lines
799 B
Diff
19 lines
799 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 0939a8070f9cc4f66f1679fef74862debb7d32ae..6c8b8eddcdb81f7151202eb12541308040790d45 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 {
|
|
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) {
|