Fix #976, check if world was unloaded in 1.14+

This commit is contained in:
sandtechnology committed 2021-05-30 13:49:39 +08:00
1 parent 85407ad92a
commit 2424fcce12
1 file changed
+2 -1
@@ -867,8 +867,9 @@ public class Util {
* @return true if the given location is loaded or not.
*/
public static boolean isLoaded(@NotNull Location loc) {
// plugin.getLogger().log(Level.WARNING, "Checking isLoaded(Location loc)");
if (loc.getWorld() == null) {
if ((!getNMSVersion().contains("1_13") && !loc.isWorldLoaded()) || loc.getWorld() == null) {
// plugin.getLogger().log(Level.WARNING, "Is not loaded. (No world)");
return false;
}