public class ChatHandler extends com.google.common.collect.ForwardingCollection<ChatIdentityFormatter> implements ChatFormatter
Constructor and Description |
---|
ChatHandler() |
Modifier and Type | Method and Description |
---|---|
protected Collection<ChatIdentityFormatter> |
delegate() |
String |
format(String message,
Player player)
Obtains the formatted string, not including the message that will be sent
|
void |
setFormatter(ChatIdentityFormatter provider,
Plugin plugin)
Sets the provider of the chat format, performing the default overriding logic of the original provider
|
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 ChatHandler()
public void setFormatter(ChatIdentityFormatter provider, Plugin plugin)
ChatFormatter
The provider is notified before it is replaced, so do not try to replace the provider in the overriden method
setFormatter
in interface ChatFormatter
provider
- the provider to useplugin
- the plugin that registers the new providerpublic String format(String message, Player player)
ChatFormatter
format
in interface ChatFormatter
message
- the default chat identifierplayer
- the player that is sending the messageprotected Collection<ChatIdentityFormatter> delegate()
delegate
in class com.google.common.collect.ForwardingCollection<ChatIdentityFormatter>
Copyright © 2016. All rights reserved.