Class ItemEventValue

java.lang.Object
ua.mcchickenstudio.opencreative.coding.values.EventValue
ua.mcchickenstudio.opencreative.coding.values.ItemEventValue
All Implemented Interfaces:
ExtensionContent
Direct Known Subclasses:
CursorItemValue, EntityItemValue, EventItemValue, EventNewItemValue, HumanBootsValue, HumanChestplateValue, HumanHelmetValue, HumanItemInMainHandValue, HumanItemInOffHandValue, HumanLeggingsValue, SaddleItemValue, WorldIconValue

public abstract class ItemEventValue extends EventValue

ItemEventValue

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

    • ItemEventValue

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

    • getItem

      @Nullable public abstract @Nullable org.bukkit.inventory.ItemStack getItem(@NotNull @NotNull ActionsHandler handler, @NotNull @NotNull Action action, @Nullable @Nullable org.bukkit.entity.Entity entity)
      Returns an item stack that can be got from player, event, action, or null.
      Returns:
      item, 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.