Documentation ¶
Index ¶
- Constants
- Variables
- 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
- type BossBarColor
- type BossBarDivision
- type BufferConfig
- type ChatAction
- type ChatColor
- type ChatComponent
- 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
- type ChatStyle
- type CommandNode
- type CommandNodeType
- type CommandParser
- type CommandParserBool
- 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
- 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
- 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
- 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
- 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
- type CommandSuggestionType
- type Config
- type ConnReadWrite
- type Content
- type 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
- type Dimension
- type Event
- type EventCallback
- type Gamemode
- type IChatComponent
- type InAddr
- type LevelType
- type Map
- type Module
- type OptDouble
- type OptFloat
- type OptInteger
- type Packet
- type PacketBossBar
- type PacketHandshake
- type PacketLoginDisconnect
- type PacketLoginStart
- type PacketLoginSuccess
- type PacketPlayChat
- type PacketPlayDeclareCommands
- type PacketPlayDisconnect
- type PacketPlayJoinGame
- type PacketPlayKeepAlive
- type PacketPlayMessage
- type PacketPlayPluginMessage
- type PacketPlayTabComplete
- type PacketPlayTabCompleteServerbound
- 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
- type PacketPlayerPositionLook
- type PacketSetCompression
- type PacketStatusPing
- type PacketStatusRequest
- type PacketStatusResponse
- type PacketUpdateHealth
- type Player
- 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 (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) 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
- type PlayerClickType
- type PlayerInteractEvent
- type PlayerJoinEvent
- type PlayerKickEvent
- type PlayerQuitEvent
- type PlayerRegistry
- type PluginMessageEvent
- type Position
- type Protocol
- type ScoreboardPosition
- type State
- type StringChatComponent
- type Type
- type VarBuffer
Constants ¶
View Source
const ( CommandNodeTypeLiteral CommandNodeTypeArgument )
Variables ¶
View Source
var ( ChatColorBlack = ChatColor{0, "black"} ChatColorDarkBlue = ChatColor{1, "dark_blue"} ChatColorDarkGreen = ChatColor{2, "dark_green"} ChatColorDarkAqua = ChatColor{3, "dark_aqua"} ChatColorDarkRed = ChatColor{4, "dark_red"} ChatColorDarkPurple = ChatColor{5, "dark_purple"} ChatColorGold = ChatColor{6, "gold"} ChatColorGray = ChatColor{7, "gray"} ChatColorDarkGray = ChatColor{8, "dark_gray"} ChatColorIndigo = ChatColor{9, "blue"} ChatColorGreen = ChatColor{10, "green"} ChatColorAqua = ChatColor{11, "aqua"} ChatColorRed = ChatColor{12, "red"} ChatColorPink = ChatColor{13, "light_purple"} ChatColorYellow = ChatColor{14, "yellow"} ChatColorWhite = ChatColor{15, "white"} ChatStyleObfuscated = ChatStyle{&ChatColor{'k', "obfuscated"}} ChatStyleBold = ChatStyle{&ChatColor{'l', "bold"}} ChatStyleStrikeThrough = ChatStyle{&ChatColor{'m', "strikethrough"}} ChatStyleUnderlined = ChatStyle{&ChatColor{'n', "underlined"}} ChatStyleItalic = ChatStyle{&ChatColor{'o', "italic"}} )
Functions ¶
func IsCompatible ¶
func JsonEscape ¶
func JsonMessage ¶
func JsonMessage(s string) json.RawMessage
func PacketTypeHash ¶
Types ¶
type BossBarAction ¶
type BossBarAction int
const ( BOSSBAR_ADD BossBarAction = iota BOSSBAR_REMOVE BOSSBAR_UPDATE_HEALTH BOSSBAR_UPDATE_TITLE BOSSBAR_UPDATE_STYLE BOSSBAR_UPDATE_FLAGS )
type BossBarColor ¶
type BossBarColor int
const ( BOSSBAR_COLOR_PINK BossBarColor = iota BOSSBAR_COLOR_BLUE BOSSBAR_COLOR_RED BOSSBAR_COLOR_GREEN BOSSBAR_COLOR_YELLOW BOSSBAR_COLOR_PURPLE BOSSBAR_COLOR_WHITE )
type BossBarDivision ¶
type BossBarDivision int
const ( BOSSBAR_NODIVISION BossBarDivision = iota BOSSBAR_6NOTCHES BOSSBAR_10NOTCHES BOSSBAR_12NOTCHES BOSSBAR_20NOTCHES )
type BufferConfig ¶
type ChatAction ¶
type ChatAction struct { Action string `json:"action"` Value interface{} `json:"value"` }
func ChatClickRunCommand ¶
func ChatClickRunCommand(command string) *ChatAction
func ChatHoverMessage ¶
func ChatHoverMessage(components []IChatComponent) *ChatAction
func ChatHoverText ¶
func ChatHoverText(component string) *ChatAction
type ChatColor ¶
type ChatColor struct {
// contains filtered or unexported fields
}
func (*ChatColor) ChatFormat ¶
type ChatComponent ¶
type ChatComponent struct { Bold bool `json:"bold"` Italic bool `json:"italic"` Underlined bool `json:"underlined"` StrikeThrough bool `json:"strikethrough"` Obfuscated bool `json:"obfuscated"` Color *string `json:"color,omitempty"` Insertion *string `json:"insertion,omitempty"` ClickEvent *ChatAction `json:"clickEvent,omitempty"` HoverEvent *ChatAction `json:"hoverEvent,omitempty"` Extra []IChatComponent `json:"extra,omitempty"` }
func (*ChatComponent) AddExtra ¶
func (component *ChatComponent) AddExtra(extra IChatComponent)
func (*ChatComponent) JSON ¶
func (component *ChatComponent) JSON() (string, error)
func (*ChatComponent) SetBold ¶
func (component *ChatComponent) SetBold(bold bool)
func (*ChatComponent) SetClickEvent ¶
func (component *ChatComponent) SetClickEvent(action *ChatAction)
func (*ChatComponent) SetColor ¶
func (component *ChatComponent) SetColor(color *ChatColor)
func (*ChatComponent) SetExtra ¶
func (component *ChatComponent) SetExtra(extra []IChatComponent)
func (*ChatComponent) SetHoverEvent ¶
func (component *ChatComponent) SetHoverEvent(action *ChatAction)
func (*ChatComponent) SetInsertion ¶
func (component *ChatComponent) SetInsertion(insertion string)
func (*ChatComponent) SetItalic ¶
func (component *ChatComponent) SetItalic(italic bool)
func (*ChatComponent) SetObfuscated ¶
func (component *ChatComponent) SetObfuscated(obfuscated bool)
func (*ChatComponent) SetStrikeThrough ¶
func (component *ChatComponent) SetStrikeThrough(strikeThrough bool)
func (*ChatComponent) SetUnderlined ¶
func (component *ChatComponent) SetUnderlined(underlined bool)
type ChatPosition ¶
type ChatPosition uint8
const ( CHAT_BOX ChatPosition = iota SYSTEM ACTION_BAR )
type CommandNode ¶
type CommandNode struct { Type CommandNodeType Execute func(player *Player, args []string) Children []*CommandNode RedirectNode *CommandNode Name string Parser CommandParser }
func CommandNodeArgument ¶
func CommandNodeArgument( name string, children []*CommandNode, parser CommandParser, execute func(player *Player, args []string)) *CommandNode
func CommandNodeLiteral ¶
func CommandNodeLiteral( name string, children []*CommandNode, execute func(player *Player, args []string)) *CommandNode
type CommandNodeType ¶
type CommandNodeType uint8
type CommandParser ¶
type CommandParserBool ¶
type CommandParserBool struct{}
func (*CommandParserBool) Complete ¶
func (c *CommandParserBool) Complete(arg string) []string
func (*CommandParserBool) GetId ¶
func (c *CommandParserBool) GetId() string
func (*CommandParserBool) GetSuggestion ¶
func (c *CommandParserBool) GetSuggestion() CommandSuggestionType
func (*CommandParserBool) IsArrayValid ¶
func (c *CommandParserBool) IsArrayValid(arg []string) bool
func (*CommandParserBool) IsMultiple ¶
func (c *CommandParserBool) IsMultiple() bool
func (*CommandParserBool) IsValid ¶
func (c *CommandParserBool) IsValid(arg string) bool
type CommandParserDouble ¶
func (*CommandParserDouble) Complete ¶
func (c *CommandParserDouble) Complete(arg string) []string
func (*CommandParserDouble) GetId ¶
func (c *CommandParserDouble) GetId() string
func (*CommandParserDouble) GetSuggestion ¶
func (c *CommandParserDouble) GetSuggestion() CommandSuggestionType
func (*CommandParserDouble) IsArrayValid ¶
func (c *CommandParserDouble) IsArrayValid(arg []string) bool
func (*CommandParserDouble) IsMultiple ¶
func (c *CommandParserDouble) IsMultiple() bool
func (*CommandParserDouble) IsValid ¶
func (c *CommandParserDouble) IsValid(arg string) bool
type CommandParserFloat ¶
func (*CommandParserFloat) Complete ¶
func (c *CommandParserFloat) Complete(arg string) []string
func (*CommandParserFloat) GetId ¶
func (c *CommandParserFloat) GetId() string
func (*CommandParserFloat) GetSuggestion ¶
func (c *CommandParserFloat) GetSuggestion() CommandSuggestionType
func (*CommandParserFloat) IsArrayValid ¶
func (c *CommandParserFloat) IsArrayValid(arg []string) bool
func (*CommandParserFloat) IsMultiple ¶
func (c *CommandParserFloat) IsMultiple() bool
func (*CommandParserFloat) IsValid ¶
func (c *CommandParserFloat) IsValid(arg string) bool
type CommandParserInteger ¶
type CommandParserInteger struct { Min OptInteger Max OptInteger }
func (*CommandParserInteger) Complete ¶
func (c *CommandParserInteger) Complete(arg string) []string
func (*CommandParserInteger) GetId ¶
func (c *CommandParserInteger) GetId() string
func (*CommandParserInteger) GetSuggestion ¶
func (c *CommandParserInteger) GetSuggestion() CommandSuggestionType
func (*CommandParserInteger) IsArrayValid ¶
func (c *CommandParserInteger) IsArrayValid(arg []string) bool
func (*CommandParserInteger) IsMultiple ¶
func (c *CommandParserInteger) IsMultiple() bool
func (*CommandParserInteger) IsValid ¶
func (c *CommandParserInteger) IsValid(arg string) bool
type CommandParserString ¶
type CommandParserString struct {
Format CommandParserStringFormat
}
func (*CommandParserString) Complete ¶
func (c *CommandParserString) Complete(arg string) []string
func (*CommandParserString) GetId ¶
func (c *CommandParserString) GetId() string
func (*CommandParserString) GetSuggestion ¶
func (c *CommandParserString) GetSuggestion() CommandSuggestionType
func (*CommandParserString) IsArrayValid ¶
func (c *CommandParserString) IsArrayValid(arg []string) bool
func (*CommandParserString) IsMultiple ¶
func (c *CommandParserString) IsMultiple() bool
func (*CommandParserString) IsValid ¶
func (c *CommandParserString) IsValid(arg string) bool
type CommandParserStringFormat ¶
type CommandParserStringFormat int
const ( CommandParserStringFormatSingleWord CommandParserStringFormat = iota CommandParserStringFormatGreedyPhrase )
type CommandSuggestionType ¶
type CommandSuggestionType string
const ( CommandSuggestionNone CommandSuggestionType = "" CommandSuggestionAskServer CommandSuggestionType = "minecraft:ask_server" CommandSuggestionAllRecipes CommandSuggestionType = "minecraft:all_recipes" CommandSuggestionAvailableSounds CommandSuggestionType = "minecraft:available_sounds" CommandSuggestionSummonableEntities CommandSuggestionType = "minecraft:summonable_entities" )
type Config ¶
type Config struct { ListenAddress string `json:"listen_address"` MaxPlayers int `json:"max_players"` Motd string `json:"motd"` Restricted bool `json:"restricted"` Logs bool `json:"logs"` Compression bool `json:"enable_compression"` Threshold int `json:"compression_threshold"` BufferConfig BufferConfig `json:"buffer_config"` }
type ConnReadWrite ¶
type ConnReadWrite struct {
// contains filtered or unexported fields
}
func (ConnReadWrite) ReadByte ¶
func (rdrwtr ConnReadWrite) ReadByte() (b byte, err error)
type Core ¶
type Core struct {
// contains filtered or unexported fields
}
func (*Core) DeclareCommand ¶
func (c *Core) DeclareCommand(graph *CommandNode)
func (*Core) GetPlayerRegistry ¶
func (c *Core) GetPlayerRegistry() *PlayerRegistry
func (*Core) OnPluginMessage ¶
type EventCallback ¶
type IChatComponent ¶
func BukkitMessageConvert ¶
func BukkitMessageConvert(message string) IChatComponent
type OptInteger ¶
type PacketBossBar ¶
type PacketBossBar struct { UUID uuid.UUID Action BossBarAction Title string Health float32 Color BossBarColor Division BossBarDivision Flags uint8 }
func (*PacketBossBar) Handle ¶
func (packet *PacketBossBar) Handle(player *Player)
func (*PacketBossBar) Id ¶
func (packet *PacketBossBar) Id() (int, Protocol)
func (*PacketBossBar) Read ¶
func (packet *PacketBossBar) Read(player *Player, length int) (err error)
func (*PacketBossBar) Write ¶
func (packet *PacketBossBar) Write(player *Player) (err error)
type PacketHandshake ¶
func (*PacketHandshake) Handle ¶
func (packet *PacketHandshake) Handle(player *Player)
func (*PacketHandshake) Id ¶
func (packet *PacketHandshake) Id() (int, Protocol)
func (*PacketHandshake) Read ¶
func (packet *PacketHandshake) Read(player *Player, length int) (err error)
func (*PacketHandshake) Write ¶
func (packet *PacketHandshake) Write(player *Player) (err error)
type PacketLoginDisconnect ¶
type PacketLoginDisconnect struct {
Component string
}
func (*PacketLoginDisconnect) Handle ¶
func (packet *PacketLoginDisconnect) Handle(player *Player)
func (*PacketLoginDisconnect) Id ¶
func (packet *PacketLoginDisconnect) Id() (int, Protocol)
func (*PacketLoginDisconnect) Read ¶
func (packet *PacketLoginDisconnect) Read(player *Player, length int) (err error)
func (*PacketLoginDisconnect) Write ¶
func (packet *PacketLoginDisconnect) Write(player *Player) (err error)
type PacketLoginStart ¶
type PacketLoginStart struct {
Username string
}
func (*PacketLoginStart) Handle ¶
func (packet *PacketLoginStart) Handle(player *Player)
func (*PacketLoginStart) Id ¶
func (packet *PacketLoginStart) Id() (int, Protocol)
func (*PacketLoginStart) Read ¶
func (packet *PacketLoginStart) Read(player *Player, length int) (err error)
func (*PacketLoginStart) Write ¶
func (packet *PacketLoginStart) Write(player *Player) (err error)
type PacketLoginSuccess ¶
func (*PacketLoginSuccess) Handle ¶
func (packet *PacketLoginSuccess) Handle(player *Player)
func (*PacketLoginSuccess) Id ¶
func (packet *PacketLoginSuccess) Id() (int, Protocol)
func (*PacketLoginSuccess) Read ¶
func (packet *PacketLoginSuccess) Read(player *Player, length int) (err error)
func (*PacketLoginSuccess) Write ¶
func (packet *PacketLoginSuccess) Write(player *Player) (err error)
type PacketPlayChat ¶
type PacketPlayChat struct {
Message string
}
func (*PacketPlayChat) Handle ¶
func (packet *PacketPlayChat) Handle(player *Player)
func (*PacketPlayChat) Id ¶
func (packet *PacketPlayChat) Id() (int, Protocol)
func (*PacketPlayChat) Read ¶
func (packet *PacketPlayChat) Read(player *Player, length int) (err error)
func (*PacketPlayChat) Write ¶
func (packet *PacketPlayChat) Write(player *Player) (err error)
type PacketPlayDeclareCommands ¶
type PacketPlayDeclareCommands struct { Nodes []commandNode RootIndex int }
func (*PacketPlayDeclareCommands) Handle ¶
func (packet *PacketPlayDeclareCommands) Handle(player *Player)
func (*PacketPlayDeclareCommands) Id ¶
func (packet *PacketPlayDeclareCommands) Id() (int, Protocol)
func (*PacketPlayDeclareCommands) Read ¶
func (packet *PacketPlayDeclareCommands) Read(player *Player, length int) (err error)
func (*PacketPlayDeclareCommands) Write ¶
func (packet *PacketPlayDeclareCommands) Write(player *Player) (err error)
type PacketPlayDisconnect ¶
type PacketPlayDisconnect struct {
Component string
}
func (*PacketPlayDisconnect) Handle ¶
func (packet *PacketPlayDisconnect) Handle(player *Player)
func (*PacketPlayDisconnect) Id ¶
func (packet *PacketPlayDisconnect) Id() (int, Protocol)
func (*PacketPlayDisconnect) Read ¶
func (packet *PacketPlayDisconnect) Read(player *Player, length int) (err error)
func (*PacketPlayDisconnect) Write ¶
func (packet *PacketPlayDisconnect) Write(player *Player) (err error)
type PacketPlayJoinGame ¶
type PacketPlayJoinGame struct { EntityId uint32 Gamemode Gamemode Dimension Dimension Difficulty Difficulty MaxPlayers uint8 LevelType LevelType ReducedDebug bool }
func (*PacketPlayJoinGame) Handle ¶
func (packet *PacketPlayJoinGame) Handle(player *Player)
func (*PacketPlayJoinGame) Id ¶
func (packet *PacketPlayJoinGame) Id() (int, Protocol)
func (*PacketPlayJoinGame) Read ¶
func (packet *PacketPlayJoinGame) Read(player *Player, length int) (err error)
func (*PacketPlayJoinGame) Write ¶
func (packet *PacketPlayJoinGame) Write(player *Player) (err error)
type PacketPlayKeepAlive ¶
type PacketPlayKeepAlive struct {
Identifier int
}
func (*PacketPlayKeepAlive) Handle ¶
func (packet *PacketPlayKeepAlive) Handle(player *Player)
func (*PacketPlayKeepAlive) Id ¶
func (packet *PacketPlayKeepAlive) Id() (int, Protocol)
func (*PacketPlayKeepAlive) Read ¶
func (packet *PacketPlayKeepAlive) Read(player *Player, length int) (err error)
func (*PacketPlayKeepAlive) Write ¶
func (packet *PacketPlayKeepAlive) Write(player *Player) (err error)
type PacketPlayMessage ¶
type PacketPlayMessage struct { Component string Position ChatPosition }
func (*PacketPlayMessage) Handle ¶
func (packet *PacketPlayMessage) Handle(player *Player)
func (*PacketPlayMessage) Id ¶
func (packet *PacketPlayMessage) Id() (int, Protocol)
func (*PacketPlayMessage) Read ¶
func (packet *PacketPlayMessage) Read(player *Player, length int) (err error)
func (*PacketPlayMessage) Write ¶
func (packet *PacketPlayMessage) Write(player *Player) (err error)
type PacketPlayPluginMessage ¶
func (*PacketPlayPluginMessage) Handle ¶
func (packet *PacketPlayPluginMessage) Handle(player *Player)
func (*PacketPlayPluginMessage) Id ¶
func (packet *PacketPlayPluginMessage) Id() (int, Protocol)
func (*PacketPlayPluginMessage) Read ¶
func (packet *PacketPlayPluginMessage) Read(player *Player, length int) (err error)
func (*PacketPlayPluginMessage) Write ¶
func (packet *PacketPlayPluginMessage) Write(player *Player) (err error)
type PacketPlayTabComplete ¶
type PacketPlayTabComplete struct {
Matches []string
}
func (*PacketPlayTabComplete) Handle ¶
func (packet *PacketPlayTabComplete) Handle(player *Player)
func (*PacketPlayTabComplete) Id ¶
func (packet *PacketPlayTabComplete) Id() (int, Protocol)
func (*PacketPlayTabComplete) Read ¶
func (packet *PacketPlayTabComplete) Read(player *Player, length int) (err error)
func (*PacketPlayTabComplete) Write ¶
func (packet *PacketPlayTabComplete) Write(player *Player) (err error)
type PacketPlayTabCompleteServerbound ¶
func (*PacketPlayTabCompleteServerbound) Handle ¶
func (packet *PacketPlayTabCompleteServerbound) Handle(player *Player)
func (*PacketPlayTabCompleteServerbound) Id ¶
func (packet *PacketPlayTabCompleteServerbound) Id() (int, Protocol)
func (*PacketPlayTabCompleteServerbound) Read ¶
func (packet *PacketPlayTabCompleteServerbound) Read(player *Player, length int) (err error)
func (*PacketPlayTabCompleteServerbound) Write ¶
func (packet *PacketPlayTabCompleteServerbound) Write(player *Player) (err error)
type PacketPlayerListHeaderFooter ¶
type PacketPlayerListHeaderFooter struct {}
func (*PacketPlayerListHeaderFooter) Handle ¶
func (packet *PacketPlayerListHeaderFooter) Handle(player *Player)
func (*PacketPlayerListHeaderFooter) Id ¶
func (packet *PacketPlayerListHeaderFooter) Id() (int, Protocol)
func (*PacketPlayerListHeaderFooter) Read ¶
func (packet *PacketPlayerListHeaderFooter) Read(player *Player, length int) (err error)
func (*PacketPlayerListHeaderFooter) Write ¶
func (packet *PacketPlayerListHeaderFooter) Write(player *Player) (err error)
type PacketPlayerPositionLook ¶
type PacketPlayerPositionLook struct { X float64 Y float64 Z float64 Yaw float32 Pitch float32 Flags uint8 TeleportId int }
func (*PacketPlayerPositionLook) Handle ¶
func (packet *PacketPlayerPositionLook) Handle(player *Player)
func (*PacketPlayerPositionLook) Id ¶
func (packet *PacketPlayerPositionLook) Id() (int, Protocol)
func (*PacketPlayerPositionLook) Read ¶
func (packet *PacketPlayerPositionLook) Read(player *Player, length int) (err error)
func (*PacketPlayerPositionLook) Write ¶
func (packet *PacketPlayerPositionLook) Write(player *Player) (err error)
type PacketSetCompression ¶
type PacketSetCompression struct {
Threshold int
}
func (*PacketSetCompression) Handle ¶
func (packet *PacketSetCompression) Handle(player *Player)
func (*PacketSetCompression) Id ¶
func (packet *PacketSetCompression) Id() (int, Protocol)
func (*PacketSetCompression) Read ¶
func (packet *PacketSetCompression) Read(player *Player, length int) (err error)
func (*PacketSetCompression) Write ¶
func (packet *PacketSetCompression) Write(player *Player) (err error)
type PacketStatusPing ¶
type PacketStatusPing struct {
Time uint64
}
func (*PacketStatusPing) Handle ¶
func (packet *PacketStatusPing) Handle(player *Player)
func (*PacketStatusPing) Id ¶
func (packet *PacketStatusPing) Id() (int, Protocol)
func (*PacketStatusPing) Read ¶
func (packet *PacketStatusPing) Read(player *Player, length int) (err error)
func (*PacketStatusPing) Write ¶
func (packet *PacketStatusPing) Write(player *Player) (err error)
type PacketStatusRequest ¶
type PacketStatusRequest struct{}
func (*PacketStatusRequest) Handle ¶
func (packet *PacketStatusRequest) Handle(player *Player)
func (*PacketStatusRequest) Id ¶
func (packet *PacketStatusRequest) Id() (int, Protocol)
func (*PacketStatusRequest) Read ¶
func (packet *PacketStatusRequest) Read(player *Player, length int) (err error)
func (*PacketStatusRequest) Write ¶
func (packet *PacketStatusRequest) Write(player *Player) (err error)
type PacketStatusResponse ¶
type PacketStatusResponse struct {
Response string
}
func (*PacketStatusResponse) Handle ¶
func (packet *PacketStatusResponse) Handle(player *Player)
func (*PacketStatusResponse) Id ¶
func (packet *PacketStatusResponse) Id() (int, Protocol)
func (*PacketStatusResponse) Read ¶
func (packet *PacketStatusResponse) Read(player *Player, length int) (err error)
func (*PacketStatusResponse) Write ¶
func (packet *PacketStatusResponse) Write(player *Player) (err error)
type PacketUpdateHealth ¶
func (*PacketUpdateHealth) Handle ¶
func (packet *PacketUpdateHealth) Handle(player *Player)
func (*PacketUpdateHealth) Id ¶
func (packet *PacketUpdateHealth) Id() (int, Protocol)
func (*PacketUpdateHealth) Read ¶
func (packet *PacketUpdateHealth) Read(player *Player, length int) (err error)
func (*PacketUpdateHealth) Write ¶
func (packet *PacketUpdateHealth) Write(player *Player) (err error)
type Player ¶
type Player struct {
// contains filtered or unexported fields
}
func (*Player) HackClientbound ¶
func (*Player) HackServerbound ¶
func (*Player) HandlePacket ¶
func (*Player) ReadByteArray ¶
func (*Player) ReadFloat32 ¶
func (*Player) ReadFloat64 ¶
func (*Player) ReadNStringLimited ¶
func (*Player) ReadPacket ¶
func (*Player) ReadPacketWithCompression ¶
func (*Player) ReadPacketWithoutCompression ¶
func (*Player) ReadPosition ¶
func (*Player) ReadString ¶
func (*Player) ReadStringLimited ¶
func (*Player) ReadUInt16 ¶
func (*Player) ReadUInt32 ¶
func (*Player) ReadUInt64 ¶
func (*Player) ReadVarInt ¶
func (*Player) SendActionBar ¶
func (p *Player) SendActionBar(message IChatComponent)
func (*Player) SendBukkitMessage ¶
func (*Player) SendMessage ¶
func (p *Player) SendMessage(message IChatComponent)
func (*Player) SendRawActionBar ¶
func (*Player) SendRawMessage ¶
func (*Player) WriteByteArray ¶
func (*Player) WriteFloat32 ¶
func (*Player) WriteFloat64 ¶
func (*Player) WritePacket ¶
func (*Player) WritePacketWithCompression ¶
func (*Player) WritePacketWithoutCompression ¶
func (*Player) WritePosition ¶
func (*Player) WriteString ¶
func (*Player) WriteStringRestricted ¶
func (*Player) WriteUInt16 ¶
func (*Player) WriteUInt32 ¶
func (*Player) WriteUInt64 ¶
func (*Player) WriteUInt8 ¶
func (*Player) WriteVarInt ¶
type PlayerChatEvent ¶
type PlayerClickType ¶
type PlayerClickType byte
const ( PlayerRightClick PlayerClickType = iota PlayerLeftClick )
type PlayerInteractEvent ¶
type PlayerInteractEvent struct { Player *Player ClickType PlayerClickType }
type PlayerJoinEvent ¶
type PlayerJoinEvent struct {
Player *Player
}
type PlayerKickEvent ¶
type PlayerQuitEvent ¶
type PlayerQuitEvent struct {
Player *Player
}
type PlayerRegistry ¶
type PlayerRegistry struct {
// contains filtered or unexported fields
}
func (*PlayerRegistry) ForEachPlayer ¶
func (registry *PlayerRegistry) ForEachPlayer(fn func(player *Player))
func (*PlayerRegistry) ForEachPlayerAsync ¶
func (registry *PlayerRegistry) ForEachPlayerAsync(fn func(player *Player))
func (*PlayerRegistry) GetPlayerCount ¶
func (registry *PlayerRegistry) GetPlayerCount() int
func (*PlayerRegistry) GetPlayers ¶
func (registry *PlayerRegistry) GetPlayers() []*Player
type PluginMessageEvent ¶
type Protocol ¶
type Protocol uint16
const ( V1_7_2 Protocol = 4 V1_7_6 Protocol = 5 V1_8 Protocol = 47 V1_9 Protocol = 107 V1_9_1 Protocol = 108 V1_9_2 Protocol = 109 V1_9_3 Protocol = 110 V1_10 Protocol = 210 V1_11 Protocol = 315 V1_11_1 Protocol = 316 V1_12 Protocol = 335 V1_12_1 Protocol = 338 V1_12_2 Protocol = 340 V1_13 Protocol = 393 V1_13_1 Protocol = 401 V1_13_2 Protocol = 404 )
type ScoreboardPosition ¶
type ScoreboardPosition uint8
const ( LIST ScoreboardPosition = iota SIDEBAR BELOW_NAME )
type StringChatComponent ¶
type StringChatComponent struct { Text string `json:"text"` *ChatComponent }
func ChatMessage ¶
func ChatMessage(text string) *StringChatComponent
func (*StringChatComponent) JSON ¶
func (component *StringChatComponent) JSON() (string, error)
func (*StringChatComponent) SetText ¶
func (component *StringChatComponent) SetText(text string)
Click to show internal directories.
Click to hide internal directories.