Documentation ¶
Index ¶
- Constants
- Variables
- func Channels(p *Message) (channels []string)
- func IsRegister(p *Message) bool
- func IsUnregister(p *Message) bool
- func LegacyRegister(p *Message) bool
- func LegacyUnregister(p *Message) bool
- func McBrand(p *Message) bool
- func TransformLegacyToModernChannel(name string) string
- type Message
Constants ¶
Variables ¶
var InvalidIdentifierRegex = regexp.MustCompile(`[^a-z0-9\\-_]*`)
Functions ¶
func IsRegister ¶ added in v0.15.0
IsRegister determines whether this plugin message is being used to register plugin channels.
func IsUnregister ¶ added in v0.15.0
IsUnregister determines whether this plugin message is being used to unregister plugin channels.
func LegacyRegister ¶
LegacyRegister determines whether this plugin message is a legacy (<1.13) registration plugin message.
func LegacyUnregister ¶
LegacyUnregister determines whether this plugin message is a legacy (<1.13) un-registration plugin message.
func McBrand ¶
McBrand determines whether this is a brand plugin message. This is shown on the client.
func TransformLegacyToModernChannel ¶
TransformLegacyToModernChannel transforms a plugin message channel from a "legacy" (<1.13) form to a modern one.
Types ¶
type Message ¶
Message is a Minecraft plugin message packet.
func ConstructChannelsPacket ¶
ConstructChannelsPacket constructs a channel (un)register packet. channels must not be empty! Note that the Message's Retained field remains nil.
func RewriteMinecraftBrand ¶
RewriteMinecraftBrand rewrites the brand message to indicate the presence of the proxy.