java.lang.Object
com.ultikits.ultitools.abstracts.gui.declarative.widgets.IconWrapper

public class IconWrapper extends Object
IconWrapper 是对 Icon 的简单包装,用于在 Widget 树中传递。

它不可变,可以在多个 Widget 之间安全共享。

Since:
6.2.0
Version:
1.0.0
Author:
UltiTools Team
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Builder for IconWrapper.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final @NotNull mc.obliviate.inventory.Icon
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    IconWrapper(@NotNull mc.obliviate.inventory.Icon icon)
     
    IconWrapper(@NotNull org.bukkit.inventory.ItemStack itemStack)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NotNull IconWrapper.Builder
    builder(@NotNull org.bukkit.inventory.ItemStack itemStack)
    创建 IconWrapper 的构建器。
    @NotNull mc.obliviate.inventory.Icon
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • icon

      @NotNull private final @NotNull mc.obliviate.inventory.Icon icon
  • Constructor Details

    • IconWrapper

      public IconWrapper(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack)
    • IconWrapper

      public IconWrapper(@NotNull @NotNull mc.obliviate.inventory.Icon icon)
  • Method Details

    • getIcon

      @NotNull public @NotNull mc.obliviate.inventory.Icon getIcon()
    • builder

      @NotNull public static @NotNull IconWrapper.Builder builder(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack)
      创建 IconWrapper 的构建器。
      Parameters:
      itemStack - 物品堆
      Returns:
      Builder