public enum SpellResult extends Enum<SpellResult>
| Modifier and Type | Method and Description |
|---|---|
boolean |
isAlternate()
Determine if this result is an alternate-mode cast.
|
boolean |
isFailure()
Determine if this result is a failure or not.
|
boolean |
isFree()
Determine if this result is a free cast or not.
|
boolean |
isFree(boolean castOnNoTarget) |
boolean |
isStop()
Determine if this result should stop processing or not.
|
boolean |
isSuccess()
Determine if this result is a success or not.
|
boolean |
isSuccess(boolean castOnNoTarget)
Determine if this result is a success or not,
possibly counting no_target as a success.
|
SpellResult |
max(SpellResult other) |
SpellResult |
min(SpellResult other) |
boolean |
shouldRefundCooldown(boolean castOnNoTarget) |
boolean |
shouldRefundCosts(boolean castOnNoTarget,
boolean refund) |
static SpellResult |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SpellResult[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SpellResult STOP
public static final SpellResult PENDING
public static final SpellResult CAST
public static final SpellResult CAST_SELF
public static final SpellResult CAST_TARGET
public static final SpellResult ALTERNATE
public static final SpellResult ALTERNATE_UP
public static final SpellResult ALTERNATE_DOWN
public static final SpellResult ALTERNATE_SNEAK
public static final SpellResult ALTERNATE_JUMPING
public static final SpellResult ALTERNATE_SNEAK_UP
public static final SpellResult ALTERNATE_SNEAK_DOWN
public static final SpellResult ALTERNATE_JUMPING_UP
public static final SpellResult ALTERNATE_JUMPING_DOWN
public static final SpellResult REACTIVATE
public static final SpellResult FIZZLE
public static final SpellResult BACKFIRE
public static final SpellResult BLOCKED
public static final SpellResult DEACTIVATE
public static final SpellResult TARGET_SELECTED
public static final SpellResult CURSED
public static final SpellResult COOLDOWN
public static final SpellResult NO_TARGET
public static final SpellResult FAIL
public static final SpellResult INSUFFICIENT_RESOURCES
public static final SpellResult INSUFFICIENT_CHARGES
public static final SpellResult INSUFFICIENT_PERMISSION
public static final SpellResult ENTITY_REQUIRED
public static final SpellResult LIVING_ENTITY_REQUIRED
public static final SpellResult PLAYER_REQUIRED
public static final SpellResult LOCATION_REQUIRED
public static final SpellResult WORLD_REQUIRED
public static final SpellResult INVALID_WORLD
public static final SpellResult CANCELLED
public static final SpellResult NO_ACTION
public static SpellResult[] values()
for (SpellResult c : SpellResult.values()) System.out.println(c);
public static SpellResult valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic boolean isFailure()
Note that a spell result can be neither failure nor success.
public boolean isSuccess()
public boolean isSuccess(boolean castOnNoTarget)
public boolean isFree()
public boolean isFree(boolean castOnNoTarget)
public boolean isStop()
public boolean shouldRefundCooldown(boolean castOnNoTarget)
public boolean shouldRefundCosts(boolean castOnNoTarget,
boolean refund)
public boolean isAlternate()
public SpellResult min(SpellResult other)
public SpellResult max(SpellResult other)
Copyright © 2021 elMakers. All rights reserved.