mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 20:07:09 +00:00
Fixed namespaces paths
This commit is contained in:
parent
3605bc36c5
commit
207c2c4aba
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@ bin/*
|
|||||||
.idea/*
|
.idea/*
|
||||||
*.log
|
*.log
|
||||||
*.txt
|
*.txt
|
||||||
|
*.phar
|
||||||
server.properties
|
server.properties
|
||||||
|
|
||||||
# Windows image file caches
|
# Windows image file caches
|
||||||
|
@ -46,7 +46,7 @@ It is mainly [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accept
|
|||||||
```php
|
```php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace PocketMine\Example;
|
namespace pocketmine\Example;
|
||||||
|
|
||||||
class ExampleClass{
|
class ExampleClass{
|
||||||
const EXAMPLE_CLASS_CONSTANT = 1;
|
const EXAMPLE_CLASS_CONSTANT = 1;
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine;
|
namespace pocketmine;
|
||||||
use PocketMine\Utils\TextFormat;
|
use pocketmine\utils\TextFormat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the achievement list and a bit more
|
* Handles the achievement list and a bit more
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine;
|
namespace pocketmine;
|
||||||
|
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Math\Vector2;
|
use pocketmine\math\Vector2;
|
||||||
use PocketMine\Utils\Config;
|
use pocketmine\utils\Config;
|
||||||
|
|
||||||
class BanAPI{
|
class BanAPI{
|
||||||
private $server;
|
private $server;
|
||||||
@ -44,10 +44,10 @@ class BanAPI{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function init(){
|
public function init(){
|
||||||
$this->whitelist = new Config(\PocketMine\DATA . "white-list.txt", Config::ENUM); //Open whitelist list file
|
$this->whitelist = new Config(\pocketmine\DATA . "white-list.txt", Config::ENUM); //Open whitelist list file
|
||||||
$this->bannedIPs = new Config(\PocketMine\DATA . "banned-ips.txt", Config::ENUM); //Open Banned IPs list file
|
$this->bannedIPs = new Config(\pocketmine\DATA . "banned-ips.txt", Config::ENUM); //Open Banned IPs list file
|
||||||
$this->banned = new Config(\PocketMine\DATA . "banned.txt", Config::ENUM); //Open Banned Usernames list file
|
$this->banned = new Config(\pocketmine\DATA . "banned.txt", Config::ENUM); //Open Banned Usernames list file
|
||||||
$this->ops = new Config(\PocketMine\DATA . "ops.txt", Config::ENUM); //Open list of OPs
|
$this->ops = new Config(\pocketmine\DATA . "ops.txt", 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("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("ban", "<add|remove|list|reload> [username]", array($this, "commandHandler"));
|
||||||
$this->server->api->console->register("kick", "<player> [reason ...]", array($this, "commandHandler"));
|
$this->server->api->console->register("kick", "<player> [reason ...]", array($this, "commandHandler"));
|
||||||
@ -220,7 +220,7 @@ class BanAPI{
|
|||||||
$output .= "Player \"$user\" added to white-list\n";
|
$output .= "Player \"$user\" added to white-list\n";
|
||||||
break;
|
break;
|
||||||
case "reload":
|
case "reload":
|
||||||
$this->whitelist = new Config(\PocketMine\DATA . "white-list.txt", Config::ENUM);
|
$this->whitelist = new Config(\pocketmine\DATA . "white-list.txt", Config::ENUM);
|
||||||
break;
|
break;
|
||||||
case "list":
|
case "list":
|
||||||
$output .= "White-list: " . implode(", ", $this->whitelist->getAll(true)) . "\n";
|
$output .= "White-list: " . implode(", ", $this->whitelist->getAll(true)) . "\n";
|
||||||
@ -265,7 +265,7 @@ class BanAPI{
|
|||||||
$output .= "IP \"$ip\" added to ban list\n";
|
$output .= "IP \"$ip\" added to ban list\n";
|
||||||
break;
|
break;
|
||||||
case "reload":
|
case "reload":
|
||||||
$this->bannedIPs = new Config(\PocketMine\DATA . "banned-ips.txt", Config::ENUM);
|
$this->bannedIPs = new Config(\pocketmine\DATA . "banned-ips.txt", Config::ENUM);
|
||||||
break;
|
break;
|
||||||
case "list":
|
case "list":
|
||||||
$output .= "IP ban list: " . implode(", ", $this->bannedIPs->getAll(true)) . "\n";
|
$output .= "IP ban list: " . implode(", ", $this->bannedIPs->getAll(true)) . "\n";
|
||||||
@ -303,7 +303,7 @@ class BanAPI{
|
|||||||
$output .= "Player \"$user\" added to ban list\n";
|
$output .= "Player \"$user\" added to ban list\n";
|
||||||
break;
|
break;
|
||||||
case "reload":
|
case "reload":
|
||||||
$this->banned = new Config(\PocketMine\DATA . "banned.txt", Config::ENUM);
|
$this->banned = new Config(\pocketmine\DATA . "banned.txt", Config::ENUM);
|
||||||
break;
|
break;
|
||||||
case "list":
|
case "list":
|
||||||
$output .= "Ban list: " . implode(", ", $this->banned->getAll(true)) . "\n";
|
$output .= "Ban list: " . implode(", ", $this->banned->getAll(true)) . "\n";
|
||||||
|
@ -19,12 +19,12 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine;
|
namespace pocketmine;
|
||||||
|
|
||||||
use PocketMine\Block;
|
use pocketmine\Block;
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Level\Position;
|
use pocketmine\level\Position;
|
||||||
|
|
||||||
class BlockAPI{
|
class BlockAPI{
|
||||||
private $server;
|
private $server;
|
||||||
@ -292,7 +292,7 @@ class BlockAPI{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function blockUpdate(Position $pos, $type = Level::BLOCK_UPDATE_NORMAL){
|
public function blockUpdate(Position $pos, $type = Level::BLOCK_UPDATE_NORMAL){
|
||||||
if(!($pos instanceof BLock\Block)){
|
if(!($pos instanceof block\Block)){
|
||||||
$block = $pos->level->getBlock($pos);
|
$block = $pos->level->getBlock($pos);
|
||||||
}else{
|
}else{
|
||||||
$pos = new Position($pos->x, $pos->y, $pos->z, $pos->level);
|
$pos = new Position($pos->x, $pos->y, $pos->z, $pos->level);
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine;
|
namespace pocketmine;
|
||||||
|
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
|
|
||||||
class LevelAPI{
|
class LevelAPI{
|
||||||
private $server;
|
private $server;
|
||||||
|
@ -19,58 +19,58 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine;
|
namespace pocketmine;
|
||||||
|
|
||||||
use PocketMine\Command\CommandSender;
|
use pocketmine\command\CommandSender;
|
||||||
use PocketMine\Entity\Human;
|
use pocketmine\entity\Human;
|
||||||
use PocketMine\Event;
|
use pocketmine\Event;
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Level\Position;
|
use pocketmine\level\Position;
|
||||||
use PocketMine\Math\Vector3 as Vector3;
|
use pocketmine\math\Vector3 as Vector3;
|
||||||
use PocketMine\NBT\NBT;
|
use pocketmine\nbt\NBT;
|
||||||
use PocketMine\NBT\Tag\Byte;
|
use pocketmine\nbt\tag\Byte;
|
||||||
use PocketMine\NBT\Tag\Compound;
|
use pocketmine\nbt\tag\Compound;
|
||||||
use PocketMine\NBT\Tag\Double;
|
use pocketmine\nbt\tag\Double;
|
||||||
use PocketMine\NBT\Tag\Enum;
|
use pocketmine\nbt\tag\Enum;
|
||||||
use PocketMine\NBT\Tag\Float;
|
use pocketmine\nbt\tag\Float;
|
||||||
use PocketMine\NBT\Tag\Int;
|
use pocketmine\nbt\tag\Int;
|
||||||
use PocketMine\NBT\Tag\Short;
|
use pocketmine\nbt\tag\Short;
|
||||||
use PocketMine\NBT\Tag\String;
|
use pocketmine\nbt\tag\String;
|
||||||
use PocketMine\Network\Protocol\AdventureSettingsPacket;
|
use pocketmine\network\protocol\AdventureSettingsPacket;
|
||||||
use PocketMine\Network\Protocol\ChunkDataPacket;
|
use pocketmine\network\protocol\ChunkDataPacket;
|
||||||
use PocketMine\Network\Protocol\ContainerClosePacket;
|
use pocketmine\network\protocol\ContainerClosePacket;
|
||||||
use PocketMine\Network\Protocol\ContainerSetContentPacket;
|
use pocketmine\network\protocol\ContainerSetContentPacket;
|
||||||
use PocketMine\Network\Protocol\ContainerSetSlotPacket;
|
use pocketmine\network\protocol\ContainerSetSlotPacket;
|
||||||
use PocketMine\Network\Protocol\DataPacket;
|
use pocketmine\network\protocol\DataPacket;
|
||||||
use PocketMine\Network\Protocol\DisconnectPacket;
|
use pocketmine\network\protocol\DisconnectPacket;
|
||||||
use PocketMine\Network\Protocol\Info as ProtocolInfo;
|
use pocketmine\network\protocol\Info as ProtocolInfo;
|
||||||
use PocketMine\Network\Protocol\LoginStatusPacket;
|
use pocketmine\network\protocol\LoginStatusPacket;
|
||||||
use PocketMine\Network\Protocol\MessagePacket;
|
use pocketmine\network\protocol\MessagePacket;
|
||||||
use PocketMine\Network\Protocol\PongPacket;
|
use pocketmine\network\protocol\PongPacket;
|
||||||
use PocketMine\Network\Protocol\ServerHandshakePacket;
|
use pocketmine\network\protocol\ServerHandshakePacket;
|
||||||
use PocketMine\Network\Protocol\SetSpawnPositionPacket;
|
use pocketmine\network\protocol\SetSpawnPositionPacket;
|
||||||
use PocketMine\Network\Protocol\SetTimePacket;
|
use pocketmine\network\protocol\SetTimePacket;
|
||||||
use PocketMine\Network\Protocol\StartGamePacket;
|
use pocketmine\network\protocol\StartGamePacket;
|
||||||
use PocketMine\Network\Protocol\TileEventPacket;
|
use pocketmine\network\protocol\TileEventPacket;
|
||||||
use PocketMine\Network\Protocol\UnknownPacket;
|
use pocketmine\network\protocol\UnknownPacket;
|
||||||
use PocketMine\Network\Protocol\UpdateBlockPacket;
|
use pocketmine\network\protocol\UpdateBlockPacket;
|
||||||
use PocketMine\Network\RakNet\Info;
|
use pocketmine\network\raknet\Info;
|
||||||
use PocketMine\Network\RakNet\Packet;
|
use pocketmine\network\raknet\Packet;
|
||||||
use PocketMine\Permission\PermissibleBase;
|
use pocketmine\permission\PermissibleBase;
|
||||||
use PocketMine\Permission\PermissionAttachment;
|
use pocketmine\permission\PermissionAttachment;
|
||||||
use PocketMine\Plugin\Plugin;
|
use pocketmine\plugin\Plugin;
|
||||||
use PocketMine\PMF\LevelFormat;
|
use pocketmine\pmf\LevelFormat;
|
||||||
use PocketMine\Recipes\Crafting;
|
use pocketmine\recipes\Crafting;
|
||||||
use PocketMine\Scheduler\CallbackTask;
|
use pocketmine\scheduler\CallbackTask;
|
||||||
use PocketMine\Tile\Chest;
|
use pocketmine\tile\Chest;
|
||||||
use PocketMine\Tile\Furnace;
|
use pocketmine\tile\Furnace;
|
||||||
use PocketMine\Tile\Sign;
|
use pocketmine\tile\Sign;
|
||||||
use PocketMine\Tile\Spawnable;
|
use pocketmine\tile\Spawnable;
|
||||||
use PocketMine\Tile\Tile;
|
use pocketmine\tile\Tile;
|
||||||
use PocketMine\Utils\Config;
|
use pocketmine\utils\Config;
|
||||||
use PocketMine\Utils\TextFormat;
|
use pocketmine\utils\TextFormat;
|
||||||
use PocketMine\Utils\Utils;
|
use pocketmine\utils\Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main class that handles networking, recovery, and packet sending to the server part
|
* Main class that handles networking, recovery, and packet sending to the server part
|
||||||
@ -131,7 +131,7 @@ class Player extends Human implements CommandSender{
|
|||||||
private $resendQueue = array();
|
private $resendQueue = array();
|
||||||
private $ackQueue = array();
|
private $ackQueue = array();
|
||||||
private $receiveCount = -1;
|
private $receiveCount = -1;
|
||||||
/** @var \PocketMine\Network\RakNet\Packet */
|
/** @var \pocketmine\network\raknet\Packet */
|
||||||
private $buffer;
|
private $buffer;
|
||||||
private $bufferLen = 0;
|
private $bufferLen = 0;
|
||||||
private $nextBuffer = 0;
|
private $nextBuffer = 0;
|
||||||
@ -154,7 +154,7 @@ class Player extends Human implements CommandSender{
|
|||||||
private $received = array();
|
private $received = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \PocketMine\Scheduler\TaskHandler[]
|
* @var \pocketmine\scheduler\TaskHandler[]
|
||||||
*/
|
*/
|
||||||
private $tasks = array();
|
private $tasks = array();
|
||||||
|
|
||||||
@ -255,7 +255,7 @@ class Player extends Human implements CommandSender{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Permission\Permission|string $name
|
* @param permission\Permission|string $name
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
@ -264,7 +264,7 @@ class Player extends Human implements CommandSender{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Permission\Permission|string $name
|
* @param permission\Permission|string $name
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
@ -277,7 +277,7 @@ class Player extends Human implements CommandSender{
|
|||||||
* @param string $name
|
* @param string $name
|
||||||
* @param bool $value
|
* @param bool $value
|
||||||
*
|
*
|
||||||
* @return Permission\PermissionAttachment
|
* @return permission\PermissionAttachment
|
||||||
*/
|
*/
|
||||||
public function addAttachment(Plugin $plugin, $name = null, $value = null){
|
public function addAttachment(Plugin $plugin, $name = null, $value = null){
|
||||||
return $this->perm->addAttachment($plugin, $name, $value);
|
return $this->perm->addAttachment($plugin, $name, $value);
|
||||||
@ -295,7 +295,7 @@ class Player extends Human implements CommandSender{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Permission\PermissionAttachmentInfo[]
|
* @return permission\PermissionAttachmentInfo[]
|
||||||
*/
|
*/
|
||||||
public function getEffectivePermissions(){
|
public function getEffectivePermissions(){
|
||||||
return $this->perm->getEffectivePermissions();
|
return $this->perm->getEffectivePermissions();
|
||||||
@ -603,7 +603,7 @@ class Player extends Human implements CommandSender{
|
|||||||
if($this->connected === false){
|
if($this->connected === false){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->server->getPluginManager()->callEvent($ev = new Event\Server\DataPacketSendEvent($this, $packet));
|
$this->server->getPluginManager()->callEvent($ev = new event\server\DataPacketSendEvent($this, $packet));
|
||||||
if($ev->isCancelled()){
|
if($ev->isCancelled()){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -884,7 +884,7 @@ class Player extends Human implements CommandSender{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->server->getPluginManager()->callEvent($ev = new Event\Player\PlayerAchievementAwardedEvent($this, $achievementId));
|
$this->server->getPluginManager()->callEvent($ev = new event\player\PlayerAchievementAwardedEvent($this, $achievementId));
|
||||||
if(!$ev->isCancelled()){
|
if(!$ev->isCancelled()){
|
||||||
$this->achievements[$achievementId] = true;
|
$this->achievements[$achievementId] = true;
|
||||||
Achievement::broadcast($this, $achievementId);
|
Achievement::broadcast($this, $achievementId);
|
||||||
@ -918,7 +918,7 @@ class Player extends Human implements CommandSender{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->server->getPluginManager()->callEvent($ev = new Event\Player\PlayerGameModeChangeEvent($this, (int) $gm));
|
$this->server->getPluginManager()->callEvent($ev = new event\player\PlayerGameModeChangeEvent($this, (int) $gm));
|
||||||
if($ev->isCancelled()){
|
if($ev->isCancelled()){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1177,7 +1177,7 @@ class Player extends Human implements CommandSender{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->server->getPluginManager()->callEvent($ev = new Event\Server\DataPacketReceiveEvent($this, $packet));
|
$this->server->getPluginManager()->callEvent($ev = new event\server\DataPacketReceiveEvent($this, $packet));
|
||||||
if($ev->isCancelled()){
|
if($ev->isCancelled()){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1246,7 +1246,7 @@ class Player extends Human implements CommandSender{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->server->getPluginManager()->callEvent($ev = new Event\Player\PlayerPreLoginEvent($this, "Plugin reason"));
|
$this->server->getPluginManager()->callEvent($ev = new event\player\PlayerPreLoginEvent($this, "Plugin reason"));
|
||||||
if($ev->isCancelled()){
|
if($ev->isCancelled()){
|
||||||
$this->close($ev->getKickMessage(), "Plugin reason");
|
$this->close($ev->getKickMessage(), "Plugin reason");
|
||||||
|
|
||||||
@ -1311,7 +1311,7 @@ class Player extends Human implements CommandSender{
|
|||||||
$this->slot = $this->hotbar[0];
|
$this->slot = $this->hotbar[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->server->getPluginManager()->callEvent($ev = new Event\Player\PlayerLoginEvent($this, "Plugin reason"));
|
$this->server->getPluginManager()->callEvent($ev = new event\player\PlayerLoginEvent($this, "Plugin reason"));
|
||||||
if($ev->isCancelled()){
|
if($ev->isCancelled()){
|
||||||
$this->close($ev->getKickMessage(), "Plugin reason");
|
$this->close($ev->getKickMessage(), "Plugin reason");
|
||||||
|
|
||||||
@ -1355,7 +1355,7 @@ class Player extends Human implements CommandSender{
|
|||||||
|
|
||||||
console("[INFO] " . TextFormat::AQUA . $this->username . TextFormat::RESET . "[/" . $this->ip . ":" . $this->port . "] logged in with entity id " . $this->id . " at (" . $this->level->getName() . ", " . round($this->x, 4) . ", " . round($this->y, 4) . ", " . round($this->z, 4) . ")");
|
console("[INFO] " . TextFormat::AQUA . $this->username . TextFormat::RESET . "[/" . $this->ip . ":" . $this->port . "] logged in with entity id " . $this->id . " at (" . $this->level->getName() . ", " . round($this->x, 4) . ", " . round($this->y, 4) . ", " . round($this->z, 4) . ")");
|
||||||
|
|
||||||
$this->server->getPluginManager()->callEvent(new Event\Player\PlayerJoinEvent($this, $this->username . " joined the game"));
|
$this->server->getPluginManager()->callEvent(new event\player\PlayerJoinEvent($this, $this->username . " joined the game"));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case ProtocolInfo::READY_PACKET:
|
case ProtocolInfo::READY_PACKET:
|
||||||
@ -1386,7 +1386,7 @@ class Player extends Human implements CommandSender{
|
|||||||
|
|
||||||
$pos = new Position($this->x, $this->y, $this->z, $this->level);
|
$pos = new Position($this->x, $this->y, $this->z, $this->level);
|
||||||
$pos = $this->level->getSafeSpawn($pos);
|
$pos = $this->level->getSafeSpawn($pos);
|
||||||
$this->server->getPluginManager()->callEvent($ev = new Event\Player\PlayerRespawnEvent($this, $pos));
|
$this->server->getPluginManager()->callEvent($ev = new event\player\PlayerRespawnEvent($this, $pos));
|
||||||
|
|
||||||
$this->teleport($ev->getRespawnPosition());
|
$this->teleport($ev->getRespawnPosition());
|
||||||
$this->sendBuffer();
|
$this->sendBuffer();
|
||||||
@ -1457,7 +1457,7 @@ class Player extends Human implements CommandSender{
|
|||||||
if($packet->slot === false){
|
if($packet->slot === false){
|
||||||
$this->sendInventorySlot($packet->slot);
|
$this->sendInventorySlot($packet->slot);
|
||||||
}else{
|
}else{
|
||||||
$this->server->getPluginManager()->callEvent($ev = new Event\Player\PlayerItemHeldEvent($this, $item, $packet->slot, 0));
|
$this->server->getPluginManager()->callEvent($ev = new event\player\PlayerItemHeldEvent($this, $item, $packet->slot, 0));
|
||||||
if($ev->isCancelled()){
|
if($ev->isCancelled()){
|
||||||
$this->sendInventorySlot($packet->slot);
|
$this->sendInventorySlot($packet->slot);
|
||||||
}elseif($item instanceof Item){
|
}elseif($item instanceof Item){
|
||||||
@ -1816,7 +1816,7 @@ class Player extends Human implements CommandSender{
|
|||||||
$this->craftingItems = array();
|
$this->craftingItems = array();
|
||||||
$this->toCraft = array();
|
$this->toCraft = array();
|
||||||
|
|
||||||
$this->server->getPluginManager()->callEvent($ev = new Event\Player\PlayerRespawnEvent($this, $this->spawnPosition));
|
$this->server->getPluginManager()->callEvent($ev = new event\player\PlayerRespawnEvent($this, $this->spawnPosition));
|
||||||
|
|
||||||
$this->teleport($ev->getRespawnPosition());
|
$this->teleport($ev->getRespawnPosition());
|
||||||
//$this->entity->fire = 0;
|
//$this->entity->fire = 0;
|
||||||
@ -1914,16 +1914,16 @@ class Player extends Human implements CommandSender{
|
|||||||
$packet->message = TextFormat::clean($packet->message);
|
$packet->message = TextFormat::clean($packet->message);
|
||||||
if(trim($packet->message) != "" and strlen($packet->message) <= 255){
|
if(trim($packet->message) != "" and strlen($packet->message) <= 255){
|
||||||
$message = $packet->message;
|
$message = $packet->message;
|
||||||
$this->server->getPluginManager()->callEvent($ev = new Event\Player\PlayerCommandPreprocessEvent($this, $message));
|
$this->server->getPluginManager()->callEvent($ev = new event\player\PlayerCommandPreprocessEvent($this, $message));
|
||||||
if($ev->isCancelled()){
|
if($ev->isCancelled()){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(substr($ev->getMessage(), 0, 1) === "/"){ //Command
|
if(substr($ev->getMessage(), 0, 1) === "/"){ //Command
|
||||||
$this->server->dispatchCommand($ev->getPlayer(), substr($ev->getMessage(), 1));
|
$this->server->dispatchCommand($ev->getPlayer(), substr($ev->getMessage(), 1));
|
||||||
}else{
|
}else{
|
||||||
$this->server->getPluginManager()->callEvent($ev = new Event\Player\PlayerChatEvent($this, $ev->getMessage()));
|
$this->server->getPluginManager()->callEvent($ev = new event\player\PlayerChatEvent($this, $ev->getMessage()));
|
||||||
if(!$ev->isCancelled()){
|
if(!$ev->isCancelled()){
|
||||||
Player::groupChat(sprintf($ev->getFormat(), $ev->getPlayer()->getDisplayName(), $ev->getMessage()), $ev->getRecipients());
|
$this->server->broadcastMessage(sprintf($ev->getFormat(), $ev->getPlayer()->getDisplayName(), $ev->getMessage()), $ev->getRecipients());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2181,7 +2181,7 @@ class Player extends Human implements CommandSender{
|
|||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function kick($reason = ""){
|
public function kick($reason = ""){
|
||||||
$this->server->getPluginManager()->callEvent($ev = new Event\Player\PlayerKickEvent($this, $reason, "Kicked player " . $this->username . "." . ($reason !== "" ? " With reason: $reason" : "")));
|
$this->server->getPluginManager()->callEvent($ev = new event\player\PlayerKickEvent($this, $reason, "Kicked player " . $this->username . "." . ($reason !== "" ? " With reason: $reason" : "")));
|
||||||
if(!$ev->isCancelled()){
|
if(!$ev->isCancelled()){
|
||||||
$this->sendMessage("You have been kicked. " . ($reason !== "" ? " Reason: $reason" : "") . "\n");
|
$this->sendMessage("You have been kicked. " . ($reason !== "" ? " Reason: $reason" : "") . "\n");
|
||||||
$this->close($ev->getQuitMessage(), $reason);
|
$this->close($ev->getQuitMessage(), $reason);
|
||||||
@ -2235,7 +2235,7 @@ class Player extends Human implements CommandSender{
|
|||||||
if($this->connected === true){
|
if($this->connected === true){
|
||||||
unset($this->level->players[$this->CID]);
|
unset($this->level->players[$this->CID]);
|
||||||
if($this->username != ""){
|
if($this->username != ""){
|
||||||
$this->server->getPluginManager()->callEvent($ev = new Event\Player\PlayerQuitEvent($this, $message));
|
$this->server->getPluginManager()->callEvent($ev = new event\player\PlayerQuitEvent($this, $message));
|
||||||
if($this->loggedIn === true){
|
if($this->loggedIn === true){
|
||||||
parent::close();
|
parent::close();
|
||||||
$this->save();
|
$this->save();
|
||||||
@ -2312,7 +2312,7 @@ class Player extends Human implements CommandSender{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->server->getPluginManager()->callEvent($ev = new Event\Server\DataPacketSendEvent($this, $packet));
|
$this->server->getPluginManager()->callEvent($ev = new event\server\DataPacketSendEvent($this, $packet));
|
||||||
if($ev->isCancelled()){
|
if($ev->isCancelled()){
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
@ -19,12 +19,12 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine;
|
namespace pocketmine;
|
||||||
|
|
||||||
use PocketMine\Entity\Entity;
|
use pocketmine\entity\Entity;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Level\Position;
|
use pocketmine\level\Position;
|
||||||
use PocketMine\Math\Vector3 as Vector3;
|
use pocketmine\math\Vector3 as Vector3;
|
||||||
|
|
||||||
class PlayerAPI{
|
class PlayerAPI{
|
||||||
private $server;
|
private $server;
|
||||||
|
@ -29,7 +29,7 @@ namespace {
|
|||||||
* @param int $level
|
* @param int $level
|
||||||
*/
|
*/
|
||||||
function console($message, $EOL = true, $log = true, $level = 1){
|
function console($message, $EOL = true, $log = true, $level = 1){
|
||||||
PocketMine\console($message, $EOL, $log, $level);
|
pocketmine\console($message, $EOL, $log, $level);
|
||||||
}
|
}
|
||||||
|
|
||||||
function safe_var_dump(){
|
function safe_var_dump(){
|
||||||
@ -76,23 +76,27 @@ namespace {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace PocketMine {
|
namespace pocketmine {
|
||||||
|
use pocketmine\utils\TextFormat;
|
||||||
|
use pocketmine\utils\Utils;
|
||||||
|
use pocketmine\wizard\Installer;
|
||||||
|
|
||||||
const VERSION = "Alpha_1.4dev";
|
const VERSION = "Alpha_1.4dev";
|
||||||
const API_VERSION = "1.0.0";
|
const API_VERSION = "1.0.0";
|
||||||
const CODENAME = "絶好(Zekkou)ケーキ(Cake)";
|
const CODENAME = "絶好(Zekkou)ケーキ(Cake)";
|
||||||
const MINECRAFT_VERSION = "v0.8.1 alpha";
|
const MINECRAFT_VERSION = "v0.8.1 alpha";
|
||||||
const PHP_VERSION = "5.5";
|
const PHP_VERSION = "5.5";
|
||||||
|
|
||||||
@define("PocketMine\\PATH", \getcwd() . DIRECTORY_SEPARATOR);
|
@define("pocketmine\\PATH", \getcwd() . DIRECTORY_SEPARATOR);
|
||||||
|
|
||||||
if(!class_exists("SplClassLoader", false)){
|
if(!class_exists("SplClassLoader", false)){
|
||||||
require_once(\PocketMine\PATH . "src/SPL/SplClassLoader.php");
|
require_once(\pocketmine\PATH . "src/spl/SplClassLoader.php");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$autoloader = new \SplClassLoader();
|
$autoloader = new \SplClassLoader();
|
||||||
$autoloader->add("PocketMine", array(
|
$autoloader->add("pocketmine", array(
|
||||||
\PocketMine\PATH . "src"
|
\pocketmine\PATH . "src"
|
||||||
));
|
));
|
||||||
$autoloader->register(true);
|
$autoloader->register(true);
|
||||||
|
|
||||||
@ -138,21 +142,21 @@ namespace PocketMine {
|
|||||||
ini_set("default_charset", "utf-8");
|
ini_set("default_charset", "utf-8");
|
||||||
|
|
||||||
ini_set("memory_limit", "128M"); //Default
|
ini_set("memory_limit", "128M"); //Default
|
||||||
define("PocketMine\\START_TIME", microtime(true));
|
define("pocketmine\\START_TIME", microtime(true));
|
||||||
|
|
||||||
$opts = getopt("", array("enable-ansi", "disable-ansi", "data:", "plugins:", "no-wizard"));
|
$opts = getopt("", array("enable-ansi", "disable-ansi", "data:", "plugins:", "no-wizard"));
|
||||||
|
|
||||||
define("PocketMine\\DATA", isset($opts["data"]) ? realpath($opts["data"]) . DIRECTORY_SEPARATOR : \getcwd() . DIRECTORY_SEPARATOR);
|
define("pocketmine\\DATA", isset($opts["data"]) ? realpath($opts["data"]) . DIRECTORY_SEPARATOR : \getcwd() . DIRECTORY_SEPARATOR);
|
||||||
define("PocketMine\\PLUGIN_PATH", isset($opts["plugins"]) ? realpath($opts["plugins"]) . DIRECTORY_SEPARATOR : \getcwd() . DIRECTORY_SEPARATOR . "plugins" . DIRECTORY_SEPARATOR);
|
define("pocketmine\\PLUGIN_PATH", isset($opts["plugins"]) ? realpath($opts["plugins"]) . DIRECTORY_SEPARATOR : \getcwd() . DIRECTORY_SEPARATOR . "plugins" . DIRECTORY_SEPARATOR);
|
||||||
|
|
||||||
if((strpos(strtoupper(php_uname("s")), "WIN") === false or isset($opts["enable-ansi"])) and !isset($opts["disable-ansi"])){
|
if((strpos(strtoupper(php_uname("s")), "WIN") === false or isset($opts["enable-ansi"])) and !isset($opts["disable-ansi"])){
|
||||||
define("PocketMine\\ANSI", true);
|
define("pocketmine\\ANSI", true);
|
||||||
}else{
|
}else{
|
||||||
define("PocketMine\\ANSI", false);
|
define("pocketmine\\ANSI", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
function kill($pid){
|
function kill($pid){
|
||||||
switch(Utils\Utils::getOS()){
|
switch(Utils::getOS()){
|
||||||
case "win":
|
case "win":
|
||||||
exec("taskkill.exe /F /PID " . ((int) $pid) . " > NUL");
|
exec("taskkill.exe /F /PID " . ((int) $pid) . " > NUL");
|
||||||
break;
|
break;
|
||||||
@ -172,41 +176,41 @@ namespace PocketMine {
|
|||||||
* @param int $level
|
* @param int $level
|
||||||
*/
|
*/
|
||||||
function console($message, $EOL = true, $log = true, $level = 1){
|
function console($message, $EOL = true, $log = true, $level = 1){
|
||||||
if(!defined("PocketMine\\DEBUG") or \PocketMine\DEBUG >= $level){
|
if(!defined("pocketmine\\DEBUG") or \pocketmine\DEBUG >= $level){
|
||||||
$message .= $EOL === true ? PHP_EOL : "";
|
$message .= $EOL === true ? PHP_EOL : "";
|
||||||
if($message{0} !== "["){
|
if($message{0} !== "["){
|
||||||
$message = "[INFO] $message";
|
$message = "[INFO] $message";
|
||||||
}
|
}
|
||||||
$time = (\PocketMine\ANSI === true ? Utils\TextFormat::AQUA . date("H:i:s") . Utils\TextFormat::RESET : date("H:i:s")) . " ";
|
$time = (\pocketmine\ANSI === true ? TextFormat::AQUA . date("H:i:s") . TextFormat::RESET : date("H:i:s")) . " ";
|
||||||
$replaced = Utils\TextFormat::clean(preg_replace('/\x1b\[[0-9;]*m/', "", $time . $message));
|
$replaced = TextFormat::clean(preg_replace('/\x1b\[[0-9;]*m/', "", $time . $message));
|
||||||
if($log === true and (!defined("LOG") or LOG === true)){
|
if($log === true and (!defined("LOG") or LOG === true)){
|
||||||
log(date("Y-m-d") . " " . $replaced, "server", false, $level);
|
log(date("Y-m-d") . " " . $replaced, "server", false, $level);
|
||||||
}
|
}
|
||||||
if(\PocketMine\ANSI === true){
|
if(\pocketmine\ANSI === true){
|
||||||
$add = "";
|
$add = "";
|
||||||
if(preg_match("/^\\[([a-zA-Z0-9]*)\\]/", $message, $matches) > 0){
|
if(preg_match("/^\\[([a-zA-Z0-9]*)\\]/", $message, $matches) > 0){
|
||||||
switch($matches[1]){
|
switch($matches[1]){
|
||||||
case "ERROR":
|
case "ERROR":
|
||||||
case "SEVERE":
|
case "SEVERE":
|
||||||
$add .= Utils\TextFormat::RED;
|
$add .= TextFormat::RED;
|
||||||
break;
|
break;
|
||||||
case "TRACE":
|
case "TRACE":
|
||||||
case "INTERNAL":
|
case "INTERNAL":
|
||||||
case "DEBUG":
|
case "DEBUG":
|
||||||
$add .= Utils\TextFormat::GRAY;
|
$add .= TextFormat::GRAY;
|
||||||
break;
|
break;
|
||||||
case "WARNING":
|
case "WARNING":
|
||||||
$add .= Utils\TextFormat::YELLOW;
|
$add .= TextFormat::YELLOW;
|
||||||
break;
|
break;
|
||||||
case "NOTICE":
|
case "NOTICE":
|
||||||
$add .= Utils\TextFormat::AQUA;
|
$add .= TextFormat::AQUA;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$add = "";
|
$add = "";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$message = Utils\TextFormat::toANSI($time . $add . $message . Utils\TextFormat::RESET);
|
$message = TextFormat::toANSI($time . $add . $message . TextFormat::RESET);
|
||||||
}else{
|
}else{
|
||||||
$message = $replaced;
|
$message = $replaced;
|
||||||
}
|
}
|
||||||
@ -265,13 +269,13 @@ namespace PocketMine {
|
|||||||
|
|
||||||
function log($message, $name, $EOL = true, $level = 2, $close = false){
|
function log($message, $name, $EOL = true, $level = 2, $close = false){
|
||||||
global $fpointers;
|
global $fpointers;
|
||||||
if((!defined("PocketMine\\DEBUG") or \PocketMine\DEBUG >= $level) and (!defined("PocketMine\\LOG") or \PocketMine\LOG === true)){
|
if((!defined("pocketmine\\DEBUG") or \pocketmine\DEBUG >= $level) and (!defined("pocketmine\\LOG") or \pocketmine\LOG === true)){
|
||||||
$message .= $EOL === true ? PHP_EOL : "";
|
$message .= $EOL === true ? PHP_EOL : "";
|
||||||
if(!isset($fpointers)){
|
if(!isset($fpointers)){
|
||||||
$fpointers = array();
|
$fpointers = array();
|
||||||
}
|
}
|
||||||
if(!isset($fpointers[$name]) or $fpointers[$name] === false){
|
if(!isset($fpointers[$name]) or $fpointers[$name] === false){
|
||||||
$fpointers[$name] = @fopen(\PocketMine\DATA . "/" . $name . ".log", "ab");
|
$fpointers[$name] = @fopen(\pocketmine\DATA . "/" . $name . ".log", "ab");
|
||||||
}
|
}
|
||||||
@fwrite($fpointers[$name], $message);
|
@fwrite($fpointers[$name], $message);
|
||||||
if($close === true){
|
if($close === true){
|
||||||
@ -282,7 +286,7 @@ namespace PocketMine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
set_error_handler("\\PocketMine\\error_handler", E_ALL);
|
set_error_handler("\\pocketmine\\error_handler", E_ALL);
|
||||||
|
|
||||||
$errors = 0;
|
$errors = 0;
|
||||||
|
|
||||||
@ -340,20 +344,20 @@ namespace PocketMine {
|
|||||||
exit(1); //Exit with error
|
exit(1); //Exit with error
|
||||||
}
|
}
|
||||||
|
|
||||||
if(file_exists(\PocketMine\PATH . ".git/refs/heads/master")){ //Found Git information!
|
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"))));
|
define("pocketmine\\GIT_COMMIT", strtolower(trim(file_get_contents(\pocketmine\PATH . ".git/refs/heads/master"))));
|
||||||
}else{ //Unknown :(
|
}else{ //Unknown :(
|
||||||
define("PocketMine\\GIT_COMMIT", str_repeat("00", 20));
|
define("pocketmine\\GIT_COMMIT", str_repeat("00", 20));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ini_set("opcache.mmap_base", bin2hex(Utils\Utils::getRandomBytes(8, false))); //Fix OPCache address errors
|
@ini_set("opcache.mmap_base", bin2hex(Utils::getRandomBytes(8, false))); //Fix OPCache address errors
|
||||||
|
|
||||||
if(!file_exists(\PocketMine\DATA . "server.properties") and !isset($opts["no-wizard"])){
|
if(!file_exists(\pocketmine\DATA . "server.properties") and !isset($opts["no-wizard"])){
|
||||||
new Wizard\Installer();
|
new Installer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$server = new Server($autoloader, \PocketMine\PATH, \PocketMine\DATA, \PocketMine\PLUGIN_PATH);
|
$server = new Server($autoloader, \pocketmine\PATH, \pocketmine\DATA, \pocketmine\PLUGIN_PATH);
|
||||||
$server->start();
|
$server->start();
|
||||||
|
|
||||||
kill(getmypid());
|
kill(getmypid());
|
||||||
|
@ -23,43 +23,43 @@
|
|||||||
* PocketMine-MP is the Minecraft: PE multiplayer server software
|
* PocketMine-MP is the Minecraft: PE multiplayer server software
|
||||||
* Homepage: http://www.pocketmine.net/
|
* Homepage: http://www.pocketmine.net/
|
||||||
*/
|
*/
|
||||||
namespace PocketMine;
|
namespace pocketmine;
|
||||||
|
|
||||||
use PocketMine\Block\Block;
|
use pocketmine\block\Block;
|
||||||
use PocketMine\Command\CommandReader;
|
use pocketmine\command\CommandReader;
|
||||||
use PocketMine\Command\CommandSender;
|
use pocketmine\command\CommandSender;
|
||||||
use PocketMine\Command\ConsoleCommandSender;
|
use pocketmine\command\ConsoleCommandSender;
|
||||||
use PocketMine\Command\PluginCommand;
|
use pocketmine\command\PluginCommand;
|
||||||
use PocketMine\Command\SimpleCommandMap;
|
use pocketmine\command\SimpleCommandMap;
|
||||||
use PocketMine\Entity\Entity;
|
use pocketmine\entity\Entity;
|
||||||
use PocketMine\Event\HandlerList;
|
use pocketmine\event\HandlerList;
|
||||||
use PocketMine\Event\Server\PacketReceiveEvent;
|
use pocketmine\event\server\PacketReceiveEvent;
|
||||||
use PocketMine\Event\Server\PacketSendEvent;
|
use pocketmine\event\server\PacketSendEvent;
|
||||||
use PocketMine\Event\Server\ServerCommandEvent;
|
use pocketmine\event\server\ServerCommandEvent;
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Generator\Generator;
|
use pocketmine\level\generator\Generator;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Network\Packet;
|
use pocketmine\network\Packet;
|
||||||
use PocketMine\Network\Query\QueryHandler;
|
use pocketmine\network\query\QueryHandler;
|
||||||
use PocketMine\Network\Query\QueryPacket;
|
use pocketmine\network\query\QueryPacket;
|
||||||
use PocketMine\Network\RakNet\Info as RakNetInfo;
|
use pocketmine\network\raknet\Info as RakNetInfo;
|
||||||
use PocketMine\Network\RakNet\Packet as RakNetPacket;
|
use pocketmine\network\raknet\Packet as RakNetPacket;
|
||||||
use PocketMine\Network\ThreadedHandler;
|
use pocketmine\network\ThreadedHandler;
|
||||||
use PocketMine\Network\UPnP\UPnP;
|
use pocketmine\network\upnp\UPnP;
|
||||||
use PocketMine\Permission\BanList;
|
use pocketmine\permission\BanList;
|
||||||
use PocketMine\Permission\DefaultPermissions;
|
use pocketmine\permission\DefaultPermissions;
|
||||||
use PocketMine\Plugin\Plugin;
|
use pocketmine\plugin\Plugin;
|
||||||
use PocketMine\Plugin\PluginLoadOrder;
|
use pocketmine\plugin\PluginLoadOrder;
|
||||||
use PocketMine\Plugin\PluginManager;
|
use pocketmine\plugin\PluginManager;
|
||||||
use PocketMine\Recipes\Crafting;
|
use pocketmine\recipes\Crafting;
|
||||||
use PocketMine\Scheduler\CallbackTask;
|
use pocketmine\scheduler\CallbackTask;
|
||||||
use PocketMine\Scheduler\ServerScheduler;
|
use pocketmine\scheduler\ServerScheduler;
|
||||||
use PocketMine\Scheduler\TickScheduler;
|
use pocketmine\scheduler\TickScheduler;
|
||||||
use PocketMine\Tile\Tile;
|
use pocketmine\tile\Tile;
|
||||||
use PocketMine\Utils\Config;
|
use pocketmine\utils\Config;
|
||||||
use PocketMine\Utils\TextFormat;
|
use pocketmine\utils\TextFormat;
|
||||||
use PocketMine\Utils\Utils;
|
use pocketmine\utils\Utils;
|
||||||
use PocketMine\Utils\VersionString;
|
use pocketmine\utils\VersionString;
|
||||||
|
|
||||||
class Server{
|
class Server{
|
||||||
const BROADCAST_CHANNEL_ADMINISTRATIVE = "pocketmine.broadcast.admin";
|
const BROADCAST_CHANNEL_ADMINISTRATIVE = "pocketmine.broadcast.admin";
|
||||||
@ -146,28 +146,28 @@ class Server{
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getPocketMineVersion(){
|
public function getPocketMineVersion(){
|
||||||
return \PocketMine\VERSION;
|
return \pocketmine\VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getCodename(){
|
public function getCodename(){
|
||||||
return \PocketMine\CODENAME;
|
return \pocketmine\CODENAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getVersion(){
|
public function getVersion(){
|
||||||
return \PocketMine\MINECRAFT_VERSION;
|
return \pocketmine\MINECRAFT_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getApiVersion(){
|
public function getApiVersion(){
|
||||||
return \PocketMine\API_VERSION;
|
return \pocketmine\API_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -700,14 +700,14 @@ class Server{
|
|||||||
$this->setConfigInt("difficulty", 3);
|
$this->setConfigInt("difficulty", 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
define("PocketMine\\DEBUG", $this->getConfigInt("debug", 1));
|
define("pocketmine\\DEBUG", $this->getConfigInt("debug", 1));
|
||||||
define("ADVANCED_CACHE", $this->getConfigBoolean("enable-advanced-cache", false));
|
define("ADVANCED_CACHE", $this->getConfigBoolean("enable-advanced-cache", false));
|
||||||
define("MAX_CHUNK_RATE", 20 / $this->getConfigInt("max-chunks-per-second", 7)); //Default rate ~448 kB/s
|
define("MAX_CHUNK_RATE", 20 / $this->getConfigInt("max-chunks-per-second", 7)); //Default rate ~448 kB/s
|
||||||
if(ADVANCED_CACHE == true){
|
if(ADVANCED_CACHE == true){
|
||||||
console("[INFO] Advanced cache enabled");
|
console("[INFO] Advanced cache enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(defined("PocketMine\\DEBUG") and \PocketMine\DEBUG >= 0 and function_exists("cli_set_process_title")){
|
if(defined("pocketmine\\DEBUG") and \pocketmine\DEBUG >= 0 and function_exists("cli_set_process_title")){
|
||||||
@cli_set_process_title("PocketMine-MP " . $this->getPocketMineVersion());
|
@cli_set_process_title("PocketMine-MP " . $this->getPocketMineVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -723,8 +723,8 @@ class Server{
|
|||||||
$this->commandMap = new SimpleCommandMap($this);
|
$this->commandMap = new SimpleCommandMap($this);
|
||||||
$this->pluginManager = new PluginManager($this, $this->commandMap);
|
$this->pluginManager = new PluginManager($this, $this->commandMap);
|
||||||
$this->pluginManager->subscribeToPermission(Server::BROADCAST_CHANNEL_ADMINISTRATIVE, $this->consoleSender);
|
$this->pluginManager->subscribeToPermission(Server::BROADCAST_CHANNEL_ADMINISTRATIVE, $this->consoleSender);
|
||||||
$this->pluginManager->registerInterface("PocketMine\\Plugin\\FolderPluginLoader");
|
$this->pluginManager->registerInterface("pocketmine\\plugin\\FolderPluginLoader");
|
||||||
$this->pluginManager->registerInterface("PocketMine\\Plugin\\PharPluginLoader");
|
$this->pluginManager->registerInterface("pocketmine\\plugin\\PharPluginLoader");
|
||||||
$this->pluginManager->loadPlugins($this->pluginPath);
|
$this->pluginManager->loadPlugins($this->pluginPath);
|
||||||
|
|
||||||
//TODO: update checking (async)
|
//TODO: update checking (async)
|
||||||
@ -734,9 +734,9 @@ class Server{
|
|||||||
Item::init();
|
Item::init();
|
||||||
Crafting::init();
|
Crafting::init();
|
||||||
|
|
||||||
Generator::addGenerator("PocketMine\\Level\\Generator\\Flat", "flat");
|
Generator::addGenerator("pocketmine\\level\\generator\\Flat", "flat");
|
||||||
Generator::addGenerator("PocketMine\\Level\\Generator\\Normal", "normal");
|
Generator::addGenerator("pocketmine\\level\\generator\\Normal", "normal");
|
||||||
Generator::addGenerator("PocketMine\\Level\\Generator\\Normal", "default");
|
Generator::addGenerator("pocketmine\\level\\generator\\Normal", "default");
|
||||||
Level::init();
|
Level::init();
|
||||||
|
|
||||||
$this->properties->save();
|
$this->properties->save();
|
||||||
@ -748,7 +748,7 @@ class Server{
|
|||||||
if(!defined("NO_THREADS") and $this->getProperty("enable-rcon") === true){
|
if(!defined("NO_THREADS") and $this->getProperty("enable-rcon") === true){
|
||||||
$this->rcon = new RCON($this->getProperty("rcon.password", ""), $this->getProperty("rcon.port", $this->getProperty("server-port")), ($ip = $this->getProperty("server-ip")) != "" ? $ip : "0.0.0.0", $this->getProperty("rcon.threads", 1), $this->getProperty("rcon.clients-per-thread", 50));
|
$this->rcon = new RCON($this->getProperty("rcon.password", ""), $this->getProperty("rcon.port", $this->getProperty("server-port")), ($ip = $this->getProperty("server-ip")) != "" ? $ip : "0.0.0.0", $this->getProperty("rcon.threads", 1), $this->getProperty("rcon.clients-per-thread", 50));
|
||||||
}*/
|
}*/
|
||||||
$this->scheduler->scheduleRepeatingTask(new CallbackTask("PocketMine\\Utils\\Cache::cleanup"), 20 * 45);
|
$this->scheduler->scheduleRepeatingTask(new CallbackTask("pocketmine\\utils\\Cache::cleanup"), 20 * 45);
|
||||||
if($this->getConfigBoolean("auto-save", true) === true){
|
if($this->getConfigBoolean("auto-save", true) === true){
|
||||||
$this->scheduler->scheduleRepeatingTask(new CallbackTask(array($this, "doAutoSave")), 18000);
|
$this->scheduler->scheduleRepeatingTask(new CallbackTask(array($this, "doAutoSave")), 18000);
|
||||||
}
|
}
|
||||||
@ -874,7 +874,7 @@ class Server{
|
|||||||
*/
|
*/
|
||||||
console("[INFO] Default game type: " . self::getGamemodeString($this->getGamemode())); //TODO: string name
|
console("[INFO] Default game type: " . self::getGamemodeString($this->getGamemode())); //TODO: string name
|
||||||
//$this->trigger("server.start", microtime(true));
|
//$this->trigger("server.start", microtime(true));
|
||||||
console('[INFO] Done (' . round(microtime(true) - \PocketMine\START_TIME, 3) . 's)! For help, type "help" or "?"');
|
console('[INFO] Done (' . round(microtime(true) - \pocketmine\START_TIME, 3) . 's)! For help, type "help" or "?"');
|
||||||
if(Utils::getOS() === "win"){ //Workaround less usleep() waste
|
if(Utils::getOS() === "win"){ //Workaround less usleep() waste
|
||||||
$this->tickProcessorWindows();
|
$this->tickProcessorWindows();
|
||||||
}else{
|
}else{
|
||||||
@ -1076,7 +1076,7 @@ class Server{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function titleTick(){
|
public function titleTick(){
|
||||||
if(defined("PocketMine\\DEBUG") and \PocketMine\DEBUG >= 0 and \PocketMine\ANSI === true){
|
if(defined("pocketmine\\DEBUG") and \pocketmine\DEBUG >= 0 and \pocketmine\ANSI === true){
|
||||||
echo "\x1b]0;PocketMine-MP " . $this->getPocketMineVersion() . " | Online " . count(Player::$list) . "/" . $this->getMaxPlayers() . " | RAM " . round((memory_get_usage() / 1024) / 1024, 2) . "/" . round((memory_get_usage(true) / 1024) / 1024, 2) . " MB | U " . round($this->interface->getUploadSpeed() / 1024, 2) . " D " . round($this->interface->getDownloadSpeed() / 1024, 2) . " kB/s | TPS " . $this->getTicksPerSecond() . "\x07";
|
echo "\x1b]0;PocketMine-MP " . $this->getPocketMineVersion() . " | Online " . count(Player::$list) . "/" . $this->getMaxPlayers() . " | RAM " . round((memory_get_usage() / 1024) / 1024, 2) . "/" . round((memory_get_usage(true) / 1024) / 1024, 2) . " MB | U " . round($this->interface->getUploadSpeed() / 1024, 2) . " D " . round($this->interface->getDownloadSpeed() / 1024, 2) . " kB/s | TPS " . $this->getTicksPerSecond() . "\x07";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,16 +19,16 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine;
|
namespace pocketmine;
|
||||||
|
|
||||||
use PocketMine\Network\Query\QueryHandler;
|
use pocketmine\network\query\QueryHandler;
|
||||||
use PocketMine\Network\RCON\RCON;
|
use pocketmine\network\rcon\RCON;
|
||||||
use PocketMine\Network\UPnP\UPnP;
|
use pocketmine\network\upnp\UPnP;
|
||||||
use PocketMine\Plugin\PluginManager;
|
use pocketmine\plugin\PluginManager;
|
||||||
use PocketMine\Utils\Config;
|
use pocketmine\utils\Config;
|
||||||
use PocketMine\Utils\TextFormat;
|
use pocketmine\utils\TextFormat;
|
||||||
use PocketMine\Utils\Utils;
|
use pocketmine\utils\Utils;
|
||||||
use PocketMine\Utils\VersionString;
|
use pocketmine\utils\VersionString;
|
||||||
|
|
||||||
class ServerAPI{
|
class ServerAPI{
|
||||||
public $restart = false;
|
public $restart = false;
|
||||||
@ -83,15 +83,15 @@ class ServerAPI{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function load(){
|
public function load(){
|
||||||
@mkdir(\PocketMine\DATA . "players/", 0755);
|
@mkdir(\pocketmine\DATA . "players/", 0755);
|
||||||
@mkdir(\PocketMine\DATA . "worlds/", 0755);
|
@mkdir(\pocketmine\DATA . "worlds/", 0755);
|
||||||
@mkdir(\PocketMine\DATA . "plugins/", 0755);
|
@mkdir(\pocketmine\DATA . "plugins/", 0755);
|
||||||
|
|
||||||
$version = new VersionString();
|
$version = new VersionString();
|
||||||
console("[INFO] Starting Minecraft: PE server version " . TextFormat::AQUA . MINECRAFT_VERSION);
|
console("[INFO] Starting Minecraft: PE server version " . TextFormat::AQUA . MINECRAFT_VERSION);
|
||||||
|
|
||||||
console("[INFO] Loading properties...");
|
console("[INFO] Loading properties...");
|
||||||
$this->config = new Config(\PocketMine\DATA . "server.properties", Config::PROPERTIES, array(
|
$this->config = new Config(\pocketmine\DATA . "server.properties", Config::PROPERTIES, array(
|
||||||
"server-name" => "Minecraft: PE Server",
|
"server-name" => "Minecraft: PE Server",
|
||||||
"description" => "Server made using PocketMine-MP",
|
"description" => "Server made using PocketMine-MP",
|
||||||
"motd" => "Welcome @player to this server!",
|
"motd" => "Welcome @player to this server!",
|
||||||
@ -124,7 +124,7 @@ class ServerAPI{
|
|||||||
$this->parseProperties();
|
$this->parseProperties();
|
||||||
|
|
||||||
//Load advanced properties
|
//Load advanced properties
|
||||||
define("PocketMine\\DEBUG", $this->getProperty("debug", 1));
|
define("pocketmine\\DEBUG", $this->getProperty("debug", 1));
|
||||||
define("ADVANCED_CACHE", $this->getProperty("enable-advanced-cache", false));
|
define("ADVANCED_CACHE", $this->getProperty("enable-advanced-cache", false));
|
||||||
define("MAX_CHUNK_RATE", 20 / $this->getProperty("max-chunks-per-second", 7)); //Default rate ~448 kB/s
|
define("MAX_CHUNK_RATE", 20 / $this->getProperty("max-chunks-per-second", 7)); //Default rate ~448 kB/s
|
||||||
if(ADVANCED_CACHE == true){
|
if(ADVANCED_CACHE == true){
|
||||||
@ -150,7 +150,7 @@ class ServerAPI{
|
|||||||
}else{
|
}else{
|
||||||
$last = new \DateTime($info[0]["commit"]["committer"]["date"]);
|
$last = new \DateTime($info[0]["commit"]["committer"]["date"]);
|
||||||
$last = $last->getTimestamp();
|
$last = $last->getTimestamp();
|
||||||
if($last >= $this->getProperty("last-update") and $this->getProperty("last-update") !== false and \PocketMine\GIT_COMMIT != $info[0]["sha"]){
|
if($last >= $this->getProperty("last-update") and $this->getProperty("last-update") !== false and \pocketmine\GIT_COMMIT != $info[0]["sha"]){
|
||||||
console("[NOTICE] " . TextFormat::YELLOW . "A new DEVELOPMENT version of PocketMine-MP has been released!");
|
console("[NOTICE] " . TextFormat::YELLOW . "A new DEVELOPMENT version of PocketMine-MP has been released!");
|
||||||
console("[NOTICE] " . TextFormat::YELLOW . "Commit \"" . $info[0]["commit"]["message"] . "\" [" . substr($info[0]["sha"], 0, 10) . "] by " . $info[0]["commit"]["committer"]["name"]);
|
console("[NOTICE] " . TextFormat::YELLOW . "Commit \"" . $info[0]["commit"]["message"] . "\" [" . substr($info[0]["sha"], 0, 10) . "] by " . $info[0]["commit"]["committer"]["name"]);
|
||||||
console("[NOTICE] " . TextFormat::YELLOW . "Get it at PocketMine.net or at https://github.com/PocketMine/PocketMine-MP/archive/" . $info[0]["sha"] . ".zip");
|
console("[NOTICE] " . TextFormat::YELLOW . "Get it at PocketMine.net or at https://github.com/PocketMine/PocketMine-MP/archive/" . $info[0]["sha"] . ".zip");
|
||||||
@ -200,7 +200,7 @@ class ServerAPI{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console("[INFO] Loaded " . count(PluginManager::loadPlugins(\PocketMine\DATA . "plugins/")) . " plugin(s).");
|
console("[INFO] Loaded " . count(PluginManager::loadPlugins(\pocketmine\DATA . "plugins/")) . " plugin(s).");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,16 +23,16 @@
|
|||||||
* PocketMine-MP is the Minecraft: PE multiplayer server software
|
* PocketMine-MP is the Minecraft: PE multiplayer server software
|
||||||
* Homepage: http://www.pocketmine.net/
|
* Homepage: http://www.pocketmine.net/
|
||||||
*/
|
*/
|
||||||
namespace PocketMine;
|
namespace pocketmine;
|
||||||
|
|
||||||
use PocketMine\Entity\Entity;
|
use pocketmine\entity\Entity;
|
||||||
use PocketMine\Network\Packet;
|
use pocketmine\network\Packet;
|
||||||
use PocketMine\Network\Protocol\Info;
|
use pocketmine\network\protocol\Info;
|
||||||
use PocketMine\Network\RakNet\Info as RakNetInfo;
|
use pocketmine\network\raknet\Info as RakNetInfo;
|
||||||
use PocketMine\Network\RakNet\Packet as RakNetPacket;
|
use pocketmine\network\raknet\Packet as RakNetPacket;
|
||||||
use PocketMine\Plugin\PluginManager;
|
use pocketmine\plugin\PluginManager;
|
||||||
use PocketMine\Utils\Utils;
|
use pocketmine\utils\Utils;
|
||||||
use PocketMine\Utils\VersionString;
|
use pocketmine\utils\VersionString;
|
||||||
|
|
||||||
class ServerOld{
|
class ServerOld{
|
||||||
/** @var Server */
|
/** @var Server */
|
||||||
@ -93,8 +93,8 @@ class ServerOld{
|
|||||||
|
|
||||||
private function load(){
|
private function load(){
|
||||||
$this->version = new VersionString();
|
$this->version = new VersionString();
|
||||||
if(defined("PocketMine\\DEBUG") and \PocketMine\DEBUG >= 0 and function_exists("cli_set_process_title")){
|
if(defined("pocketmine\\DEBUG") and \pocketmine\DEBUG >= 0 and function_exists("cli_set_process_title")){
|
||||||
@cli_set_process_title("PocketMine-MP " . \PocketMine\VERSION);
|
@cli_set_process_title("PocketMine-MP " . \pocketmine\VERSION);
|
||||||
}
|
}
|
||||||
console("[INFO] Starting Minecraft PE server on " . ($this->serverip === "0.0.0.0" ? "*" : $this->serverip) . ":" . $this->port);
|
console("[INFO] Starting Minecraft PE server on " . ($this->serverip === "0.0.0.0" ? "*" : $this->serverip) . ":" . $this->port);
|
||||||
define("BOOTUP_RANDOM", Utils::getRandomBytes(16));
|
define("BOOTUP_RANDOM", Utils::getRandomBytes(16));
|
||||||
@ -155,19 +155,19 @@ class ServerOld{
|
|||||||
|
|
||||||
public function titleTick(){
|
public function titleTick(){
|
||||||
$time = microtime(true);
|
$time = microtime(true);
|
||||||
if(defined("PocketMine\\DEBUG") and \PocketMine\DEBUG >= 0 and \PocketMine\ANSI === true){
|
if(defined("pocketmine\\DEBUG") and \pocketmine\DEBUG >= 0 and \pocketmine\ANSI === true){
|
||||||
echo "\x1b]0;PocketMine-MP " . VERSION . " | Online " . count(Player::$list) . "/" . $this->maxClients . " | RAM " . round((memory_get_usage() / 1024) / 1024, 2) . "MB | U " . round(($this->interface->bandwidth[1] / max(1, $time - $this->interface->bandwidth[2])) / 1024, 2) . " D " . round(($this->interface->bandwidth[0] / max(1, $time - $this->interface->bandwidth[2])) / 1024, 2) . " kB/s | TPS " . $this->getTPS() . "\x07";
|
echo "\x1b]0;PocketMine-MP " . VERSION . " | Online " . count(Player::$list) . "/" . $this->maxClients . " | RAM " . round((memory_get_usage() / 1024) / 1024, 2) . "MB | U " . round(($this->interface->bandwidth[1] / max(1, $time - $this->interface->bandwidth[2])) / 1024, 2) . " D " . round(($this->interface->bandwidth[0] / max(1, $time - $this->interface->bandwidth[2])) / 1024, 2) . " kB/s | TPS " . $this->getTPS() . "\x07";
|
||||||
}
|
}
|
||||||
$this->interface->bandwidth = array(0, 0, $time);
|
$this->interface->bandwidth = array(0, 0, $time);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function loadEvents(){
|
public function loadEvents(){
|
||||||
if(\PocketMine\ANSI === true){
|
if(\pocketmine\ANSI === true){
|
||||||
$this->schedule(30, array($this, "titleTick"), array(), true);
|
$this->schedule(30, array($this, "titleTick"), array(), true);
|
||||||
}
|
}
|
||||||
$this->schedule(20 * 15, array($this, "checkTicks"), array(), true);
|
$this->schedule(20 * 15, array($this, "checkTicks"), array(), true);
|
||||||
$this->schedule(20 * 60, array($this, "checkMemory"), array(), true);
|
$this->schedule(20 * 60, array($this, "checkMemory"), array(), true);
|
||||||
$this->schedule(20 * 45, "PocketMine\\Utils\\Cache::cleanup", array(), true);
|
$this->schedule(20 * 45, "pocketmine\\utils\\Cache::cleanup", array(), true);
|
||||||
$this->schedule(20, array($this, "asyncOperationChecker"), array(), true);
|
$this->schedule(20, array($this, "asyncOperationChecker"), array(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -435,7 +435,7 @@ class ServerOld{
|
|||||||
}
|
}
|
||||||
console("[INFO] Default game type: " . strtoupper($this->getGamemode()));
|
console("[INFO] Default game type: " . strtoupper($this->getGamemode()));
|
||||||
$this->trigger("server.start", microtime(true));
|
$this->trigger("server.start", microtime(true));
|
||||||
console('[INFO] Done (' . round(microtime(true) - \PocketMine\START_TIME, 3) . 's)! For help, type "help" or "?"');
|
console('[INFO] Done (' . round(microtime(true) - \pocketmine\START_TIME, 3) . 's)! For help, type "help" or "?"');
|
||||||
$this->process();
|
$this->process();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -496,7 +496,7 @@ class ServerOld{
|
|||||||
$p["rcon.password"] = "******";
|
$p["rcon.password"] = "******";
|
||||||
}
|
}
|
||||||
$dump .= "server.properties: " . var_export($p, true) . "\r\n\r\n\r\n";
|
$dump .= "server.properties: " . var_export($p, true) . "\r\n\r\n\r\n";
|
||||||
if(class_exists("PocketMine\\Plugin\\PluginManager", false)){
|
if(class_exists("pocketmine\\plugin\\PluginManager", false)){
|
||||||
$dump .= "Loaded plugins:\r\n";
|
$dump .= "Loaded plugins:\r\n";
|
||||||
foreach(PluginManager::getPlugins() as $p){
|
foreach(PluginManager::getPlugins() as $p){
|
||||||
$d = $p->getDescription();
|
$d = $p->getDescription();
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine;
|
namespace pocketmine;
|
||||||
|
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
|
|
||||||
class TimeAPI{
|
class TimeAPI{
|
||||||
public static $phases = array(
|
public static $phases = array(
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -19,12 +19,12 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Network\Protocol\ChatPacket;
|
use pocketmine\network\protocol\ChatPacket;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
use PocketMine\Server;
|
use pocketmine\Server;
|
||||||
|
|
||||||
class Bed extends Transparent{
|
class Bed extends Transparent{
|
||||||
public function __construct($type = 0){
|
public function __construct($type = 0){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Bedrock extends Solid{
|
class Bedrock extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class Beetroot extends Flowable{
|
class Beetroot extends Flowable{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class BirchWoodStairs extends Stair{
|
class BirchWoodStairs extends Stair{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -22,12 +22,12 @@
|
|||||||
/**
|
/**
|
||||||
* All Block classes are in here
|
* All Block classes are in here
|
||||||
*/
|
*/
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Level\Position;
|
use pocketmine\level\Position;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
abstract class Block extends Position{
|
abstract class Block extends Position{
|
||||||
const AIR = 0;
|
const AIR = 0;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
class Bookshelf extends Solid{
|
class Bookshelf extends Solid{
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
class BrickStairs extends Stair{
|
class BrickStairs extends Stair{
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Bricks extends Solid{
|
class Bricks extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class BrownMushroom extends Flowable{
|
class BrownMushroom extends Flowable{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,17 +19,17 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\NBT\NBT;
|
use pocketmine\nbt\NBT;
|
||||||
use PocketMine\NBT\Tag\Compound;
|
use pocketmine\nbt\tag\Compound;
|
||||||
use PocketMine\NBT\Tag\Enum;
|
use pocketmine\nbt\tag\Enum;
|
||||||
use PocketMine\NBT\Tag\Int;
|
use pocketmine\nbt\tag\Int;
|
||||||
use PocketMine\NBT\Tag\String;
|
use pocketmine\nbt\tag\String;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
use PocketMine\Tile\Furnace;
|
use pocketmine\tile\Furnace;
|
||||||
use PocketMine\Tile\Tile;
|
use pocketmine\tile\Tile;
|
||||||
|
|
||||||
class BurningFurnace extends Solid{
|
class BurningFurnace extends Solid{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,13 +19,13 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Math\Vector3 as Vector3;
|
use pocketmine\math\Vector3 as Vector3;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
use PocketMine\Server;
|
use pocketmine\Server;
|
||||||
|
|
||||||
class Cactus extends Transparent{
|
class Cactus extends Transparent{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class Cake extends Transparent{
|
class Cake extends Transparent{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class Carpet extends Flowable{
|
class Carpet extends Flowable{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class Carrot extends Flowable{
|
class Carrot extends Flowable{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,17 +19,17 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\NBT\NBT;
|
use pocketmine\nbt\NBT;
|
||||||
use PocketMine\NBT\Tag\Compound;
|
use pocketmine\nbt\tag\Compound;
|
||||||
use PocketMine\NBT\Tag\Enum;
|
use pocketmine\nbt\tag\Enum;
|
||||||
use PocketMine\NBT\Tag\Int;
|
use pocketmine\nbt\tag\Int;
|
||||||
use PocketMine\NBT\Tag\String;
|
use pocketmine\nbt\tag\String;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
use PocketMine\Tile\Chest as TileChest;
|
use pocketmine\tile\Chest as TileChest;
|
||||||
use PocketMine\Tile\Tile;
|
use pocketmine\tile\Tile;
|
||||||
|
|
||||||
class Chest extends Transparent{
|
class Chest extends Transparent{
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Clay extends Solid{
|
class Clay extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Coal extends Solid{
|
class Coal extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class CoalOre extends Solid{
|
class CoalOre extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Cobblestone extends Solid{
|
class Cobblestone extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
class CobblestoneStairs extends Stair{
|
class CobblestoneStairs extends Stair{
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Cobweb extends Flowable{
|
class Cobweb extends Flowable{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class CyanFlower extends Flowable{
|
class CyanFlower extends Flowable{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class Dandelion extends Flowable{
|
class Dandelion extends Flowable{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
|
|
||||||
class DeadBush extends Flowable{
|
class DeadBush extends Flowable{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Diamond extends Solid{
|
class Diamond extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class DiamondOre extends Solid{
|
class DiamondOre extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class Dirt extends Solid{
|
class Dirt extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,12 +19,12 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Network\Protocol\LevelEventPacket;
|
use pocketmine\network\protocol\LevelEventPacket;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
|
|
||||||
abstract class Door extends Transparent{
|
abstract class Door extends Transparent{
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class DoubleSlab extends Solid{
|
class DoubleSlab extends Solid{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class DoubleWoodSlab extends Solid{
|
class DoubleWoodSlab extends Solid{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,12 +19,12 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
use PocketMine\Server;
|
use pocketmine\Server;
|
||||||
|
|
||||||
class Fallable extends Solid{
|
class Fallable extends Solid{
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Farmland extends Solid{
|
class Farmland extends Solid{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
class Fence extends Transparent{
|
class Fence extends Transparent{
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class FenceGate extends Transparent{
|
class FenceGate extends Transparent{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
|
|
||||||
class Fire extends Flowable{
|
class Fire extends Flowable{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
class Flowable extends Transparent{
|
class Flowable extends Transparent{
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
class Furnace extends BurningFurnace{
|
class Furnace extends BurningFurnace{
|
||||||
|
@ -19,12 +19,12 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
use PocketMine\Server;
|
use pocketmine\Server;
|
||||||
|
|
||||||
class Generic extends Block{
|
class Generic extends Block{
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Glass extends Transparent{
|
class Glass extends Transparent{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
class GlassPane extends Transparent{
|
class GlassPane extends Transparent{
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
class GlowingObsidian extends Solid{
|
class GlowingObsidian extends Solid{
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
|
|
||||||
class GlowingRedstoneOre extends Solid{
|
class GlowingRedstoneOre extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Glowstone extends Transparent{
|
class Glowstone extends Transparent{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Gold extends Solid{
|
class Gold extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class GoldOre extends Solid{
|
class GoldOre extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,12 +19,12 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Generator\Object\TallGrass;
|
use pocketmine\level\generator\object\TallGrass;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
use PocketMine\Utils\Random;
|
use pocketmine\utils\Random;
|
||||||
|
|
||||||
class Grass extends Solid{
|
class Grass extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Gravel extends Fallable{
|
class Gravel extends Fallable{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class HayBale extends Solid{
|
class HayBale extends Solid{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Ice extends Transparent{
|
class Ice extends Transparent{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Iron extends Solid{
|
class Iron extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
class IronBars extends Transparent{
|
class IronBars extends Transparent{
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class IronDoor extends Door{
|
class IronDoor extends Door{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class IronOre extends Solid{
|
class IronOre extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class JungleWoodStairs extends Stair{
|
class JungleWoodStairs extends Stair{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class Ladder extends Transparent{
|
class Ladder extends Transparent{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Lapis extends Solid{
|
class Lapis extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class LapisOre extends Solid{
|
class LapisOre extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,13 +19,13 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Level\Position;
|
use pocketmine\level\Position;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
use PocketMine\Server;
|
use pocketmine\Server;
|
||||||
|
|
||||||
class Lava extends Liquid{
|
class Lava extends Liquid{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class Leaves extends Transparent{
|
class Leaves extends Transparent{
|
||||||
const OAK = 0;
|
const OAK = 0;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
class Liquid extends Transparent{
|
class Liquid extends Transparent{
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class LitPumpkin extends Solid{
|
class LitPumpkin extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Melon extends Transparent{
|
class Melon extends Transparent{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class MelonStem extends Flowable{
|
class MelonStem extends Flowable{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class MossStone extends Solid{
|
class MossStone extends Solid{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class NetherBrick extends Solid{
|
class NetherBrick extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
class NetherBrickStairs extends Stair{
|
class NetherBrickStairs extends Stair{
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
class NetherReactor extends Solid{
|
class NetherReactor extends Solid{
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Netherrack extends Solid{
|
class Netherrack extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Obsidian extends Solid{
|
class Obsidian extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
class Planks extends Solid{
|
class Planks extends Solid{
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class Potato extends Flowable{
|
class Potato extends Flowable{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
class Pumpkin extends Solid{
|
class Pumpkin extends Solid{
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class PumpkinStem extends Flowable{
|
class PumpkinStem extends Flowable{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Quartz extends Solid{
|
class Quartz extends Solid{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
class QuartzStairs extends Stair{
|
class QuartzStairs extends Stair{
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class RedMushroom extends Flowable{
|
class RedMushroom extends Flowable{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
|
|
||||||
class RedstoneOre extends Solid{
|
class RedstoneOre extends Solid{
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
class Sand extends Fallable{
|
class Sand extends Fallable{
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class Sandstone extends Solid{
|
class Sandstone extends Solid{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
class SandstoneStairs extends Stair{
|
class SandstoneStairs extends Stair{
|
||||||
|
@ -19,13 +19,13 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Generator\Object\Tree;
|
use pocketmine\level\generator\object\Tree;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
use PocketMine\Utils\Random;
|
use pocketmine\utils\Random;
|
||||||
|
|
||||||
class Sapling extends Flowable{
|
class Sapling extends Flowable{
|
||||||
const OAK = 0;
|
const OAK = 0;
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class SignPost extends Transparent{
|
class SignPost extends Transparent{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class Slab extends Transparent{
|
class Slab extends Transparent{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
class Snow extends Solid{
|
class Snow extends Solid{
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use PocketMine\Item\Item;
|
use pocketmine\item\Item;
|
||||||
use PocketMine\Level\Level;
|
use pocketmine\level\Level;
|
||||||
use PocketMine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class SnowLayer extends Flowable{
|
class SnowLayer extends Flowable{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PocketMine\Block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
|
||||||
class Solid extends Generic{
|
class Solid extends Generic{
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user