Fix NPE when setting the protection center

This commit is contained in:
tastybento 2024-08-20 21:58:12 -07:00
parent 09c9e9348b
commit fdbb2480b4

View File

@ -1747,7 +1747,7 @@ public class Island implements DataObject, MetaDataAble {
* @since 1.16.0
*/
public void setProtectionCenter(Location location) throws IOException {
if (this.location.equals(location)) {
if (this.getProtectionCenter().equals(location)) {
return; // nothing to do
}
if (!this.inIslandSpace(location)) {