Search in sources :

Example 1 with ResidenceInterface

use of com.bekvon.bukkit.residence.api.ResidenceInterface in project CombatLogX by SirBlobman.

the class ResidenceRegionHandler method isSafeZone.

@Override
public boolean isSafeZone(Player player, Location location, TagType tagType) {
    if (tagType != TagType.PLAYER)
        return false;
    ResidenceInterface residenceManager = ResidenceApi.getResidenceManager();
    ClaimedResidence claimedResidence = residenceManager.getByLoc(location);
    if (claimedResidence == null)
        return false;
    ResidencePermissions residencePermissions = claimedResidence.getPermissions();
    return !residencePermissions.has(Flags.pvp, true);
}
Also used : ClaimedResidence(com.bekvon.bukkit.residence.protection.ClaimedResidence) ResidencePermissions(com.bekvon.bukkit.residence.protection.ResidencePermissions) ResidenceInterface(com.bekvon.bukkit.residence.api.ResidenceInterface)

Aggregations

ResidenceInterface (com.bekvon.bukkit.residence.api.ResidenceInterface)1 ClaimedResidence (com.bekvon.bukkit.residence.protection.ClaimedResidence)1 ResidencePermissions (com.bekvon.bukkit.residence.protection.ResidencePermissions)1