public class GodMode extends Handler
| Modifier and Type | Class and Description |
|---|---|
static class |
GodMode.Factory |
| Modifier and Type | Field and Description |
|---|---|
static GodMode.Factory |
FACTORY |
| Modifier and Type | Method and Description |
|---|---|
StateFlag.State |
getInvincibility(LocalPlayer player)
Return whether the player should be invincible.
|
boolean |
hasGodMode(LocalPlayer player) |
static boolean |
set(LocalPlayer player,
Session session,
boolean value) |
void |
setGodMode(LocalPlayer player,
boolean godMode) |
getSession, initialize, onCrossBoundary, testMoveTo, tickpublic static final GodMode.Factory FACTORY
public GodMode(Session session)
public boolean hasGodMode(LocalPlayer player)
public void setGodMode(LocalPlayer player, boolean godMode)
@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 playerpublic static boolean set(LocalPlayer player, Session session, boolean value)