Class ItemsAdderPackCompressedEvent

java.lang.Object
org.bukkit.event.Event
dev.lone.itemsadder.api.Events.ItemsAdderPackCompressedEvent

public class ItemsAdderPackCompressedEvent extends Event
Async event called before ItemsAdder writes the final resourcepack zip.
  • Constructor Details

    • ItemsAdderPackCompressedEvent

      public ItemsAdderPackCompressedEvent()
      Creates pack compressed event.
    • ItemsAdderPackCompressedEvent

      public ItemsAdderPackCompressedEvent(Map<String, ItemsAdderPackCompressedEvent.PackEntry> entries)
      Creates pack compressed event.
      Parameters:
      entries - mutable zip entries.
  • Method Details

    • getEntries

      Gets mutable zip entries, keyed by their path inside the pack zip.
      Returns:
      mutable zip entries.
    • getEntry

      @Nullable public @Nullable ItemsAdderPackCompressedEvent.PackEntry getEntry(String path)
      Gets an entry by path.
      Parameters:
      path - path inside the pack zip.
      Returns:
      entry, if any.
    • setEntry

      public void setEntry(String path, byte[] bytes)
      Adds or replaces an entry.
      Parameters:
      path - path inside the pack zip.
      bytes - entry contents.
    • setTextEntry

      public void setTextEntry(String path, String text)
      Adds or replaces a UTF-8 text entry.
      Parameters:
      path - path inside the pack zip.
      text - entry contents.
    • removeEntry

      public void removeEntry(String path)
      Removes an entry.
      Parameters:
      path - path inside the pack zip.
    • getHandlers

      @NotNull public @NotNull HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      public static HandlerList getHandlerList()