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 { // ID 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 { // SendPluginMessage 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 { // Register registers the specified message identifiers to listen on so you can // intercept plugin messages on the channel using the PluginMessageEvent. Register(ids ...ChannelIdentifier) // Unregister 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
type MinecraftChannelIdentifier ¶
MinecraftChannelIdentifier is a Minecraft 1.13+ channel identifier.
func (*MinecraftChannelIdentifier) ID ¶
func (m *MinecraftChannelIdentifier) ID() string
Click to show internal directories.
Click to hide internal directories.