Klasse ProtectionService
java.lang.Object
de.delinkedde.mobarenareborn.protection.ProtectionService
Decides whether a location is inside a protected arena region.
Any arena that has a region defined is protected, regardless of whether it is enabled, so the
build area is safe from griefing both during rounds and while it is being set up. Protection can
be switched off entirely with protection.enabled in config.yml.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungProtectionService(@NotNull ArenaManager arenas, @NotNull ConfigManager config) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanbooleanisInArenaRegion(@Nullable Location location) Tests whether a location lies inside any arena region, independent of the protection toggle.booleanisProtected(@Nullable Location location) Tests whether a location lies inside any arena region while protection is enabled.
-
Konstruktordetails
-
ProtectionService
public ProtectionService(@NotNull @NotNull ArenaManager arenas, @NotNull @NotNull ConfigManager config) - Parameter:
arenas- the arena registry, queried for regionsconfig- the configuration manager, read for the master toggle
-
-
Methodendetails
-
isProtected
Tests whether a location lies inside any arena region while protection is enabled.- Parameter:
location- the location to test, may benull- Gibt zurück:
trueif the location is within a protected arena region
-
isInArenaRegion
Tests whether a location lies inside any arena region, independent of the protection toggle.- Parameter:
location- the location to test, may benull- Gibt zurück:
trueif the location is within an arena region
-
blocksNaturalSpawns
public boolean blocksNaturalSpawns()- Gibt zurück:
- whether natural mob spawning should be blocked inside arena regions
-