small fixes

This commit is contained in:
Shoghi Cervantes 2014-03-06 03:03:42 +01:00
parent dd2d229f74
commit ee53e21159
34 changed files with 40 additions and 658 deletions

View File

@ -36,7 +36,7 @@ const PHP_VERSION = "5.5";
}else{
$path = "";
}
$fPath = PATH . "src" . DIRECTORY_SEPARATOR . $path . $className . ".php";
$fPath = \PocketMine\PATH . "src" . DIRECTORY_SEPARATOR . $path . $className . ".php";
if(file_exists($fPath)){
require_once($fPath);
}
@ -47,7 +47,7 @@ const PHP_VERSION = "5.5";
}else{
$path = "";
}
$fPath = PATH . "plugins". DIRECTORY_SEPARATOR . $parent . DIRECTORY_SEPARATOR . "src" . DIRECTORY_SEPARATOR . $path . $className . ".php";
$fPath = \PocketMine\PATH . "plugins". DIRECTORY_SEPARATOR . $parent . DIRECTORY_SEPARATOR . "src" . DIRECTORY_SEPARATOR . $path . $className . ".php";
if(file_exists($fPath)){
require_once($fPath);
}
@ -274,7 +274,7 @@ function log($message, $name, $EOL = true, $level = 2, $close = false){
$fpointers = array();
}
if(!isset($fpointers[$name]) or $fpointers[$name] === false){
$fpointers[$name] = @fopen(DATA."/".$name.".log", "ab");
$fpointers[$name] = @fopen(\PocketMine\DATA."/".$name.".log", "ab");
}
@fwrite($fpointers[$name], $message);
if($close === true){
@ -344,17 +344,17 @@ if($errors > 0){
}
$gitsha1 = false;
if(file_exists(PATH . ".git/refs/heads/master")){ //Found Git information!
define("PocketMine\GIT_COMMIT", strtolower(trim(file_get_contents(PATH .".git/refs/heads/master"))));
if(file_exists(\PocketMine\PATH . ".git/refs/heads/master")){ //Found Git information!
define("PocketMine\GIT_COMMIT", strtolower(trim(file_get_contents(\PocketMine\PATH .".git/refs/heads/master"))));
}else{ //Unknown :(
define("PocketMine\GIT_COMMIT", str_repeat("00", 20));
}
ini_set("opcache.mmap_base", bin2hex(Utils\Utils::getRandomBytes(8, false))); //Fix OPCache address errors
require_once(PATH . "src/utils/pthreads.php");
require_once(\PocketMine\PATH . "src/utils/pthreads.php");
if(!file_exists(DATA . "server.properties") and !isset($opts["no-wizard"])){
if(!file_exists(\PocketMine\DATA . "server.properties") and !isset($opts["no-wizard"])){
$installer = new Wizard\Installer();
}

View File

@ -40,10 +40,10 @@ class BanAPI{
}
public function init(){
$this->whitelist = new Utils\Config(DATA."white-list.txt", Utils\Config::ENUM);//Open whitelist list file
$this->bannedIPs = new Utils\Config(DATA."banned-ips.txt", Utils\Config::ENUM);//Open Banned IPs list file
$this->banned = new Utils\Config(DATA."banned.txt", Utils\Config::ENUM);//Open Banned Usernames list file
$this->ops = new Utils\Config(DATA."ops.txt", Utils\Config::ENUM);//Open list of OPs
$this->whitelist = new Utils\Config(\PocketMine\DATA."white-list.txt", Utils\Config::ENUM);//Open whitelist list file
$this->bannedIPs = new Utils\Config(\PocketMine\DATA."banned-ips.txt", Utils\Config::ENUM);//Open Banned IPs list file
$this->banned = new Utils\Config(\PocketMine\DATA."banned.txt", Utils\Config::ENUM);//Open Banned Usernames list file
$this->ops = new Utils\Config(\PocketMine\DATA."ops.txt", Utils\Config::ENUM);//Open list of OPs
$this->server->api->console->register("banip", "<add|remove|list|reload> [IP|player]", array($this, "commandHandler"));
$this->server->api->console->register("ban", "<add|remove|list|reload> [username]", array($this, "commandHandler"));
$this->server->api->console->register("kick", "<player> [reason ...]", array($this, "commandHandler"));
@ -213,7 +213,7 @@ class BanAPI{
$output .= "Player \"$user\" added to white-list\n";
break;
case "reload":
$this->whitelist = new Utils\Config(DATA."white-list.txt", Utils\Config::ENUM);
$this->whitelist = new Utils\Config(\PocketMine\DATA."white-list.txt", Utils\Config::ENUM);
break;
case "list":
$output .= "White-list: ".implode(", ", $this->whitelist->getAll(true))."\n";
@ -258,7 +258,7 @@ class BanAPI{
$output .= "IP \"$ip\" added to ban list\n";
break;
case "reload":
$this->bannedIPs = new Utils\Config(DATA."banned-ips.txt", Utils\Config::ENUM);
$this->bannedIPs = new Utils\Config(\PocketMine\DATA."banned-ips.txt", Utils\Config::ENUM);
break;
case "list":
$output .= "IP ban list: ".implode(", ", $this->bannedIPs->getAll(true))."\n";
@ -296,7 +296,7 @@ class BanAPI{
$output .= "Player \"$user\" added to ban list\n";
break;
case "reload":
$this->banned = new Utils\Config(DATA."banned.txt", Utils\Config::ENUM);
$this->banned = new Utils\Config(\PocketMine\DATA."banned.txt", Utils\Config::ENUM);
break;
case "list":
$output .= "Ban list: ".implode(", ", $this->banned->getAll(true))."\n";

View File

@ -109,7 +109,7 @@ class LevelAPI{
if($name === ""){
return false;
}
$path = DATA."worlds/".$name."/";
$path = \PocketMine\DATA."worlds/".$name."/";
if($this->get($name) === false and !file_exists($path."level.pmf")){
$level = new Level\LevelImport($path);
if($level->import() === false){
@ -142,7 +142,7 @@ class LevelAPI{
console("[NOTICE] Level \"".$name."\" not found");
return false;
}
$path = DATA."worlds/".$name."/";
$path = \PocketMine\DATA."worlds/".$name."/";
console("[INFO] Preparing level \"".$name."\"");
$level = new PMF\LevelFormat($path."level.pmf");
if(!$level->isLoaded){

View File

@ -112,7 +112,7 @@ class Player extends Entity\RealHuman{
public static function getOffline($name){
$server = ServerAPI::request();
$iname = strtolower($name);
if(!file_exists(DATA."players/".$iname.".dat")){
if(!file_exists(\PocketMine\DATA."players/".$iname.".dat")){
$nbt = new NBT\Tag\Compound(false, array(
"Pos" => new NBT\Tag\Enum("Pos", array(
0 => new NBT\Tag\Double(0, $server->spawn->x),
@ -149,8 +149,8 @@ class Player extends Entity\RealHuman{
$nbt->Inventory->setTagType(NBT\TAG_Compound);
$nbt->Motion->setTagType(NBT\TAG_Double);
$nbt->Rotation->setTagType(NBT\TAG_Float);
if(file_exists(DATA."players/".$iname.".yml")){
$data = new Utils\Config(DATA."players/".$iname.".yml", Utils\Config::YAML, array());
if(file_exists(\PocketMine\DATA."players/".$iname.".yml")){
$data = new Utils\Config(\PocketMine\DATA."players/".$iname.".yml", Utils\Config::YAML, array());
$nbt->playerGameType = (int) $data->get("gamemode");
$nbt->Level = $data->get("position")["level"];
$nbt->Pos[0] = $data->get("position")["x"];
@ -197,7 +197,7 @@ class Player extends Entity\RealHuman{
foreach($data->get("achievements") as $achievement => $status){
$nbt->Achievements[$achievement] = new NBT\Tag\Byte($achievement, $status == true ? 1:0);
}
unlink(DATA."players/".$iname.".yml");
unlink(\PocketMine\DATA."players/".$iname.".yml");
}else{
console("[NOTICE] Player data not found for \"".$iname."\", creating new profile");
Player::saveOffline($name, $nbt);
@ -205,7 +205,7 @@ class Player extends Entity\RealHuman{
}else{
$nbt = new NBT(NBT\BIG_ENDIAN);
$nbt->read(file_get_contents(DATA."players/".$iname.".dat"));
$nbt->read(file_get_contents(\PocketMine\DATA."players/".$iname.".dat"));
$nbt = $nbt->getData();
}
@ -218,7 +218,7 @@ class Player extends Entity\RealHuman{
ServerAPI::request()->handle("player.offline.save", $nbtTag);
$nbt = new NBT(NBT\BIG_ENDIAN);
$nbt->setData($nbtTag);
file_put_contents(DATA."players/".strtolower($name).".dat", $nbt->write());
file_put_contents(\PocketMine\DATA."players/".strtolower($name).".dat", $nbt->write());
}
public static function broadcastPacket(array $players, Network\Protocol\DataPacket $packet){

View File

@ -169,7 +169,7 @@ class PluginAPI extends \stdClass{
}
public function pluginsPath(){
$path = join(DIRECTORY_SEPARATOR, array(DATA."plugins", ""));
$path = join(DIRECTORY_SEPARATOR, array(\PocketMine\DATA."plugins", ""));
@mkdir($path);
return $path;
}

View File

@ -92,9 +92,9 @@ class ServerAPI{
}
public function load(){
@mkdir(DATA."players/", 0755);
@mkdir(DATA."worlds/", 0755);
@mkdir(DATA."plugins/", 0755);
@mkdir(\PocketMine\DATA."players/", 0755);
@mkdir(\PocketMine\DATA."worlds/", 0755);
@mkdir(\PocketMine\DATA."plugins/", 0755);
//Init all the events
foreach(get_declared_classes() as $class){
@ -107,7 +107,7 @@ class ServerAPI{
console("[INFO] Starting Minecraft PE server version ".Utils\TextFormat::AQUA.MINECRAFT_VERSION);
console("[INFO] Loading properties...");
$this->config = new Utils\Config(DATA . "server.properties", Utils\Config::PROPERTIES, array(
$this->config = new Utils\Config(\PocketMine\DATA . "server.properties", Utils\Config::PROPERTIES, array(
"server-name" => "Minecraft: PE Server",
"description" => "Server made using PocketMine-MP",
"motd" => "Welcome @player to this server!",

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class Arrow extends Projectile{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class Chicken extends Animal{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class Cow extends Animal{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class Creeper extends Monster implements Explosive{
}

View File

@ -1,24 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
class DroppedItem extends Entity{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class Egg extends Projectile{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class EnderPearl extends Projectile{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class Enderman extends Monster implements InventorySource{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class FallingBlock extends Entity{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class Minecart extends Vehicle{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class Ocelot extends Animal implements Tameable{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class Painting extends Hanging{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class Pig extends Animal implements Rideable{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class PigZombie extends Zombie{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class Sheep extends Animal implements Colorable{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class Silverfish extends Monster{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class Skeleton extends Monster implements ProjectileSource{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class Slime extends Living{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class Snowball extends Projectile{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class Spider extends Monster{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class TNTPrimed extends Entity implements Explosive{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class Wolf extends Animal implements Tameable{
}

View File

@ -1,27 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace PocketMine\Entity;
use PocketMine;
class Zombie extends Monster{
}

View File

@ -28,7 +28,7 @@ class WorldGenerator{
$this->seed = $seed !== false ? (int) $seed:Utils\Utils::readInt(Utils\Utils::getRandomBytes(4, false));
$this->random = new Utils\Random($this->seed);
$this->height = (int) $height;
$this->path = DATA."worlds/".$name."/";
$this->path = \PocketMine\DATA."worlds/".$name."/";
$this->generator = $generator;
$level = new PMF\LevelFormat($this->path."level.pmf", array(
"name" => $name,

View File

@ -16,8 +16,8 @@ exit(0);//TODO
if(!class_exists("Server", false)){
define("NO_THREADS", true);
require_once(dirname(__FILE__)."/../dependencies.php");
require_once(PATH."/src/functions.php");
require_once(PATH."/src/dependencies.php");
require_once(\PocketMine\PATH."/src/functions.php");
require_once(\PocketMine\PATH."/src/dependencies.php");
console(Utils\TextFormat::GREEN . "[TEST] Starting tests");
testCase("dummy", dummy(), null);
$t = new ServerSuiteTest;

View File

@ -84,7 +84,7 @@ LICENSE;
}
private function generateBaseConfig(){
$config = new Utils\Config(DATA . "server.properties", Utils\Config::PROPERTIES);
$config = new Utils\Config(\PocketMine\DATA . "server.properties", Utils\Config::PROPERTIES);
echo "[?] ".$this->lang->name_your_server." (".self::DEFAULT_NAME."): ";
$config->set("server-name", $this->getInput(self::DEFAULT_NAME));
echo "[*] ".$this->lang->port_warning."\n";
@ -124,13 +124,13 @@ LICENSE;
if($op === ""){
echo "[!] ".$this->lang->op_warning."\n";
}else{
$ops = new Utils\Config(DATA."ops.txt", Utils\Config::ENUM);
$ops = new Utils\Config(\PocketMine\DATA."ops.txt", Utils\Config::ENUM);
$ops->set($op, true);
$ops->save();
}
echo "[*] ".$this->lang->whitelist_info."\n";
echo "[?] ".$this->lang->whitelist_enable." (y/N): ";
$config = new Utils\Config(DATA . "server.properties", Utils\Config::PROPERTIES);
$config = new Utils\Config(\PocketMine\DATA . "server.properties", Utils\Config::PROPERTIES);
if(strtolower($this->getInput("n")) === "y"){
echo "[!] ".$this->lang->whitelist_warning."\n";
$config->set("white-list", true);
@ -141,7 +141,7 @@ LICENSE;
}
private function networkFunctions(){
$config = new Utils\Config(DATA . "server.properties", Utils\Config::PROPERTIES);
$config = new Utils\Config(\PocketMine\DATA . "server.properties", Utils\Config::PROPERTIES);
echo "[!] ".$this->lang->query_warning1."\n";
echo "[!] ".$this->lang->query_warning2."\n";
echo "[?] ".$this->lang->query_disable." (y/N): ";

View File

@ -46,11 +46,11 @@ use PocketMine;
private $lang;
private $langfile;
public function __construct($lang = ""){
if(file_exists(PATH."src/lang/Installer/".$lang.".ini")){
if(file_exists(\PocketMine\PATH."src/lang/Installer/".$lang.".ini")){
$this->lang = $lang;
$this->langfile = PATH."src/lang/Installer/".$lang.".ini";
$this->langfile = \PocketMine\PATH."src/lang/Installer/".$lang.".ini";
}else{
$l = glob(PATH."src/lang/Installer/".$lang."_*.ini");
$l = glob(\PocketMine\PATH."src/lang/Installer/".$lang."_*.ini");
if(count($l) > 0){
$files = array();
foreach($l as $file){
@ -61,14 +61,14 @@ use PocketMine;
$l = key($files);
$l = substr($l, strrpos($l, "/") + 1, -4);
$this->lang = isset(self::$languages[$l]) ? $l:$lang;
$this->langfile = PATH."src/lang/Installer/".$l.".ini";
$this->langfile = \PocketMine\PATH."src/lang/Installer/".$l.".ini";
}else{
$this->lang = "en";
$this->langfile = PATH."src/lang/Installer/en.ini";
$this->langfile = \PocketMine\PATH."src/lang/Installer/en.ini";
}
}
$this->loadLang(PATH."src/lang/Installer/en.ini", "en");
$this->loadLang(\PocketMine\PATH."src/lang/Installer/en.ini", "en");
if($this->lang !== "en"){
$this->loadLang($this->langfile, $this->lang);
}