Versions in this module Expand all Collapse all v0 v0.0.1 Dec 19, 2018 Changes in this version + const CommandNodeTypeArgument + const CommandNodeTypeLiteral + var COMPATIBLE_PROTO = []Protocol + var ChatColorAqua = ChatColor + var ChatColorBlack = ChatColor + var ChatColorDarkAqua = ChatColor + var ChatColorDarkBlue = ChatColor + var ChatColorDarkGray = ChatColor + var ChatColorDarkGreen = ChatColor + var ChatColorDarkPurple = ChatColor + var ChatColorDarkRed = ChatColor + var ChatColorGold = ChatColor + var ChatColorGray = ChatColor + var ChatColorGreen = ChatColor + var ChatColorIndigo = ChatColor + var ChatColorPink = ChatColor + var ChatColorRed = ChatColor + var ChatColorWhite = ChatColor + var ChatColorYellow = ChatColor + var ChatStyleBold = ChatStyle + var ChatStyleItalic = ChatStyle + var ChatStyleObfuscated = ChatStyle + var ChatStyleStrikeThrough = ChatStyle + var ChatStyleUnderlined = ChatStyle + func IsCompatible(proto Protocol) bool + func JsonEscape(s string) string + func JsonMessage(s string) json.RawMessage + func PacketTypeHash(state State, id int) int64 + type BossBarAction int + const BOSSBAR_ADD + const BOSSBAR_REMOVE + const BOSSBAR_UPDATE_FLAGS + const BOSSBAR_UPDATE_HEALTH + const BOSSBAR_UPDATE_STYLE + const BOSSBAR_UPDATE_TITLE + type BossBarColor int + const BOSSBAR_COLOR_BLUE + const BOSSBAR_COLOR_GREEN + const BOSSBAR_COLOR_PINK + const BOSSBAR_COLOR_PURPLE + const BOSSBAR_COLOR_RED + const BOSSBAR_COLOR_WHITE + const BOSSBAR_COLOR_YELLOW + type BossBarDivision int + const BOSSBAR_10NOTCHES + const BOSSBAR_12NOTCHES + const BOSSBAR_20NOTCHES + const BOSSBAR_6NOTCHES + const BOSSBAR_NODIVISION + type BufferConfig struct + ChatMessage int + HandshakeAddress int + PlayerName int + type ChatAction struct + Action string + Value interface{} + func ChatClickRunCommand(command string) *ChatAction + func ChatHoverMessage(components []IChatComponent) *ChatAction + func ChatHoverText(component string) *ChatAction + type ChatColor struct + func (color *ChatColor) ChatFormat() string + func (color *ChatColor) GetId() byte + func (color *ChatColor) GetName() string + type ChatComponent struct + Bold bool + ClickEvent *ChatAction + Color *string + Extra []IChatComponent + HoverEvent *ChatAction + Insertion *string + Italic bool + Obfuscated bool + StrikeThrough bool + Underlined bool + func (component *ChatComponent) AddExtra(extra IChatComponent) + func (component *ChatComponent) JSON() (string, error) + func (component *ChatComponent) SetBold(bold bool) + func (component *ChatComponent) SetClickEvent(action *ChatAction) + func (component *ChatComponent) SetColor(color *ChatColor) + func (component *ChatComponent) SetExtra(extra []IChatComponent) + func (component *ChatComponent) SetHoverEvent(action *ChatAction) + func (component *ChatComponent) SetInsertion(insertion string) + func (component *ChatComponent) SetItalic(italic bool) + func (component *ChatComponent) SetObfuscated(obfuscated bool) + func (component *ChatComponent) SetStrikeThrough(strikeThrough bool) + func (component *ChatComponent) SetUnderlined(underlined bool) + type ChatPosition uint8 + const ACTION_BAR + const CHAT_BOX + const SYSTEM + type ChatStyle struct + func (color *ChatStyle) ChatFormat() string + type CommandNode struct + Children []*CommandNode + Execute func(player *Player, args []string) + Name string + Parser CommandParser + RedirectNode *CommandNode + Type CommandNodeType + func CommandNodeArgument(name string, children []*CommandNode, parser CommandParser, ...) *CommandNode + func CommandNodeLiteral(name string, children []*CommandNode, ...) *CommandNode + type CommandNodeType uint8 + type CommandParser interface + Complete func(string) []string + GetId func() string + GetSuggestion func() CommandSuggestionType + IsArrayValid func([]string) bool + IsMultiple func() bool + IsValid func(string) bool + type CommandParserBool struct + func (c *CommandParserBool) Complete(arg string) []string + func (c *CommandParserBool) GetId() string + func (c *CommandParserBool) GetSuggestion() CommandSuggestionType + func (c *CommandParserBool) IsArrayValid(arg []string) bool + func (c *CommandParserBool) IsMultiple() bool + func (c *CommandParserBool) IsValid(arg string) bool + type CommandParserDouble struct + Max OptDouble + Min OptDouble + func (c *CommandParserDouble) Complete(arg string) []string + func (c *CommandParserDouble) GetId() string + func (c *CommandParserDouble) GetSuggestion() CommandSuggestionType + func (c *CommandParserDouble) IsArrayValid(arg []string) bool + func (c *CommandParserDouble) IsMultiple() bool + func (c *CommandParserDouble) IsValid(arg string) bool + type CommandParserFloat struct + Max OptFloat + Min OptFloat + func (c *CommandParserFloat) Complete(arg string) []string + func (c *CommandParserFloat) GetId() string + func (c *CommandParserFloat) GetSuggestion() CommandSuggestionType + func (c *CommandParserFloat) IsArrayValid(arg []string) bool + func (c *CommandParserFloat) IsMultiple() bool + func (c *CommandParserFloat) IsValid(arg string) bool + type CommandParserInteger struct + Max OptInteger + Min OptInteger + func (c *CommandParserInteger) Complete(arg string) []string + func (c *CommandParserInteger) GetId() string + func (c *CommandParserInteger) GetSuggestion() CommandSuggestionType + func (c *CommandParserInteger) IsArrayValid(arg []string) bool + func (c *CommandParserInteger) IsMultiple() bool + func (c *CommandParserInteger) IsValid(arg string) bool + type CommandParserString struct + Format CommandParserStringFormat + func (c *CommandParserString) Complete(arg string) []string + func (c *CommandParserString) GetId() string + func (c *CommandParserString) GetSuggestion() CommandSuggestionType + func (c *CommandParserString) IsArrayValid(arg []string) bool + func (c *CommandParserString) IsMultiple() bool + func (c *CommandParserString) IsValid(arg string) bool + type CommandParserStringFormat int + const CommandParserStringFormatGreedyPhrase + const CommandParserStringFormatSingleWord + type CommandSuggestionType string + const CommandSuggestionAllRecipes + const CommandSuggestionAskServer + const CommandSuggestionAvailableSounds + const CommandSuggestionNone + const CommandSuggestionSummonableEntities + type Config struct + BufferConfig BufferConfig + Compression bool + ListenAddress string + Logs bool + MaxPlayers int + Motd string + Restricted bool + Threshold int + type ConnReadWrite struct + func (rdrwtr ConnReadWrite) ReadByte() (b byte, err error) + type Content struct + Base Protocol + Map Map + Name string + Protocol Protocol + type Core struct + func Init() *Core + func (c *Core) CallEvent(event Event) + func (c *Core) DeclareCommand(graph *CommandNode) + func (c *Core) GetConfig(config interface{}) + func (c *Core) GetPlayerRegistry() *PlayerRegistry + func (c *Core) On(handler interface{}) + func (c *Core) OnPluginMessage(channel string, handler interface{}) + func (c *Core) SetBrand(brand string) + func (c *Core) Start() + type Difficulty uint8 + const EASY + const HARD + const NORMAL + const PEACEFUL + type Dimension uint32 + const END + const NETHER + const OVERWORLD + type Event interface + type EventCallback struct + Callback interface{} + MetaData map[string]string + type Gamemode uint8 + const ADVENTURE + const CREATIVE + const SPECTATOR + const SURVIVAL + type IChatComponent interface + JSON func() (string, error) + func BukkitMessageConvert(message string) IChatComponent + type InAddr struct + type LevelType string + const AMPLIFIED + const DEFAULT + const DEFAULT_1_1 + const FLAT + const LARGE_BIOMES + type Map struct + Clientbound map[string]string + Serverbound map[string]string + type Module struct + Content Content + Type Type + type OptDouble struct + Used bool + Value float64 + type OptFloat struct + Used bool + Value float32 + type OptInteger struct + Used bool + Value int32 + type Packet interface + Handle func(*Player) + Id func() (int, Protocol) + Read func(*Player, int) error + Write func(*Player) error + type PacketBossBar struct + Action BossBarAction + Color BossBarColor + Division BossBarDivision + Flags uint8 + Health float32 + Title string + UUID uuid.UUID + func (packet *PacketBossBar) Handle(player *Player) + func (packet *PacketBossBar) Id() (int, Protocol) + func (packet *PacketBossBar) Read(player *Player, length int) (err error) + func (packet *PacketBossBar) Write(player *Player) (err error) + type PacketHandshake struct + Address string + Port uint16 + Protocol Protocol + State State + func (packet *PacketHandshake) Handle(player *Player) + func (packet *PacketHandshake) Id() (int, Protocol) + func (packet *PacketHandshake) Read(player *Player, length int) (err error) + func (packet *PacketHandshake) Write(player *Player) (err error) + type PacketLoginDisconnect struct + Component string + func (packet *PacketLoginDisconnect) Handle(player *Player) + func (packet *PacketLoginDisconnect) Id() (int, Protocol) + func (packet *PacketLoginDisconnect) Read(player *Player, length int) (err error) + func (packet *PacketLoginDisconnect) Write(player *Player) (err error) + type PacketLoginStart struct + Username string + func (packet *PacketLoginStart) Handle(player *Player) + func (packet *PacketLoginStart) Id() (int, Protocol) + func (packet *PacketLoginStart) Read(player *Player, length int) (err error) + func (packet *PacketLoginStart) Write(player *Player) (err error) + type PacketLoginSuccess struct + UUID string + Username string + func (packet *PacketLoginSuccess) Handle(player *Player) + func (packet *PacketLoginSuccess) Id() (int, Protocol) + func (packet *PacketLoginSuccess) Read(player *Player, length int) (err error) + func (packet *PacketLoginSuccess) Write(player *Player) (err error) + type PacketPlayChat struct + Message string + func (packet *PacketPlayChat) Handle(player *Player) + func (packet *PacketPlayChat) Id() (int, Protocol) + func (packet *PacketPlayChat) Read(player *Player, length int) (err error) + func (packet *PacketPlayChat) Write(player *Player) (err error) + type PacketPlayDeclareCommands struct + Nodes []commandNode + RootIndex int + func (packet *PacketPlayDeclareCommands) Handle(player *Player) + func (packet *PacketPlayDeclareCommands) Id() (int, Protocol) + func (packet *PacketPlayDeclareCommands) Read(player *Player, length int) (err error) + func (packet *PacketPlayDeclareCommands) Write(player *Player) (err error) + type PacketPlayDisconnect struct + Component string + func (packet *PacketPlayDisconnect) Handle(player *Player) + func (packet *PacketPlayDisconnect) Id() (int, Protocol) + func (packet *PacketPlayDisconnect) Read(player *Player, length int) (err error) + func (packet *PacketPlayDisconnect) Write(player *Player) (err error) + type PacketPlayJoinGame struct + Difficulty Difficulty + Dimension Dimension + EntityId uint32 + Gamemode Gamemode + LevelType LevelType + MaxPlayers uint8 + ReducedDebug bool + func (packet *PacketPlayJoinGame) Handle(player *Player) + func (packet *PacketPlayJoinGame) Id() (int, Protocol) + func (packet *PacketPlayJoinGame) Read(player *Player, length int) (err error) + func (packet *PacketPlayJoinGame) Write(player *Player) (err error) + type PacketPlayKeepAlive struct + Identifier int + func (packet *PacketPlayKeepAlive) Handle(player *Player) + func (packet *PacketPlayKeepAlive) Id() (int, Protocol) + func (packet *PacketPlayKeepAlive) Read(player *Player, length int) (err error) + func (packet *PacketPlayKeepAlive) Write(player *Player) (err error) + type PacketPlayMessage struct + Component string + Position ChatPosition + func (packet *PacketPlayMessage) Handle(player *Player) + func (packet *PacketPlayMessage) Id() (int, Protocol) + func (packet *PacketPlayMessage) Read(player *Player, length int) (err error) + func (packet *PacketPlayMessage) Write(player *Player) (err error) + type PacketPlayPluginMessage struct + Channel string + Data []byte + func (packet *PacketPlayPluginMessage) Handle(player *Player) + func (packet *PacketPlayPluginMessage) Id() (int, Protocol) + func (packet *PacketPlayPluginMessage) Read(player *Player, length int) (err error) + func (packet *PacketPlayPluginMessage) Write(player *Player) (err error) + type PacketPlayTabComplete struct + Matches []string + func (packet *PacketPlayTabComplete) Handle(player *Player) + func (packet *PacketPlayTabComplete) Id() (int, Protocol) + func (packet *PacketPlayTabComplete) Read(player *Player, length int) (err error) + func (packet *PacketPlayTabComplete) Write(player *Player) (err error) + type PacketPlayTabCompleteServerbound struct + AssumeCommand bool + Position Position + Text string + func (packet *PacketPlayTabCompleteServerbound) Handle(player *Player) + func (packet *PacketPlayTabCompleteServerbound) Id() (int, Protocol) + func (packet *PacketPlayTabCompleteServerbound) Read(player *Player, length int) (err error) + func (packet *PacketPlayTabCompleteServerbound) Write(player *Player) (err error) + type PacketPlayerListHeaderFooter struct + Footer *string + Header *string + func (packet *PacketPlayerListHeaderFooter) Handle(player *Player) + func (packet *PacketPlayerListHeaderFooter) Id() (int, Protocol) + func (packet *PacketPlayerListHeaderFooter) Read(player *Player, length int) (err error) + func (packet *PacketPlayerListHeaderFooter) Write(player *Player) (err error) + type PacketPlayerPositionLook struct + Flags uint8 + Pitch float32 + TeleportId int + X float64 + Y float64 + Yaw float32 + Z float64 + func (packet *PacketPlayerPositionLook) Handle(player *Player) + func (packet *PacketPlayerPositionLook) Id() (int, Protocol) + func (packet *PacketPlayerPositionLook) Read(player *Player, length int) (err error) + func (packet *PacketPlayerPositionLook) Write(player *Player) (err error) + type PacketSetCompression struct + Threshold int + func (packet *PacketSetCompression) Handle(player *Player) + func (packet *PacketSetCompression) Id() (int, Protocol) + func (packet *PacketSetCompression) Read(player *Player, length int) (err error) + func (packet *PacketSetCompression) Write(player *Player) (err error) + type PacketStatusPing struct + Time uint64 + func (packet *PacketStatusPing) Handle(player *Player) + func (packet *PacketStatusPing) Id() (int, Protocol) + func (packet *PacketStatusPing) Read(player *Player, length int) (err error) + func (packet *PacketStatusPing) Write(player *Player) (err error) + type PacketStatusRequest struct + func (packet *PacketStatusRequest) Handle(player *Player) + func (packet *PacketStatusRequest) Id() (int, Protocol) + func (packet *PacketStatusRequest) Read(player *Player, length int) (err error) + func (packet *PacketStatusRequest) Write(player *Player) (err error) + type PacketStatusResponse struct + Response string + func (packet *PacketStatusResponse) Handle(player *Player) + func (packet *PacketStatusResponse) Id() (int, Protocol) + func (packet *PacketStatusResponse) Read(player *Player, length int) (err error) + func (packet *PacketStatusResponse) Write(player *Player) (err error) + type PacketUpdateHealth struct + Food int + FoodSaturation float32 + Health float32 + func (packet *PacketUpdateHealth) Handle(player *Player) + func (packet *PacketUpdateHealth) Id() (int, Protocol) + func (packet *PacketUpdateHealth) Read(player *Player, length int) (err error) + func (packet *PacketUpdateHealth) Write(player *Player) (err error) + type Player struct + func (p *Player) SendActionBar(message IChatComponent) + func (p *Player) SendBukkitMessage(message string) + func (p *Player) SendMessage(message IChatComponent) + func (p *Player) SendRawActionBar(message string) + func (p *Player) SendRawMessage(message string) + func (player *Player) GetName() string + func (player *Player) GetUUID() string + func (player *Player) HackClientbound(id int, protocol Protocol) int + func (player *Player) HackServerbound(id int) int + func (player *Player) HandlePacket(id int, length int) (packet Packet, err error) + func (player *Player) Kick(s string) + func (player *Player) ReadBool() (b bool, err error) + func (player *Player) ReadByte() (b byte, err error) + func (player *Player) ReadByteArray(length int) (data []byte, err error) + func (player *Player) ReadFloat32() (i float32, err error) + func (player *Player) ReadFloat64() (i float64, err error) + func (player *Player) ReadNStringLimited(max int) (s string, read int, err error) + func (player *Player) ReadPacket() (packet Packet, err error) + func (player *Player) ReadPacketWithCompression() (packet Packet, err error) + func (player *Player) ReadPacketWithoutCompression() (packet Packet, err error) + func (player *Player) ReadPosition() (i Position, err error) + func (player *Player) ReadString() (s string, err error) + func (player *Player) ReadStringLimited(max int) (s string, err error) + func (player *Player) ReadUInt16() (i uint16, err error) + func (player *Player) ReadUInt32() (i uint32, err error) + func (player *Player) ReadUInt64() (i uint64, err error) + func (player *Player) ReadUInt8() (i uint8, err error) + func (player *Player) ReadVarInt() (i int, err error) + func (player *Player) WriteBool(b bool) (err error) + func (player *Player) WriteByteArray(data []byte) (err error) + func (player *Player) WriteFloat32(i float32) (err error) + func (player *Player) WriteFloat64(i float64) (err error) + func (player *Player) WritePacket(packet Packet) (err error) + func (player *Player) WritePacketWithCompression(packet Packet) (err error) + func (player *Player) WritePacketWithoutCompression(packet Packet) (err error) + func (player *Player) WritePosition(i Position) (err error) + func (player *Player) WriteString(s string) (err error) + func (player *Player) WriteStringRestricted(s string, max int) (err error) + func (player *Player) WriteUInt16(i uint16) (err error) + func (player *Player) WriteUInt32(i uint32) (err error) + func (player *Player) WriteUInt64(i uint64) (err error) + func (player *Player) WriteUInt8(i uint8) (err error) + func (player *Player) WriteUUID(uid uuid.UUID) (err error) + func (player *Player) WriteVarInt(i int) (err error) + type PlayerChatEvent struct + Message string + Player *Player + type PlayerClickType byte + const PlayerLeftClick + const PlayerRightClick + type PlayerInteractEvent struct + ClickType PlayerClickType + Player *Player + type PlayerJoinEvent struct + Player *Player + type PlayerKickEvent struct + Player *Player + Reason string + type PlayerQuitEvent struct + Player *Player + type PlayerRegistry struct + func (registry *PlayerRegistry) ForEachPlayer(fn func(player *Player)) + func (registry *PlayerRegistry) ForEachPlayerAsync(fn func(player *Player)) + func (registry *PlayerRegistry) GetPlayerCount() int + func (registry *PlayerRegistry) GetPlayers() []*Player + type PluginMessageEvent struct + Channel string + Data []byte + type Position struct + X int + Y int + Z int + type Protocol uint16 + const V1_10 + const V1_11 + const V1_11_1 + const V1_12 + const V1_12_1 + const V1_12_2 + const V1_13 + const V1_13_1 + const V1_13_2 + const V1_7_2 + const V1_7_6 + const V1_8 + const V1_9 + const V1_9_1 + const V1_9_2 + const V1_9_3 + type ScoreboardPosition uint8 + const BELOW_NAME + const LIST + const SIDEBAR + type State int8 + const HANDSHAKING + const LOGIN + const PLAY + const STATUS + type StringChatComponent struct + Text string + func ChatMessage(text string) *StringChatComponent + func (component *StringChatComponent) JSON() (string, error) + func (component *StringChatComponent) SetText(text string) + type Type struct + Name string + Version int + type VarBuffer struct + func (buff *VarBuffer) Bytes() []byte + func (buff *VarBuffer) Len() int + func (buff *VarBuffer) Read(p []byte) (n int, err error) + func (buff *VarBuffer) Write(p []byte) (n int, err error)