mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-17 04:06:54 +00:00
small fixes
This commit is contained in:
@@ -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";
|
||||
|
@@ -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){
|
||||
|
@@ -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){
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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!",
|
||||
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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{
|
||||
|
||||
}
|
@@ -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,
|
||||
|
@@ -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;
|
||||
|
@@ -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): ";
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user