Class VersionHelper

java.lang.Object
dev.triumphteam.gui.components.util.VersionHelper

public final class VersionHelper extends Object
Class for detecting server version for legacy support :(
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
    Checks if the version supports Components or not Paper versions above 1.16.5 would be true Spigot always false
    static final boolean
    Checks if the version has ItemMeta.setCustomModelData(Integer)
    static final boolean
    Checks if the version is lower than 1.13 due to the item changes
    static final boolean
    Checks if the version supports PersistentDataContainer
    static final boolean
    Checks if the version doesn't have SkullMeta.setOwningPlayer(OfflinePlayer) and SkullMeta.setOwner(String) should be used instead
    static final boolean
    Checks if the version supports the ItemMeta.setUnbreakable(boolean) method
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Class<?>
    craftClass(@NotNull String name)
     

    Methods inherited from class java.lang.Object

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

    • IS_COMPONENT_LEGACY

      public static final boolean IS_COMPONENT_LEGACY
      Checks if the version supports Components or not Paper versions above 1.16.5 would be true Spigot always false
    • IS_ITEM_LEGACY

      public static final boolean IS_ITEM_LEGACY
      Checks if the version is lower than 1.13 due to the item changes
    • IS_UNBREAKABLE_LEGACY

      public static final boolean IS_UNBREAKABLE_LEGACY
      Checks if the version supports the ItemMeta.setUnbreakable(boolean) method
    • IS_PDC_VERSION

      public static final boolean IS_PDC_VERSION
      Checks if the version supports PersistentDataContainer
    • IS_SKULL_OWNER_LEGACY

      public static final boolean IS_SKULL_OWNER_LEGACY
      Checks if the version doesn't have SkullMeta.setOwningPlayer(OfflinePlayer) and SkullMeta.setOwner(String) should be used instead
    • IS_CUSTOM_MODEL_DATA

      public static final boolean IS_CUSTOM_MODEL_DATA
      Checks if the version has ItemMeta.setCustomModelData(Integer)
  • Constructor Details

    • VersionHelper

      public VersionHelper()
  • Method Details