mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 04:17:07 +00:00
Merge remote-tracking branch 'origin/master' into Faster-Network
This commit is contained in:
commit
c40b00288b
@ -32,7 +32,7 @@ class PlayerAPI{
|
|||||||
$this->server->api->console->register("kill", "<player>", array($this, "commandHandler"));
|
$this->server->api->console->register("kill", "<player>", array($this, "commandHandler"));
|
||||||
$this->server->api->console->register("gamemode", "<mode> [player]", array($this, "commandHandler"));
|
$this->server->api->console->register("gamemode", "<mode> [player]", array($this, "commandHandler"));
|
||||||
$this->server->api->console->register("tp", "[target player] <destination player|w:world> OR /tp [target player] <x> <y> <z>", array($this, "commandHandler"));
|
$this->server->api->console->register("tp", "[target player] <destination player|w:world> OR /tp [target player] <x> <y> <z>", array($this, "commandHandler"));
|
||||||
$this->server->api->console->register("setspawn", "[player] [x] [y] [z]", array($this, "commandHandler"));
|
$this->server->api->console->register("spawnpoint", "[player] [x] [y] [z]", array($this, "commandHandler"));
|
||||||
$this->server->api->console->register("spawn", "", array($this, "commandHandler"));
|
$this->server->api->console->register("spawn", "", array($this, "commandHandler"));
|
||||||
$this->server->api->console->register("ping", "", array($this, "commandHandler"));
|
$this->server->api->console->register("ping", "", array($this, "commandHandler"));
|
||||||
$this->server->api->console->alias("lag", "ping");
|
$this->server->api->console->alias("lag", "ping");
|
||||||
@ -118,7 +118,7 @@ class PlayerAPI{
|
|||||||
public function commandHandler($cmd, $params, $issuer, $alias){
|
public function commandHandler($cmd, $params, $issuer, $alias){
|
||||||
$output = "";
|
$output = "";
|
||||||
switch($cmd){
|
switch($cmd){
|
||||||
case "setspawn":
|
case "spawnpoint":
|
||||||
if(!($issuer instanceof Player)){
|
if(!($issuer instanceof Player)){
|
||||||
$output .= "Please run this command in-game.\n";
|
$output .= "Please run this command in-game.\n";
|
||||||
break;
|
break;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
COMPILER_VERSION="0.15"
|
COMPILER_VERSION="0.16"
|
||||||
|
|
||||||
PHP_VERSION="5.5.8"
|
PHP_VERSION="5.5.9"
|
||||||
ZEND_VM="GOTO"
|
ZEND_VM="GOTO"
|
||||||
|
|
||||||
LIBEDIT_VERSION="0.3"
|
LIBEDIT_VERSION="0.3"
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
PMMP_VERSION=""
|
PMMP_VERSION=""
|
||||||
MAC_BUILD="PHP_5.5.8_x86_MacOS"
|
MAC_BUILD="PHP_5.5.9_x86_MacOS"
|
||||||
RPI_BUILD="PHP_5.5.8_ARM_Raspbian_hard"
|
RPI_BUILD="PHP_5.5.9_ARM_Raspbian_hard"
|
||||||
AND_BUILD="PHP_5.5.8_ARMv7_Android"
|
AND_BUILD="PHP_5.5.9_ARMv7_Android"
|
||||||
|
IOS_BUILD="PHP_5.5.9_ARMv6_iOS"
|
||||||
update=off
|
update=off
|
||||||
|
|
||||||
#Needed to use aliases
|
#Needed to use aliases
|
||||||
@ -70,8 +71,20 @@ else
|
|||||||
echo -n "[3/3] Obtaining PHP:"
|
echo -n "[3/3] Obtaining PHP:"
|
||||||
echo " detecting if build is available..."
|
echo " detecting if build is available..."
|
||||||
if [ "$(uname -s)" == "Darwin" ]; then
|
if [ "$(uname -s)" == "Darwin" ]; then
|
||||||
if ["$(uname -s)" == iPhone*] || ["$(uname -s)" == iPod*] || ["$(uname -s)" == iPad*]; then
|
set +e
|
||||||
echo -n "[3/3] No binaries for iOS available"
|
UNAME_M=$(uname -m)
|
||||||
|
IS_IOS=$(expr match $UNAME_M 'iP[a-zA-Z0-9,]*')
|
||||||
|
set -e
|
||||||
|
if [ $IS_IOS -gt 0 ]; then
|
||||||
|
rm -r -f bin/ >> /dev/null 2>&1
|
||||||
|
echo -n "[3/3] iOS PHP build available, downloading $IOS_BUILD.tar.gz..."
|
||||||
|
download_file "http://sourceforge.net/projects/pocketmine/files/builds/$IOS_BUILD.tar.gz" | tar -zx > /dev/null 2>&1
|
||||||
|
chmod +x ./bin/php5/bin/*
|
||||||
|
echo -n " regenerating php.ini..."
|
||||||
|
echo "date.timezone=$TIMEZONE" >> "./bin/php5/lib/php.ini"
|
||||||
|
echo "short_open_tag=0" >> "./bin/php5/lib/php.ini"
|
||||||
|
echo "asp_tags=0" >> "./bin/php5/lib/php.ini"
|
||||||
|
echo " done"
|
||||||
else
|
else
|
||||||
rm -r -f bin/ >> /dev/null 2>&1
|
rm -r -f bin/ >> /dev/null 2>&1
|
||||||
echo -n "[3/3] Mac OSX PHP build available, downloading $MAC_BUILD.tar.gz..."
|
echo -n "[3/3] Mac OSX PHP build available, downloading $MAC_BUILD.tar.gz..."
|
||||||
@ -99,7 +112,7 @@ else
|
|||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
set -e
|
set -e
|
||||||
rm -r -f bin/ >> /dev/null 2>&1
|
rm -r -f bin/ >> /dev/null 2>&1
|
||||||
echo -n "[3/3] Raspberry Pi build available, downloading $RPI_BUILD.tar.gz..."
|
echo -n "[3/3] Raspberry Pi PHP build available, downloading $RPI_BUILD.tar.gz..."
|
||||||
download_file "http://sourceforge.net/projects/pocketmine/files/builds/$RPI_BUILD.tar.gz" | tar -zx > /dev/null 2>&1
|
download_file "http://sourceforge.net/projects/pocketmine/files/builds/$RPI_BUILD.tar.gz" | tar -zx > /dev/null 2>&1
|
||||||
chmod +x ./bin/php5/bin/*
|
chmod +x ./bin/php5/bin/*
|
||||||
echo -n " regenerating php.ini..."
|
echo -n " regenerating php.ini..."
|
||||||
|
@ -40,13 +40,13 @@ if(ini_get("date.timezone") == ""){ //No Timezone set
|
|||||||
|
|
||||||
$daylight = (int) date("I");
|
$daylight = (int) date("I");
|
||||||
$d = timezone_name_from_abbr("", $offset, $daylight);
|
$d = timezone_name_from_abbr("", $offset, $daylight);
|
||||||
ini_set("date.timezone", $d);
|
@ini_set("date.timezone", $d);
|
||||||
date_default_timezone_set($d);
|
date_default_timezone_set($d);
|
||||||
}else{
|
}else{
|
||||||
$d = @date_default_timezone_get();
|
$d = @date_default_timezone_get();
|
||||||
if(strpos($d, "/") === false){
|
if(strpos($d, "/") === false){
|
||||||
$d = timezone_name_from_abbr($d);
|
$d = timezone_name_from_abbr($d);
|
||||||
ini_set("date.timezone", $d);
|
@ini_set("date.timezone", $d);
|
||||||
date_default_timezone_set($d);
|
date_default_timezone_set($d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ class Utils{
|
|||||||
public static $ip = false;
|
public static $ip = false;
|
||||||
|
|
||||||
public static function isOnline(){
|
public static function isOnline(){
|
||||||
return ((@fsockopen("google.com", 80, $e = null, $n = null, 2) !== false or @fsockopen("www.linux.org", 80, $e = null, $n = null, 2) !== false or @fsockopen("www.php.net", 80, $e = null, $n = null, 2) !== false) ? true:false);
|
return ((@fsockopen("8.8.8.8", 80, $e = null, $n = null, 2) !== false or @fsockopen("www.linux.org", 80, $e = null, $n = null, 2) !== false or @fsockopen("www.php.net", 80, $e = null, $n = null, 2) !== false) ? true:false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getUniqueID($raw = false, $extra = ""){
|
public static function getUniqueID($raw = false, $extra = ""){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user