public class DataCollection extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
DataCollection.BufferGetter
Represents a getter for buffer.
|
| 构造器和说明 |
|---|
DataCollection(DataConverter<?>[] dataConverters)
Initialize the DataCollection with fixed size.
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
get()
Get String argument in order
|
<T> T |
get(Class<T> c)
Get customize buffer element
|
boolean |
getBoolean()
Get boolean argument in order
|
Command |
getCommand()
Get Command argument in order
|
double |
getDouble()
Get double argument in order
|
int |
getInt()
Get int argument in order
|
long |
getLong()
Get long argument in order
|
Plugin |
getPlugin()
Get Plugin argument in order
|
static void |
register(Plugin plugin,
DataConverter<?> dataConverter,
DataCollection.BufferGetter bufferGetter)
Register the getter of the buffer
|
static void |
unregister(Plugin plugin)
Unregister the getter of the buffers by plugin
|
static boolean |
unregisterAll()
Unregister all the getter of the buffers
|
<T> void |
write(Class<T> cls,
T t)
Write customize buffer element
|
void |
writeCommand(Command command)
Write a Command argument
|
void |
writePlugin(Plugin p)
Write a Plugin argument
|
public DataCollection(DataConverter<?>[] dataConverters)
dataConverters - the data converterspublic static void register(Plugin plugin, DataConverter<?> dataConverter, DataCollection.BufferGetter bufferGetter)
plugin - the plugindataConverter - the buffer data converterbufferGetter - the getter of the bufferpublic static void unregister(Plugin plugin)
plugin - the pluginpublic static boolean unregisterAll()
public String get()
public int getInt()
public double getDouble()
public boolean getBoolean()
public long getLong()
public void writePlugin(Plugin p)
p - Plugin argumentpublic Plugin getPlugin()
public Command getCommand()
public void writeCommand(Command command)
command - Command argumentpublic <T> void write(Class<T> cls, T t)
T - the buffer elements' typecls - the buffer elements' classt - the buffer elementUnsupportedOperationException - if the buffer is not registeredpublic <T> T get(Class<T> c)
T - the buffer elements' typec - the buffer elements' classUnsupportedOperationException - if the buffer is not registeredCopyright © 2022. All rights reserved.