Class NumberEventValue

java.lang.Object
ua.mcchickenstudio.opencreative.coding.values.EventValue
ua.mcchickenstudio.opencreative.coding.values.NumberEventValue
All Implemented Interfaces:
ExtensionContent
Direct Known Subclasses:
AbsorptionAmountValue, ArmorPointsValue, ArmorToughnessValue, AttackDamageValue, AttackKnockbackValue, AttackSpeedValue, BurningTimeValue, ClearWeatherDurationValue, ClickedSlotValue, DamageValue, EntityAgeValue, EntityFallDistanceValue, EntityFireTicksValue, EntityFreezeTicksValue, EntityFuseTicksValue, EntityGravityValue, EntityHeightValue, EntityLocationPitchValue, EntityLocationXValue, EntityLocationYawValue, EntityLocationYValue, EntityLocationZValue, EntityScaleValue, EntityStepHeightValue, EntityTicksLivedValue, EntityWidthXValue, EntityWidthZValue, ExplosionKnockbackResistanceValue, FoodLevelValue, HumanHungerValue, KnockbackResistanceValue, LivingArrowsInBodyValue, LivingBeeStingerCooldownValue, LivingBodyYawValue, LivingHealthValue, LivingLastDamageValue, LivingMaxHealthValue, LivingMaximumAirValue, LivingMaxNoDamageTicksValue, LivingNoDamageTicksValue, LivingRemainingAirValue, LivingShieldBlockingDelayValue, MerchantTradesCountValue, NewSlotValue, OldSlotValue, PlayerClientViewDistanceValue, PlayerExperienceLevelValue, PlayerExperienceValue, PlayerFlightSpeedValue, PlayerPingValue, PlayerTotalExperienceValue, PlayerWalkSpeedValue, PurchasePriceValue, ServerTicksPerSecondValue, ThunderWeatherDurationValue, UnixTimeHoursValue, UnixTimeMinutesValue, UnixTimeSecondsValue, UnixTimeValue, WebResponseCodeValue, WorldBlockEditsAmountValue, WorldBlockEditsLimitValue, WorldEntitiesAmountLimitValue, WorldEntitiesAmountValue, WorldGameTimeValue, WorldIdValue, WorldLastRedstoneOperationsValue, WorldOnlineValue, WorldRatingValue, WorldRedstoneOperationsLimitValue, WorldSizeValue, WorldTargetsCount, WorldTimeValue, WorldVariablesAmountLimitValue, WorldVariablesAmountValue

public abstract class NumberEventValue extends EventValue

NumberEventValue

This class represents an event value, that returns number, or null.
  • Constructor Details

    • NumberEventValue

      public NumberEventValue(@NotNull @NotNull String id, @NotNull @NotNull org.bukkit.inventory.ItemStack displayIcon, @NotNull @NotNull MenusCategory category)
  • Method Details

    • getNumber

      @Nullable public abstract @Nullable Number getNumber(@NotNull @NotNull ActionsHandler handler, @NotNull @NotNull Action action, @Nullable @Nullable org.bukkit.entity.Entity entity)
      Returns a number that can be got from player, event, action, or null.
      Returns:
      number, or null.
    • getValue

      @Nullable public final @Nullable Object getValue(@NotNull @NotNull ActionsHandler handler, @NotNull @NotNull Action action, @Nullable @Nullable org.bukkit.entity.Entity entity)
      Description copied from class: EventValue
      Returns a value that will be set instead of event value name tag item.
      Specified by:
      getValue in class EventValue
      Parameters:
      handler - handler of action to get value.
      action - action to get value.
      entity - entity to get value, can be null.
      Returns:
      string, number, boolean, item, location, vector, or null.