Class WrappedDataWatcher.Serializer

java.lang.Object
com.comphenix.protocol.wrappers.AbstractWrapper
com.comphenix.protocol.wrappers.WrappedDataWatcher.Serializer
Enclosing class:
WrappedDataWatcher

public static class WrappedDataWatcher.Serializer extends AbstractWrapper
Represents a DataWatcherSerializer in 1.9. If a Serializer is optional, values must be wrapped in a Optional.
  • Constructor Details

    • Serializer

      @Deprecated(forRemoval=true) public Serializer(Class<?> type, Object handle, boolean optional)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a new Serializer
      Parameters:
      type - Type it serializes
      handle - NMS handle
      optional - Whether or not it's Optional
    • Serializer

      public Serializer(Type type, Object handle, boolean optional)
      Constructs a new Serializer
      Parameters:
      type - Type it serializes
      handle - NMS handle
      optional - Whether or not it's Optional
  • Method Details

    • getType

      @Deprecated(forRemoval=true) public Class<?> getType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use getGenericType() instead.
      Gets the type this serializer serializes.
      Returns:
      The type
    • getGenericType

      public Type getGenericType()
      Gets the type this serializer serializes.
      Returns:
      The type.
    • isOptional

      public boolean isOptional()
      Whether or not this serializer is optional, that is whether or not the return type is wrapped in a Optional.
      Returns:
      True if it is, false if not
    • toString

      public String toString()
      Overrides:
      toString in class AbstractWrapper