Allow the use of certain block materials, regardless of permissions. HCF feature.
This commit is contained in:
parent
22670ddb15
commit
3c10b8276c
@ -215,6 +215,11 @@ public class Conf {
|
|||||||
public static Set<Material> territoryProtectedMaterialsWhenOffline = EnumSet.noneOf(Material.class);
|
public static Set<Material> territoryProtectedMaterialsWhenOffline = EnumSet.noneOf(Material.class);
|
||||||
public static Set<Material> territoryDenyUseageMaterialsWhenOffline = EnumSet.noneOf(Material.class);
|
public static Set<Material> territoryDenyUseageMaterialsWhenOffline = EnumSet.noneOf(Material.class);
|
||||||
public static transient Set<EntityType> safeZoneNerfedCreatureTypes = EnumSet.noneOf(EntityType.class);
|
public static transient Set<EntityType> safeZoneNerfedCreatureTypes = EnumSet.noneOf(EntityType.class);
|
||||||
|
/// <summary>
|
||||||
|
/// This defines a set of materials which should always be allowed to use, regardless of factions permissions.
|
||||||
|
/// Useful for HCF features.
|
||||||
|
/// </summary>
|
||||||
|
public static Set<Material> territoryBypassAllProtection = EnumSet.noneOf(Material.class);
|
||||||
|
|
||||||
// Economy settings
|
// Economy settings
|
||||||
public static boolean econEnabled = false;
|
public static boolean econEnabled = false;
|
||||||
|
@ -160,6 +160,10 @@ public class FactionsPlayerListener implements Listener {
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
Material material = block.getType();
|
Material material = block.getType();
|
||||||
|
|
||||||
|
// Check if the material is bypassing protection
|
||||||
|
if (Conf.territoryBypassAllProtection.contains(material)) return true;
|
||||||
|
|
||||||
// Dupe fix.
|
// Dupe fix.
|
||||||
FLocation loc = new FLocation(block);
|
FLocation loc = new FLocation(block);
|
||||||
Faction otherFaction = Board.getInstance().getFactionAt(loc);
|
Faction otherFaction = Board.getInstance().getFactionAt(loc);
|
||||||
|
Loading…
Reference in New Issue
Block a user