Class Icon

java.lang.Object
com.github.darksoulq.abyssallib.server.resource.asset.Icon
All Implemented Interfaces:
Asset

public class Icon extends Object implements Asset
Represents the icon.png icon for a resource pack.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Icon(byte @NotNull [] data)
    Uses manually provided PNG image data.
    Icon(@NotNull org.bukkit.plugin.Plugin plugin)
    Loads resourcepack/pack.png from the plugin JAR.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    emit(@NotNull Map<String,byte[]> files)
    Emits the asset's files into the provided output map.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Icon

      public Icon(@NotNull @NotNull org.bukkit.plugin.Plugin plugin)
      Loads resourcepack/pack.png from the plugin JAR.
      Parameters:
      plugin - Plugin providing the resource
    • Icon

      public Icon(byte @NotNull [] data)
      Uses manually provided PNG image data.
      Parameters:
      data - PNG byte array
  • Method Details

    • emit

      public void emit(@NotNull @NotNull Map<String,byte[]> files)
      Description copied from interface: Asset
      Emits the asset's files into the provided output map.
      Specified by:
      emit in interface Asset
      Parameters:
      files - the output map where keys are file paths and values are file contents