@ThreadSafe public abstract class PluginChannels extends com.google.common.collect.ForwardingCollection<PluginChannel> implements Registry<PluginChannel>
To access this handler, use this code:
PluginChannels handler = Registered.channels();
Constructor and Description |
---|
PluginChannels()
Do not instantiate
|
Modifier and Type | Method and Description |
---|---|
protected Collection<PluginChannel> |
delegate() |
PluginChannel |
fromName(String name)
Find a channel by its name
|
void |
register(String name,
PluginChannel channel)
Registers a channel in the listings
|
protected abstract void |
sendPluginMessage(String channel,
byte... data)
Send a plugin message
|
void |
unregister(String name)
Removes a channel if it exists in the listings
|
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, standardAddAll, standardClear, standardContains, standardContainsAll, standardIsEmpty, standardRemove, standardRemoveAll, standardRetainAll, standardToArray, standardToArray, standardToString, toArray, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
public PluginChannels()
To access this handler, use this code:
PluginChannels handler = Registered.channels();
protected abstract void sendPluginMessage(String channel, byte... data)
channel
- name of the channeldata
- the data to sendpublic void register(String name, PluginChannel channel)
name
- the name of the channelchannel
- the channel to registerpublic void unregister(String name)
name
- the name of the channel to removepublic PluginChannel fromName(String name)
name
- the name to find the channel byprotected Collection<PluginChannel> delegate()
delegate
in class com.google.common.collect.ForwardingCollection<PluginChannel>
Copyright © 2016. All rights reserved.