Class InvincibilityFlag
java.lang.Object
com.sk89q.worldguard.session.handler.Handler
com.sk89q.worldguard.session.handler.FlagValueChangeHandler<StateFlag.State>
com.sk89q.worldguard.session.handler.InvincibilityFlag
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInvincibility
(LocalPlayer player) Return whether the player should be invincible.protected boolean
onAbsentValue
(LocalPlayer player, com.sk89q.worldedit.util.Location from, com.sk89q.worldedit.util.Location to, ApplicableRegionSet toSet, StateFlag.State lastValue, MoveType moveType) protected void
onInitialValue
(LocalPlayer player, ApplicableRegionSet set, StateFlag.State value) protected boolean
onSetValue
(LocalPlayer player, com.sk89q.worldedit.util.Location from, com.sk89q.worldedit.util.Location to, ApplicableRegionSet toSet, StateFlag.State currentValue, StateFlag.State lastValue, MoveType moveType) Methods inherited from class com.sk89q.worldguard.session.handler.FlagValueChangeHandler
initialize, onClearValue, onCrossBoundary, uninitialize
Methods inherited from class com.sk89q.worldguard.session.handler.Handler
getSession, testMoveTo, tick
-
Field Details
-
FACTORY
-
-
Constructor Details
-
InvincibilityFlag
-
-
Method Details
-
onInitialValue
- Specified by:
onInitialValue
in classFlagValueChangeHandler<StateFlag.State>
-
onSetValue
protected boolean onSetValue(LocalPlayer player, com.sk89q.worldedit.util.Location from, com.sk89q.worldedit.util.Location to, ApplicableRegionSet toSet, StateFlag.State currentValue, StateFlag.State lastValue, MoveType moveType) - Specified by:
onSetValue
in classFlagValueChangeHandler<StateFlag.State>
-
onAbsentValue
protected boolean onAbsentValue(LocalPlayer player, com.sk89q.worldedit.util.Location from, com.sk89q.worldedit.util.Location to, ApplicableRegionSet toSet, StateFlag.State lastValue, MoveType moveType) - Specified by:
onAbsentValue
in classFlagValueChangeHandler<StateFlag.State>
-
getInvincibility
Description copied from class:Handler
Return whether the player should be invincible.StateFlag.State.DENY
can be returned to prevent invincibility even if another handler permits it.- Overrides:
getInvincibility
in classHandler
- Parameters:
player
- The player- Returns:
- Invincibility state
-