session

package
v0.0.0-...-d1826b6 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultFBCodeName = "Phoenix"
View Source
const DefaultFBHash = "ba7da8cc17265bc83be96a5c9f292e60784c7bed8757ee6bc84316e8671497e5"
View Source
const DefaultFBVersion = "1.4.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type FBPlainToken

type FBPlainToken struct {
	EncryptToken bool   `json:"encrypt_token"`
	Username     string `json:"username"`
	Password     string `json:"password"`
}

type Session

type Session struct {
	Config *SessionConfig
	// set/ set end callback
	CmdSetCbFn    func(X, Y, Z int)
	CmdSetEndCbFn func(X, Y, Z int)
	// contains filtered or unexported fields
}

func NewSession

func NewSession(config *SessionConfig) *Session

func (*Session) Execute

func (s *Session) Execute(cmd string)

func (*Session) GetEndPos

func (s *Session) GetEndPos() (x, y, z int)

func (*Session) GetPos

func (s *Session) GetPos() (x, y, z int)

func (*Session) Start

func (s *Session) Start() (terminateChan chan string, startErr error)

func (*Session) Stop

func (s *Session) Stop()

type SessionConfig

type SessionConfig struct {
	Lang          string `yaml:"lang" json:"lang"`
	FBUserName    string `yaml:"fb_username" json:"fb_username"`
	FBPassword    string `yaml:"fb_password" json:"fb_password"`
	FBToken       string `yaml:"fb_token" json:"fb_token"`
	ServerCode    string `yaml:"server_code" json:"server_code"`
	ServerPasswd  string `yaml:"server_passwd" json:"server_passwd"`
	RespondUser   string `yaml:"respond_user" json:"respond_user"`
	MuteWorldChat bool   `yaml:"mute_world_chat" json:"mute_world_chat"`

	// when "iamDeveloper" is true, the following fields are used,
	// otherwise, the fields are ignored (restore to default)
	NoPyRPC               bool   `yaml:"no_py_rpc" json:"no_py_rpc"`
	NBTConstructorEnabled bool   `yaml:"nbt_constructor_enable" json:"nbt_constructor_enable"`
	FBVersion             string `yaml:"fb_version" json:"fb_version"`
	FBHash                string `yaml:"fb_hash" json:"fb_hash"`
	FBCodeName            string `yaml:"fb_codename" json:"fb_codename"`
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig() *SessionConfig

func (*SessionConfig) IsDeveloper

func (config *SessionConfig) IsDeveloper() bool

Directories

Path Synopsis
bridge
fmt

Jump to

Keyboard shortcuts

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