Package redempt.redlib.protection
Enum Class ProtectionPolicy.ProtectionType
java.lang.Object
java.lang.Enum<ProtectionPolicy.ProtectionType>
redempt.redlib.protection.ProtectionPolicy.ProtectionType
- All Implemented Interfaces:
Serializable
,Comparable<ProtectionPolicy.ProtectionType>
,Constable
- Enclosing class:
- ProtectionPolicy
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionPlayers using an anvil damaging it (1.13+ only)Blocks explodingPlayers breaking blocksPlayers opening containersDispenser events which may modify blocksDispenser events which may modify blocks inside the protected area from outside itEntities explodingSnow golems placing snow, frost walkerBlocks fadingFallingBlock entities turning into solid blocks (sand, gravel)Fire destroying blocksLava and water flowingLava an water flowing from unprotected areas into protected areasCrop growth and block spreading/formationPlayers interacting with non-container blocksPlayers interacting with entitiesDoes nothing by default, but other plugins can register their events to be protected against by this type.Mobs spawningPistons pushing and pulling blocksPistons pushing blocks in or pulling blocks outPlayers placing blocksPlayers placing entities such as paintings, item frames, and armor standsPortals being created from another dimensionRedstone wires and componentsSilverfish infesting or breaking blocksStructure growth, like treesStructure growth of a block outside the protected area which would create blocks inside the protected areaTrampling of farmland by playersPlayers using buckets to place or collect liquidsWither spawning in and breaking blocks around it -
Field Summary
Modifier and TypeFieldDescriptionstatic final ProtectionPolicy.ProtectionType[]
Every protection typestatic final ProtectionPolicy.ProtectionType[]
All protection types relating to actions taken directly by players - Breaking, placing, and interacting with blocksstatic final ProtectionPolicy.ProtectionType[]
All protection types relating to actions usually taken by players which indirectly affect blocks - Pistons, redstone, explosions, and falling blocksstatic final ProtectionPolicy.ProtectionType[]
All protection types relating to natural processes not caused by players -
Method Summary
Modifier and TypeMethodDescriptionstatic ProtectionPolicy.ProtectionType[]
allExcept
(ProtectionPolicy.ProtectionType... types) Gets all protection types except those specifiedstatic ProtectionPolicy.ProtectionType[]
and
(ProtectionPolicy.ProtectionType[]... types) Combines arrays of protection typesReturns the enum constant of this class with the specified name.static ProtectionPolicy.ProtectionType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BREAK_BLOCK
Players breaking blocks -
PLACE_BLOCK
Players placing blocks -
INTERACT
Players interacting with non-container blocks -
USE_BUCKETS
Players using buckets to place or collect liquids -
CONTAINER_ACCESS
Players opening containers -
ENTITY_EXPLOSION
Entities exploding -
BLOCK_EXPLOSION
Blocks exploding -
PISTONS
Pistons pushing and pulling blocks -
PISTONS_IN
Pistons pushing blocks in or pulling blocks out -
REDSTONE
Redstone wires and components -
FALLING_BLOCK
FallingBlock entities turning into solid blocks (sand, gravel) -
GROWTH
Crop growth and block spreading/formation -
STRUCTURE_GROWTH
Structure growth, like trees -
STRUCTURE_GROWTH_IN
Structure growth of a block outside the protected area which would create blocks inside the protected area -
FADE
Blocks fading -
FLOW
Lava and water flowing -
FLOW_IN
Lava an water flowing from unprotected areas into protected areas -
ANVIL_BREAK
Players using an anvil damaging it (1.13+ only) -
MOB_SPAWN
Mobs spawning -
SILVERFISH
Silverfish infesting or breaking blocks -
WITHER
Wither spawning in and breaking blocks around it -
FIRE
Fire destroying blocks -
PORTAL_PAIRING
Portals being created from another dimension -
ENTITY_FORM_BLOCK
Snow golems placing snow, frost walker -
MISCELLANEOUS
Does nothing by default, but other plugins can register their events to be protected against by this type. -
INTERACT_ENTITY
Players interacting with entities -
PLACE_ENTITY
Players placing entities such as paintings, item frames, and armor stands -
DISPENSER_PLACE
Dispenser events which may modify blocks -
DISPENSER_PLACE_IN
Dispenser events which may modify blocks inside the protected area from outside it -
TRAMPLE
Trampling of farmland by players
-
-
Field Details
-
ALL
Every protection type -
DIRECT_PLAYERS
All protection types relating to actions taken directly by players - Breaking, placing, and interacting with blocks -
INDIRECT_PLAYERS
All protection types relating to actions usually taken by players which indirectly affect blocks - Pistons, redstone, explosions, and falling blocks -
NATURAL
All protection types relating to natural processes not caused by players
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
allExcept
Gets all protection types except those specified- Parameters:
types
- The protection types to exclude- Returns:
- All protection types except those specified
-
and
Combines arrays of protection types- Parameters:
types
- The arrays to combine- Returns:
- The combined arrays
-