Interface GeyserDefineCustomItemsEvent

All Superinterfaces:
org.geysermc.event.Event

public interface GeyserDefineCustomItemsEvent extends org.geysermc.event.Event
Called on Geyser's startup when looking for custom items. Custom items must be registered through this event. This event will not be called if the "add non-Bedrock items" setting is disabled in the Geyser config.
  • Method Details

    • getExistingCustomItems

      @NonNull Map<String,​Collection<CustomItemData>> getExistingCustomItems()
      Gets a multimap of all the already registered custom items indexed by the item's extended java item's identifier.
      Returns:
      a multimap of all the already registered custom items
    • getExistingNonVanillaCustomItems

      @NonNull List<NonVanillaCustomItemData> getExistingNonVanillaCustomItems()
      Gets the list of the already registered non-vanilla custom items.
      Returns:
      the list of the already registered non-vanilla custom items
    • register

      boolean register(@NonNull String identifier, @NonNull CustomItemData customItemData)
      Registers a custom item with a base Java item. This is used to register items with custom textures and properties based on NBT data.
      Parameters:
      identifier - the base (java) item
      customItemData - the custom item data to register
      Returns:
      if the item was registered
    • register

      boolean register(@NonNull NonVanillaCustomItemData customItemData)
      Registers a custom item with no base item. This is used for mods.
      Parameters:
      customItemData - the custom item data to register
      Returns:
      if the item was registered