SpecterGO

package module
v0.0.0-...-899e583 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2018 License: GPL-2.0, GPL-3.0 Imports: 12 Imported by: 3

README

https://github.com/SpecterTeam/Specter Build Status

A Minecraft: Bedrock Edition multiplayer software writen in GoLang.

Developer
Contributing

SpecterGO is currently under heavy developement and every contribution is accepted as long as it's clear, clean and is original.

Installation

Just run in your terminal ./compile.sh (make you sure it has perm if not do "chmod +x compile.sh") then go to the folder main and start the program ./main.

License

SpecterGO is under the GNU General Public License v3.0.

        SpecterGO  Copyright (C) 2018  SpecterTeam

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

SpecterGO is not affiliated with Mojang AB.

Documentation

Index

Constants

View Source
const (
	Survival = iota
	Creative
	Adventure
	Spectator
	View = Spectator
)
View Source
const (
	Name    = "SpecterGO"
	Version = "0.1-ALPHA"
)

Variables

View Source
var (
	TPS = 20
)

Functions

func GetLogger

func GetLogger() *utils.Logger

func HelpCommand

func HelpCommand() command.Command

func InitCommands

func InitCommands()

func InitDirectories

func InitDirectories(path string)

func Load

func Load()

func SetServer

func SetServer(s Server)

func StopCommand

func StopCommand() command.Command

Types

type Gamemode

type Gamemode int

type Player

type Player struct {
	// contains filtered or unexported fields
}

func NewPlayer

func NewPlayer() Player

func (*Player) DisplayName

func (p *Player) DisplayName() string

func (*Player) GameMode

func (p *Player) GameMode() Gamemode

func (*Player) Ip

func (p *Player) Ip() string

func (*Player) IsAuthenticated

func (p *Player) IsAuthenticated() bool

func (*Player) LoggedIn

func (p *Player) LoggedIn() bool

func (*Player) PlayedBefore

func (p *Player) PlayedBefore() bool

func (*Player) Port

func (p *Player) Port() int

func (*Player) Protocol

func (p *Player) Protocol() int

func (*Player) SetDisplayName

func (p *Player) SetDisplayName(displayName string)

func (*Player) SetGameMode

func (p *Player) SetGameMode(gameMode Gamemode)

func (*Player) SetIp

func (p *Player) SetIp(ip string)

func (*Player) SetLoggedIn

func (p *Player) SetLoggedIn(loggedIn bool)

func (*Player) SetPlayedBefore

func (p *Player) SetPlayedBefore(playedBefore bool)

func (*Player) SetPort

func (p *Player) SetPort(port int)

func (*Player) SetProtocol

func (p *Player) SetProtocol(protocol int)

func (*Player) SetSpawned

func (p *Player) SetSpawned(spawned bool)

func (*Player) SetUserName

func (p *Player) SetUserName(userName string)

func (*Player) SetXuid

func (p *Player) SetXuid(xuid string)

func (*Player) Spawned

func (p *Player) Spawned() bool

func (*Player) UserName

func (p *Player) UserName() string

func (*Player) Xuid

func (p *Player) Xuid() string

type Players

type Players map[int]Player

type RakNetInterface

type RakNetInterface struct {
	// contains filtered or unexported fields
}

func NewRakNetInterface

func NewRakNetInterface() RakNetInterface

func (*RakNetInterface) Minecraft

func (r *RakNetInterface) Minecraft() *identifier.Minecraft

func (*RakNetInterface) Players

func (r *RakNetInterface) Players() Players

func (*RakNetInterface) Server

func (r *RakNetInterface) Server() *raknetServer.Server

func (*RakNetInterface) SetPlayers

func (r *RakNetInterface) SetPlayers(players Players)

func (*RakNetInterface) SetServer

func (r *RakNetInterface) SetServer(server *raknetServer.Server)

func (*RakNetInterface) Shutdown

func (r *RakNetInterface) Shutdown()

type Server

type Server struct {
	ServerConfig utils.Config
	// contains filtered or unexported fields
}

func GetServer

func GetServer() *Server

func NewServer

func NewServer(path string) Server

func (*Server) DoTitleTick

func (s *Server) DoTitleTick()

func (*Server) Gamemode

func (s *Server) Gamemode() Gamemode

func (*Server) InitTicker

func (s *Server) InitTicker()

func (*Server) MaxPlayers

func (s *Server) MaxPlayers() int

func (*Server) Motd

func (s *Server) Motd() string

func (*Server) Path

func (s *Server) Path() string

func (*Server) Port

func (s *Server) Port() int

func (*Server) Raknet

func (s *Server) Raknet() *RakNetInterface

func (*Server) Running

func (s *Server) Running() bool

func (*Server) SetGamemode

func (s *Server) SetGamemode(gamemode Gamemode)

func (*Server) SetMaxPlayers

func (s *Server) SetMaxPlayers(max int)

func (*Server) SetMotd

func (s *Server) SetMotd(motd string)

func (*Server) SetOnlinePlayersCount

func (s *Server) SetOnlinePlayersCount(count int)

func (*Server) SetPath

func (s *Server) SetPath(path string)

func (*Server) SetRaknet

func (s *Server) SetRaknet(raknet RakNetInterface)

func (*Server) SetRunning

func (s *Server) SetRunning(running bool)

func (*Server) SetWorldName

func (s *Server) SetWorldName(name string)

func (*Server) Shutdown

func (s *Server) Shutdown()

func (*Server) Start

func (s *Server) Start()

func (*Server) Tick

func (s *Server) Tick()

func (*Server) WorldName

func (s *Server) WorldName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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