use of com.bekvon.bukkit.residence.protection.ResidencePermissions 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);
}
use of com.bekvon.bukkit.residence.protection.ResidencePermissions in project Skript by SkriptLang.
the class ResidenceHook method canBuild_i.
@Override
public boolean canBuild_i(final Player p, final Location l) {
final ClaimedResidence res = Residence.getInstance().getResidenceManager().getByLoc(l);
if (res == null)
// No claim here
return true;
ResidencePermissions perms = res.getPermissions();
return perms.playerHas(p, Flags.build, true);
}
Aggregations