Class SkriptDataType

java.lang.Object
org.skriptlang.skript.bukkit.pdc.SkriptDataType
All Implemented Interfaces:
org.bukkit.persistence.PersistentDataType<org.bukkit.persistence.PersistentDataContainer,Object>

public class SkriptDataType extends Object implements org.bukkit.persistence.PersistentDataType<org.bukkit.persistence.PersistentDataContainer,Object>
A PersistentDataType that can store any Yggsdrasil-serializable object using PDCSerializer.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.bukkit.persistence.PersistentDataType

    org.bukkit.persistence.PersistentDataType.BooleanPersistentDataType, org.bukkit.persistence.PersistentDataType.PrimitivePersistentDataType<P>
  • Field Summary

    Fields inherited from interface org.bukkit.persistence.PersistentDataType

    BOOLEAN, BYTE, BYTE_ARRAY, DOUBLE, FLOAT, INTEGER, INTEGER_ARRAY, LIST, LONG, LONG_ARRAY, SHORT, STRING, TAG_CONTAINER, TAG_CONTAINER_ARRAY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Object
    fromPrimitive(@NotNull org.bukkit.persistence.PersistentDataContainer primitive, @NotNull org.bukkit.persistence.PersistentDataAdapterContext context)
     
    get()
     
    @NotNull Class<Object>
     
    @NotNull Class<org.bukkit.persistence.PersistentDataContainer>
     
    @NotNull org.bukkit.persistence.PersistentDataContainer
    toPrimitive(@NotNull Object complex, @NotNull org.bukkit.persistence.PersistentDataAdapterContext context)
     

    Methods inherited from class java.lang.Object

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

    • SkriptDataType

      public SkriptDataType()
  • Method Details

    • get

      public static SkriptDataType get()
    • getPrimitiveType

      @NotNull public @NotNull Class<org.bukkit.persistence.PersistentDataContainer> getPrimitiveType()
      Specified by:
      getPrimitiveType in interface org.bukkit.persistence.PersistentDataType<org.bukkit.persistence.PersistentDataContainer,Object>
    • getComplexType

      @NotNull public @NotNull Class<Object> getComplexType()
      Specified by:
      getComplexType in interface org.bukkit.persistence.PersistentDataType<org.bukkit.persistence.PersistentDataContainer,Object>
    • toPrimitive

      @NotNull public @NotNull org.bukkit.persistence.PersistentDataContainer toPrimitive(@NotNull @NotNull Object complex, @NotNull @NotNull org.bukkit.persistence.PersistentDataAdapterContext context)
      Specified by:
      toPrimitive in interface org.bukkit.persistence.PersistentDataType<org.bukkit.persistence.PersistentDataContainer,Object>
    • fromPrimitive

      @NotNull public @NotNull Object fromPrimitive(@NotNull @NotNull org.bukkit.persistence.PersistentDataContainer primitive, @NotNull @NotNull org.bukkit.persistence.PersistentDataAdapterContext context)
      Specified by:
      fromPrimitive in interface org.bukkit.persistence.PersistentDataType<org.bukkit.persistence.PersistentDataContainer,Object>