diff --git a/PocketMine-MP.php b/PocketMine-MP.php index 6a7603af8..8f735f2aa 100644 --- a/PocketMine-MP.php +++ b/PocketMine-MP.php @@ -14,7 +14,7 @@ * (at your option) any later version. * * @author PocketMine Team - * @link http://www.pocketmine.net/ + * * */ diff --git a/src/Achievement.php b/src/Achievement.php index c676ae819..29e99e9c6 100644 --- a/src/Achievement.php +++ b/src/Achievement.php @@ -14,7 +14,7 @@ * (at your option) any later version. * * @author PocketMine Team - * @link http://www.pocketmine.net/ + * * */ diff --git a/src/Server.php b/src/Server.php index aecaf3d15..fadd01cd1 100644 --- a/src/Server.php +++ b/src/Server.php @@ -19,6 +19,10 @@ * */ +/** + * PocketMine-MP is the Minecraft: PE multiplayer server software + * Homepage: http://www.pocketmine.net/ + */ namespace PocketMine; use PocketMine\Entity\Entity as Entity; diff --git a/src/block/Block.php b/src/block/Block.php index 59e4d39ef..2f16b06d3 100644 --- a/src/block/Block.php +++ b/src/block/Block.php @@ -19,6 +19,9 @@ * */ +/** + * All Block classes are in here + */ namespace PocketMine\Block; const AIR = 0; const STONE = 1; diff --git a/src/entity/Entity.php b/src/entity/Entity.php index 30858ac0a..6c5ecc1ad 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -19,6 +19,9 @@ * */ +/** + * All the entity classes + */ namespace PocketMine\Entity; use PocketMine\Event\Entity\EntityLevelChangeEvent as EntityLevelChangeEvent; diff --git a/src/event/Event.php b/src/event/Event.php index bca4d4aa3..e4a4a761c 100644 --- a/src/event/Event.php +++ b/src/event/Event.php @@ -19,6 +19,9 @@ * */ +/** + * Classes referenced to Event handling and Events itself + */ namespace PocketMine\Event; use PocketMine; diff --git a/src/event/EventPriority.php b/src/event/EventPriority.php index 5a4690460..3aa920a4b 100644 --- a/src/event/EventPriority.php +++ b/src/event/EventPriority.php @@ -1,6 +1,6 @@ block = clone $block; diff --git a/src/item/Item.php b/src/item/Item.php index 0d3f0e8be..c120fafb6 100644 --- a/src/item/Item.php +++ b/src/item/Item.php @@ -19,6 +19,9 @@ * */ +/** + * All the Item classes + */ namespace PocketMine\Item; //All Block IDs are here too diff --git a/src/level/Level.php b/src/level/Level.php index 75a4e1e76..ea7fd78b9 100644 --- a/src/level/Level.php +++ b/src/level/Level.php @@ -19,6 +19,9 @@ * */ +/** + * All Level related classes are here, like Generators, Populators, Noise, ... + */ namespace PocketMine\Level; use PocketMine\Block\Air as Air; diff --git a/src/level/generator/Generator.php b/src/level/generator/Generator.php index decad7e95..f83dbbc4d 100644 --- a/src/level/generator/Generator.php +++ b/src/level/generator/Generator.php @@ -19,6 +19,9 @@ * */ +/** + * Generator classes used in Levels + */ namespace PocketMine\Level\Generator; use PocketMine\Level\Level as Level; diff --git a/src/level/generator/noise/Generator.php b/src/level/generator/noise/Generator.php index 55d4baad2..656c2b604 100644 --- a/src/level/generator/noise/Generator.php +++ b/src/level/generator/noise/Generator.php @@ -19,6 +19,9 @@ * */ +/** + * Different noise generators for level generation + */ namespace PocketMine\Level\Generator\Noise; use PocketMine; diff --git a/src/level/generator/object/Object.php b/src/level/generator/object/Object.php new file mode 100644 index 000000000..eb277217f --- /dev/null +++ b/src/level/generator/object/Object.php @@ -0,0 +1,30 @@ +putByte($tag->getType()); - if($tag instanceof NamedNBTTag){ + if($tag instanceof Tag\NamedTAG){ $this->putString($tag->getName()); } $tag->write($this); @@ -162,43 +177,43 @@ class NBT implements \ArrayAccess{ } public function getShort(){ - return $this->endianness === self::BIG_ENDIAN ? Utils::readShort($this->get(2)) : Utils::readLShort($this->get(2)); + return $this->endianness === BIG_ENDIAN ? Utils::readShort($this->get(2)) : Utils::readLShort($this->get(2)); } public function putShort($v){ - $this->buffer .= $this->endianness === self::BIG_ENDIAN ? Utils::writeShort($v) : Utils::writeLShort($v); + $this->buffer .= $this->endianness === BIG_ENDIAN ? Utils::writeShort($v) : Utils::writeLShort($v); } public function getInt(){ - return $this->endianness === self::BIG_ENDIAN ? Utils::readInt($this->get(4)) : Utils::readLInt($this->get(4)); + return $this->endianness === BIG_ENDIAN ? Utils::readInt($this->get(4)) : Utils::readLInt($this->get(4)); } public function putInt($v){ - $this->buffer .= $this->endianness === self::BIG_ENDIAN ? Utils::writeInt($v) : Utils::writeLInt($v); + $this->buffer .= $this->endianness === BIG_ENDIAN ? Utils::writeInt($v) : Utils::writeLInt($v); } public function getLong(){ - return $this->endianness === self::BIG_ENDIAN ? Utils::readLong($this->get(8)) : Utils::readLLong($this->get(8)); + return $this->endianness === BIG_ENDIAN ? Utils::readLong($this->get(8)) : Utils::readLLong($this->get(8)); } public function putLong($v){ - $this->buffer .= $this->endianness === self::BIG_ENDIAN ? Utils::writeLong($v) : Utils::writeLLong($v); + $this->buffer .= $this->endianness === BIG_ENDIAN ? Utils::writeLong($v) : Utils::writeLLong($v); } public function getFloat(){ - return $this->endianness === self::BIG_ENDIAN ? Utils::readFloat($this->get(4)) : Utils::readLFloat($this->get(4)); + return $this->endianness === BIG_ENDIAN ? Utils::readFloat($this->get(4)) : Utils::readLFloat($this->get(4)); } public function putFloat($v){ - $this->buffer .= $this->endianness === self::BIG_ENDIAN ? Utils::writeFloat($v) : Utils::writeLFloat($v); + $this->buffer .= $this->endianness === BIG_ENDIAN ? Utils::writeFloat($v) : Utils::writeLFloat($v); } public function getDouble(){ - return $this->endianness === self::BIG_ENDIAN ? Utils::readDouble($this->get(8)) : Utils::readLDouble($this->get(8)); + return $this->endianness === BIG_ENDIAN ? Utils::readDouble($this->get(8)) : Utils::readLDouble($this->get(8)); } public function putDouble($v){ - $this->buffer .= $this->endianness === self::BIG_ENDIAN ? Utils::writeDouble($v) : Utils::writeLDouble($v); + $this->buffer .= $this->endianness === BIG_ENDIAN ? Utils::writeDouble($v) : Utils::writeLDouble($v); } public function getString(){ diff --git a/src/nbt/tag/Byte.php b/src/nbt/tag/Byte.php index a963d6791..001029176 100644 --- a/src/nbt/tag/Byte.php +++ b/src/nbt/tag/Byte.php @@ -24,7 +24,7 @@ namespace PocketMine\NBT\Tag; use PocketMine; use PocketMine\NBT; -class Byte extends NamedNBTTag{ +class Byte extends NamedTag{ public function getType(){ return NBT\TAG_Byte; diff --git a/src/nbt/tag/Byte_Array.php b/src/nbt/tag/Byte_Array.php index 28d037165..af063e0e1 100644 --- a/src/nbt/tag/Byte_Array.php +++ b/src/nbt/tag/Byte_Array.php @@ -24,7 +24,7 @@ namespace PocketMine\NBT\Tag; use PocketMine; use PocketMine\NBT; -class Byte_Array extends NamedNBTTag{ +class Byte_Array extends NamedTag{ public function getType(){ return NBT\TAG_Byte_Array; diff --git a/src/nbt/tag/Compound.php b/src/nbt/tag/Compound.php index c8daaa8d7..01e41b235 100644 --- a/src/nbt/tag/Compound.php +++ b/src/nbt/tag/Compound.php @@ -24,7 +24,7 @@ namespace PocketMine\NBT\Tag; use PocketMine; use PocketMine\NBT; -class Compound extends NamedNBTTag implements \ArrayAccess, \Iterator{ +class Compound extends NamedTag implements \ArrayAccess, \Iterator{ public function __construct($name = "", $value = array()){ $this->name = $name; diff --git a/src/nbt/tag/Double.php b/src/nbt/tag/Double.php index 7ce07c5d6..38c7d5483 100644 --- a/src/nbt/tag/Double.php +++ b/src/nbt/tag/Double.php @@ -24,7 +24,7 @@ namespace PocketMine\NBT\Tag; use PocketMine; use PocketMine\NBT; -class Double extends NamedNBTTag{ +class Double extends NamedTag{ public function getType(){ return NBT\TAG_Double; diff --git a/src/nbt/tag/End.php b/src/nbt/tag/End.php index 8802fd274..2431f24e5 100644 --- a/src/nbt/tag/End.php +++ b/src/nbt/tag/End.php @@ -24,7 +24,7 @@ namespace PocketMine\NBT\Tag; use PocketMine; use PocketMine\NBT; -class End extends NBTTag{ +class End extends Tag{ public function getType(){ return NBT\TAG_End; diff --git a/src/nbt/tag/Enum.php b/src/nbt/tag/Enum.php index c3181438a..8a5225564 100644 --- a/src/nbt/tag/Enum.php +++ b/src/nbt/tag/Enum.php @@ -25,7 +25,7 @@ use PocketMine\NBT\Tag\Enum as TagEnum; use PocketMine; use PocketMine\NBT; -class Enum extends NamedNBTTag implements \ArrayAccess, \Iterator{ +class Enum extends NamedTag implements \ArrayAccess, \Iterator{ private $tagType; diff --git a/src/nbt/tag/Float.php b/src/nbt/tag/Float.php index 5da314c9b..37ee7a098 100644 --- a/src/nbt/tag/Float.php +++ b/src/nbt/tag/Float.php @@ -24,7 +24,7 @@ namespace PocketMine\NBT\Tag; use PocketMine; use PocketMine\NBT; -class Float extends NamedNBTTag{ +class Float extends NamedTag{ public function getType(){ return NBT\TAG_Float; diff --git a/src/nbt/tag/Int.php b/src/nbt/tag/Int.php index fd743018a..85464f960 100644 --- a/src/nbt/tag/Int.php +++ b/src/nbt/tag/Int.php @@ -24,7 +24,7 @@ namespace PocketMine\NBT\Tag; use PocketMine; use PocketMine\NBT; -class Int extends NamedNBTTag{ +class Int extends NamedTag{ public function getType(){ return NBT\TAG_Int; diff --git a/src/nbt/tag/Int_Array.php b/src/nbt/tag/Int_Array.php index 0c234b1b2..8f06a3c52 100644 --- a/src/nbt/tag/Int_Array.php +++ b/src/nbt/tag/Int_Array.php @@ -24,7 +24,7 @@ namespace PocketMine\NBT\Tag; use PocketMine; use PocketMine\NBT; -class Int_Array extends NamedNBTTag{ +class Int_Array extends NamedTag{ public function getType(){ return NBT\TAG_Int_Array; diff --git a/src/nbt/tag/Long.php b/src/nbt/tag/Long.php index ea87c6c3b..258aaeb90 100644 --- a/src/nbt/tag/Long.php +++ b/src/nbt/tag/Long.php @@ -24,7 +24,7 @@ namespace PocketMine\NBT\Tag; use PocketMine; use PocketMine\NBT; -class Long extends NamedNBTTag{ +class Long extends NamedTag{ public function getType(){ return NBT\TAG_Long; diff --git a/src/nbt/NamedNBTTag.php b/src/nbt/tag/NamedTag.php similarity index 93% rename from src/nbt/NamedNBTTag.php rename to src/nbt/tag/NamedTag.php index dfe6eb6d4..b533b409e 100644 --- a/src/nbt/NamedNBTTag.php +++ b/src/nbt/tag/NamedTag.php @@ -19,11 +19,11 @@ * */ -namespace PocketMine\NBT; +namespace PocketMine\NBT\Tag; use PocketMine; -abstract class NamedNBTTag extends NBTTag{ +abstract class NamedTag extends Tag{ protected $name; diff --git a/src/nbt/tag/Short.php b/src/nbt/tag/Short.php index 050058650..a0e3181fe 100644 --- a/src/nbt/tag/Short.php +++ b/src/nbt/tag/Short.php @@ -24,7 +24,7 @@ namespace PocketMine\NBT\Tag; use PocketMine; use PocketMine\NBT; -class Short extends NamedNBTTag{ +class Short extends NamedTag{ public function getType(){ return NBT\TAG_Short; diff --git a/src/nbt/tag/String.php b/src/nbt/tag/String.php index 54a9b1aba..1eecd9396 100644 --- a/src/nbt/tag/String.php +++ b/src/nbt/tag/String.php @@ -24,7 +24,7 @@ namespace PocketMine\NBT\Tag; use PocketMine; use PocketMine\NBT; -class String extends NamedNBTTag{ +class String extends NamedTag{ public function getType(){ return NBT\TAG_String; diff --git a/src/nbt/NBTTag.php b/src/nbt/tag/Tag.php similarity index 77% rename from src/nbt/NBTTag.php rename to src/nbt/tag/Tag.php index 02f26d0e7..b74044d58 100644 --- a/src/nbt/NBTTag.php +++ b/src/nbt/tag/Tag.php @@ -19,22 +19,13 @@ * */ -namespace PocketMine\NBT; -const TAG_End = 0; -const TAG_Byte = 1; -const TAG_Short = 2; -const TAG_Int = 3; -const TAG_Long = 4; -const TAG_Float = 5; -const TAG_Double = 6; -const TAG_Byte_Array = 7; -const TAG_String = 8; -const TAG_Enum = 9; -const TAG_Compound = 10; -const TAG_Int_Array = 11; +/** + * All the NBT Tags + */ +namespace PocketMine\NBT\Tag; use PocketMine; -abstract class NBTTag{ +abstract class Tag{ protected $value; diff --git a/src/network/Handler.php b/src/network/Handler.php index 12450baa9..0fd03ac2d 100644 --- a/src/network/Handler.php +++ b/src/network/Handler.php @@ -19,6 +19,9 @@ * */ +/** + * Network-related classes + */ namespace PocketMine\Network; use PocketMine\Event\Event as Event; diff --git a/src/network/protocol/packet/AddEntityPacket.php b/src/network/protocol/AddEntityPacket.php similarity index 100% rename from src/network/protocol/packet/AddEntityPacket.php rename to src/network/protocol/AddEntityPacket.php diff --git a/src/network/protocol/packet/AddItemEntityPacket.php b/src/network/protocol/AddItemEntityPacket.php similarity index 100% rename from src/network/protocol/packet/AddItemEntityPacket.php rename to src/network/protocol/AddItemEntityPacket.php diff --git a/src/network/protocol/packet/AddMobPacket.php b/src/network/protocol/AddMobPacket.php similarity index 100% rename from src/network/protocol/packet/AddMobPacket.php rename to src/network/protocol/AddMobPacket.php diff --git a/src/network/protocol/packet/AddPaintingPacket.php b/src/network/protocol/AddPaintingPacket.php similarity index 100% rename from src/network/protocol/packet/AddPaintingPacket.php rename to src/network/protocol/AddPaintingPacket.php diff --git a/src/network/protocol/packet/AddPlayerPacket.php b/src/network/protocol/AddPlayerPacket.php similarity index 100% rename from src/network/protocol/packet/AddPlayerPacket.php rename to src/network/protocol/AddPlayerPacket.php diff --git a/src/network/protocol/packet/AdventureSettingsPacket.php b/src/network/protocol/AdventureSettingsPacket.php similarity index 100% rename from src/network/protocol/packet/AdventureSettingsPacket.php rename to src/network/protocol/AdventureSettingsPacket.php diff --git a/src/network/protocol/packet/AnimatePacket.php b/src/network/protocol/AnimatePacket.php similarity index 100% rename from src/network/protocol/packet/AnimatePacket.php rename to src/network/protocol/AnimatePacket.php diff --git a/src/network/protocol/packet/ChatPacket.php b/src/network/protocol/ChatPacket.php similarity index 100% rename from src/network/protocol/packet/ChatPacket.php rename to src/network/protocol/ChatPacket.php diff --git a/src/network/protocol/packet/ChunkDataPacket.php b/src/network/protocol/ChunkDataPacket.php similarity index 100% rename from src/network/protocol/packet/ChunkDataPacket.php rename to src/network/protocol/ChunkDataPacket.php diff --git a/src/network/protocol/packet/ClientConnectPacket.php b/src/network/protocol/ClientConnectPacket.php similarity index 100% rename from src/network/protocol/packet/ClientConnectPacket.php rename to src/network/protocol/ClientConnectPacket.php diff --git a/src/network/protocol/packet/ClientHandshakePacket.php b/src/network/protocol/ClientHandshakePacket.php similarity index 100% rename from src/network/protocol/packet/ClientHandshakePacket.php rename to src/network/protocol/ClientHandshakePacket.php diff --git a/src/network/protocol/packet/ContainerClosePacket.php b/src/network/protocol/ContainerClosePacket.php similarity index 100% rename from src/network/protocol/packet/ContainerClosePacket.php rename to src/network/protocol/ContainerClosePacket.php diff --git a/src/network/protocol/packet/ContainerOpenPacket.php b/src/network/protocol/ContainerOpenPacket.php similarity index 100% rename from src/network/protocol/packet/ContainerOpenPacket.php rename to src/network/protocol/ContainerOpenPacket.php diff --git a/src/network/protocol/packet/ContainerSetContentPacket.php b/src/network/protocol/ContainerSetContentPacket.php similarity index 100% rename from src/network/protocol/packet/ContainerSetContentPacket.php rename to src/network/protocol/ContainerSetContentPacket.php diff --git a/src/network/protocol/packet/ContainerSetDataPacket.php b/src/network/protocol/ContainerSetDataPacket.php similarity index 100% rename from src/network/protocol/packet/ContainerSetDataPacket.php rename to src/network/protocol/ContainerSetDataPacket.php diff --git a/src/network/protocol/packet/ContainerSetSlotPacket.php b/src/network/protocol/ContainerSetSlotPacket.php similarity index 100% rename from src/network/protocol/packet/ContainerSetSlotPacket.php rename to src/network/protocol/ContainerSetSlotPacket.php diff --git a/src/network/protocol/packet/DisconnectPacket.php b/src/network/protocol/DisconnectPacket.php similarity index 100% rename from src/network/protocol/packet/DisconnectPacket.php rename to src/network/protocol/DisconnectPacket.php diff --git a/src/network/protocol/packet/DropItemPacket.php b/src/network/protocol/DropItemPacket.php similarity index 100% rename from src/network/protocol/packet/DropItemPacket.php rename to src/network/protocol/DropItemPacket.php diff --git a/src/network/protocol/packet/EntityDataPacket.php b/src/network/protocol/EntityDataPacket.php similarity index 100% rename from src/network/protocol/packet/EntityDataPacket.php rename to src/network/protocol/EntityDataPacket.php diff --git a/src/network/protocol/packet/EntityEventPacket.php b/src/network/protocol/EntityEventPacket.php similarity index 100% rename from src/network/protocol/packet/EntityEventPacket.php rename to src/network/protocol/EntityEventPacket.php diff --git a/src/network/protocol/packet/ExplodePacket.php b/src/network/protocol/ExplodePacket.php similarity index 100% rename from src/network/protocol/packet/ExplodePacket.php rename to src/network/protocol/ExplodePacket.php diff --git a/src/network/protocol/packet/HurtArmorPacket.php b/src/network/protocol/HurtArmorPacket.php similarity index 100% rename from src/network/protocol/packet/HurtArmorPacket.php rename to src/network/protocol/HurtArmorPacket.php diff --git a/src/network/protocol/Info.php b/src/network/protocol/Info.php index 99f6dbaef..436d34c65 100644 --- a/src/network/protocol/Info.php +++ b/src/network/protocol/Info.php @@ -19,6 +19,9 @@ * */ +/** + * Minecraft: PE multiplayer protocol implementation + */ namespace PocketMine\Network\Protocol; use PocketMine; @@ -26,6 +29,9 @@ use PocketMine; abstract class Info{ + /** + * Actual Minecraft: PE protocol version + */ const CURRENT_PROTOCOL = 14; diff --git a/src/network/protocol/packet/InteractPacket.php b/src/network/protocol/InteractPacket.php similarity index 100% rename from src/network/protocol/packet/InteractPacket.php rename to src/network/protocol/InteractPacket.php diff --git a/src/network/protocol/packet/LevelEventPacket.php b/src/network/protocol/LevelEventPacket.php similarity index 100% rename from src/network/protocol/packet/LevelEventPacket.php rename to src/network/protocol/LevelEventPacket.php diff --git a/src/network/protocol/packet/LoginPacket.php b/src/network/protocol/LoginPacket.php similarity index 100% rename from src/network/protocol/packet/LoginPacket.php rename to src/network/protocol/LoginPacket.php diff --git a/src/network/protocol/packet/LoginStatusPacket.php b/src/network/protocol/LoginStatusPacket.php similarity index 100% rename from src/network/protocol/packet/LoginStatusPacket.php rename to src/network/protocol/LoginStatusPacket.php diff --git a/src/network/protocol/packet/MessagePacket.php b/src/network/protocol/MessagePacket.php similarity index 100% rename from src/network/protocol/packet/MessagePacket.php rename to src/network/protocol/MessagePacket.php diff --git a/src/network/protocol/packet/MoveEntityPacket.php b/src/network/protocol/MoveEntityPacket.php similarity index 100% rename from src/network/protocol/packet/MoveEntityPacket.php rename to src/network/protocol/MoveEntityPacket.php diff --git a/src/network/protocol/packet/MoveEntityPacket_PosRot.php b/src/network/protocol/MoveEntityPacket_PosRot.php similarity index 100% rename from src/network/protocol/packet/MoveEntityPacket_PosRot.php rename to src/network/protocol/MoveEntityPacket_PosRot.php diff --git a/src/network/protocol/packet/MovePlayerPacket.php b/src/network/protocol/MovePlayerPacket.php similarity index 100% rename from src/network/protocol/packet/MovePlayerPacket.php rename to src/network/protocol/MovePlayerPacket.php diff --git a/src/network/protocol/packet/PingPacket.php b/src/network/protocol/PingPacket.php similarity index 100% rename from src/network/protocol/packet/PingPacket.php rename to src/network/protocol/PingPacket.php diff --git a/src/network/protocol/packet/PlayerActionPacket.php b/src/network/protocol/PlayerActionPacket.php similarity index 100% rename from src/network/protocol/packet/PlayerActionPacket.php rename to src/network/protocol/PlayerActionPacket.php diff --git a/src/network/protocol/packet/PlayerArmorEquipmentPacket.php b/src/network/protocol/PlayerArmorEquipmentPacket.php similarity index 100% rename from src/network/protocol/packet/PlayerArmorEquipmentPacket.php rename to src/network/protocol/PlayerArmorEquipmentPacket.php diff --git a/src/network/protocol/packet/PlayerEquipmentPacket.php b/src/network/protocol/PlayerEquipmentPacket.php similarity index 100% rename from src/network/protocol/packet/PlayerEquipmentPacket.php rename to src/network/protocol/PlayerEquipmentPacket.php diff --git a/src/network/protocol/packet/PongPacket.php b/src/network/protocol/PongPacket.php similarity index 100% rename from src/network/protocol/packet/PongPacket.php rename to src/network/protocol/PongPacket.php diff --git a/src/network/protocol/packet/ReadyPacket.php b/src/network/protocol/ReadyPacket.php similarity index 100% rename from src/network/protocol/packet/ReadyPacket.php rename to src/network/protocol/ReadyPacket.php diff --git a/src/network/protocol/packet/RemoveBlockPacket.php b/src/network/protocol/RemoveBlockPacket.php similarity index 100% rename from src/network/protocol/packet/RemoveBlockPacket.php rename to src/network/protocol/RemoveBlockPacket.php diff --git a/src/network/protocol/packet/RemoveEntityPacket.php b/src/network/protocol/RemoveEntityPacket.php similarity index 100% rename from src/network/protocol/packet/RemoveEntityPacket.php rename to src/network/protocol/RemoveEntityPacket.php diff --git a/src/network/protocol/packet/RemovePlayerPacket.php b/src/network/protocol/RemovePlayerPacket.php similarity index 100% rename from src/network/protocol/packet/RemovePlayerPacket.php rename to src/network/protocol/RemovePlayerPacket.php diff --git a/src/network/protocol/packet/RequestChunkPacket.php b/src/network/protocol/RequestChunkPacket.php similarity index 100% rename from src/network/protocol/packet/RequestChunkPacket.php rename to src/network/protocol/RequestChunkPacket.php diff --git a/src/network/protocol/packet/RespawnPacket.php b/src/network/protocol/RespawnPacket.php similarity index 100% rename from src/network/protocol/packet/RespawnPacket.php rename to src/network/protocol/RespawnPacket.php diff --git a/src/network/protocol/packet/RotateHeadPacket.php b/src/network/protocol/RotateHeadPacket.php similarity index 100% rename from src/network/protocol/packet/RotateHeadPacket.php rename to src/network/protocol/RotateHeadPacket.php diff --git a/src/network/protocol/packet/SendInventoryPacket.php b/src/network/protocol/SendInventoryPacket.php similarity index 100% rename from src/network/protocol/packet/SendInventoryPacket.php rename to src/network/protocol/SendInventoryPacket.php diff --git a/src/network/protocol/packet/ServerHandshakePacket.php b/src/network/protocol/ServerHandshakePacket.php similarity index 100% rename from src/network/protocol/packet/ServerHandshakePacket.php rename to src/network/protocol/ServerHandshakePacket.php diff --git a/src/network/protocol/packet/SetEntityDataPacket.php b/src/network/protocol/SetEntityDataPacket.php similarity index 100% rename from src/network/protocol/packet/SetEntityDataPacket.php rename to src/network/protocol/SetEntityDataPacket.php diff --git a/src/network/protocol/packet/SetEntityMotionPacket.php b/src/network/protocol/SetEntityMotionPacket.php similarity index 100% rename from src/network/protocol/packet/SetEntityMotionPacket.php rename to src/network/protocol/SetEntityMotionPacket.php diff --git a/src/network/protocol/packet/SetHealthPacket.php b/src/network/protocol/SetHealthPacket.php similarity index 100% rename from src/network/protocol/packet/SetHealthPacket.php rename to src/network/protocol/SetHealthPacket.php diff --git a/src/network/protocol/packet/SetSpawnPositionPacket.php b/src/network/protocol/SetSpawnPositionPacket.php similarity index 100% rename from src/network/protocol/packet/SetSpawnPositionPacket.php rename to src/network/protocol/SetSpawnPositionPacket.php diff --git a/src/network/protocol/packet/SetTimePacket.php b/src/network/protocol/SetTimePacket.php similarity index 100% rename from src/network/protocol/packet/SetTimePacket.php rename to src/network/protocol/SetTimePacket.php diff --git a/src/network/protocol/packet/StartGamePacket.php b/src/network/protocol/StartGamePacket.php similarity index 100% rename from src/network/protocol/packet/StartGamePacket.php rename to src/network/protocol/StartGamePacket.php diff --git a/src/network/protocol/packet/TakeItemEntityPacket.php b/src/network/protocol/TakeItemEntityPacket.php similarity index 100% rename from src/network/protocol/packet/TakeItemEntityPacket.php rename to src/network/protocol/TakeItemEntityPacket.php diff --git a/src/network/protocol/packet/TileEventPacket.php b/src/network/protocol/TileEventPacket.php similarity index 100% rename from src/network/protocol/packet/TileEventPacket.php rename to src/network/protocol/TileEventPacket.php diff --git a/src/network/protocol/packet/UnknownPacket.php b/src/network/protocol/UnknownPacket.php similarity index 99% rename from src/network/protocol/packet/UnknownPacket.php rename to src/network/protocol/UnknownPacket.php index 63d1f9db2..558ec63f8 100644 --- a/src/network/protocol/packet/UnknownPacket.php +++ b/src/network/protocol/UnknownPacket.php @@ -19,6 +19,7 @@ * */ + namespace PocketMine\Network\Protocol; use PocketMine; diff --git a/src/network/protocol/packet/UpdateBlockPacket.php b/src/network/protocol/UpdateBlockPacket.php similarity index 100% rename from src/network/protocol/packet/UpdateBlockPacket.php rename to src/network/protocol/UpdateBlockPacket.php diff --git a/src/network/protocol/packet/UseItemPacket.php b/src/network/protocol/UseItemPacket.php similarity index 100% rename from src/network/protocol/packet/UseItemPacket.php rename to src/network/protocol/UseItemPacket.php diff --git a/src/network/query/QueryHandler.php b/src/network/query/QueryHandler.php index a70b8f6fe..f523200b0 100644 --- a/src/network/query/QueryHandler.php +++ b/src/network/query/QueryHandler.php @@ -19,6 +19,10 @@ * */ +/** + * Implementation of the UT3 Query Protocol (GameSpot) + * Source: http://wiki.unrealadmin.org/UT3_query_protocol +*/ namespace PocketMine\Network\Query; use PocketMine\Player as Player; @@ -26,11 +30,6 @@ use PocketMine\ServerAPI as ServerAPI; use PocketMine\Utils\Utils as Utils; use PocketMine; -/* -Implementation of the UT3 Query Protocol (GameSpot) -Source: http://wiki.unrealadmin.org/UT3_query_protocol -*/ - class QueryHandler{ private $socket, $server, $lastToken, $token, $longData, $timeout; diff --git a/src/network/raknet/Info.php b/src/network/raknet/Info.php index 078b81091..b680f3204 100644 --- a/src/network/raknet/Info.php +++ b/src/network/raknet/Info.php @@ -19,6 +19,9 @@ * */ +/** + * RakNet UDP library implementation + */ namespace PocketMine\Network\RakNet; use PocketMine; diff --git a/src/network/rcon/RCON.php b/src/network/rcon/RCON.php index a2f22639f..1747f520a 100644 --- a/src/network/rcon/RCON.php +++ b/src/network/rcon/RCON.php @@ -19,15 +19,16 @@ * */ +/** + * Implementation of the Source RCON Protocol to allow remote console commands + * Source: https://developer.valvesoftware.com/wiki/Source_RCON_Protocol +*/ namespace PocketMine\Network\RCON; use PocketMine; use PocketMine\ServerAPI as ServerAPI; -/* -Implementation of the Source RCON Protocol to allow remote console commands -Source: https://developer.valvesoftware.com/wiki/Source_RCON_Protocol -*/ + class RCON{ private $socket, $password, $workers, $threads, $clientsPerThread; diff --git a/src/network/upnp/PortForward.php b/src/network/upnp/PortForward.php index 1705d42f3..7d3ead324 100644 --- a/src/network/upnp/PortForward.php +++ b/src/network/upnp/PortForward.php @@ -19,6 +19,9 @@ * */ +/** + * UPnP port forwarding support. Only for Windows + */ namespace PocketMine\Network\UPnP; use PocketMine; diff --git a/src/pmf/PMF.php b/src/pmf/PMF.php index dcf3567dd..d4e37517f 100644 --- a/src/pmf/PMF.php +++ b/src/pmf/PMF.php @@ -19,6 +19,10 @@ * */ +/** + * PMF (PocketMine Format) handling + * TODO: Remove in favor of NBT + */ namespace PocketMine\PMF; use PocketMine; diff --git a/src/recipes/Crafting.php b/src/recipes/Crafting.php index c727c24af..533f96b21 100644 --- a/src/recipes/Crafting.php +++ b/src/recipes/Crafting.php @@ -19,6 +19,9 @@ * */ +/** + * Crafting / Smelting / Fuel data and fast search databases + */ namespace PocketMine\Recipes; use PocketMine\BlockAPI as BlockAPI; diff --git a/src/recipes/Fuel.php b/src/recipes/Fuel.php index 1341bfe74..f030b0ea5 100644 --- a/src/recipes/Fuel.php +++ b/src/recipes/Fuel.php @@ -25,28 +25,28 @@ use PocketMine; abstract class Fuel{ public static $duration = array( - COAL => 80, - COAL_BLOCK => 800, - TRUNK => 15, - WOODEN_PLANKS => 15, - SAPLING => 5, - WOODEN_AXE => 10, - WOODEN_PICKAXE => 10, - WOODEN_SWORD => 10, - WOODEN_SHOVEL => 10, - WOODEN_HOE => 10, - STICK => 5, - FENCE => 15, - FENCE_GATE => 15, - WOODEN_STAIRS => 15, - SPRUCE_WOOD_STAIRS => 15, - BIRCH_WOOD_STAIRS => 15, - JUNGLE_WOOD_STAIRS => 15, - TRAPDOOR => 15, - WORKBENCH => 15, - BOOKSHELF => 15, - CHEST => 15, - BUCKET => 1000, + Item\COAL => 80, + Item\COAL_BLOCK => 800, + Item\TRUNK => 15, + Item\WOODEN_PLANKS => 15, + Item\SAPLING => 5, + Item\WOODEN_AXE => 10, + Item\WOODEN_PICKAXE => 10, + Item\WOODEN_SWORD => 10, + Item\WOODEN_SHOVEL => 10, + Item\WOODEN_HOE => 10, + Item\STICK => 5, + Item\FENCE => 15, + Item\FENCE_GATE => 15, + Item\WOODEN_STAIRS => 15, + Item\SPRUCE_WOOD_STAIRS => 15, + Item\BIRCH_WOOD_STAIRS => 15, + Item\JUNGLE_WOOD_STAIRS => 15, + Item\TRAPDOOR => 15, + Item\WORKBENCH => 15, + Item\BOOKSHELF => 15, + Item\CHEST => 15, + Item\BUCKET => 1000, ); diff --git a/src/recipes/Smelt.php b/src/recipes/Smelt.php index 28523e072..42675c946 100644 --- a/src/recipes/Smelt.php +++ b/src/recipes/Smelt.php @@ -20,25 +20,24 @@ */ namespace PocketMine\Recipes; - use PocketMine; class Smelt{ public static $product = array( - COBBLESTONE => array(STONE, 0), - SAND => array(GLASS, 0), - TRUNK => array(COAL, 1), //Charcoal - GOLD_ORE => array(GOLD_INGOT, 0), - IRON_ORE => array(IRON_INGOT, 0), - NETHERRACK => array(NETHER_BRICK, 0), - RAW_PORKCHOP => array(COOKED_PORKCHOP, 0), - CLAY => array(BRICK, 0), - //RAW_FISH => array(COOKED_FISH, 0), - CACTUS => array(DYE, 2), - RED_MUSHROOM => array(DYE, 1), - RAW_BEEF => array(STEAK, 0), - RAW_CHICKEN => array(COOKED_CHICKEN, 0), - RED_MUSHROOM => array(DYE, 1), - POTATO => array(BAKED_POTATO, 0), + Item\COBBLESTONE => array(Item\STONE, 0), + Item\SAND => array(Item\GLASS, 0), + Item\TRUNK => array(Item\COAL, 1), //Charcoal + Item\GOLD_ORE => array(Item\GOLD_INGOT, 0), + Item\IRON_ORE => array(Item\IRON_INGOT, 0), + Item\NETHERRACK => array(Item\NETHER_BRICK, 0), + Item\RAW_PORKCHOP => array(Item\COOKED_PORKCHOP, 0), + Item\CLAY => array(Item\BRICK, 0), + //Item\RAW_FISH => array(Item\COOKED_FISH, 0), + Item\CACTUS => array(Item\DYE, 2), + Item\RED_MUSHROOM => array(Item\DYE, 1), + Item\RAW_BEEF => array(Item\STEAK, 0), + Item\RAW_CHICKEN => array(Item\COOKED_CHICKEN, 0), + Item\RED_MUSHROOM => array(Item\DYE, 1), + Item\POTATO => array(Item\BAKED_POTATO, 0), ); } \ No newline at end of file diff --git a/src/tile/Tile.php b/src/tile/Tile.php index 972a99ccd..283d2d4c7 100644 --- a/src/tile/Tile.php +++ b/src/tile/Tile.php @@ -19,6 +19,10 @@ * */ +/** + * All the Tile classes and related classes + * TODO: Add Nether Reactor tile + */ namespace PocketMine\Tile; use PocketMine\Level\Level as Level; diff --git a/src/utils/Utils.php b/src/utils/Utils.php index 89152150a..0c4ac4f99 100644 --- a/src/utils/Utils.php +++ b/src/utils/Utils.php @@ -19,6 +19,9 @@ * */ +/** + * Various Utilities used around the code + */ namespace PocketMine\Utils; use PocketMine; diff --git a/src/wizard/Installer.php b/src/wizard/Installer.php index c5c384b98..93eb7a0b4 100644 --- a/src/wizard/Installer.php +++ b/src/wizard/Installer.php @@ -19,6 +19,10 @@ * */ +/** + * Set-up wizard used on the first run + * Can be disabled with --no-wizard + */ namespace PocketMine\Wizard; use PocketMine;