public class WrappedWatchableObject extends AbstractWrapper
handle, handleType| Constructor and Description |
|---|
WrappedWatchableObject(int index,
Object value)
Constructs a DataWatcher Item wrapper from a given index and initial value.
|
WrappedWatchableObject(Object handle)
Constructs a DataWatcher Item wrapper from an existing NMS data watcher item.
|
WrappedWatchableObject(WrappedDataWatcher.WrappedDataWatcherObject watcherObject,
Object value)
Constructs a DataWatcher Item wrapper from a given watcher object and initial value.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
boolean |
getDirtyState()
Whether or not the value must be synchronized with the client.
|
int |
getIndex()
Gets this Item's index from the watcher object
|
Object |
getRawValue()
Gets the raw value of this data watcher item.
|
Object |
getValue()
Gets the wrapped value of this data watcher item.
|
WrappedDataWatcher.WrappedDataWatcherObject |
getWatcherObject()
Gets this Item's watcher object, which contains the index and serializer.
|
int |
hashCode() |
void |
setDirtyState(boolean dirty)
Sets this item's dirty state
|
void |
setValue(Object value)
Sets the value of this item.
|
void |
setValue(Object value,
boolean updateClient)
Sets the value of this item.
|
String |
toString() |
getHandle, getHandleType, setHandlepublic WrappedWatchableObject(Object handle)
handle - Data watcher itempublic WrappedWatchableObject(int index,
Object value)
Not recommended in 1.9 and up.
index - Index of the Itemvalue - Initial valuepublic WrappedWatchableObject(WrappedDataWatcher.WrappedDataWatcherObject watcherObject, Object value)
watcherObject - Watcher objectvalue - Initial valuepublic WrappedDataWatcher.WrappedDataWatcherObject getWatcherObject()
public int getIndex()
public Object getValue()
public Object getRawValue()
public void setValue(Object value, boolean updateClient)
value - New valueupdateClient - Whether or not to update the clientpublic void setValue(Object value)
value - New valuepublic boolean getDirtyState()
public void setDirtyState(boolean dirty)
dirty - New statepublic boolean equals(Object obj)
equals in class AbstractWrapperpublic int hashCode()
hashCode in class AbstractWrapperpublic String toString()
toString in class AbstractWrapperCopyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.