pluginabi

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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin interface {
	PluginName
	Init(PluginManager) error
	Start()
	Pause()
}

type PluginManager

type PluginManager interface {
	Printf(scope string, format string, a ...any) (n int, err error)
	Println(scope string, a ...any) (n int, err error)
	RegisterLogProcesser(context PluginName, process func(logmsg string, iscommandrespone bool)) (channel chan *manager.MessageResponse)
	RegisterServerMessageProcesser(skipRegister bool) (channel chan *manager.MessageResponse)
	RegisterPlugin(plugin Plugin) (err error)
	GetPlugin(pluginName string) Plugin
	UnregisterServerMessageProcesser(channel chan *manager.MessageResponse)

	RunCommand(cmd string) string

	Status(opts ...grpc.CallOption) (*manager.StatusResponse, error)
	Stop(opts ...grpc.CallOption) (*emptypb.Empty, error)
	StartMinecraft() (err error)
}

type PluginName

type PluginName interface {
	Name() string
	DisplayName() string
}

type PluginNameWrapper

type PluginNameWrapper struct {
	PluginName        string
	PluginDisplayName string
}

func (*PluginNameWrapper) DisplayName

func (p *PluginNameWrapper) DisplayName() string

func (*PluginNameWrapper) Name

func (p *PluginNameWrapper) Name() string

Jump to

Keyboard shortcuts

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