Phpcraft
|
Public Member Functions | |
__construct (?string $name=null, array $custom_config_defaults=[], ?UserInterface $ui=null, $private_key=null) | |
reloadConfig () | |
saveConfig () | |
Public Member Functions inherited from Phpcraft\Server | |
__construct (array $streams=[], $private_key=null) | |
isOpen () | |
setGroups (array $groups) | |
getGroup (string $name) | |
isListening () | |
getPorts () | |
getMotd () | |
isOnlineMode () | |
broadcast ($msg, int $position=ChatPosition::SYSTEM) | |
getPlayers () | |
adminBroadcast ($msg, string $permission="everything") | |
permissionBroadcast (string $permission, $msg, int $position=ChatPosition::SYSTEM) | |
sendAdminBroadcast ($message, string $permission="everything") | |
getOfflinePlayer (string $name_or_uuid) | |
getPlayer ($name_or_uuid) | |
getName () | |
sendMessage ($message) | |
close ($reason=null) | |
softClose () | |
hasPermission (string $permission) | |
hasServer () | |
getServer () | |
hasPosition () | |
getPosition () | |
Static Public Member Functions | |
static | getDefaultName () |
static | cliStart (?string $name=null, array $custom_config_defaults=[]) |
static | start (?string $name=null, bool $offline=false, bool $plain=false, array $custom_config_defaults=[]) |
Public Attributes | |
$name | |
$ui | |
$config | |
$custom_config_defaults | |
$config_reloaded_function | |
$spawn_position | |
Public Attributes inherited from Phpcraft\Server | |
$streams | |
$private_key | |
$clients | |
$persist_configs = false | |
$compression_threshold = 256 | |
$groups = [] | |
$join_function = null | |
$packet_function = null | |
$disconnect_function = null | |
$list_ping_function = null | |
$allow_incompatible_versions = false | |
$open_condition | |
Public Attributes inherited from Phpcraft\BareServer | |
$worlds = [] | |
$eidCounter | |
Additional Inherited Members | |
Protected Attributes inherited from Phpcraft\Server | |
$tick_loop | |
Phpcraft\IntegratedServer::__construct | ( | ?string | $name = null , |
array | $custom_config_defaults = [] , |
||
?UserInterface | $ui = null , |
||
$private_key = null |
|||
) |
string | null | $name | |
array | $custom_config_defaults | |
UserInterface | null | $ui | |
resource | null | $private_key | A private key generated using openssl_pkey_new(["private_key_bits" => 1024, "private_key_type" => OPENSSL_KEYTYPE_RSA]) to use for online mode, or null to use offline mode. |
|
static |
Starts the integrated server using $argv.
string | null | $name | |
array | $custom_config_defaults |
|
static |
Reimplemented in Phpcraft\ProxyServer.
Phpcraft\IntegratedServer::reloadConfig | ( | ) |
Phpcraft\IntegratedServer::saveConfig | ( | ) |
|
static |
Starts the integrated server using the given settings.
string | null | $name | |
bool | $offline | |
bool | $plain | |
array | $custom_config_defaults |
array< string, mixed > Phpcraft\IntegratedServer::$config |
callable null Phpcraft\IntegratedServer::$config_reloaded_function |
The function called after the config has been reloaded.
array< string, mixed > Phpcraft\IntegratedServer::$custom_config_defaults |
string Phpcraft\IntegratedServer::$name |
Point3D Phpcraft\IntegratedServer::$spawn_position |
The position where clients will spawn at. Defaults to
new Point3D(0, 16, 0)
.
PlainUserInterface Phpcraft\IntegratedServer::$ui |