Interface IMessageable
- All Known Subinterfaces:
ICommandSender,IPlayer,IServer
- All Known Implementing Classes:
IMessageable.BlackHoleMessageable,OfflinePlayerSpigot,PlayerSpigot,SpigotServer
public interface IMessageable
Represents objects that can receive messages.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classImplementation ofIMessageablethat does not send messages anywhere. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IMessageableInstance ofIMessageable.BlackHoleMessageablethat can be used in case messages should not be sent anywhere. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidsendError(ITextFactory textFactory, String message) Sends an error message to this object.default voidsendInfo(ITextFactory textFactory, String message) Sends a info message to this object.default voidsendMessage(ITextFactory textFactory, TextType textType, String message) Sends a message to this object.voidsendMessage(Text text) Sends a message to this object.default voidsendSuccess(ITextFactory textFactory, String message) Sends a success message to this object.
-
Field Details
-
NULL
Instance ofIMessageable.BlackHoleMessageablethat can be used in case messages should not be sent anywhere.
-
-
Method Details
-
sendMessage
Sends a message to this object.- Parameters:
text- The message to send. This may or may not contain formatting.
-
sendMessage
Sends a message to this object.- Parameters:
textFactory- TheITextFactoryto use for creating theTextobject.textType- TheTextTypeto use for the message to send.message- The message to send.
-
sendError
Sends an error message to this object.- Parameters:
textFactory- TheITextFactoryto use for creating theTextobject.message- The error message to send.
-
sendSuccess
Sends a success message to this object.- Parameters:
textFactory- TheITextFactoryto use for creating theTextobject.message- The success message to send.
-
sendInfo
Sends a info message to this object.- Parameters:
textFactory- TheITextFactoryto use for creating theTextobject.message- The info message to send.
-