Package com.comphenix.protocol.wrappers
Class WrappedDataWatcher.Serializer
java.lang.Object
com.comphenix.protocol.wrappers.AbstractWrapper
com.comphenix.protocol.wrappers.WrappedDataWatcher.Serializer
- Enclosing class:
- WrappedDataWatcher
Represents a DataWatcherSerializer in 1.9. If a Serializer is optional,
values must be wrapped in a
Optional.- Author:
- dmulloy2
-
Field Summary
Fields inherited from class com.comphenix.protocol.wrappers.AbstractWrapper
handle, handleType -
Constructor Summary
ConstructorsConstructorDescriptionSerializer(Class<?> type, Object handle, boolean optional)Constructs a new Serializer -
Method Summary
Methods inherited from class com.comphenix.protocol.wrappers.AbstractWrapper
equals, getHandle, getHandleType, hashCode, setHandle
-
Constructor Details
-
Serializer
Constructs a new Serializer- Parameters:
type- Type it serializeshandle- NMS handleoptional- Whether or not it'sOptional
-
-
Method Details
-
getType
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 aOptional.- Returns:
- True if it is, false if not
-
toString
- Overrides:
toStringin classAbstractWrapper
-