mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 03:47:16 +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("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("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("ping", "", array($this, "commandHandler"));
|
||||
$this->server->api->console->alias("lag", "ping");
|
||||
@ -118,7 +118,7 @@ class PlayerAPI{
|
||||
public function commandHandler($cmd, $params, $issuer, $alias){
|
||||
$output = "";
|
||||
switch($cmd){
|
||||
case "setspawn":
|
||||
case "spawnpoint":
|
||||
if(!($issuer instanceof Player)){
|
||||
$output .= "Please run this command in-game.\n";
|
||||
break;
|
||||
@ -497,4 +497,4 @@ class PlayerAPI{
|
||||
$this->server->handle("player.offline.save", $data);
|
||||
$data->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
COMPILER_VERSION="0.15"
|
||||
COMPILER_VERSION="0.16"
|
||||
|
||||
PHP_VERSION="5.5.8"
|
||||
PHP_VERSION="5.5.9"
|
||||
ZEND_VM="GOTO"
|
||||
|
||||
LIBEDIT_VERSION="0.3"
|
||||
|
@ -1,8 +1,9 @@
|
||||
#!/bin/bash
|
||||
PMMP_VERSION=""
|
||||
MAC_BUILD="PHP_5.5.8_x86_MacOS"
|
||||
RPI_BUILD="PHP_5.5.8_ARM_Raspbian_hard"
|
||||
AND_BUILD="PHP_5.5.8_ARMv7_Android"
|
||||
MAC_BUILD="PHP_5.5.9_x86_MacOS"
|
||||
RPI_BUILD="PHP_5.5.9_ARM_Raspbian_hard"
|
||||
AND_BUILD="PHP_5.5.9_ARMv7_Android"
|
||||
IOS_BUILD="PHP_5.5.9_ARMv6_iOS"
|
||||
update=off
|
||||
|
||||
#Needed to use aliases
|
||||
@ -70,8 +71,20 @@ else
|
||||
echo -n "[3/3] Obtaining PHP:"
|
||||
echo " detecting if build is available..."
|
||||
if [ "$(uname -s)" == "Darwin" ]; then
|
||||
if ["$(uname -s)" == iPhone*] || ["$(uname -s)" == iPod*] || ["$(uname -s)" == iPad*]; then
|
||||
echo -n "[3/3] No binaries for iOS available"
|
||||
set +e
|
||||
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
|
||||
rm -r -f bin/ >> /dev/null 2>&1
|
||||
echo -n "[3/3] Mac OSX PHP build available, downloading $MAC_BUILD.tar.gz..."
|
||||
@ -99,7 +112,7 @@ else
|
||||
if [ $? -eq 0 ]; then
|
||||
set -e
|
||||
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
|
||||
chmod +x ./bin/php5/bin/*
|
||||
echo -n " regenerating php.ini..."
|
||||
|
@ -40,13 +40,13 @@ if(ini_get("date.timezone") == ""){ //No Timezone set
|
||||
|
||||
$daylight = (int) date("I");
|
||||
$d = timezone_name_from_abbr("", $offset, $daylight);
|
||||
ini_set("date.timezone", $d);
|
||||
@ini_set("date.timezone", $d);
|
||||
date_default_timezone_set($d);
|
||||
}else{
|
||||
$d = @date_default_timezone_get();
|
||||
if(strpos($d, "/") === false){
|
||||
$d = timezone_name_from_abbr($d);
|
||||
ini_set("date.timezone", $d);
|
||||
@ini_set("date.timezone", $d);
|
||||
date_default_timezone_set($d);
|
||||
}
|
||||
}
|
||||
@ -77,4 +77,4 @@ if(file_exists(FILE_PATH.".git/refs/heads/master")){ //Found Git information!
|
||||
define("GIT_COMMIT", strtolower(trim(file_get_contents(FILE_PATH.".git/refs/heads/master"))));
|
||||
}else{ //Unknown :(
|
||||
define("GIT_COMMIT", str_repeat("00", 20));
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ class Utils{
|
||||
public static $ip = false;
|
||||
|
||||
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 = ""){
|
||||
|
Loading…
x
Reference in New Issue
Block a user