Class VersionHelper
java.lang.Object
io.rhythmknights.coreapi.component.utility.VersionHelper
Class for detecting server version for legacy support :(
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanChecks if the version supports Components or not Spigot always falsestatic final booleanChecks if the version hasItemMeta.setCustomModelData(Integer)static final booleanstatic final booleanChecks if the version is lower than 1.13 due to the item changesstatic final booleanStarting with version 1.20.5 the internal field referenced byItemMeta.getDisplayName()is no longer a stringstatic final booleanChecks if the version supportsPersistentDataContainerstatic final booleanChecks if the version hasPlayerProfilestatic final booleanChecks if the version doesn't haveSkullMeta.setOwningPlayer(OfflinePlayer)andSkullMeta.setOwner(String)should be used insteadstatic final booleanChecks if the version supports theItemMeta.setUnbreakable(boolean)method -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
IS_COMPONENT_LEGACY
public static final boolean IS_COMPONENT_LEGACYChecks if the version supports Components or not Spigot always false -
IS_ITEM_LEGACY
public static final boolean IS_ITEM_LEGACYChecks if the version is lower than 1.13 due to the item changes -
IS_UNBREAKABLE_LEGACY
public static final boolean IS_UNBREAKABLE_LEGACYChecks if the version supports theItemMeta.setUnbreakable(boolean)method -
IS_PDC_VERSION
public static final boolean IS_PDC_VERSIONChecks if the version supportsPersistentDataContainer -
IS_SKULL_OWNER_LEGACY
public static final boolean IS_SKULL_OWNER_LEGACYChecks if the version doesn't haveSkullMeta.setOwningPlayer(OfflinePlayer)andSkullMeta.setOwner(String)should be used instead -
IS_CUSTOM_MODEL_DATA
public static final boolean IS_CUSTOM_MODEL_DATAChecks if the version hasItemMeta.setCustomModelData(Integer) -
IS_PLAYER_PROFILE_API
public static final boolean IS_PLAYER_PROFILE_APIChecks if the version hasPlayerProfile -
IS_ITEM_NAME_COMPONENT
public static final boolean IS_ITEM_NAME_COMPONENTStarting with version 1.20.5 the internal field referenced byItemMeta.getDisplayName()is no longer a string -
IS_FOLIA
public static final boolean IS_FOLIA
-
-
Constructor Details
-
VersionHelper
public VersionHelper()
-
-
Method Details
-
craftClass
- Throws:
ClassNotFoundException
-