Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultNamespace = "minecraft"
Variables ¶
View Source
var ValidIdentifierRegex = regexp.MustCompile(`[a-z0-9\\-_]*`)
Functions ¶
This section is empty.
Types ¶
type ChannelIdentifier ¶
type ChannelIdentifier interface { // Returns the channel identifier. Id() string }
ChannelIdentifier is a channel identifier for use with plugin messaging.
func NewChannelIdentifier ¶
func NewChannelIdentifier(namespace, name string) (ChannelIdentifier, error)
NewChannelIdentifier returns a new validated channel identifier.
func NewDefaultNamespace ¶
func NewDefaultNamespace(name string) (ChannelIdentifier, error)
func NewLegacyChannelIdentifier ¶
func NewLegacyChannelIdentifier(name string) ChannelIdentifier
type ChannelMessageSink ¶
type ChannelMessageSink interface { // Sends a plugin message to the channel with id. SendPluginMessage(id ChannelIdentifier, data []byte) error }
ChannelMessageSink can receive plugin messages.
type ChannelMessageSource ¶
type ChannelMessageSource interface{}
ChannelMessageSource is a source of plugin messages.
type ChannelRegistrar ¶
type ChannelRegistrar interface { // Registers the specified message identifiers to listen on so you can // intercept plugin messages on the channel using the PluginMessageEvent. Register(ids ...ChannelIdentifier) // Removes the intent to listen for the specified channels. Unregister(ids ...ChannelIdentifier) }
ChannelRegistrar is an interface to register and unregister ChannelIdentifiers for the proxy to listen on.
type LegacyChannelIdentifier ¶
type LegacyChannelIdentifier string // Has just a name field, no namespace and value.
LegacyChannelIdentifier is a legacy channel identifier (for Minecraft 1.12 and below). For modern 1.13 plugin messages, please see MinecraftChannelIdentifier.
func (LegacyChannelIdentifier) Id ¶
func (l LegacyChannelIdentifier) Id() string
Click to show internal directories.
Click to hide internal directories.