Documentation ¶
Index ¶
- Variables
- type BasePlugin
- func (bp *BasePlugin) DisplayName() string
- func (bp *BasePlugin) DisplayScoreboard(name string, slot string)
- func (bp *BasePlugin) EnsureScoreboard(name string, criterion string, displayname ...string)
- func (bp *BasePlugin) GetAllScore() (scores map[string]map[string]int64)
- func (bp *BasePlugin) GetOneScore(player string, name string) (scores int64)
- func (bp *BasePlugin) GetPlayerInfo(player string) (*MinecraftPlayerInfo, error)
- func (bp *BasePlugin) GetPlayerInfo_Position(player string) (*MinecraftPlayerInfo, error)
- func (bp *BasePlugin) GetPlayerList() []string
- func (bp *BasePlugin) Init(pm pluginabi.PluginManager, plugin pluginabi.Plugin) error
- func (bp *BasePlugin) Name() string
- func (bp *BasePlugin) Pause()
- func (bp *BasePlugin) Println(a ...any) (int, error)
- func (bp *BasePlugin) RegisterCommand(command string, commandFunc func(string, ...string)) error
- func (bp *BasePlugin) RunCommand(command string) string
- func (bp *BasePlugin) ScoreAction(player string, name string, action string, count int64)
- func (bp *BasePlugin) Start()
- func (bp *BasePlugin) Teleport(src string, dst any) error
- func (bp *BasePlugin) Tellraw(Target string, msg []tellraw.Message) string
- type MinecraftPlayerInfo
- type MinecraftPlayerInfo_Extra
- type MinecraftPosition
- type PlayerInfo
- func (pi *PlayerInfo) Commit(mpi *MinecraftPlayerInfo) error
- func (pi *PlayerInfo) DisplayName() string
- func (pi *PlayerInfo) GetPlayerInfo(player string) (playerInfo *MinecraftPlayerInfo, err error)
- func (pi *PlayerInfo) GetPlayerInfo_Position(player string) (playerInfo *MinecraftPlayerInfo, err error)
- func (pi *PlayerInfo) Init(pm pluginabi.PluginManager) (err error)
- func (pi *PlayerInfo) Load() error
- func (pi *PlayerInfo) Name() string
- func (pi *PlayerInfo) Pause()
- func (pi *PlayerInfo) Start()
- type ScoreboardCore
- type SimpleCommand
- type TeleportCore
- func (tc *TeleportCore) DisplayName() string
- func (tc *TeleportCore) Init(pm pluginabi.PluginManager) (err error)
- func (tc *TeleportCore) Name() string
- func (tc *TeleportCore) Teleport(src string, dst any) error
- func (tc *TeleportCore) TeleportPlayer(src string, dst string) error
- func (tc *TeleportCore) TeleportPosition(src string, dst *MinecraftPosition) error
Constants ¶
This section is empty.
Variables ¶
View Source
var PlayerEnterLeaveMessage = regexp.MustCompile(`(left|joined) the game`)
View Source
var ScoreboardTrackedPlayer = regexp.MustCompile(`There are \d tracked .*?:\s?(.*)`)
View Source
var ScoreboardTrackedPlayerScore = regexp.MustCompile(`^.*? has (\d+)`)
Functions ¶
This section is empty.
Types ¶
type BasePlugin ¶
type BasePlugin struct {
// contains filtered or unexported fields
}
func (*BasePlugin) DisplayName ¶
func (bp *BasePlugin) DisplayName() string
func (*BasePlugin) DisplayScoreboard ¶
func (bp *BasePlugin) DisplayScoreboard(name string, slot string)
func (*BasePlugin) EnsureScoreboard ¶
func (bp *BasePlugin) EnsureScoreboard(name string, criterion string, displayname ...string)
func (*BasePlugin) GetAllScore ¶
func (bp *BasePlugin) GetAllScore() (scores map[string]map[string]int64)
func (*BasePlugin) GetOneScore ¶
func (bp *BasePlugin) GetOneScore(player string, name string) (scores int64)
func (*BasePlugin) GetPlayerInfo ¶
func (bp *BasePlugin) GetPlayerInfo(player string) (*MinecraftPlayerInfo, error)
func (*BasePlugin) GetPlayerInfo_Position ¶
func (bp *BasePlugin) GetPlayerInfo_Position(player string) (*MinecraftPlayerInfo, error)
func (*BasePlugin) GetPlayerList ¶
func (bp *BasePlugin) GetPlayerList() []string
func (*BasePlugin) Init ¶
func (bp *BasePlugin) Init(pm pluginabi.PluginManager, plugin pluginabi.Plugin) error
func (*BasePlugin) Name ¶
func (bp *BasePlugin) Name() string
func (*BasePlugin) Pause ¶
func (bp *BasePlugin) Pause()
func (*BasePlugin) Println ¶
func (bp *BasePlugin) Println(a ...any) (int, error)
func (*BasePlugin) RegisterCommand ¶
func (bp *BasePlugin) RegisterCommand(command string, commandFunc func(string, ...string)) error
func (*BasePlugin) RunCommand ¶
func (bp *BasePlugin) RunCommand(command string) string
func (*BasePlugin) ScoreAction ¶
func (bp *BasePlugin) ScoreAction(player string, name string, action string, count int64)
func (*BasePlugin) Start ¶
func (bp *BasePlugin) Start()
func (*BasePlugin) Teleport ¶
func (bp *BasePlugin) Teleport(src string, dst any) error
type MinecraftPlayerInfo ¶
type MinecraftPlayerInfo struct { Player string Location *MinecraftPosition LastLocation *MinecraftPosition UUID string Extra MinecraftPlayerInfo_Extra // contains filtered or unexported fields }
func (*MinecraftPlayerInfo) Commit ¶
func (mpi *MinecraftPlayerInfo) Commit() error
func (*MinecraftPlayerInfo) GetExtra ¶
func (mpi *MinecraftPlayerInfo) GetExtra(context pluginabi.PluginName, v any) (extra any)
func (*MinecraftPlayerInfo) PutExtra ¶
func (mpi *MinecraftPlayerInfo) PutExtra(context pluginabi.PluginName, extra any)
type MinecraftPlayerInfo_Extra ¶
func (*MinecraftPlayerInfo_Extra) UnmarshalJSON ¶
func (extra *MinecraftPlayerInfo_Extra) UnmarshalJSON(data []byte) error
type PlayerInfo ¶
type PlayerInfo struct { BasePlugin // contains filtered or unexported fields }
func (*PlayerInfo) Commit ¶
func (pi *PlayerInfo) Commit(mpi *MinecraftPlayerInfo) error
func (*PlayerInfo) DisplayName ¶
func (pi *PlayerInfo) DisplayName() string
func (*PlayerInfo) GetPlayerInfo ¶
func (pi *PlayerInfo) GetPlayerInfo(player string) (playerInfo *MinecraftPlayerInfo, err error)
func (*PlayerInfo) GetPlayerInfo_Position ¶
func (pi *PlayerInfo) GetPlayerInfo_Position(player string) (playerInfo *MinecraftPlayerInfo, err error)
func (*PlayerInfo) Init ¶
func (pi *PlayerInfo) Init(pm pluginabi.PluginManager) (err error)
func (*PlayerInfo) Load ¶
func (pi *PlayerInfo) Load() error
func (*PlayerInfo) Name ¶
func (pi *PlayerInfo) Name() string
func (*PlayerInfo) Pause ¶
func (pi *PlayerInfo) Pause()
func (*PlayerInfo) Start ¶
func (pi *PlayerInfo) Start()
type ScoreboardCore ¶
type ScoreboardCore struct { BasePlugin // contains filtered or unexported fields }
func (*ScoreboardCore) DisplayName ¶
func (sc *ScoreboardCore) DisplayName() string
func (*ScoreboardCore) Init ¶
func (sc *ScoreboardCore) Init(pm pluginabi.PluginManager) error
func (*ScoreboardCore) Name ¶
func (sc *ScoreboardCore) Name() string
func (*ScoreboardCore) Start ¶
func (sc *ScoreboardCore) Start()
type SimpleCommand ¶
type SimpleCommand struct { BasePlugin // contains filtered or unexported fields }
func (*SimpleCommand) DisplayName ¶
func (sp *SimpleCommand) DisplayName() string
func (*SimpleCommand) Init ¶
func (sp *SimpleCommand) Init(pm pluginabi.PluginManager) (err error)
func (*SimpleCommand) Name ¶
func (sp *SimpleCommand) Name() string
func (*SimpleCommand) RegisterCommand ¶
func (sp *SimpleCommand) RegisterCommand(context pluginabi.PluginName, command string, commandFunc func(string, ...string)) error
type TeleportCore ¶
type TeleportCore struct {
BasePlugin
}
func (*TeleportCore) DisplayName ¶
func (tc *TeleportCore) DisplayName() string
func (*TeleportCore) Init ¶
func (tc *TeleportCore) Init(pm pluginabi.PluginManager) (err error)
func (*TeleportCore) Name ¶
func (tc *TeleportCore) Name() string
func (*TeleportCore) Teleport ¶
func (tc *TeleportCore) Teleport(src string, dst any) error
func (*TeleportCore) TeleportPlayer ¶
func (tc *TeleportCore) TeleportPlayer(src string, dst string) error
func (*TeleportCore) TeleportPosition ¶
func (tc *TeleportCore) TeleportPosition(src string, dst *MinecraftPosition) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.