Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MessageResponder ¶
type MessageResponder interface { // Process processes the given plugin message. // Returns true if the message is a BungeeCord plugin message and was processed. Process(message *plugin.Message) bool }
MessageResponder is a message responder for BungeeCord plugin channels.
var NopMessageResponder MessageResponder = &nopMessageResponder{}
NopMessageResponder is a MessageResponder that does not process messages.
func NewMessageResponder ¶
func NewMessageResponder( player Player, providers Providers, ) MessageResponder
NewMessageResponder returns a new MessageResponder.
type Player ¶
type Player interface { ID() uuid.UUID Username() string RemoteAddr() net.Addr Disconnect(reason component.Component) }
Dependencies required by NewMessageResponder.
type PlayerProvider ¶
type PlayerProvider interface { PlayerByName(username string) Player PlayerCount() int // Total number of players online Players() []Player BroadcastMessage(component.Component) }
PlayerProvider provides a player by its name.
type Providers ¶
type Providers interface { PlayerProvider ServerProvider ServerConnectionProvider }
Dependencies required by NewMessageResponder.
type Server ¶
type Server interface { Name() string PlayerCount() int BroadcastPluginMessage(message.ChannelIdentifier, []byte) Connect(Player) Players() []Player BroadcastMessage(component.Component) Addr() net.Addr }
Dependencies required by NewMessageResponder.
type ServerConnection ¶
type ServerConnection interface { Name() string // Name of the server. Protocol() proto.Protocol proto.PacketWriter }
ServerConnection represents a server connection for a player.
type ServerConnectionProvider ¶
type ServerConnectionProvider interface {
ConnectedServer() ServerConnection
}
ServerConnectionProvider provides the currently connected server connection for a player.
type ServerProvider ¶
ServerProvider provides servers.
Click to show internal directories.
Click to hide internal directories.