Class AdaptiveItemTagBridge

java.lang.Object
me.kzheart.klib.item.AdaptiveItemTagBridge
All Implemented Interfaces:
ItemTagBridge

public final class AdaptiveItemTagBridge extends Object implements ItemTagBridge
Java 泛型平台返回契约;存储与迁移逻辑由 Kotlin 实现。 旧 Kotlin 调用 val value: String = bridge.get(item, key) 依赖平台泛型;缺失标签仍返回 null。
  • Constructor Details

  • Method Details

    • get

      public <T> T get(org.bukkit.inventory.ItemStack item, TagKey<T> key)
      Specified by:
      get in interface ItemTagBridge
    • set

      public <T> void set(org.bukkit.inventory.ItemStack item, TagKey<T> key, T value)
      Specified by:
      set in interface ItemTagBridge
    • has

      public boolean has(org.bukkit.inventory.ItemStack item, TagKey<?> key)
      Specified by:
      has in interface ItemTagBridge
    • remove

      public void remove(org.bukkit.inventory.ItemStack item, TagKey<?> key)
      Specified by:
      remove in interface ItemTagBridge