Optimised Kingdoms

This commit is contained in:
Auxilor 2020-10-29 19:52:31 +00:00
parent 382c276a39
commit 1d9253cffe

View File

@ -10,7 +10,6 @@ import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.EquipmentSlot;
import org.kingdoms.constants.kingdom.Kingdom; import org.kingdoms.constants.kingdom.Kingdom;
import org.kingdoms.constants.land.Land; import org.kingdoms.constants.land.Land;
import org.kingdoms.constants.player.KingdomPlayer;
import org.kingdoms.managers.PvPManager; import org.kingdoms.managers.PvPManager;
import org.kingdoms.managers.land.LandManager; import org.kingdoms.managers.land.LandManager;
@ -31,7 +30,7 @@ public final class AntigriefKingdoms implements AntigriefWrapper {
if(!land.isClaimed()) return true; if(!land.isClaimed()) return true;
Kingdom kingdom = land.getKingdom(); Kingdom kingdom = land.getKingdom();
return kingdom.getKingdomMembers().contains(KingdomPlayer.getKingdomPlayer(player)); return kingdom.isMember(player);
} }
@Override @Override
@ -52,7 +51,7 @@ public final class AntigriefKingdoms implements AntigriefWrapper {
if(!land.isClaimed()) return true; if(!land.isClaimed()) return true;
Kingdom kingdom = land.getKingdom(); Kingdom kingdom = land.getKingdom();
return kingdom.getKingdomMembers().contains(KingdomPlayer.getKingdomPlayer(player)); return kingdom.isMember(player);
} }
} }