public class InvincibilityFlag extends FlagValueChangeHandler<StateFlag.State>
| Modifier and Type | Class and Description |
|---|---|
static class |
InvincibilityFlag.Factory |
| Modifier and Type | Field and Description |
|---|---|
static InvincibilityFlag.Factory |
FACTORY |
| Constructor and Description |
|---|
InvincibilityFlag(Session session) |
| Modifier and Type | Method and Description |
|---|---|
StateFlag.State |
getInvincibility(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) |
initialize, onCrossBoundarygetSession, testMoveTo, tickpublic static final InvincibilityFlag.Factory FACTORY
public InvincibilityFlag(Session session)
protected void onInitialValue(LocalPlayer player, ApplicableRegionSet set, StateFlag.State value)
onInitialValue in class FlagValueChangeHandler<StateFlag.State>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)
onSetValue in class FlagValueChangeHandler<StateFlag.State>protected boolean onAbsentValue(LocalPlayer player, com.sk89q.worldedit.util.Location from, com.sk89q.worldedit.util.Location to, ApplicableRegionSet toSet, StateFlag.State lastValue, MoveType moveType)
onAbsentValue in class FlagValueChangeHandler<StateFlag.State>@Nullable public StateFlag.State getInvincibility(LocalPlayer player)
HandlerStateFlag.State.DENY can be returned to prevent invincibility
even if another handler permits it.
getInvincibility in class Handlerplayer - The player