plugin

package
v0.0.0-...-f4d221b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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

func (*BasePlugin) Tellraw

func (bp *BasePlugin) Tellraw(Target string, msg []tellraw.Message) string

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

type MinecraftPlayerInfo_Extra map[string]any

func (*MinecraftPlayerInfo_Extra) UnmarshalJSON

func (extra *MinecraftPlayerInfo_Extra) UnmarshalJSON(data []byte) error

type MinecraftPosition

type MinecraftPosition struct {
	Position  [3]float64
	Dimension string
}

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 (*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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL