Class VersionHelper

java.lang.Object
io.rhythmknights.coreapi.component.utility.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 Spigot always false
    static final boolean
    Checks if the version has ItemMeta.setCustomModelData(Integer)
    static final boolean
     
    static final boolean
    Checks if the version is lower than 1.13 due to the item changes
    static final boolean
    Starting with version 1.20.5 the internal field referenced by ItemMeta.getDisplayName() is no longer a string
    static final boolean
    Checks if the version supports PersistentDataContainer
    static final boolean
    Checks if the version has PlayerProfile
    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 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)
    • IS_PLAYER_PROFILE_API

      public static final boolean IS_PLAYER_PROFILE_API
      Checks if the version has PlayerProfile
    • IS_ITEM_NAME_COMPONENT

      public static final boolean IS_ITEM_NAME_COMPONENT
      Starting with version 1.20.5 the internal field referenced by ItemMeta.getDisplayName() is no longer a string
    • IS_FOLIA

      public static final boolean IS_FOLIA
  • Constructor Details

    • VersionHelper

      public VersionHelper()
  • Method Details