Formatting code

This commit is contained in:
Shoghi Cervantes 2014-03-23 00:32:05 +01:00
parent af14c87572
commit 80cfa7cc84
126 changed files with 473 additions and 469 deletions

View File

@ -22,8 +22,8 @@
namespace PocketMine; namespace PocketMine;
use PocketMine\Entity\RealHuman; use PocketMine\Entity\RealHuman;
use PocketMine\Event;
use PocketMine\Event\EventHandler; use PocketMine\Event\EventHandler;
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;
@ -2159,6 +2159,7 @@ const CREATIVE_SLOTS = 112;
$nbt->readCompressed(file_get_contents(\PocketMine\DATA . "players/" . $iname . ".dat")); $nbt->readCompressed(file_get_contents(\PocketMine\DATA . "players/" . $iname . ".dat"));
$nbt = $nbt->getData(); $nbt = $nbt->getData();
} }
return $nbt; return $nbt;
} }
@ -2424,6 +2425,4 @@ const CREATIVE_SLOTS = 112;
} }
} }

View File

@ -30,7 +30,6 @@ 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\PMF\Plugin;
use PocketMine\Recipes\Crafting; use PocketMine\Recipes\Crafting;
use PocketMine\Tile\Tile; use PocketMine\Tile\Tile;
use PocketMine\Utils\Config; use PocketMine\Utils\Config;

View File

@ -21,10 +21,10 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Network\Protocol\ChatPacket; use PocketMine\Network\Protocol\ChatPacket;
use PocketMine\ServerAPI; use PocketMine\ServerAPI;
use PocketMine;
class Bed extends Transparent{ class Bed extends Transparent{
public function __construct($type = 0){ public function __construct($type = 0){

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class Beetroot extends Flowable{ class Beetroot extends Flowable{
public function __construct($meta = 0){ public function __construct($meta = 0){

View File

@ -24,10 +24,10 @@
*/ */
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
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;
abstract class Block extends Position{ abstract class Block extends Position{
const AIR = 0; const AIR = 0;

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class BrownMushroom extends Flowable{ class BrownMushroom extends Flowable{
public function __construct(){ public function __construct(){

View File

@ -22,13 +22,13 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine;
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\Tile\Furnace; use PocketMine\Tile\Furnace;
use PocketMine;
use PocketMine\Tile\Tile; use PocketMine\Tile\Tile;
class BurningFurnace extends Solid{ class BurningFurnace extends Solid{

View File

@ -21,11 +21,11 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
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\ServerAPI; use PocketMine\ServerAPI;
use PocketMine;
class Cactus extends Transparent{ class Cactus extends Transparent{
public function __construct($meta = 0){ public function __construct($meta = 0){

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class Cake extends Transparent{ class Cake extends Transparent{
public function __construct($meta = 0){ public function __construct($meta = 0){

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class Carpet extends Flowable{ class Carpet extends Flowable{
public function __construct($meta = 0){ public function __construct($meta = 0){

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class Carrot extends Flowable{ class Carrot extends Flowable{
public function __construct($meta = 0){ public function __construct($meta = 0){

View File

@ -22,13 +22,13 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine;
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\Tile\Chest as TileChest; use PocketMine\Tile\Chest as TileChest;
use PocketMine;
use PocketMine\Tile\Tile; use PocketMine\Tile\Tile;
class Chest extends Transparent{ class Chest extends Transparent{

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class CyanFlower extends Flowable{ class CyanFlower extends Flowable{
public function __construct(){ public function __construct(){

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class Dandelion extends Flowable{ class Dandelion extends Flowable{
public function __construct(){ public function __construct(){

View File

@ -21,11 +21,11 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
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;
use PocketMine;
abstract class Door extends Transparent{ abstract class Door extends Transparent{

View File

@ -21,10 +21,10 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\ServerAPI; use PocketMine\ServerAPI;
use PocketMine;
class Fallable extends Solid{ class Fallable extends Solid{

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class Fire extends Flowable{ class Fire extends Flowable{
public function __construct($meta = 0){ public function __construct($meta = 0){

View File

@ -21,10 +21,10 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\ServerAPI; use PocketMine\ServerAPI;
use PocketMine;
class Generic extends Block{ class Generic extends Block{

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class GlowingRedstoneOre extends Solid{ class GlowingRedstoneOre extends Solid{
public function __construct(){ public function __construct(){

View File

@ -21,10 +21,10 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Generator\Object\TallGrass; use PocketMine\Level\Generator\Object\TallGrass;
use PocketMine\Utils\Random; use PocketMine\Utils\Random;
use PocketMine;
class Grass extends Solid{ class Grass extends Solid{
public function __construct(){ public function __construct(){

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class Ladder extends Transparent{ class Ladder extends Transparent{
public function __construct($meta = 0){ public function __construct($meta = 0){

View File

@ -21,11 +21,11 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
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\ServerAPI; use PocketMine\ServerAPI;
use PocketMine;
class Lava extends Liquid{ class Lava extends Liquid{
public function __construct($meta = 0){ public function __construct($meta = 0){

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class Leaves extends Transparent{ class Leaves extends Transparent{
const OAK = 0; const OAK = 0;

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class MelonStem extends Flowable{ class MelonStem extends Flowable{
public function __construct($meta = 0){ public function __construct($meta = 0){

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class Potato extends Flowable{ class Potato extends Flowable{
public function __construct($meta = 0){ public function __construct($meta = 0){

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class PumpkinStem extends Flowable{ class PumpkinStem extends Flowable{
public function __construct($meta = 0){ public function __construct($meta = 0){

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class RedMushroom extends Flowable{ class RedMushroom extends Flowable{
public function __construct(){ public function __construct(){

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class RedstoneOre extends Solid{ class RedstoneOre extends Solid{
public function __construct(){ public function __construct(){

View File

@ -21,11 +21,11 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
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\Utils\Random; use PocketMine\Utils\Random;
use PocketMine;
class Sapling extends Flowable{ class Sapling extends Flowable{
const OAK = 0; const OAK = 0;

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class SignPost extends Transparent{ class SignPost extends Transparent{
public function __construct($meta = 0){ public function __construct($meta = 0){

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class SnowLayer extends Flowable{ class SnowLayer extends Flowable{
public function __construct($meta = 0){ public function __construct($meta = 0){

View File

@ -21,10 +21,10 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
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;
class Sugarcane extends Flowable{ class Sugarcane extends Flowable{
public function __construct($meta = 0){ public function __construct($meta = 0){

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class TallGrass extends Flowable{ class TallGrass extends Flowable{
public function __construct($meta = 1){ public function __construct($meta = 1){

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class Torch extends Flowable{ class Torch extends Flowable{
public function __construct($meta = 0){ public function __construct($meta = 0){

View File

@ -22,9 +22,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Level\Position; use PocketMine\Level\Position;
use PocketMine;
use PocketMine\ServerAPI; use PocketMine\ServerAPI;
class Water extends Liquid{ class Water extends Liquid{

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block; namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
class Wheat extends Flowable{ class Wheat extends Flowable{
public function __construct($meta = 0){ public function __construct($meta = 0){

View File

@ -24,6 +24,7 @@
*/ */
namespace PocketMine\Entity; namespace PocketMine\Entity;
use PocketMine;
use PocketMine\Event\Entity\EntityLevelChangeEvent; use PocketMine\Event\Entity\EntityLevelChangeEvent;
use PocketMine\Event\Entity\EntityMotionEvent; use PocketMine\Event\Entity\EntityMotionEvent;
use PocketMine\Event\Entity\EntityMoveEvent; use PocketMine\Event\Entity\EntityMoveEvent;
@ -34,15 +35,14 @@ use PocketMine\Level\Position;
use PocketMine\Math\AxisAlignedBB; use PocketMine\Math\AxisAlignedBB;
use PocketMine\Math\Vector3 as Vector3; use PocketMine\Math\Vector3 as Vector3;
use PocketMine\NBT\Tag\Compound; use PocketMine\NBT\Tag\Compound;
use PocketMine\Network;
use PocketMine\Network\Protocol\MoveEntityPacket_PosRot; use PocketMine\Network\Protocol\MoveEntityPacket_PosRot;
use PocketMine\Network\Protocol\MovePlayerPacket; use PocketMine\Network\Protocol\MovePlayerPacket;
use PocketMine\Network\Protocol\RemoveEntityPacket; use PocketMine\Network\Protocol\RemoveEntityPacket;
use PocketMine\Network\Protocol\SetEntityMotionPacket; use PocketMine\Network\Protocol\SetEntityMotionPacket;
use PocketMine\Network;
use PocketMine\Player; use PocketMine\Player;
use PocketMine\PMF\LevelFormat; use PocketMine\PMF\LevelFormat;
use PocketMine\ServerAPI; use PocketMine\ServerAPI;
use PocketMine;
abstract class Entity extends Position{ abstract class Entity extends Position{
public static $entityCount = 1; public static $entityCount = 1;

View File

@ -21,7 +21,6 @@
namespace PocketMine\Entity; namespace PocketMine\Entity;
use PocketMine;
use PocketMine\Event\Entity\EntityArmorChangeEvent; use PocketMine\Event\Entity\EntityArmorChangeEvent;
use PocketMine\Event\Entity\EntityInventoryChangeEvent; use PocketMine\Event\Entity\EntityInventoryChangeEvent;
use PocketMine\Event\Event; use PocketMine\Event\Event;
@ -30,13 +29,14 @@ use PocketMine\Item\Item;
use PocketMine\NBT\Tag\Byte; use PocketMine\NBT\Tag\Byte;
use PocketMine\NBT\Tag\Compound; use PocketMine\NBT\Tag\Compound;
use PocketMine\NBT\Tag\Short; use PocketMine\NBT\Tag\Short;
use PocketMine\Network;
use PocketMine\Network\Protocol\AddPlayerPacket; use PocketMine\Network\Protocol\AddPlayerPacket;
use PocketMine\Network\Protocol\ContainerSetContentPacket; use PocketMine\Network\Protocol\ContainerSetContentPacket;
use PocketMine\Network\Protocol\PlayerEquipmentPacket; use PocketMine\Network\Protocol\PlayerEquipmentPacket;
use PocketMine\Network\Protocol\RemovePlayerPacket; use PocketMine\Network\Protocol\RemovePlayerPacket;
use PocketMine\Network\Protocol\SetEntityMotionPacket; use PocketMine\Network\Protocol\SetEntityMotionPacket;
use PocketMine\Network;
use PocketMine\Player; use PocketMine\Player;
use PocketMine;
class Human extends Creature implements ProjectileSource, InventorySource{ class Human extends Creature implements ProjectileSource, InventorySource{

View File

@ -21,11 +21,11 @@
namespace PocketMine\Event\Block; namespace PocketMine\Event\Block;
use PocketMine;
use PocketMine\Block\Block; use PocketMine\Block\Block;
use PocketMine\Event\CancellableEvent; use PocketMine\Event\CancellableEvent;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Player; use PocketMine\Player;
use PocketMine;
class BlockBreakEvent extends BlockEvent implements CancellableEvent{ class BlockBreakEvent extends BlockEvent implements CancellableEvent{
public static $handlers; public static $handlers;

View File

@ -21,11 +21,11 @@
namespace PocketMine\Event\Block; namespace PocketMine\Event\Block;
use PocketMine;
use PocketMine\Block\Block; use PocketMine\Block\Block;
use PocketMine\Event\CancellableEvent; use PocketMine\Event\CancellableEvent;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Player; use PocketMine\Player;
use PocketMine;
/** /**
* Called when a player places a block * Called when a player places a block

View File

@ -22,9 +22,9 @@
namespace PocketMine\Event\Entity; namespace PocketMine\Event\Entity;
use PocketMine\Entity\Entity; use PocketMine\Entity\Entity;
use PocketMine;
use PocketMine\Event\CancellableEvent; use PocketMine\Event\CancellableEvent;
use PocketMine\Event; use PocketMine\Event;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
class EntityArmorChangeEvent extends EntityEvent implements CancellableEvent{ class EntityArmorChangeEvent extends EntityEvent implements CancellableEvent{

View File

@ -22,9 +22,9 @@
namespace PocketMine\Event\Entity; namespace PocketMine\Event\Entity;
use PocketMine\Entity\Entity; use PocketMine\Entity\Entity;
use PocketMine;
use PocketMine\Event\CancellableEvent; use PocketMine\Event\CancellableEvent;
use PocketMine\Event; use PocketMine\Event;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
class EntityInventoryChangeEvent extends EntityEvent implements CancellableEvent{ class EntityInventoryChangeEvent extends EntityEvent implements CancellableEvent{

View File

@ -22,9 +22,9 @@
namespace PocketMine\Event\Entity; namespace PocketMine\Event\Entity;
use PocketMine\Entity\Entity; use PocketMine\Entity\Entity;
use PocketMine;
use PocketMine\Event\CancellableEvent; use PocketMine\Event\CancellableEvent;
use PocketMine\Event; use PocketMine\Event;
use PocketMine;
use PocketMine\Level\Level; use PocketMine\Level\Level;
class EntityLevelChangeEvent extends EntityEvent implements CancellableEvent{ class EntityLevelChangeEvent extends EntityEvent implements CancellableEvent{

View File

@ -22,9 +22,9 @@
namespace PocketMine\Event\Entity; namespace PocketMine\Event\Entity;
use PocketMine\Entity\Entity; use PocketMine\Entity\Entity;
use PocketMine;
use PocketMine\Event\CancellableEvent; use PocketMine\Event\CancellableEvent;
use PocketMine\Event; use PocketMine\Event;
use PocketMine;
use PocketMine\Math\Vector3 as Vector3; use PocketMine\Math\Vector3 as Vector3;
class EntityMotionEvent extends EntityEvent implements CancellableEvent{ class EntityMotionEvent extends EntityEvent implements CancellableEvent{

View File

@ -22,9 +22,9 @@
namespace PocketMine\Event\Entity; namespace PocketMine\Event\Entity;
use PocketMine\Entity\Entity; use PocketMine\Entity\Entity;
use PocketMine;
use PocketMine\Event\CancellableEvent; use PocketMine\Event\CancellableEvent;
use PocketMine\Event; use PocketMine\Event;
use PocketMine;
use PocketMine\Math\Vector3 as Vector3; use PocketMine\Math\Vector3 as Vector3;
class EntityMoveEvent extends EntityEvent implements CancellableEvent{ class EntityMoveEvent extends EntityEvent implements CancellableEvent{

View File

@ -21,11 +21,11 @@
namespace PocketMine\Event\Player; namespace PocketMine\Event\Player;
use PocketMine;
use PocketMine\Block\Block; use PocketMine\Block\Block;
use PocketMine\Event\CancellableEvent; use PocketMine\Event\CancellableEvent;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Player; use PocketMine\Player;
use PocketMine;
/** /**
* Called when a player interacts or touches a block (including air?) * Called when a player interacts or touches a block (including air?)

View File

@ -21,10 +21,10 @@
namespace PocketMine\Event\Player; namespace PocketMine\Event\Player;
use PocketMine\Event\CancellableEvent;
use PocketMine;
use PocketMine\Event; use PocketMine\Event;
use PocketMine\Event\CancellableEvent;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine;
use PocketMine\Player; use PocketMine\Player;
class PlayerItemHeldEvent extends PlayerEvent implements CancellableEvent{ class PlayerItemHeldEvent extends PlayerEvent implements CancellableEvent{

View File

@ -21,10 +21,10 @@
namespace PocketMine\Event\Server; namespace PocketMine\Event\Server;
use PocketMine\Event;
use PocketMine\Event\CancellableEvent; use PocketMine\Event\CancellableEvent;
use PocketMine\Network\Protocol\DataPacket;
use PocketMine; use PocketMine;
use PocketMine\Event;
use PocketMine\Network\Protocol\DataPacket;
use PocketMine\Player; use PocketMine\Player;
class DataPacketReceiveEvent extends ServerEvent implements CancellableEvent{ class DataPacketReceiveEvent extends ServerEvent implements CancellableEvent{

View File

@ -21,10 +21,10 @@
namespace PocketMine\Event\Server; namespace PocketMine\Event\Server;
use PocketMine\Event;
use PocketMine\Event\CancellableEvent; use PocketMine\Event\CancellableEvent;
use PocketMine\Network\Protocol\DataPacket;
use PocketMine; use PocketMine;
use PocketMine\Event;
use PocketMine\Network\Protocol\DataPacket;
use PocketMine\Player; use PocketMine\Player;
class DataPacketSendEvent extends ServerEvent implements CancellableEvent{ class DataPacketSendEvent extends ServerEvent implements CancellableEvent{

View File

@ -22,8 +22,8 @@
namespace PocketMine\Event\Server; namespace PocketMine\Event\Server;
use PocketMine\Event\CancellableEvent; use PocketMine\Event\CancellableEvent;
use PocketMine\Event;
use PocketMine; use PocketMine;
use PocketMine\Event;
use PocketMine\Network\Packet; use PocketMine\Network\Packet;
class PacketReceiveEvent extends ServerEvent implements CancellableEvent{ class PacketReceiveEvent extends ServerEvent implements CancellableEvent{

View File

@ -22,8 +22,8 @@
namespace PocketMine\Event\Server; namespace PocketMine\Event\Server;
use PocketMine\Event\CancellableEvent; use PocketMine\Event\CancellableEvent;
use PocketMine\Event;
use PocketMine; use PocketMine;
use PocketMine\Event;
use PocketMine\Network\Packet; use PocketMine\Network\Packet;
class PacketSendEvent extends ServerEvent implements CancellableEvent{ class PacketSendEvent extends ServerEvent implements CancellableEvent{

View File

@ -21,11 +21,11 @@
namespace PocketMine\Event\Tile; namespace PocketMine\Event\Tile;
use PocketMine\Event;
use PocketMine\Item\Item;
use PocketMine;
use PocketMine\Tile\Tile;
use PocketMine\Event\CancellableEvent; use PocketMine\Event\CancellableEvent;
use PocketMine\Event;
use PocketMine;
use PocketMine\Item\Item;
use PocketMine\Tile\Tile;
class TileInventoryChangeEvent extends TileEvent implements CancellableEvent{ class TileInventoryChangeEvent extends TileEvent implements CancellableEvent{
public static $handlers; public static $handlers;

View File

@ -22,12 +22,12 @@
namespace PocketMine\Item; namespace PocketMine\Item;
use PocketMine\Block\Air; use PocketMine\Block\Air;
use PocketMine;
use PocketMine\Block\Block; use PocketMine\Block\Block;
use PocketMine\Block\Lava; use PocketMine\Block\Lava;
use PocketMine\Block\Liquid; use PocketMine\Block\Liquid;
use PocketMine\Block\Water; use PocketMine\Block\Water;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
use PocketMine\Player; use PocketMine\Player;
class Bucket extends Item{ class Bucket extends Item{

View File

@ -22,10 +22,10 @@
namespace PocketMine\Item; namespace PocketMine\Item;
use PocketMine\Block\Block; use PocketMine\Block\Block;
use PocketMine;
use PocketMine\Block\Fire; use PocketMine\Block\Fire;
use PocketMine\Block\Solid; use PocketMine\Block\Solid;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
use PocketMine\Player; use PocketMine\Player;
class FlintSteel extends Item{ class FlintSteel extends Item{

View File

@ -25,13 +25,13 @@
namespace PocketMine\Item; namespace PocketMine\Item;
use PocketMine\Block\Block; use PocketMine\Block\Block;
use PocketMine;
use PocketMine\Entity\Entity; use PocketMine\Entity\Entity;
use PocketMine\Item\Block as ItemBlock; use PocketMine\Item\Block as ItemBlock;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Player;
use PocketMine\Recipes\Fuel; use PocketMine\Recipes\Fuel;
use PocketMine\Recipes\Smelt; use PocketMine\Recipes\Smelt;
use PocketMine;
use PocketMine\Player;
class Item{ class Item{
//All Block IDs are here too //All Block IDs are here too

View File

@ -22,10 +22,10 @@
namespace PocketMine\Item; namespace PocketMine\Item;
use PocketMine\Block\Block; use PocketMine\Block\Block;
use PocketMine\Level\Level;
use PocketMine\ServerAPI;
use PocketMine; use PocketMine;
use PocketMine\Level\Level;
use PocketMine\Player; use PocketMine\Player;
use PocketMine\ServerAPI;
class Painting extends Item{ class Painting extends Item{
public function __construct($meta = 0, $count = 1){ public function __construct($meta = 0, $count = 1){

View File

@ -21,11 +21,11 @@
namespace PocketMine\Item; namespace PocketMine\Item;
use PocketMine\Entity; use PocketMine;
use PocketMine\Block\Block; use PocketMine\Block\Block;
use PocketMine\Entity;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Player; use PocketMine\Player;
use PocketMine;
class SpawnEgg extends Item{ class SpawnEgg extends Item{
public function __construct($meta = 0, $count = 1){ public function __construct($meta = 0, $count = 1){

View File

@ -22,13 +22,13 @@
namespace PocketMine\Level; namespace PocketMine\Level;
use PocketMine\Block\Block; use PocketMine\Block\Block;
use PocketMine;
use PocketMine\Block\TNT; use PocketMine\Block\TNT;
use PocketMine\Item\Item;
use PocketMine\Math\Vector3 as Vector3; use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Network\Protocol\ExplodePacket; use PocketMine\Network\Protocol\ExplodePacket;
use PocketMine\Player; use PocketMine\Player;
use PocketMine\ServerAPI; use PocketMine\ServerAPI;
use PocketMine;
use PocketMine\Item\Item;
class Explosion{ class Explosion{
public static $specialDrops = array( public static $specialDrops = array(

View File

@ -24,7 +24,6 @@
*/ */
namespace PocketMine\Level; namespace PocketMine\Level;
use PocketMine;
use PocketMine\Block\Air; use PocketMine\Block\Air;
use PocketMine\Block\Block; use PocketMine\Block\Block;
use PocketMine\Item\Item; use PocketMine\Item\Item;
@ -52,6 +51,7 @@ use PocketMine\Utils\Cache;
use PocketMine\Utils\Config; use PocketMine\Utils\Config;
use PocketMine\Utils\Random; use PocketMine\Utils\Random;
use PocketMine\Utils\Utils; use PocketMine\Utils\Utils;
use PocketMine;
/** /**
* Class Level * Class Level

View File

@ -21,10 +21,10 @@
namespace PocketMine\Level; namespace PocketMine\Level;
use PocketMine\NBT\NBT;
use PocketMine;
use PocketMine\PMF\LevelFormat; use PocketMine\PMF\LevelFormat;
use PocketMine\Utils\Config; use PocketMine\Utils\Config;
use PocketMine;
use PocketMine\NBT\NBT;
class LevelImport{ class LevelImport{
private $path; private $path;

View File

@ -21,12 +21,12 @@
namespace PocketMine\Level; namespace PocketMine\Level;
use PocketMine;
use PocketMine\Level\Generator\Generator; use PocketMine\Level\Generator\Generator;
use PocketMine\PMF\LevelFormat; use PocketMine\PMF\LevelFormat;
use PocketMine\Utils\Config; use PocketMine\Utils\Config;
use PocketMine\Utils\Random; use PocketMine\Utils\Random;
use PocketMine\Utils\Utils; use PocketMine\Utils\Utils;
use PocketMine;
class WorldGenerator{ class WorldGenerator{
private $seed, $level, $path, $random, $generator, $height; private $seed, $level, $path, $random, $generator, $height;

View File

@ -21,7 +21,6 @@
namespace PocketMine\Level\Generator; namespace PocketMine\Level\Generator;
use PocketMine;
use PocketMine\Block\CoalOre; use PocketMine\Block\CoalOre;
use PocketMine\Block\DiamondOre; use PocketMine\Block\DiamondOre;
use PocketMine\Block\Dirt; use PocketMine\Block\Dirt;
@ -35,6 +34,7 @@ use PocketMine\Level\Generator\Populator\Ore;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Math\Vector3 as Vector3; use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random; use PocketMine\Utils\Random;
use PocketMine;
class Flat extends Generator{ class Flat extends Generator{
private $level, $random, $structure, $chunks, $options, $floorLevel, $preset, $populators = array(); private $level, $random, $structure, $chunks, $options, $floorLevel, $preset, $populators = array();

View File

@ -24,9 +24,9 @@
*/ */
namespace PocketMine\Level\Generator; namespace PocketMine\Level\Generator;
use PocketMine;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Utils\Random; use PocketMine\Utils\Random;
use PocketMine;
abstract class Generator{ abstract class Generator{
private static $list = array(); private static $list = array();

View File

@ -21,6 +21,7 @@
namespace PocketMine\Level\Generator; namespace PocketMine\Level\Generator;
use PocketMine;
use PocketMine\Block\CoalOre; use PocketMine\Block\CoalOre;
use PocketMine\Block\DiamondOre; use PocketMine\Block\DiamondOre;
use PocketMine\Block\Dirt; use PocketMine\Block\Dirt;
@ -37,7 +38,6 @@ use PocketMine\Level\Generator\Populator\Tree;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Math\Vector3 as Vector3; use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random; use PocketMine\Utils\Random;
use PocketMine;
class Normal extends Generator{ class Normal extends Generator{

View File

@ -21,9 +21,9 @@
namespace PocketMine\Level\Generator\Object; namespace PocketMine\Level\Generator\Object;
use PocketMine;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Math\Vector3 as Vector3; use PocketMine\Math\Vector3 as Vector3;
use PocketMine;
class BigTree extends Tree{ class BigTree extends Tree{
private $trunkHeightMultiplier = 0.618; private $trunkHeightMultiplier = 0.618;

View File

@ -21,11 +21,11 @@
namespace PocketMine\Level\Generator\Object; namespace PocketMine\Level\Generator\Object;
use PocketMine;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Math\Vector3 as Vector3; use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Math\VectorMath; use PocketMine\Math\VectorMath;
use PocketMine\Utils\Random; use PocketMine\Utils\Random;
use PocketMine;
class Ore{ class Ore{
private $random; private $random;

View File

@ -21,13 +21,13 @@
namespace PocketMine\Level\Generator\Object; namespace PocketMine\Level\Generator\Object;
use PocketMine;
use PocketMine\Block\Dirt; use PocketMine\Block\Dirt;
use PocketMine\Block\Leaves; use PocketMine\Block\Leaves;
use PocketMine\Block\Wood; use PocketMine\Block\Wood;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Math\Vector3 as Vector3; use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random; use PocketMine\Utils\Random;
use PocketMine;
class PineTree extends Tree{ class PineTree extends Tree{
var $type = 1; var $type = 1;

View File

@ -21,11 +21,11 @@
namespace PocketMine\Level\Generator\Object; namespace PocketMine\Level\Generator\Object;
use PocketMine;
use PocketMine\Block\Block; use PocketMine\Block\Block;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Math\Vector3 as Vector3; use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random; use PocketMine\Utils\Random;
use PocketMine;
class Pond{ class Pond{
private $random; private $random;

View File

@ -21,13 +21,13 @@
namespace PocketMine\Level\Generator\Object; namespace PocketMine\Level\Generator\Object;
use PocketMine;
use PocketMine\Block\Dirt; use PocketMine\Block\Dirt;
use PocketMine\Block\Leaves; use PocketMine\Block\Leaves;
use PocketMine\Block\Wood; use PocketMine\Block\Wood;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Math\Vector3 as Vector3; use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random; use PocketMine\Utils\Random;
use PocketMine;
class SmallTree extends Tree{ class SmallTree extends Tree{
public $type = 0; public $type = 0;

View File

@ -21,13 +21,13 @@
namespace PocketMine\Level\Generator\Object; namespace PocketMine\Level\Generator\Object;
use PocketMine;
use PocketMine\Block\Dirt; use PocketMine\Block\Dirt;
use PocketMine\Block\Leaves; use PocketMine\Block\Leaves;
use PocketMine\Block\Wood; use PocketMine\Block\Wood;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Math\Vector3 as Vector3; use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random; use PocketMine\Utils\Random;
use PocketMine;
class SpruceTree extends Tree{ class SpruceTree extends Tree{
var $type = 1; var $type = 1;

View File

@ -21,11 +21,11 @@
namespace PocketMine\Level\Generator\Object; namespace PocketMine\Level\Generator\Object;
use PocketMine;
use PocketMine\Block\Sapling; use PocketMine\Block\Sapling;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Math\Vector3 as Vector3; use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random; use PocketMine\Utils\Random;
use PocketMine;
class Tree{ class Tree{
public $overridable = array( public $overridable = array(

View File

@ -21,9 +21,9 @@
namespace PocketMine\Level\Generator\Populator; namespace PocketMine\Level\Generator\Populator;
use PocketMine;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Utils\Random; use PocketMine\Utils\Random;
use PocketMine;
class Mineshaft extends Populator{ class Mineshaft extends Populator{
private static $DISTANCE = 256; private static $DISTANCE = 256;

View File

@ -21,11 +21,11 @@
namespace PocketMine\Level\Generator\Populator; namespace PocketMine\Level\Generator\Populator;
use PocketMine;
use PocketMine\Level\Generator\Object\Ore as ObjectOre; use PocketMine\Level\Generator\Object\Ore as ObjectOre;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Math\Vector3 as Vector3; use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random; use PocketMine\Utils\Random;
use PocketMine;
class Ore extends Populator{ class Ore extends Populator{
private $oreTypes = array(); private $oreTypes = array();

View File

@ -21,11 +21,11 @@
namespace PocketMine\Level\Generator\Populator; namespace PocketMine\Level\Generator\Populator;
use PocketMine;
use PocketMine\Block\Water; use PocketMine\Block\Water;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Math\Vector3 as Vector3; use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random; use PocketMine\Utils\Random;
use PocketMine;
class Pond extends Populator{ class Pond extends Populator{
private $waterOdd = 4; private $waterOdd = 4;

View File

@ -24,9 +24,9 @@
*/ */
namespace PocketMine\Level\Generator\Populator; namespace PocketMine\Level\Generator\Populator;
use PocketMine;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Utils\Random; use PocketMine\Utils\Random;
use PocketMine;
abstract class Populator{ abstract class Populator{
public abstract function populate(Level $level, $chunkX, $chunkZ, Random $random); public abstract function populate(Level $level, $chunkX, $chunkZ, Random $random);

View File

@ -21,12 +21,12 @@
namespace PocketMine\Level\Generator\Populator; namespace PocketMine\Level\Generator\Populator;
use PocketMine;
use PocketMine\Block\Block; use PocketMine\Block\Block;
use PocketMine\Block\TallGrass as BlockTallGrass; use PocketMine\Block\TallGrass as BlockTallGrass;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Math\Vector3 as Vector3; use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random; use PocketMine\Utils\Random;
use PocketMine;
class TallGrass extends Populator{ class TallGrass extends Populator{
/** /**

View File

@ -21,13 +21,13 @@
namespace PocketMine\Level\Generator\Populator; namespace PocketMine\Level\Generator\Populator;
use PocketMine;
use PocketMine\Block\Block; use PocketMine\Block\Block;
use PocketMine\Block\Sapling; use PocketMine\Block\Sapling;
use PocketMine\Level\Generator\Object\Tree as ObjectTree; use PocketMine\Level\Generator\Object\Tree as ObjectTree;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Math\Vector3 as Vector3; use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random; use PocketMine\Utils\Random;
use PocketMine;
class Tree extends Populator{ class Tree extends Populator{
private $level; private $level;

View File

@ -24,7 +24,6 @@
*/ */
namespace PocketMine\NBT; namespace PocketMine\NBT;
use PocketMine;
use PocketMine\NBT\Tag\Byte; use PocketMine\NBT\Tag\Byte;
use PocketMine\NBT\Tag\Byte_Array; use PocketMine\NBT\Tag\Byte_Array;
use PocketMine\NBT\Tag\Compound; use PocketMine\NBT\Tag\Compound;
@ -40,6 +39,7 @@ use PocketMine\NBT\Tag\Short;
use PocketMine\NBT\Tag\String; use PocketMine\NBT\Tag\String;
use PocketMine\NBT\Tag\Tag; use PocketMine\NBT\Tag\Tag;
use PocketMine\Utils\Utils; use PocketMine\Utils\Utils;
use PocketMine;
/** /**
* Named Binary Tag encoder/decoder * Named Binary Tag encoder/decoder
@ -124,6 +124,7 @@ class NBT{
if(($write = $this->write()) !== false){ if(($write = $this->write()) !== false){
return \gzencode($write, 9); return \gzencode($write, 9);
} }
return false; return false;
} }

View File

@ -45,6 +45,7 @@ class Compound extends NamedTag implements \ArrayAccess{
return $this->{$offset}->getValue(); return $this->{$offset}->getValue();
} }
} }
return null; return null;
} }

View File

@ -48,6 +48,7 @@ class Enum extends NamedTag implements \ArrayAccess{
return $this->{$offset}->getValue(); return $this->{$offset}->getValue();
} }
} }
return null; return null;
} }

View File

@ -24,6 +24,7 @@
*/ */
namespace PocketMine\Network; namespace PocketMine\Network;
use PocketMine;
use PocketMine\Event\Event; use PocketMine\Event\Event;
use PocketMine\Event\EventHandler; use PocketMine\Event\EventHandler;
use PocketMine\Event\Server\PacketReceiveEvent; use PocketMine\Event\Server\PacketReceiveEvent;
@ -33,7 +34,6 @@ use PocketMine\Network\Query\QueryPacket;
use PocketMine\Network\RakNet\Info; use PocketMine\Network\RakNet\Info;
use PocketMine\Network\RakNet\Packet; use PocketMine\Network\RakNet\Packet;
use PocketMine\ServerAPI; use PocketMine\ServerAPI;
use PocketMine;
class Handler{ class Handler{
public $bandwidth; public $bandwidth;

View File

@ -21,9 +21,9 @@
namespace PocketMine\Network\Protocol; namespace PocketMine\Network\Protocol;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Utils\Utils; use PocketMine\Utils\Utils;
use PocketMine;
abstract class DataPacket{ abstract class DataPacket{
private $offset = 0; private $offset = 0;

View File

@ -25,11 +25,11 @@
*/ */
namespace PocketMine\Network\Query; namespace PocketMine\Network\Query;
use PocketMine;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Player; use PocketMine\Player;
use PocketMine\ServerAPI; use PocketMine\ServerAPI;
use PocketMine\Utils\Utils; use PocketMine\Utils\Utils;
use PocketMine;
class QueryHandler{ class QueryHandler{
private $socket, $server, $lastToken, $token, $longData, $timeout; private $socket, $server, $lastToken, $token, $longData, $timeout;

View File

@ -21,9 +21,9 @@
namespace PocketMine\Network\Query; namespace PocketMine\Network\Query;
use PocketMine;
use PocketMine\Network\Packet; use PocketMine\Network\Packet;
use PocketMine\Utils\Utils; use PocketMine\Utils\Utils;
use PocketMine;
class QueryPacket extends Packet{ class QueryPacket extends Packet{
const HANDSHAKE = 9; const HANDSHAKE = 9;

View File

@ -21,10 +21,10 @@
namespace PocketMine\Network\RakNet; namespace PocketMine\Network\RakNet;
use PocketMine;
use PocketMine\Network; use PocketMine\Network;
use PocketMine\Network\Protocol\Info as ProtocolInfo; use PocketMine\Network\Protocol\Info as ProtocolInfo;
use PocketMine\Utils\Utils; use PocketMine\Utils\Utils;
use PocketMine;
class Packet extends Network\Packet{ class Packet extends Network\Packet{
private $packetID; private $packetID;

View File

@ -118,6 +118,7 @@ abstract class PluginBase{
if(file_exists($this->dataFolder . "resources/" . $filename)){ if(file_exists($this->dataFolder . "resources/" . $filename)){
return file_get_contents($this->dataFolder . "resources/" . $filename); return file_get_contents($this->dataFolder . "resources/" . $filename);
} }
return false; return false;
} }
} }
@ -154,6 +155,7 @@ abstract class PluginBase{
foreach(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->dataFolder . "resources/")) as $resource){ foreach(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->dataFolder . "resources/")) as $resource){
$resources[] = $resource; $resources[] = $resource;
} }
return $resources; return $resources;
} }
} }
@ -162,14 +164,17 @@ abstract class PluginBase{
if(!isset($this->config)){ if(!isset($this->config)){
$this->reloadConfig(); $this->reloadConfig();
} }
return $this->config; return $this->config;
} }
public function saveConfig(){ public function saveConfig(){
if($this->getConfig()->save() === false){ if($this->getConfig()->save() === false){
console("[SEVERE] Could not save config to " . $this->configFile); console("[SEVERE] Could not save config to " . $this->configFile);
return false; return false;
} }
return true; return true;
} }
@ -190,8 +195,7 @@ abstract class PluginBase{
return $this->dataFolder; return $this->dataFolder;
} }
public final function getName() public final function getName(){
{
return $this->description->getName(); return $this->description->getName();
} }

View File

@ -54,6 +54,7 @@ class PluginDescription{
$this->name = preg_replace("[^A-Za-z0-9 _.-]", "", $plugin["name"]); $this->name = preg_replace("[^A-Za-z0-9 _.-]", "", $plugin["name"]);
if($this->name === ""){ if($this->name === ""){
trigger_error("Invalid PluginDescription name", E_USER_WARNING); trigger_error("Invalid PluginDescription name", E_USER_WARNING);
return; return;
} }
$this->name = str_replace(" ", "_", $this->name); $this->name = str_replace(" ", "_", $this->name);
@ -62,6 +63,7 @@ class PluginDescription{
$this->api = !is_array($plugin["api"]) ? array($plugin["api"]) : $plugin["api"]; $this->api = !is_array($plugin["api"]) ? array($plugin["api"]) : $plugin["api"];
if(stripos($this->main, "PocketMine\\") === 0){ if(stripos($this->main, "PocketMine\\") === 0){
trigger_error("Invalid PluginDescription main, cannot start within the PocketMine namespace", E_USER_ERROR); trigger_error("Invalid PluginDescription main, cannot start within the PocketMine namespace", E_USER_ERROR);
return; return;
} }
@ -87,6 +89,7 @@ class PluginDescription{
$order = strtoupper($plugin["load"]); $order = strtoupper($plugin["load"]);
if(!defined("PocketMine\\Plugin\\PluginLoadOrder::" . $order)){ if(!defined("PocketMine\\Plugin\\PluginLoadOrder::" . $order)){
trigger_error("Invalid PluginDescription load", E_USER_ERROR); trigger_error("Invalid PluginDescription load", E_USER_ERROR);
return; return;
}else{ }else{
$this->order = constant("PocketMine\\Plugin\\PluginLoadOrder::" . $order); $this->order = constant("PocketMine\\Plugin\\PluginLoadOrder::" . $order);
@ -128,80 +131,70 @@ class PluginDescription{
/** /**
* @return array * @return array
*/ */
public function getDepend() public function getDepend(){
{
return $this->depend; return $this->depend;
} }
/** /**
* @return string * @return string
*/ */
public function getDescription() public function getDescription(){
{
return $this->description; return $this->description;
} }
/** /**
* @return array * @return array
*/ */
public function getLoadBefore() public function getLoadBefore(){
{
return $this->loadBefore; return $this->loadBefore;
} }
/** /**
* @return string * @return string
*/ */
public function getMain() public function getMain(){
{
return $this->main; return $this->main;
} }
/** /**
* @return string * @return string
*/ */
public function getName() public function getName(){
{
return $this->name; return $this->name;
} }
/** /**
* @return int * @return int
*/ */
public function getOrder() public function getOrder(){
{
return $this->order; return $this->order;
} }
/** /**
* @return Permission[] * @return Permission[]
*/ */
public function getPermisions() public function getPermisions(){
{
return $this->permissions; return $this->permissions;
} }
/** /**
* @return array * @return array
*/ */
public function getSoftDepend() public function getSoftDepend(){
{
return $this->softDepend; return $this->softDepend;
} }
/** /**
* @return string * @return string
*/ */
public function getVersion() public function getVersion(){
{
return $this->version; return $this->version;
} }
/** /**
* @return string * @return string
*/ */
public function getWebsite() public function getWebsite(){
{
return $this->website; return $this->website;
} }
} }

View File

@ -21,9 +21,9 @@
namespace PocketMine\Plugin; namespace PocketMine\Plugin;
use PocketMine;
use PocketMine\Permission\Permission;
use PocketMine\Permission\Permissible; use PocketMine\Permission\Permissible;
use PocketMine\Permission\Permission;
use PocketMine;
/** /**
* Manages all the plugins, Permissions and Permissibles * Manages all the plugins, Permissions and Permissibles
@ -79,6 +79,7 @@ abstract class PluginManager{
if(isset(static::$plugins[$name])){ if(isset(static::$plugins[$name])){
return static::$plugins[$name]; return static::$plugins[$name];
} }
return null; return null;
} }
@ -99,6 +100,7 @@ abstract class PluginManager{
} }
static::$fileAssociations[spl_object_hash($loader)] = array($loader, $loader->getPluginFilters()); static::$fileAssociations[spl_object_hash($loader)] = array($loader, $loader->getPluginFilters());
return true; return true;
} }
@ -281,6 +283,7 @@ abstract class PluginManager{
if(isset(static::$permissions[$name])){ if(isset(static::$permissions[$name])){
return static::$permissions[$name]; return static::$permissions[$name];
} }
return null; return null;
} }
@ -293,8 +296,10 @@ abstract class PluginManager{
if(!isset(static::$permissions[$permission->getName()])){ if(!isset(static::$permissions[$permission->getName()])){
static::$permissions[$permission->getName()] = $permission; static::$permissions[$permission->getName()] = $permission;
static::calculatePermissionDefault($permission); static::calculatePermissionDefault($permission);
return true; return true;
} }
return false; return false;
} }
@ -388,6 +393,7 @@ abstract class PluginManager{
if(isset(static::$permSubs[$permission])){ if(isset(static::$permSubs[$permission])){
return static::$permSubs[$permission]; return static::$permSubs[$permission];
} }
return array(); return array();
} }

View File

@ -21,12 +21,12 @@
namespace PocketMine\PMF; namespace PocketMine\PMF;
use PocketMine;
use PocketMine\Level\Level; use PocketMine\Level\Level;
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\Utils\Utils; use PocketMine\Utils\Utils;
use PocketMine;
class LevelFormat extends PMF{ class LevelFormat extends PMF{
const VERSION = 2; const VERSION = 2;

View File

@ -24,9 +24,9 @@
*/ */
namespace PocketMine\Recipes; namespace PocketMine\Recipes;
use PocketMine;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\ServerAPI; use PocketMine\ServerAPI;
use PocketMine;
abstract class Crafting{ abstract class Crafting{
private static $small = array( //Probably means craftable on crafting bench and in inventory. Name it better! private static $small = array( //Probably means craftable on crafting bench and in inventory. Name it better!

View File

@ -23,13 +23,13 @@ namespace PocketMine\Tile;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Math\Vector3 as Vector3; use PocketMine\Math\Vector3 as Vector3;
use PocketMine;
use PocketMine\NBT\NBT;
use PocketMine\NBT\Tag\Compound; use PocketMine\NBT\Tag\Compound;
use PocketMine\NBT\Tag\Int; use PocketMine\NBT\Tag\Int;
use PocketMine\NBT\Tag\String; use PocketMine\NBT\Tag\String;
use PocketMine\Network\Protocol\EntityDataPacket; use PocketMine\Network\Protocol\EntityDataPacket;
use PocketMine;
use PocketMine\Player; use PocketMine\Player;
use PocketMine\NBT\NBT;
class Chest extends Spawnable{ class Chest extends Spawnable{
use Container; use Container;

View File

@ -21,6 +21,7 @@
namespace PocketMine\Tile; namespace PocketMine\Tile;
use PocketMine;
use PocketMine\Event\Event; use PocketMine\Event\Event;
use PocketMine\Event\EventHandler; use PocketMine\Event\EventHandler;
use PocketMine\Event\Tile\TileInventoryChangeEvent; use PocketMine\Event\Tile\TileInventoryChangeEvent;
@ -28,9 +29,8 @@ use PocketMine\Item\Item;
use PocketMine\NBT\Tag\Byte; use PocketMine\NBT\Tag\Byte;
use PocketMine\NBT\Tag\Compound; use PocketMine\NBT\Tag\Compound;
use PocketMine\NBT\Tag\Short; use PocketMine\NBT\Tag\Short;
use PocketMine\Player;
use PocketMine\Network; use PocketMine\Network;
use PocketMine; use PocketMine\Player;
trait Container{ trait Container{
public function openInventory(Player $player){ public function openInventory(Player $player){

View File

@ -21,11 +21,11 @@
namespace PocketMine\Tile; namespace PocketMine\Tile;
use PocketMine;
use PocketMine\Block\Block; use PocketMine\Block\Block;
use PocketMine\Item\Item; use PocketMine\Item\Item;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\NBT\Tag\Compound; use PocketMine\NBT\Tag\Compound;
use PocketMine;
class Furnace extends Tile{ class Furnace extends Tile{
use Container; use Container;

View File

@ -22,12 +22,12 @@
namespace PocketMine\Tile; namespace PocketMine\Tile;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine;
use PocketMine\NBT\NBT; use PocketMine\NBT\NBT;
use PocketMine\NBT\Tag\Compound; use PocketMine\NBT\Tag\Compound;
use PocketMine\NBT\Tag\Int; use PocketMine\NBT\Tag\Int;
use PocketMine\NBT\Tag\String; use PocketMine\NBT\Tag\String;
use PocketMine\Network\Protocol\EntityDataPacket; use PocketMine\Network\Protocol\EntityDataPacket;
use PocketMine;
use PocketMine\Player; use PocketMine\Player;
class Sign extends Spawnable{ class Sign extends Spawnable{

View File

@ -25,12 +25,12 @@
*/ */
namespace PocketMine\Tile; namespace PocketMine\Tile;
use PocketMine;
use PocketMine\Level\Level; use PocketMine\Level\Level;
use PocketMine\Level\Position; use PocketMine\Level\Position;
use PocketMine\NBT\Tag\Compound; use PocketMine\NBT\Tag\Compound;
use PocketMine\PMF\LevelFormat; use PocketMine\PMF\LevelFormat;
use PocketMine\ServerAPI; use PocketMine\ServerAPI;
use PocketMine;
abstract class Tile extends Position{ abstract class Tile extends Position{
const SIGN = "Sign"; const SIGN = "Sign";

View File

@ -25,9 +25,9 @@
*/ */
namespace PocketMine\Wizard; namespace PocketMine\Wizard;
use PocketMine;
use PocketMine\Utils\Utils;
use PocketMine\Utils\Config; use PocketMine\Utils\Config;
use PocketMine\Utils\Utils;
use PocketMine;
class Installer{ class Installer{
const DEFAULT_NAME = "Minecraft: PE Server"; const DEFAULT_NAME = "Minecraft: PE Server";

View File

@ -42,7 +42,7 @@ class StackableArray extends \Threaded{
} }
} }
class AsyncMultipleQueue extends Thread{ class AsyncMultipleQueue extends \Thread{
public $input; public $input;
public $output; public $output;
public $stop; public $stop;
@ -112,7 +112,7 @@ class AsyncMultipleQueue extends Thread{
} }
} }
class Async extends Thread{ class Async extends \Thread{
public function __construct($method, $params = array()){ public function __construct($method, $params = array()){
$this->method = $method; $this->method = $method;
$this->params = $params; $this->params = $params;