Fix NPE when no border is set in WorldBorder

This commit is contained in:
Phoenix616 2022-01-14 16:21:42 +01:00
parent 6098947fbb
commit 3ecf194913
No known key found for this signature in database
GPG Key ID: 40E2321E71738EB0

View File

@ -47,7 +47,7 @@ public class WorldBorderHook implements WorldborderHook {
@Override
public boolean isInsideBorder(Location location) {
BorderData data = plugin.getWorldBorder(location.getWorld().getName());
return data.insideBorder(location);
return data == null || data.insideBorder(location);
}
@Override