PHP 클래스 pocketmine\Server

파일 보기 프로젝트 열기: robske110/ClearSky 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$netherName Name of nether world
$networkCompressionLevel
$propertyCache

공개 메소드들

메소드 설명
__construct ( ClassLoader $autoloader, ThreadedLogger $logger, string $filePath, string $dataPath, string $pluginPath )
__debugInfo ( )
addOnlinePlayer ( Player $player )
addOp ( string $name )
addPlayer ( $identifier, Player $player )
addRecipe ( pocketmine\inventory\Recipe $recipe )
addWhitelist ( string $name )
batchPackets ( array $players, array $packets, boolean $forceSync = false ) Broadcasts a list of packets in a batch to a list of players
broadcast ( string $message, string $permissions ) : integer
broadcastMessage ( string $message, Player[] | null $recipients = null ) : integer
broadcastPacket ( array $players, DataPacket $packet ) Broadcasts a Minecraft packet to a list of players
broadcastPacketsCallback ( $data, array $identifiers )
broadcastPopup ( string $popup, Player[] | null $recipients = null ) : integer
broadcastTip ( string $tip, Player[] | null $recipients = null ) : integer
checkConsole ( )
crashDump ( )
disablePlugins ( )
dispatchCommand ( pocketmine\command\CommandSender $sender, string $commandLine ) : boolean Executes a command from a CommandSender
doAutoSave ( )
enablePlugin ( pocketmine\plugin\Plugin $plugin )
enablePlugins ( integer $type )
exceptionHandler ( Throwable $e, $trace = null )
forceShutdown ( )
generateLevel ( string $name, integer $seed = null, string $generator = null, array $options = [] ) : boolean Generates a new level if it does not exists
getAllowFlight ( ) : boolean
getAllowInvCheats ( ) : boolean
getApiVersion ( ) : string
getAutoSave ( ) : boolean
getCodename ( ) : string
getCommandAliases ( ) : string[]
getCommandMap ( ) : SimpleCommandMap
getConfigBoolean ( string $variable, boolean $defaultValue = false ) : boolean
getConfigInt ( string $variable, integer $defaultValue ) : integer
getConfigString ( string $variable, string $defaultValue = "" ) : string
getCraftingManager ( ) : CraftingManager
getCrashDumpPath ( ) : string
getDataPath ( ) : string
getDefaultGamemode ( ) : integer
getDefaultLevel ( ) : Level
getDifficulty ( ) : integer
getDifficultyFromString ( string $str ) : integer
getEntityMetadata ( ) : EntityMetadataStore
getFilePath ( ) : string
getForceGamemode ( ) : boolean
getGamemode ( ) : integer
getGamemodeFromString ( string $str ) : integer Parses a string and returns a gamemode integer, -1 if not found
getGamemodeString ( integer $mode ) : string Returns the gamemode text name
getGenerateStructures ( ) : boolean
getIPBans ( ) : BanList
getInstance ( ) : Server
getIp ( ) : string
getLanguage ( ) : BaseLang
getLevel ( integer $levelId ) : Level
getLevelByName ( $name ) : Level
getLevelMetadata ( ) : LevelMetadataStore
getLevelType ( ) : string
getLevels ( ) : Level[]
getLoader ( ) : ClassLoader
getLogger ( ) : AttachableThreadedLogger
getMaxPlayers ( ) : integer
getMemoryManager ( ) : MemoryManager
getMotd ( ) : string
getName ( ) : string
getNameBans ( ) : BanList
getNetwork ( ) : Network
getOfflinePlayer ( string $name ) : OfflinePlayer | Player
getOfflinePlayerData ( string $name ) : CompoundTag
getOnlinePlayers ( ) : Player[]
getOps ( ) : Config
getPlayer ( string $name ) : Player
getPlayerExact ( string $name ) : Player
getPlayerMetadata ( ) : PlayerMetadataStore
getPluginCommand ( string $name ) : pocketmine\command\PluginIdentifiableCommand
getPluginManager ( ) : PluginManager
getPluginPath ( ) : string
getPocketMineBuild ( ) : string
getPocketMineVersion ( ) : string
getPort ( ) : integer
getProperty ( string $variable, mixed $defaultValue = null ) : mixed
getQueryInformation ( )
getScheduler ( ) : ServerScheduler
getServerUniqueId ( )
getSpawnRadius ( ) : integer
getTick ( ) : integer
getTickUsage ( ) : float Returns the TPS usage/load in %
getTickUsageAverage ( ) : float Returns the TPS usage/load average in %
getTicksPerSecond ( ) : float Returns the last server TPS measure
getTicksPerSecondAverage ( ) : float Returns the last server TPS average measure
getUpdater ( ) : AutoUpdater
getVersion ( ) : string
getViewDistance ( ) : integer
getWhitelisted ( ) : Config
handlePacket ( string $address, integer $port, string $payload )
handleSignal ( $signo )
hasWhitelist ( ) : boolean
isHardcore ( ) : boolean
isLanguageForced ( ) : boolean
isLevelGenerated ( string $name ) : boolean
isLevelLoaded ( string $name ) : boolean
isOp ( string $name ) : boolean
isRunning ( ) : boolean
isWhitelisted ( string $name ) : boolean
loadLevel ( string $name ) : boolean Loads a level from the data directory
loadPlugin ( pocketmine\plugin\Plugin $plugin )
matchPlayer ( string $partialName ) : Player[]
microSleep ( integer $microseconds )
onPlayerLogin ( Player $player )
reload ( )
reloadWhitelist ( )
removeOnlinePlayer ( Player $player )
removeOp ( string $name )
removePlayer ( Player $player )
removePlayerListData ( UUID $uuid, array $players = null )
removeWhitelist ( string $name )
saveOfflinePlayerData ( string $name, CompoundTag $nbtTag, boolean $async = false )
sendFullPlayerListData ( Player $p )
sendRecipeList ( Player $p )
sendUsage ( $type = SendUsageTask::TYPE_STATUS )
setAutoSave ( boolean $value )
setConfigBool ( string $variable, boolean $value )
setConfigInt ( string $variable, integer $value )
setConfigString ( string $variable, string $value )
setDefaultLevel ( Level $level ) Sets the default level to a different level This won't change the level-name property, it only affects the server on runtime
setshutdownreason ( $reason )
shouldSavePlayerData ( ) : boolean
shutdown ( ) Shutdowns the server correctly
start ( ) Starts the PocketMine-MP server and starts processing ticks and packets
unloadLevel ( Level $level, boolean $forceUnload = false ) : boolean
updatePlayerListData ( UUID $uuid, $entityId, $name, $skinId, $skinData, array $players = null )

비공개 메소드들

메소드 설명
checkTickUpdates ( $currentTick, $tickTime )
registerEntities ( )
registerTiles ( )
tick ( ) Tries to execute a server tick
tickProcessor ( )
titleTick ( )
translateConfig ( $config, $language = "eng" ) ClearSky internal use

메소드 상세

__construct() 공개 메소드

public __construct ( ClassLoader $autoloader, ThreadedLogger $logger, string $filePath, string $dataPath, string $pluginPath )
$autoloader ClassLoader
$logger ThreadedLogger
$filePath string
$dataPath string
$pluginPath string

__debugInfo() 공개 메소드

public __debugInfo ( )

addOnlinePlayer() 공개 메소드

public addOnlinePlayer ( Player $player )
$player Player

addOp() 공개 메소드

public addOp ( string $name )
$name string

addPlayer() 공개 메소드

public addPlayer ( $identifier, Player $player )
$player Player

addRecipe() 공개 메소드

public addRecipe ( pocketmine\inventory\Recipe $recipe )
$recipe pocketmine\inventory\Recipe

addWhitelist() 공개 메소드

public addWhitelist ( string $name )
$name string

batchPackets() 공개 메소드

Broadcasts a list of packets in a batch to a list of players
public batchPackets ( array $players, array $packets, boolean $forceSync = false )
$players array
$packets array
$forceSync boolean

broadcast() 공개 메소드

public broadcast ( string $message, string $permissions ) : integer
$message string
$permissions string
리턴 integer

broadcastMessage() 공개 메소드

public broadcastMessage ( string $message, Player[] | null $recipients = null ) : integer
$message string
$recipients Player[] | null
리턴 integer

broadcastPacket() 공개 정적인 메소드

Broadcasts a Minecraft packet to a list of players
public static broadcastPacket ( array $players, DataPacket $packet )
$players array
$packet pocketmine\network\protocol\DataPacket

broadcastPacketsCallback() 공개 메소드

public broadcastPacketsCallback ( $data, array $identifiers )
$identifiers array

broadcastPopup() 공개 메소드

public broadcastPopup ( string $popup, Player[] | null $recipients = null ) : integer
$popup string
$recipients Player[] | null
리턴 integer

broadcastTip() 공개 메소드

public broadcastTip ( string $tip, Player[] | null $recipients = null ) : integer
$tip string
$recipients Player[] | null
리턴 integer

checkConsole() 공개 메소드

public checkConsole ( )

crashDump() 공개 메소드

public crashDump ( )

disablePlugins() 공개 메소드

public disablePlugins ( )

dispatchCommand() 공개 메소드

Executes a command from a CommandSender
public dispatchCommand ( pocketmine\command\CommandSender $sender, string $commandLine ) : boolean
$sender pocketmine\command\CommandSender
$commandLine string
리턴 boolean

doAutoSave() 공개 메소드

public doAutoSave ( )

enablePlugin() 공개 메소드

public enablePlugin ( pocketmine\plugin\Plugin $plugin )
$plugin pocketmine\plugin\Plugin

enablePlugins() 공개 메소드

public enablePlugins ( integer $type )
$type integer

exceptionHandler() 공개 메소드

public exceptionHandler ( Throwable $e, $trace = null )
$e Throwable

forceShutdown() 공개 메소드

public forceShutdown ( )

generateLevel() 공개 메소드

Generates a new level if it does not exists
public generateLevel ( string $name, integer $seed = null, string $generator = null, array $options = [] ) : boolean
$name string
$seed integer
$generator string Class name that extends pocketmine\level\generator\Noise
$options array
리턴 boolean

getAllowFlight() 공개 메소드

public getAllowFlight ( ) : boolean
리턴 boolean

getAllowInvCheats() 공개 메소드

public getAllowInvCheats ( ) : boolean
리턴 boolean

getApiVersion() 공개 메소드

public getApiVersion ( ) : string
리턴 string

getAutoSave() 공개 메소드

public getAutoSave ( ) : boolean
리턴 boolean

getCodename() 공개 메소드

public getCodename ( ) : string
리턴 string

getCommandAliases() 공개 메소드

public getCommandAliases ( ) : string[]
리턴 string[]

getCommandMap() 공개 메소드

public getCommandMap ( ) : SimpleCommandMap
리턴 pocketmine\command\SimpleCommandMap

getConfigBoolean() 공개 메소드

public getConfigBoolean ( string $variable, boolean $defaultValue = false ) : boolean
$variable string
$defaultValue boolean
리턴 boolean

getConfigInt() 공개 메소드

public getConfigInt ( string $variable, integer $defaultValue ) : integer
$variable string
$defaultValue integer
리턴 integer

getConfigString() 공개 메소드

public getConfigString ( string $variable, string $defaultValue = "" ) : string
$variable string
$defaultValue string
리턴 string

getCraftingManager() 공개 메소드

public getCraftingManager ( ) : CraftingManager
리턴 pocketmine\inventory\CraftingManager

getCrashDumpPath() 공개 메소드

public getCrashDumpPath ( ) : string
리턴 string

getDataPath() 공개 메소드

public getDataPath ( ) : string
리턴 string

getDefaultGamemode() 공개 메소드

public getDefaultGamemode ( ) : integer
리턴 integer

getDefaultLevel() 공개 메소드

public getDefaultLevel ( ) : Level
리턴 pocketmine\level\Level

getDifficulty() 공개 메소드

public getDifficulty ( ) : integer
리턴 integer

getDifficultyFromString() 공개 정적인 메소드

public static getDifficultyFromString ( string $str ) : integer
$str string
리턴 integer

getEntityMetadata() 공개 메소드

public getEntityMetadata ( ) : EntityMetadataStore
리턴 pocketmine\metadata\EntityMetadataStore

getFilePath() 공개 메소드

public getFilePath ( ) : string
리턴 string

getForceGamemode() 공개 메소드

public getForceGamemode ( ) : boolean
리턴 boolean

getGamemode() 공개 메소드

public getGamemode ( ) : integer
리턴 integer

getGamemodeFromString() 공개 정적인 메소드

Parses a string and returns a gamemode integer, -1 if not found
public static getGamemodeFromString ( string $str ) : integer
$str string
리턴 integer

getGamemodeString() 공개 정적인 메소드

Returns the gamemode text name
public static getGamemodeString ( integer $mode ) : string
$mode integer
리턴 string

getGenerateStructures() 공개 메소드

public getGenerateStructures ( ) : boolean
리턴 boolean

getIPBans() 공개 메소드

public getIPBans ( ) : BanList
리턴 pocketmine\permission\BanList

getInstance() 공개 정적인 메소드

public static getInstance ( ) : Server
리턴 Server

getIp() 공개 메소드

public getIp ( ) : string
리턴 string

getLanguage() 공개 메소드

public getLanguage ( ) : BaseLang
리턴 pocketmine\lang\BaseLang

getLevel() 공개 메소드

public getLevel ( integer $levelId ) : Level
$levelId integer
리턴 pocketmine\level\Level

getLevelByName() 공개 메소드

public getLevelByName ( $name ) : Level
$name
리턴 pocketmine\level\Level

getLevelMetadata() 공개 메소드

public getLevelMetadata ( ) : LevelMetadataStore
리턴 pocketmine\metadata\LevelMetadataStore

getLevelType() 공개 메소드

public getLevelType ( ) : string
리턴 string

getLevels() 공개 메소드

public getLevels ( ) : Level[]
리턴 pocketmine\level\Level[]

getLoader() 공개 메소드

public getLoader ( ) : ClassLoader
리턴 ClassLoader

getLogger() 공개 메소드

public getLogger ( ) : AttachableThreadedLogger
리턴 AttachableThreadedLogger

getMaxPlayers() 공개 메소드

public getMaxPlayers ( ) : integer
리턴 integer

getMemoryManager() 공개 메소드

public getMemoryManager ( ) : MemoryManager
리턴 MemoryManager

getMotd() 공개 메소드

public getMotd ( ) : string
리턴 string

getName() 공개 메소드

public getName ( ) : string
리턴 string

getNameBans() 공개 메소드

public getNameBans ( ) : BanList
리턴 pocketmine\permission\BanList

getNetwork() 공개 메소드

public getNetwork ( ) : Network
리턴 pocketmine\network\Network

getOfflinePlayer() 공개 메소드

public getOfflinePlayer ( string $name ) : OfflinePlayer | Player
$name string
리턴 OfflinePlayer | Player

getOfflinePlayerData() 공개 메소드

public getOfflinePlayerData ( string $name ) : CompoundTag
$name string
리턴 pocketmine\nbt\tag\CompoundTag

getOnlinePlayers() 공개 메소드

public getOnlinePlayers ( ) : Player[]
리턴 Player[]

getOps() 공개 메소드

public getOps ( ) : Config
리턴 pocketmine\utils\Config

getPlayer() 공개 메소드

public getPlayer ( string $name ) : Player
$name string
리턴 Player

getPlayerExact() 공개 메소드

public getPlayerExact ( string $name ) : Player
$name string
리턴 Player

getPlayerMetadata() 공개 메소드

public getPlayerMetadata ( ) : PlayerMetadataStore
리턴 pocketmine\metadata\PlayerMetadataStore

getPluginCommand() 공개 메소드

public getPluginCommand ( string $name ) : pocketmine\command\PluginIdentifiableCommand
$name string
리턴 pocketmine\command\PluginIdentifiableCommand

getPluginManager() 공개 메소드

public getPluginManager ( ) : PluginManager
리턴 pocketmine\plugin\PluginManager

getPluginPath() 공개 메소드

public getPluginPath ( ) : string
리턴 string

getPocketMineBuild() 공개 메소드

public getPocketMineBuild ( ) : string
리턴 string

getPocketMineVersion() 공개 메소드

public getPocketMineVersion ( ) : string
리턴 string

getPort() 공개 메소드

public getPort ( ) : integer
리턴 integer

getProperty() 공개 메소드

public getProperty ( string $variable, mixed $defaultValue = null ) : mixed
$variable string
$defaultValue mixed
리턴 mixed

getQueryInformation() 공개 메소드

public getQueryInformation ( )

getScheduler() 공개 메소드

public getScheduler ( ) : ServerScheduler
리턴 pocketmine\scheduler\ServerScheduler

getServerUniqueId() 공개 메소드

public getServerUniqueId ( )

getSpawnRadius() 공개 메소드

public getSpawnRadius ( ) : integer
리턴 integer

getTick() 공개 메소드

public getTick ( ) : integer
리턴 integer

getTickUsage() 공개 메소드

Returns the TPS usage/load in %
public getTickUsage ( ) : float
리턴 float

getTickUsageAverage() 공개 메소드

Returns the TPS usage/load average in %
public getTickUsageAverage ( ) : float
리턴 float

getTicksPerSecond() 공개 메소드

Returns the last server TPS measure
public getTicksPerSecond ( ) : float
리턴 float

getTicksPerSecondAverage() 공개 메소드

Returns the last server TPS average measure
public getTicksPerSecondAverage ( ) : float
리턴 float

getUpdater() 공개 메소드

public getUpdater ( ) : AutoUpdater
리턴 pocketmine\updater\AutoUpdater

getVersion() 공개 메소드

public getVersion ( ) : string
리턴 string

getViewDistance() 공개 메소드

public getViewDistance ( ) : integer
리턴 integer

getWhitelisted() 공개 메소드

public getWhitelisted ( ) : Config
리턴 pocketmine\utils\Config

handlePacket() 공개 메소드

public handlePacket ( string $address, integer $port, string $payload )
$address string
$port integer
$payload string TODO: move this to Network

handleSignal() 공개 메소드

public handleSignal ( $signo )

hasWhitelist() 공개 메소드

public hasWhitelist ( ) : boolean
리턴 boolean

isHardcore() 공개 메소드

public isHardcore ( ) : boolean
리턴 boolean

isLanguageForced() 공개 메소드

public isLanguageForced ( ) : boolean
리턴 boolean

isLevelGenerated() 공개 메소드

public isLevelGenerated ( string $name ) : boolean
$name string
리턴 boolean

isLevelLoaded() 공개 메소드

public isLevelLoaded ( string $name ) : boolean
$name string
리턴 boolean

isOp() 공개 메소드

public isOp ( string $name ) : boolean
$name string
리턴 boolean

isRunning() 공개 메소드

public isRunning ( ) : boolean
리턴 boolean

isWhitelisted() 공개 메소드

public isWhitelisted ( string $name ) : boolean
$name string
리턴 boolean

loadLevel() 공개 메소드

Loads a level from the data directory
public loadLevel ( string $name ) : boolean
$name string
리턴 boolean

loadPlugin() 공개 메소드

사용 중단:
public loadPlugin ( pocketmine\plugin\Plugin $plugin )
$plugin pocketmine\plugin\Plugin

matchPlayer() 공개 메소드

public matchPlayer ( string $partialName ) : Player[]
$partialName string
리턴 Player[]

microSleep() 공개 정적인 메소드

public static microSleep ( integer $microseconds )
$microseconds integer

onPlayerLogin() 공개 메소드

public onPlayerLogin ( Player $player )
$player Player

reload() 공개 메소드

public reload ( )

reloadWhitelist() 공개 메소드

public reloadWhitelist ( )

removeOnlinePlayer() 공개 메소드

public removeOnlinePlayer ( Player $player )
$player Player

removeOp() 공개 메소드

public removeOp ( string $name )
$name string

removePlayer() 공개 메소드

public removePlayer ( Player $player )
$player Player

removePlayerListData() 공개 메소드

public removePlayerListData ( UUID $uuid, array $players = null )
$uuid pocketmine\utils\UUID
$players array

removeWhitelist() 공개 메소드

public removeWhitelist ( string $name )
$name string

saveOfflinePlayerData() 공개 메소드

public saveOfflinePlayerData ( string $name, CompoundTag $nbtTag, boolean $async = false )
$name string
$nbtTag pocketmine\nbt\tag\CompoundTag
$async boolean

sendFullPlayerListData() 공개 메소드

public sendFullPlayerListData ( Player $p )
$p Player

sendRecipeList() 공개 메소드

public sendRecipeList ( Player $p )
$p Player

sendUsage() 공개 메소드

public sendUsage ( $type = SendUsageTask::TYPE_STATUS )

setAutoSave() 공개 메소드

public setAutoSave ( boolean $value )
$value boolean

setConfigBool() 공개 메소드

public setConfigBool ( string $variable, boolean $value )
$variable string
$value boolean

setConfigInt() 공개 메소드

public setConfigInt ( string $variable, integer $value )
$variable string
$value integer

setConfigString() 공개 메소드

public setConfigString ( string $variable, string $value )
$variable string
$value string

setDefaultLevel() 공개 메소드

Sets the default level to a different level This won't change the level-name property, it only affects the server on runtime
public setDefaultLevel ( Level $level )
$level pocketmine\level\Level

setshutdownreason() 공개 메소드

public setshutdownreason ( $reason )

shouldSavePlayerData() 공개 메소드

public shouldSavePlayerData ( ) : boolean
리턴 boolean

shutdown() 공개 메소드

Shutdowns the server correctly
public shutdown ( )

start() 공개 메소드

Starts the PocketMine-MP server and starts processing ticks and packets
public start ( )

unloadLevel() 공개 메소드

public unloadLevel ( Level $level, boolean $forceUnload = false ) : boolean
$level pocketmine\level\Level
$forceUnload boolean
리턴 boolean

updatePlayerListData() 공개 메소드

public updatePlayerListData ( UUID $uuid, $entityId, $name, $skinId, $skinData, array $players = null )
$uuid pocketmine\utils\UUID
$players array

프로퍼티 상세

$netherName 공개적으로 프로퍼티

Name of nether world
public $netherName

$networkCompressionLevel 공개적으로 프로퍼티

public $networkCompressionLevel

$propertyCache 공개적으로 프로퍼티

public $propertyCache