From cbc64462e62ff1c090bf74962815c2158b6cbad7 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Sat, 8 Mar 2014 04:41:43 +0100 Subject: [PATCH] New directory structure. More powerful startup scripts --- src/{ => PocketMine}/Achievement.php | 0 src/{ => PocketMine}/BanAPI.php | 0 src/{ => PocketMine}/BlockAPI.php | 0 src/{ => PocketMine}/ChatAPI.php | 0 src/{ => PocketMine}/ConsoleAPI.php | 0 src/{ => PocketMine}/Container.php | 0 src/{ => PocketMine}/Deprecation.php | 0 src/{ => PocketMine}/LevelAPI.php | 0 src/{ => PocketMine}/Player.php | 0 src/{ => PocketMine}/PlayerAPI.php | 0 src/{ => PocketMine}/PluginAPI.php | 0 .../PocketMine/PocketMine.php | 6 +- src/{ => PocketMine}/Server.php | 2 +- src/{ => PocketMine}/ServerAPI.php | 0 src/{ => PocketMine}/TimeAPI.php | 0 src/{ => PocketMine}/block/Air.php | 0 src/{ => PocketMine}/block/Bed.php | 0 src/{ => PocketMine}/block/Bedrock.php | 0 src/{ => PocketMine}/block/Beetroot.php | 0 .../block/BirchWoodStairs.php | 0 src/{ => PocketMine}/block/Block.php | 0 src/{ => PocketMine}/block/Bookshelf.php | 0 src/{ => PocketMine}/block/BrickStairs.php | 0 src/{ => PocketMine}/block/Bricks.php | 0 src/{ => PocketMine}/block/BrownMushroom.php | 0 src/{ => PocketMine}/block/BurningFurnace.php | 0 src/{ => PocketMine}/block/Cactus.php | 0 src/{ => PocketMine}/block/Cake.php | 0 src/{ => PocketMine}/block/Carpet.php | 0 src/{ => PocketMine}/block/Carrot.php | 0 src/{ => PocketMine}/block/Chest.php | 0 src/{ => PocketMine}/block/Clay.php | 0 src/{ => PocketMine}/block/Coal.php | 0 src/{ => PocketMine}/block/CoalOre.php | 0 src/{ => PocketMine}/block/Cobblestone.php | 0 .../block/CobblestoneStairs.php | 0 src/{ => PocketMine}/block/Cobweb.php | 0 src/{ => PocketMine}/block/CyanFlower.php | 0 src/{ => PocketMine}/block/Dandelion.php | 0 src/{ => PocketMine}/block/DeadBush.php | 0 src/{ => PocketMine}/block/Diamond.php | 0 src/{ => PocketMine}/block/DiamondOre.php | 0 src/{ => PocketMine}/block/Dirt.php | 0 src/{ => PocketMine}/block/Door.php | 0 src/{ => PocketMine}/block/DoubleSlab.php | 0 src/{ => PocketMine}/block/DoubleWoodSlab.php | 0 src/{ => PocketMine}/block/Fallable.php | 0 src/{ => PocketMine}/block/Farmland.php | 0 src/{ => PocketMine}/block/Fence.php | 0 src/{ => PocketMine}/block/FenceGate.php | 0 src/{ => PocketMine}/block/Fire.php | 0 src/{ => PocketMine}/block/Flowable.php | 0 src/{ => PocketMine}/block/Furnace.php | 0 src/{ => PocketMine}/block/Generic.php | 0 src/{ => PocketMine}/block/Glass.php | 0 src/{ => PocketMine}/block/GlassPane.php | 0 .../block/GlowingObsidian.php | 0 .../block/GlowingRedstoneOre.php | 0 src/{ => PocketMine}/block/Glowstone.php | 0 src/{ => PocketMine}/block/Gold.php | 0 src/{ => PocketMine}/block/GoldOre.php | 0 src/{ => PocketMine}/block/Grass.php | 0 src/{ => PocketMine}/block/Gravel.php | 0 src/{ => PocketMine}/block/HayBale.php | 0 src/{ => PocketMine}/block/Ice.php | 0 src/{ => PocketMine}/block/Iron.php | 0 src/{ => PocketMine}/block/IronBars.php | 0 src/{ => PocketMine}/block/IronDoor.php | 0 src/{ => PocketMine}/block/IronOre.php | 0 .../block/JungleWoodStairs.php | 0 src/{ => PocketMine}/block/Ladder.php | 0 src/{ => PocketMine}/block/Lapis.php | 0 src/{ => PocketMine}/block/LapisOre.php | 0 src/{ => PocketMine}/block/Lava.php | 0 src/{ => PocketMine}/block/Leaves.php | 0 src/{ => PocketMine}/block/Liquid.php | 0 src/{ => PocketMine}/block/LitPumpkin.php | 0 src/{ => PocketMine}/block/Melon.php | 0 src/{ => PocketMine}/block/MelonStem.php | 0 src/{ => PocketMine}/block/MossStone.php | 0 src/{ => PocketMine}/block/NetherBrick.php | 0 .../block/NetherBrickStairs.php | 0 src/{ => PocketMine}/block/NetherReactor.php | 0 src/{ => PocketMine}/block/Netherrack.php | 0 src/{ => PocketMine}/block/Obsidian.php | 0 src/{ => PocketMine}/block/Planks.php | 0 src/{ => PocketMine}/block/Potato.php | 0 src/{ => PocketMine}/block/Pumpkin.php | 0 src/{ => PocketMine}/block/PumpkinStem.php | 0 src/{ => PocketMine}/block/Quartz.php | 0 src/{ => PocketMine}/block/QuartzStairs.php | 0 src/{ => PocketMine}/block/RedMushroom.php | 0 src/{ => PocketMine}/block/RedstoneOre.php | 0 src/{ => PocketMine}/block/Sand.php | 0 src/{ => PocketMine}/block/Sandstone.php | 0 .../block/SandstoneStairs.php | 0 src/{ => PocketMine}/block/Sapling.php | 0 src/{ => PocketMine}/block/SignPost.php | 0 src/{ => PocketMine}/block/Slab.php | 0 src/{ => PocketMine}/block/Snow.php | 0 src/{ => PocketMine}/block/SnowLayer.php | 0 src/{ => PocketMine}/block/Solid.php | 0 src/{ => PocketMine}/block/SoulSand.php | 0 src/{ => PocketMine}/block/Sponge.php | 0 .../block/SpruceWoodStairs.php | 0 src/{ => PocketMine}/block/Stair.php | 0 src/{ => PocketMine}/block/StillLava.php | 0 src/{ => PocketMine}/block/StillWater.php | 0 src/{ => PocketMine}/block/Stone.php | 0 .../block/StoneBrickStairs.php | 0 src/{ => PocketMine}/block/StoneBricks.php | 0 src/{ => PocketMine}/block/StoneWall.php | 0 src/{ => PocketMine}/block/Stonecutter.php | 0 src/{ => PocketMine}/block/Sugarcane.php | 0 src/{ => PocketMine}/block/TNT.php | 0 src/{ => PocketMine}/block/TallGrass.php | 0 src/{ => PocketMine}/block/Torch.php | 0 src/{ => PocketMine}/block/Transparent.php | 0 src/{ => PocketMine}/block/Trapdoor.php | 0 src/{ => PocketMine}/block/WallSign.php | 0 src/{ => PocketMine}/block/Water.php | 0 src/{ => PocketMine}/block/Wheat.php | 0 src/{ => PocketMine}/block/Wood.php | 0 src/{ => PocketMine}/block/WoodDoor.php | 0 src/{ => PocketMine}/block/WoodSlab.php | 0 src/{ => PocketMine}/block/WoodStairs.php | 0 src/{ => PocketMine}/block/Wool.php | 0 src/{ => PocketMine}/block/Workbench.php | 0 src/{ => PocketMine}/build/compile.sh | 0 src/{ => PocketMine}/build/installer.sh | 0 src/{ => PocketMine}/build/jenkins.sh | 0 .../constants/GeneralConstants.php | 0 src/{ => PocketMine}/entity/Ageable.php | 0 src/{ => PocketMine}/entity/Animal.php | 0 src/{ => PocketMine}/entity/Arrow.php | 0 src/{ => PocketMine}/entity/Attachable.php | 0 src/{ => PocketMine}/entity/Chicken.php | 0 src/{ => PocketMine}/entity/Colorable.php | 0 src/{ => PocketMine}/entity/Cow.php | 0 src/{ => PocketMine}/entity/Creature.php | 0 src/{ => PocketMine}/entity/Creeper.php | 0 src/{ => PocketMine}/entity/Damageable.php | 0 src/{ => PocketMine}/entity/DroppedItem.php | 0 src/{ => PocketMine}/entity/Egg.php | 0 src/{ => PocketMine}/entity/EnderPearl.php | 0 src/{ => PocketMine}/entity/Enderman.php | 0 src/{ => PocketMine}/entity/Entity.php | 0 src/{ => PocketMine}/entity/Explosive.php | 0 src/{ => PocketMine}/entity/FallingBlock.php | 0 src/{ => PocketMine}/entity/Hanging.php | 0 src/{ => PocketMine}/entity/Human.php | 0 .../entity/InventorySource.php | 0 src/{ => PocketMine}/entity/Living.php | 0 src/{ => PocketMine}/entity/Minecart.php | 0 src/{ => PocketMine}/entity/Monster.php | 0 src/{ => PocketMine}/entity/NPC.php | 0 src/{ => PocketMine}/entity/Ocelot.php | 0 src/{ => PocketMine}/entity/Painting.php | 0 src/{ => PocketMine}/entity/Pig.php | 0 src/{ => PocketMine}/entity/PigZombie.php | 0 src/{ => PocketMine}/entity/Projectile.php | 0 .../entity/ProjectileSource.php | 0 src/{ => PocketMine}/entity/RealHuman.php | 0 src/{ => PocketMine}/entity/Rideable.php | 0 src/{ => PocketMine}/entity/Sheep.php | 0 src/{ => PocketMine}/entity/Silverfish.php | 0 src/{ => PocketMine}/entity/Skeleton.php | 0 src/{ => PocketMine}/entity/Slime.php | 0 src/{ => PocketMine}/entity/Snowball.php | 0 src/{ => PocketMine}/entity/Spider.php | 0 src/{ => PocketMine}/entity/TNTPrimed.php | 0 src/{ => PocketMine}/entity/Tameable.php | 0 src/{ => PocketMine}/entity/Vehicle.php | 0 src/{ => PocketMine}/entity/Villager.php | 0 src/{ => PocketMine}/entity/Wolf.php | 0 src/{ => PocketMine}/entity/Zombie.php | 0 .../event/CancellableEvent.php | 0 src/{ => PocketMine}/event/Event.php | 0 src/{ => PocketMine}/event/EventHandler.php | 0 src/{ => PocketMine}/event/EventPriority.php | 0 .../event/entity/EntityArmorChangeEvent.php | 0 .../event/entity/EntityEvent.php | 0 .../entity/EntityInventoryChangeEvent.php | 0 .../event/entity/EntityLevelChangeEvent.php | 0 .../event/entity/EntityMotionEvent.php | 0 .../event/entity/EntityMoveEvent.php | 0 .../player/PlayerEquipmentChangeEvent.php | 0 .../event/player/PlayerEvent.php | 0 .../event/plugin/PluginEvent.php | 0 .../event/server/DataPacketReceiveEvent.php | 0 .../event/server/DataPacketSendEvent.php | 0 .../event/server/PacketReceiveEvent.php | 0 .../event/server/PacketSendEvent.php | 0 .../event/server/ServerEvent.php | 0 src/{ => PocketMine}/event/tile/TileEvent.php | 0 .../event/tile/TileInventoryChangeEvent.php | 0 src/{ => PocketMine}/item/Apple.php | 0 src/{ => PocketMine}/item/Bed.php | 0 src/{ => PocketMine}/item/BeetrootSeeds.php | 0 src/{ => PocketMine}/item/BeetrootSoup.php | 0 src/{ => PocketMine}/item/Block.php | 0 src/{ => PocketMine}/item/Bowl.php | 0 src/{ => PocketMine}/item/Brick.php | 0 src/{ => PocketMine}/item/Bucket.php | 0 src/{ => PocketMine}/item/Cake.php | 0 src/{ => PocketMine}/item/Carrot.php | 0 src/{ => PocketMine}/item/Coal.php | 0 src/{ => PocketMine}/item/Diamond.php | 0 src/{ => PocketMine}/item/Feather.php | 0 src/{ => PocketMine}/item/FlintSteel.php | 0 src/{ => PocketMine}/item/GoldIngot.php | 0 src/{ => PocketMine}/item/IronAxe.php | 0 src/{ => PocketMine}/item/IronDoor.php | 0 src/{ => PocketMine}/item/IronHoe.php | 0 src/{ => PocketMine}/item/IronIngot.php | 0 src/{ => PocketMine}/item/IronPickaxe.php | 0 src/{ => PocketMine}/item/IronShovel.php | 0 src/{ => PocketMine}/item/Item.php | 0 src/{ => PocketMine}/item/MelonSeeds.php | 0 src/{ => PocketMine}/item/MushroomStew.php | 0 src/{ => PocketMine}/item/Painting.php | 0 src/{ => PocketMine}/item/Potato.php | 0 src/{ => PocketMine}/item/PumpkinSeeds.php | 0 src/{ => PocketMine}/item/Sign.php | 0 src/{ => PocketMine}/item/SpawnEgg.php | 0 src/{ => PocketMine}/item/Stick.php | 0 src/{ => PocketMine}/item/Sugarcane.php | 0 src/{ => PocketMine}/item/WheatSeeds.php | 0 src/{ => PocketMine}/item/WoodenAxe.php | 0 src/{ => PocketMine}/item/WoodenDoor.php | 0 src/{ => PocketMine}/item/WoodenPickaxe.php | 0 src/{ => PocketMine}/item/WoodenShovel.php | 0 src/{ => PocketMine}/item/WoodenSword.php | 0 src/{ => PocketMine}/lang/Installer/af_ZA.ini | 0 src/{ => PocketMine}/lang/Installer/ar_SA.ini | 0 src/{ => PocketMine}/lang/Installer/cs_CZ.ini | 0 src/{ => PocketMine}/lang/Installer/de_DE.ini | 0 src/{ => PocketMine}/lang/Installer/el_GR.ini | 0 src/{ => PocketMine}/lang/Installer/en.ini | 0 src/{ => PocketMine}/lang/Installer/en_AU.ini | 0 src/{ => PocketMine}/lang/Installer/en_CA.ini | 0 src/{ => PocketMine}/lang/Installer/en_GB.ini | 0 src/{ => PocketMine}/lang/Installer/en_PT.ini | 0 src/{ => PocketMine}/lang/Installer/en_US.ini | 0 src/{ => PocketMine}/lang/Installer/es_AR.ini | 0 src/{ => PocketMine}/lang/Installer/es_ES.ini | 0 src/{ => PocketMine}/lang/Installer/es_MX.ini | 0 src/{ => PocketMine}/lang/Installer/et_EE.ini | 0 src/{ => PocketMine}/lang/Installer/fi_FI.ini | 0 src/{ => PocketMine}/lang/Installer/fr_FR.ini | 0 src/{ => PocketMine}/lang/Installer/ga_IE.ini | 0 src/{ => PocketMine}/lang/Installer/he_IL.ini | 0 src/{ => PocketMine}/lang/Installer/id_ID.ini | 0 src/{ => PocketMine}/lang/Installer/it_IT.ini | 0 src/{ => PocketMine}/lang/Installer/ja_JP.ini | 0 src/{ => PocketMine}/lang/Installer/ko_KR.ini | 0 src/{ => PocketMine}/lang/Installer/lv_LV.ini | 0 src/{ => PocketMine}/lang/Installer/ms_MY.ini | 0 src/{ => PocketMine}/lang/Installer/mt_MT.ini | 0 src/{ => PocketMine}/lang/Installer/nl_NL.ini | 0 src/{ => PocketMine}/lang/Installer/no_NO.ini | 0 src/{ => PocketMine}/lang/Installer/pl_PL.ini | 0 src/{ => PocketMine}/lang/Installer/pt_PT.ini | 0 src/{ => PocketMine}/lang/Installer/ru_RU.ini | 0 src/{ => PocketMine}/lang/Installer/sv_SE.ini | 0 src/{ => PocketMine}/lang/Installer/th_TH.ini | 0 .../lang/Installer/tlh_AA.ini | 0 src/{ => PocketMine}/lang/Installer/tr_TR.ini | 0 src/{ => PocketMine}/lang/Installer/uk_UA.ini | 0 src/{ => PocketMine}/lang/Installer/vi_VN.ini | 0 src/{ => PocketMine}/lang/Installer/zh_CN.ini | 0 src/{ => PocketMine}/lang/Installer/zu_ZA.ini | 0 src/{ => PocketMine}/level/Explosion.php | 0 src/{ => PocketMine}/level/Level.php | 0 src/{ => PocketMine}/level/LevelImport.php | 64 ++-- .../level/PocketChunkParser.php | 0 src/{ => PocketMine}/level/Position.php | 0 src/{ => PocketMine}/level/WorldGenerator.php | 0 src/{ => PocketMine}/level/generator/Flat.php | 0 .../level/generator/Generator.php | 0 .../level/generator/Normal.php | 0 .../level/generator/noise/Generator.php | 0 .../level/generator/noise/Perlin.php | 0 .../level/generator/noise/Simplex.php | 0 .../level/generator/object/BigTree.php | 0 .../level/generator/object/Object.php | 0 .../level/generator/object/Ore.php | 0 .../level/generator/object/OreType.php | 0 .../level/generator/object/PineTree.php | 0 .../level/generator/object/Pond.php | 0 .../level/generator/object/SmallTree.php | 0 .../level/generator/object/SpruceTree.php | 0 .../level/generator/object/TallGrass.php | 0 .../level/generator/object/Tree.php | 0 .../level/generator/populator/Mineshaft.php | 0 .../level/generator/populator/Ore.php | 0 .../level/generator/populator/Pond.php | 0 .../level/generator/populator/Populator.php | 0 .../level/generator/populator/TallGrass.php | 0 .../level/generator/populator/Tree.php | 0 src/{ => PocketMine}/math/AxisAlignedBB.php | 0 src/{ => PocketMine}/math/Math.php | 0 src/{ => PocketMine}/math/Matrix.php | 0 src/{ => PocketMine}/math/Vector2.php | 0 src/{ => PocketMine}/math/Vector3.php | 0 src/{ => PocketMine}/math/VectorMath.php | 0 src/{ => PocketMine}/nbt/NBT.php | 0 src/{ => PocketMine}/nbt/tag/Byte.php | 0 src/{ => PocketMine}/nbt/tag/Byte_Array.php | 0 src/{ => PocketMine}/nbt/tag/Compound.php | 0 src/{ => PocketMine}/nbt/tag/Double.php | 0 src/{ => PocketMine}/nbt/tag/End.php | 0 src/{ => PocketMine}/nbt/tag/Enum.php | 0 src/{ => PocketMine}/nbt/tag/Float.php | 0 src/{ => PocketMine}/nbt/tag/Int.php | 0 src/{ => PocketMine}/nbt/tag/Int_Array.php | 0 src/{ => PocketMine}/nbt/tag/Long.php | 0 src/{ => PocketMine}/nbt/tag/NamedTag.php | 0 src/{ => PocketMine}/nbt/tag/Short.php | 0 src/{ => PocketMine}/nbt/tag/String.php | 0 src/{ => PocketMine}/nbt/tag/Tag.php | 0 src/{ => PocketMine}/network/Handler.php | 0 src/{ => PocketMine}/network/Packet.php | 0 src/{ => PocketMine}/network/UDPSocket.php | 0 .../network/protocol/AddEntityPacket.php | 0 .../network/protocol/AddItemEntityPacket.php | 0 .../network/protocol/AddMobPacket.php | 0 .../network/protocol/AddPaintingPacket.php | 0 .../network/protocol/AddPlayerPacket.php | 0 .../protocol/AdventureSettingsPacket.php | 0 .../network/protocol/AnimatePacket.php | 0 .../network/protocol/ChatPacket.php | 0 .../network/protocol/ChunkDataPacket.php | 0 .../network/protocol/ClientConnectPacket.php | 0 .../protocol/ClientHandshakePacket.php | 0 .../network/protocol/ContainerClosePacket.php | 0 .../network/protocol/ContainerOpenPacket.php | 0 .../protocol/ContainerSetContentPacket.php | 0 .../protocol/ContainerSetDataPacket.php | 0 .../protocol/ContainerSetSlotPacket.php | 0 .../network/protocol/DataPacket.php | 0 .../network/protocol/DisconnectPacket.php | 0 .../network/protocol/DropItemPacket.php | 0 .../network/protocol/EntityDataPacket.php | 0 .../network/protocol/EntityEventPacket.php | 0 .../network/protocol/ExplodePacket.php | 0 .../network/protocol/HurtArmorPacket.php | 0 .../network/protocol/Info.php | 0 .../network/protocol/InteractPacket.php | 0 .../network/protocol/LevelEventPacket.php | 0 .../network/protocol/LoginPacket.php | 0 .../network/protocol/LoginStatusPacket.php | 0 .../network/protocol/MessagePacket.php | 0 .../network/protocol/MoveEntityPacket.php | 0 .../protocol/MoveEntityPacket_PosRot.php | 0 .../network/protocol/MovePlayerPacket.php | 0 .../network/protocol/PingPacket.php | 0 .../network/protocol/PlayerActionPacket.php | 0 .../protocol/PlayerArmorEquipmentPacket.php | 0 .../protocol/PlayerEquipmentPacket.php | 0 .../network/protocol/PongPacket.php | 0 .../network/protocol/ReadyPacket.php | 0 .../network/protocol/RemoveBlockPacket.php | 0 .../network/protocol/RemoveEntityPacket.php | 0 .../network/protocol/RemovePlayerPacket.php | 0 .../network/protocol/RequestChunkPacket.php | 0 .../network/protocol/RespawnPacket.php | 0 .../network/protocol/RotateHeadPacket.php | 0 .../network/protocol/SendInventoryPacket.php | 0 .../protocol/ServerHandshakePacket.php | 0 .../network/protocol/SetEntityDataPacket.php | 0 .../protocol/SetEntityMotionPacket.php | 0 .../network/protocol/SetHealthPacket.php | 0 .../protocol/SetSpawnPositionPacket.php | 0 .../network/protocol/SetTimePacket.php | 0 .../network/protocol/StartGamePacket.php | 0 .../network/protocol/TakeItemEntityPacket.php | 0 .../network/protocol/TileEventPacket.php | 0 .../network/protocol/UnknownPacket.php | 0 .../network/protocol/UpdateBlockPacket.php | 0 .../network/protocol/UseItemPacket.php | 0 .../network/query/QueryHandler.php | 0 .../network/query/QueryPacket.php | 0 src/{ => PocketMine}/network/raknet/Info.php | 0 .../network/raknet/Packet.php | 0 src/{ => PocketMine}/network/rcon/RCON.php | 0 .../network/rcon/RCONInstance.php | 0 .../network/upnp/PortForward.php | 0 .../network/upnp/RemovePortForward.php | 0 src/{ => PocketMine}/pmf/LevelFormat.php | 319 ++++++++++++------ src/{ => PocketMine}/pmf/PMF.php | 0 src/{ => PocketMine}/pmf/Plugin.php | 0 src/{ => PocketMine}/recipes/Crafting.php | 0 src/{ => PocketMine}/recipes/Fuel.php | 0 src/{ => PocketMine}/recipes/Smelt.php | 0 .../tests/ServerSuiteTest.php | 0 src/{ => PocketMine}/tile/Chest.php | 0 src/{ => PocketMine}/tile/Container.php | 0 src/{ => PocketMine}/tile/Furnace.php | 0 src/{ => PocketMine}/tile/Sign.php | 0 src/{ => PocketMine}/tile/Spawnable.php | 0 src/{ => PocketMine}/tile/Tile.php | 0 src/{ => PocketMine}/utils/Cache.php | 0 src/{ => PocketMine}/utils/Config.php | 0 src/{ => PocketMine}/utils/Random.php | 0 src/{ => PocketMine}/utils/TextFormat.php | 0 src/{ => PocketMine}/utils/Utils.php | 0 src/{ => PocketMine}/utils/VersionString.php | 0 src/{ => PocketMine}/wizard/Installer.php | 0 src/{ => PocketMine}/wizard/InstallerLang.php | 0 src/{utils => }/pthreads.php | 0 start.cmd | 25 +- start.sh | 61 +++- 413 files changed, 326 insertions(+), 151 deletions(-) rename src/{ => PocketMine}/Achievement.php (100%) rename src/{ => PocketMine}/BanAPI.php (100%) rename src/{ => PocketMine}/BlockAPI.php (100%) rename src/{ => PocketMine}/ChatAPI.php (100%) rename src/{ => PocketMine}/ConsoleAPI.php (100%) rename src/{ => PocketMine}/Container.php (100%) rename src/{ => PocketMine}/Deprecation.php (100%) rename src/{ => PocketMine}/LevelAPI.php (100%) rename src/{ => PocketMine}/Player.php (100%) rename src/{ => PocketMine}/PlayerAPI.php (100%) rename src/{ => PocketMine}/PluginAPI.php (100%) rename PocketMine-MP.php => src/PocketMine/PocketMine.php (98%) rename src/{ => PocketMine}/Server.php (99%) rename src/{ => PocketMine}/ServerAPI.php (100%) rename src/{ => PocketMine}/TimeAPI.php (100%) rename src/{ => PocketMine}/block/Air.php (100%) rename src/{ => PocketMine}/block/Bed.php (100%) rename src/{ => PocketMine}/block/Bedrock.php (100%) rename src/{ => PocketMine}/block/Beetroot.php (100%) rename src/{ => PocketMine}/block/BirchWoodStairs.php (100%) rename src/{ => PocketMine}/block/Block.php (100%) rename src/{ => PocketMine}/block/Bookshelf.php (100%) rename src/{ => PocketMine}/block/BrickStairs.php (100%) rename src/{ => PocketMine}/block/Bricks.php (100%) rename src/{ => PocketMine}/block/BrownMushroom.php (100%) rename src/{ => PocketMine}/block/BurningFurnace.php (100%) rename src/{ => PocketMine}/block/Cactus.php (100%) rename src/{ => PocketMine}/block/Cake.php (100%) rename src/{ => PocketMine}/block/Carpet.php (100%) rename src/{ => PocketMine}/block/Carrot.php (100%) rename src/{ => PocketMine}/block/Chest.php (100%) rename src/{ => PocketMine}/block/Clay.php (100%) rename src/{ => PocketMine}/block/Coal.php (100%) rename src/{ => PocketMine}/block/CoalOre.php (100%) rename src/{ => PocketMine}/block/Cobblestone.php (100%) rename src/{ => PocketMine}/block/CobblestoneStairs.php (100%) rename src/{ => PocketMine}/block/Cobweb.php (100%) rename src/{ => PocketMine}/block/CyanFlower.php (100%) rename src/{ => PocketMine}/block/Dandelion.php (100%) rename src/{ => PocketMine}/block/DeadBush.php (100%) rename src/{ => PocketMine}/block/Diamond.php (100%) rename src/{ => PocketMine}/block/DiamondOre.php (100%) rename src/{ => PocketMine}/block/Dirt.php (100%) rename src/{ => PocketMine}/block/Door.php (100%) rename src/{ => PocketMine}/block/DoubleSlab.php (100%) rename src/{ => PocketMine}/block/DoubleWoodSlab.php (100%) rename src/{ => PocketMine}/block/Fallable.php (100%) rename src/{ => PocketMine}/block/Farmland.php (100%) rename src/{ => PocketMine}/block/Fence.php (100%) rename src/{ => PocketMine}/block/FenceGate.php (100%) rename src/{ => PocketMine}/block/Fire.php (100%) rename src/{ => PocketMine}/block/Flowable.php (100%) rename src/{ => PocketMine}/block/Furnace.php (100%) rename src/{ => PocketMine}/block/Generic.php (100%) rename src/{ => PocketMine}/block/Glass.php (100%) rename src/{ => PocketMine}/block/GlassPane.php (100%) rename src/{ => PocketMine}/block/GlowingObsidian.php (100%) rename src/{ => PocketMine}/block/GlowingRedstoneOre.php (100%) rename src/{ => PocketMine}/block/Glowstone.php (100%) rename src/{ => PocketMine}/block/Gold.php (100%) rename src/{ => PocketMine}/block/GoldOre.php (100%) rename src/{ => PocketMine}/block/Grass.php (100%) rename src/{ => PocketMine}/block/Gravel.php (100%) rename src/{ => PocketMine}/block/HayBale.php (100%) rename src/{ => PocketMine}/block/Ice.php (100%) rename src/{ => PocketMine}/block/Iron.php (100%) rename src/{ => PocketMine}/block/IronBars.php (100%) rename src/{ => PocketMine}/block/IronDoor.php (100%) rename src/{ => PocketMine}/block/IronOre.php (100%) rename src/{ => PocketMine}/block/JungleWoodStairs.php (100%) rename src/{ => PocketMine}/block/Ladder.php (100%) rename src/{ => PocketMine}/block/Lapis.php (100%) rename src/{ => PocketMine}/block/LapisOre.php (100%) rename src/{ => PocketMine}/block/Lava.php (100%) rename src/{ => PocketMine}/block/Leaves.php (100%) rename src/{ => PocketMine}/block/Liquid.php (100%) rename src/{ => PocketMine}/block/LitPumpkin.php (100%) rename src/{ => PocketMine}/block/Melon.php (100%) rename src/{ => PocketMine}/block/MelonStem.php (100%) rename src/{ => PocketMine}/block/MossStone.php (100%) rename src/{ => PocketMine}/block/NetherBrick.php (100%) rename src/{ => PocketMine}/block/NetherBrickStairs.php (100%) rename src/{ => PocketMine}/block/NetherReactor.php (100%) rename src/{ => PocketMine}/block/Netherrack.php (100%) rename src/{ => PocketMine}/block/Obsidian.php (100%) rename src/{ => PocketMine}/block/Planks.php (100%) rename src/{ => PocketMine}/block/Potato.php (100%) rename src/{ => PocketMine}/block/Pumpkin.php (100%) rename src/{ => PocketMine}/block/PumpkinStem.php (100%) rename src/{ => PocketMine}/block/Quartz.php (100%) rename src/{ => PocketMine}/block/QuartzStairs.php (100%) rename src/{ => PocketMine}/block/RedMushroom.php (100%) rename src/{ => PocketMine}/block/RedstoneOre.php (100%) rename src/{ => PocketMine}/block/Sand.php (100%) rename src/{ => PocketMine}/block/Sandstone.php (100%) rename src/{ => PocketMine}/block/SandstoneStairs.php (100%) rename src/{ => PocketMine}/block/Sapling.php (100%) rename src/{ => PocketMine}/block/SignPost.php (100%) rename src/{ => PocketMine}/block/Slab.php (100%) rename src/{ => PocketMine}/block/Snow.php (100%) rename src/{ => PocketMine}/block/SnowLayer.php (100%) rename src/{ => PocketMine}/block/Solid.php (100%) rename src/{ => PocketMine}/block/SoulSand.php (100%) rename src/{ => PocketMine}/block/Sponge.php (100%) rename src/{ => PocketMine}/block/SpruceWoodStairs.php (100%) rename src/{ => PocketMine}/block/Stair.php (100%) rename src/{ => PocketMine}/block/StillLava.php (100%) rename src/{ => PocketMine}/block/StillWater.php (100%) rename src/{ => PocketMine}/block/Stone.php (100%) rename src/{ => PocketMine}/block/StoneBrickStairs.php (100%) rename src/{ => PocketMine}/block/StoneBricks.php (100%) rename src/{ => PocketMine}/block/StoneWall.php (100%) rename src/{ => PocketMine}/block/Stonecutter.php (100%) rename src/{ => PocketMine}/block/Sugarcane.php (100%) rename src/{ => PocketMine}/block/TNT.php (100%) rename src/{ => PocketMine}/block/TallGrass.php (100%) rename src/{ => PocketMine}/block/Torch.php (100%) rename src/{ => PocketMine}/block/Transparent.php (100%) rename src/{ => PocketMine}/block/Trapdoor.php (100%) rename src/{ => PocketMine}/block/WallSign.php (100%) rename src/{ => PocketMine}/block/Water.php (100%) rename src/{ => PocketMine}/block/Wheat.php (100%) rename src/{ => PocketMine}/block/Wood.php (100%) rename src/{ => PocketMine}/block/WoodDoor.php (100%) rename src/{ => PocketMine}/block/WoodSlab.php (100%) rename src/{ => PocketMine}/block/WoodStairs.php (100%) rename src/{ => PocketMine}/block/Wool.php (100%) rename src/{ => PocketMine}/block/Workbench.php (100%) rename src/{ => PocketMine}/build/compile.sh (100%) mode change 100755 => 100644 rename src/{ => PocketMine}/build/installer.sh (100%) rename src/{ => PocketMine}/build/jenkins.sh (100%) rename src/{ => PocketMine}/constants/GeneralConstants.php (100%) rename src/{ => PocketMine}/entity/Ageable.php (100%) rename src/{ => PocketMine}/entity/Animal.php (100%) rename src/{ => PocketMine}/entity/Arrow.php (100%) rename src/{ => PocketMine}/entity/Attachable.php (100%) rename src/{ => PocketMine}/entity/Chicken.php (100%) rename src/{ => PocketMine}/entity/Colorable.php (100%) rename src/{ => PocketMine}/entity/Cow.php (100%) rename src/{ => PocketMine}/entity/Creature.php (100%) rename src/{ => PocketMine}/entity/Creeper.php (100%) rename src/{ => PocketMine}/entity/Damageable.php (100%) rename src/{ => PocketMine}/entity/DroppedItem.php (100%) rename src/{ => PocketMine}/entity/Egg.php (100%) rename src/{ => PocketMine}/entity/EnderPearl.php (100%) rename src/{ => PocketMine}/entity/Enderman.php (100%) rename src/{ => PocketMine}/entity/Entity.php (100%) rename src/{ => PocketMine}/entity/Explosive.php (100%) rename src/{ => PocketMine}/entity/FallingBlock.php (100%) rename src/{ => PocketMine}/entity/Hanging.php (100%) rename src/{ => PocketMine}/entity/Human.php (100%) rename src/{ => PocketMine}/entity/InventorySource.php (100%) rename src/{ => PocketMine}/entity/Living.php (100%) rename src/{ => PocketMine}/entity/Minecart.php (100%) rename src/{ => PocketMine}/entity/Monster.php (100%) rename src/{ => PocketMine}/entity/NPC.php (100%) rename src/{ => PocketMine}/entity/Ocelot.php (100%) rename src/{ => PocketMine}/entity/Painting.php (100%) rename src/{ => PocketMine}/entity/Pig.php (100%) rename src/{ => PocketMine}/entity/PigZombie.php (100%) rename src/{ => PocketMine}/entity/Projectile.php (100%) rename src/{ => PocketMine}/entity/ProjectileSource.php (100%) rename src/{ => PocketMine}/entity/RealHuman.php (100%) rename src/{ => PocketMine}/entity/Rideable.php (100%) rename src/{ => PocketMine}/entity/Sheep.php (100%) rename src/{ => PocketMine}/entity/Silverfish.php (100%) rename src/{ => PocketMine}/entity/Skeleton.php (100%) rename src/{ => PocketMine}/entity/Slime.php (100%) rename src/{ => PocketMine}/entity/Snowball.php (100%) rename src/{ => PocketMine}/entity/Spider.php (100%) rename src/{ => PocketMine}/entity/TNTPrimed.php (100%) rename src/{ => PocketMine}/entity/Tameable.php (100%) rename src/{ => PocketMine}/entity/Vehicle.php (100%) rename src/{ => PocketMine}/entity/Villager.php (100%) rename src/{ => PocketMine}/entity/Wolf.php (100%) rename src/{ => PocketMine}/entity/Zombie.php (100%) rename src/{ => PocketMine}/event/CancellableEvent.php (100%) rename src/{ => PocketMine}/event/Event.php (100%) rename src/{ => PocketMine}/event/EventHandler.php (100%) rename src/{ => PocketMine}/event/EventPriority.php (100%) rename src/{ => PocketMine}/event/entity/EntityArmorChangeEvent.php (100%) rename src/{ => PocketMine}/event/entity/EntityEvent.php (100%) rename src/{ => PocketMine}/event/entity/EntityInventoryChangeEvent.php (100%) rename src/{ => PocketMine}/event/entity/EntityLevelChangeEvent.php (100%) rename src/{ => PocketMine}/event/entity/EntityMotionEvent.php (100%) rename src/{ => PocketMine}/event/entity/EntityMoveEvent.php (100%) rename src/{ => PocketMine}/event/player/PlayerEquipmentChangeEvent.php (100%) rename src/{ => PocketMine}/event/player/PlayerEvent.php (100%) rename src/{ => PocketMine}/event/plugin/PluginEvent.php (100%) rename src/{ => PocketMine}/event/server/DataPacketReceiveEvent.php (100%) rename src/{ => PocketMine}/event/server/DataPacketSendEvent.php (100%) rename src/{ => PocketMine}/event/server/PacketReceiveEvent.php (100%) rename src/{ => PocketMine}/event/server/PacketSendEvent.php (100%) rename src/{ => PocketMine}/event/server/ServerEvent.php (100%) rename src/{ => PocketMine}/event/tile/TileEvent.php (100%) rename src/{ => PocketMine}/event/tile/TileInventoryChangeEvent.php (100%) rename src/{ => PocketMine}/item/Apple.php (100%) rename src/{ => PocketMine}/item/Bed.php (100%) rename src/{ => PocketMine}/item/BeetrootSeeds.php (100%) rename src/{ => PocketMine}/item/BeetrootSoup.php (100%) rename src/{ => PocketMine}/item/Block.php (100%) rename src/{ => PocketMine}/item/Bowl.php (100%) rename src/{ => PocketMine}/item/Brick.php (100%) rename src/{ => PocketMine}/item/Bucket.php (100%) rename src/{ => PocketMine}/item/Cake.php (100%) rename src/{ => PocketMine}/item/Carrot.php (100%) rename src/{ => PocketMine}/item/Coal.php (100%) rename src/{ => PocketMine}/item/Diamond.php (100%) rename src/{ => PocketMine}/item/Feather.php (100%) rename src/{ => PocketMine}/item/FlintSteel.php (100%) rename src/{ => PocketMine}/item/GoldIngot.php (100%) rename src/{ => PocketMine}/item/IronAxe.php (100%) rename src/{ => PocketMine}/item/IronDoor.php (100%) rename src/{ => PocketMine}/item/IronHoe.php (100%) rename src/{ => PocketMine}/item/IronIngot.php (100%) rename src/{ => PocketMine}/item/IronPickaxe.php (100%) rename src/{ => PocketMine}/item/IronShovel.php (100%) rename src/{ => PocketMine}/item/Item.php (100%) rename src/{ => PocketMine}/item/MelonSeeds.php (100%) rename src/{ => PocketMine}/item/MushroomStew.php (100%) rename src/{ => PocketMine}/item/Painting.php (100%) rename src/{ => PocketMine}/item/Potato.php (100%) rename src/{ => PocketMine}/item/PumpkinSeeds.php (100%) rename src/{ => PocketMine}/item/Sign.php (100%) rename src/{ => PocketMine}/item/SpawnEgg.php (100%) rename src/{ => PocketMine}/item/Stick.php (100%) rename src/{ => PocketMine}/item/Sugarcane.php (100%) rename src/{ => PocketMine}/item/WheatSeeds.php (100%) rename src/{ => PocketMine}/item/WoodenAxe.php (100%) rename src/{ => PocketMine}/item/WoodenDoor.php (100%) rename src/{ => PocketMine}/item/WoodenPickaxe.php (100%) rename src/{ => PocketMine}/item/WoodenShovel.php (100%) rename src/{ => PocketMine}/item/WoodenSword.php (100%) rename src/{ => PocketMine}/lang/Installer/af_ZA.ini (100%) rename src/{ => PocketMine}/lang/Installer/ar_SA.ini (100%) rename src/{ => PocketMine}/lang/Installer/cs_CZ.ini (100%) rename src/{ => PocketMine}/lang/Installer/de_DE.ini (100%) rename src/{ => PocketMine}/lang/Installer/el_GR.ini (100%) rename src/{ => PocketMine}/lang/Installer/en.ini (100%) rename src/{ => PocketMine}/lang/Installer/en_AU.ini (100%) rename src/{ => PocketMine}/lang/Installer/en_CA.ini (100%) rename src/{ => PocketMine}/lang/Installer/en_GB.ini (100%) rename src/{ => PocketMine}/lang/Installer/en_PT.ini (100%) rename src/{ => PocketMine}/lang/Installer/en_US.ini (100%) rename src/{ => PocketMine}/lang/Installer/es_AR.ini (100%) rename src/{ => PocketMine}/lang/Installer/es_ES.ini (100%) rename src/{ => PocketMine}/lang/Installer/es_MX.ini (100%) rename src/{ => PocketMine}/lang/Installer/et_EE.ini (100%) rename src/{ => PocketMine}/lang/Installer/fi_FI.ini (100%) rename src/{ => PocketMine}/lang/Installer/fr_FR.ini (100%) rename src/{ => PocketMine}/lang/Installer/ga_IE.ini (100%) rename src/{ => PocketMine}/lang/Installer/he_IL.ini (100%) rename src/{ => PocketMine}/lang/Installer/id_ID.ini (100%) rename src/{ => PocketMine}/lang/Installer/it_IT.ini (100%) rename src/{ => PocketMine}/lang/Installer/ja_JP.ini (100%) rename src/{ => PocketMine}/lang/Installer/ko_KR.ini (100%) rename src/{ => PocketMine}/lang/Installer/lv_LV.ini (100%) rename src/{ => PocketMine}/lang/Installer/ms_MY.ini (100%) rename src/{ => PocketMine}/lang/Installer/mt_MT.ini (100%) rename src/{ => PocketMine}/lang/Installer/nl_NL.ini (100%) rename src/{ => PocketMine}/lang/Installer/no_NO.ini (100%) rename src/{ => PocketMine}/lang/Installer/pl_PL.ini (100%) rename src/{ => PocketMine}/lang/Installer/pt_PT.ini (100%) rename src/{ => PocketMine}/lang/Installer/ru_RU.ini (100%) rename src/{ => PocketMine}/lang/Installer/sv_SE.ini (100%) rename src/{ => PocketMine}/lang/Installer/th_TH.ini (100%) rename src/{ => PocketMine}/lang/Installer/tlh_AA.ini (100%) rename src/{ => PocketMine}/lang/Installer/tr_TR.ini (100%) rename src/{ => PocketMine}/lang/Installer/uk_UA.ini (100%) rename src/{ => PocketMine}/lang/Installer/vi_VN.ini (100%) rename src/{ => PocketMine}/lang/Installer/zh_CN.ini (100%) rename src/{ => PocketMine}/lang/Installer/zu_ZA.ini (100%) rename src/{ => PocketMine}/level/Explosion.php (100%) rename src/{ => PocketMine}/level/Level.php (100%) rename src/{ => PocketMine}/level/LevelImport.php (59%) rename src/{ => PocketMine}/level/PocketChunkParser.php (100%) rename src/{ => PocketMine}/level/Position.php (100%) rename src/{ => PocketMine}/level/WorldGenerator.php (100%) rename src/{ => PocketMine}/level/generator/Flat.php (100%) rename src/{ => PocketMine}/level/generator/Generator.php (100%) rename src/{ => PocketMine}/level/generator/Normal.php (100%) rename src/{ => PocketMine}/level/generator/noise/Generator.php (100%) rename src/{ => PocketMine}/level/generator/noise/Perlin.php (100%) rename src/{ => PocketMine}/level/generator/noise/Simplex.php (100%) rename src/{ => PocketMine}/level/generator/object/BigTree.php (100%) rename src/{ => PocketMine}/level/generator/object/Object.php (100%) rename src/{ => PocketMine}/level/generator/object/Ore.php (100%) rename src/{ => PocketMine}/level/generator/object/OreType.php (100%) rename src/{ => PocketMine}/level/generator/object/PineTree.php (100%) rename src/{ => PocketMine}/level/generator/object/Pond.php (100%) rename src/{ => PocketMine}/level/generator/object/SmallTree.php (100%) rename src/{ => PocketMine}/level/generator/object/SpruceTree.php (100%) rename src/{ => PocketMine}/level/generator/object/TallGrass.php (100%) rename src/{ => PocketMine}/level/generator/object/Tree.php (100%) rename src/{ => PocketMine}/level/generator/populator/Mineshaft.php (100%) rename src/{ => PocketMine}/level/generator/populator/Ore.php (100%) rename src/{ => PocketMine}/level/generator/populator/Pond.php (100%) rename src/{ => PocketMine}/level/generator/populator/Populator.php (100%) rename src/{ => PocketMine}/level/generator/populator/TallGrass.php (100%) rename src/{ => PocketMine}/level/generator/populator/Tree.php (100%) rename src/{ => PocketMine}/math/AxisAlignedBB.php (100%) rename src/{ => PocketMine}/math/Math.php (100%) rename src/{ => PocketMine}/math/Matrix.php (100%) rename src/{ => PocketMine}/math/Vector2.php (100%) rename src/{ => PocketMine}/math/Vector3.php (100%) rename src/{ => PocketMine}/math/VectorMath.php (100%) rename src/{ => PocketMine}/nbt/NBT.php (100%) rename src/{ => PocketMine}/nbt/tag/Byte.php (100%) rename src/{ => PocketMine}/nbt/tag/Byte_Array.php (100%) rename src/{ => PocketMine}/nbt/tag/Compound.php (100%) rename src/{ => PocketMine}/nbt/tag/Double.php (100%) rename src/{ => PocketMine}/nbt/tag/End.php (100%) rename src/{ => PocketMine}/nbt/tag/Enum.php (100%) rename src/{ => PocketMine}/nbt/tag/Float.php (100%) rename src/{ => PocketMine}/nbt/tag/Int.php (100%) rename src/{ => PocketMine}/nbt/tag/Int_Array.php (100%) rename src/{ => PocketMine}/nbt/tag/Long.php (100%) rename src/{ => PocketMine}/nbt/tag/NamedTag.php (100%) rename src/{ => PocketMine}/nbt/tag/Short.php (100%) rename src/{ => PocketMine}/nbt/tag/String.php (100%) rename src/{ => PocketMine}/nbt/tag/Tag.php (100%) rename src/{ => PocketMine}/network/Handler.php (100%) rename src/{ => PocketMine}/network/Packet.php (100%) rename src/{ => PocketMine}/network/UDPSocket.php (100%) rename src/{ => PocketMine}/network/protocol/AddEntityPacket.php (100%) rename src/{ => PocketMine}/network/protocol/AddItemEntityPacket.php (100%) rename src/{ => PocketMine}/network/protocol/AddMobPacket.php (100%) rename src/{ => PocketMine}/network/protocol/AddPaintingPacket.php (100%) rename src/{ => PocketMine}/network/protocol/AddPlayerPacket.php (100%) rename src/{ => PocketMine}/network/protocol/AdventureSettingsPacket.php (100%) rename src/{ => PocketMine}/network/protocol/AnimatePacket.php (100%) rename src/{ => PocketMine}/network/protocol/ChatPacket.php (100%) rename src/{ => PocketMine}/network/protocol/ChunkDataPacket.php (100%) rename src/{ => PocketMine}/network/protocol/ClientConnectPacket.php (100%) rename src/{ => PocketMine}/network/protocol/ClientHandshakePacket.php (100%) rename src/{ => PocketMine}/network/protocol/ContainerClosePacket.php (100%) rename src/{ => PocketMine}/network/protocol/ContainerOpenPacket.php (100%) rename src/{ => PocketMine}/network/protocol/ContainerSetContentPacket.php (100%) rename src/{ => PocketMine}/network/protocol/ContainerSetDataPacket.php (100%) rename src/{ => PocketMine}/network/protocol/ContainerSetSlotPacket.php (100%) rename src/{ => PocketMine}/network/protocol/DataPacket.php (100%) rename src/{ => PocketMine}/network/protocol/DisconnectPacket.php (100%) rename src/{ => PocketMine}/network/protocol/DropItemPacket.php (100%) rename src/{ => PocketMine}/network/protocol/EntityDataPacket.php (100%) rename src/{ => PocketMine}/network/protocol/EntityEventPacket.php (100%) rename src/{ => PocketMine}/network/protocol/ExplodePacket.php (100%) rename src/{ => PocketMine}/network/protocol/HurtArmorPacket.php (100%) rename src/{ => PocketMine}/network/protocol/Info.php (100%) rename src/{ => PocketMine}/network/protocol/InteractPacket.php (100%) rename src/{ => PocketMine}/network/protocol/LevelEventPacket.php (100%) rename src/{ => PocketMine}/network/protocol/LoginPacket.php (100%) rename src/{ => PocketMine}/network/protocol/LoginStatusPacket.php (100%) rename src/{ => PocketMine}/network/protocol/MessagePacket.php (100%) rename src/{ => PocketMine}/network/protocol/MoveEntityPacket.php (100%) rename src/{ => PocketMine}/network/protocol/MoveEntityPacket_PosRot.php (100%) rename src/{ => PocketMine}/network/protocol/MovePlayerPacket.php (100%) rename src/{ => PocketMine}/network/protocol/PingPacket.php (100%) rename src/{ => PocketMine}/network/protocol/PlayerActionPacket.php (100%) rename src/{ => PocketMine}/network/protocol/PlayerArmorEquipmentPacket.php (100%) rename src/{ => PocketMine}/network/protocol/PlayerEquipmentPacket.php (100%) rename src/{ => PocketMine}/network/protocol/PongPacket.php (100%) rename src/{ => PocketMine}/network/protocol/ReadyPacket.php (100%) rename src/{ => PocketMine}/network/protocol/RemoveBlockPacket.php (100%) rename src/{ => PocketMine}/network/protocol/RemoveEntityPacket.php (100%) rename src/{ => PocketMine}/network/protocol/RemovePlayerPacket.php (100%) rename src/{ => PocketMine}/network/protocol/RequestChunkPacket.php (100%) rename src/{ => PocketMine}/network/protocol/RespawnPacket.php (100%) rename src/{ => PocketMine}/network/protocol/RotateHeadPacket.php (100%) rename src/{ => PocketMine}/network/protocol/SendInventoryPacket.php (100%) rename src/{ => PocketMine}/network/protocol/ServerHandshakePacket.php (100%) rename src/{ => PocketMine}/network/protocol/SetEntityDataPacket.php (100%) rename src/{ => PocketMine}/network/protocol/SetEntityMotionPacket.php (100%) rename src/{ => PocketMine}/network/protocol/SetHealthPacket.php (100%) rename src/{ => PocketMine}/network/protocol/SetSpawnPositionPacket.php (100%) rename src/{ => PocketMine}/network/protocol/SetTimePacket.php (100%) rename src/{ => PocketMine}/network/protocol/StartGamePacket.php (100%) rename src/{ => PocketMine}/network/protocol/TakeItemEntityPacket.php (100%) rename src/{ => PocketMine}/network/protocol/TileEventPacket.php (100%) rename src/{ => PocketMine}/network/protocol/UnknownPacket.php (100%) rename src/{ => PocketMine}/network/protocol/UpdateBlockPacket.php (100%) rename src/{ => PocketMine}/network/protocol/UseItemPacket.php (100%) rename src/{ => PocketMine}/network/query/QueryHandler.php (100%) rename src/{ => PocketMine}/network/query/QueryPacket.php (100%) rename src/{ => PocketMine}/network/raknet/Info.php (100%) rename src/{ => PocketMine}/network/raknet/Packet.php (100%) rename src/{ => PocketMine}/network/rcon/RCON.php (100%) rename src/{ => PocketMine}/network/rcon/RCONInstance.php (100%) rename src/{ => PocketMine}/network/upnp/PortForward.php (100%) rename src/{ => PocketMine}/network/upnp/RemovePortForward.php (100%) rename src/{ => PocketMine}/pmf/LevelFormat.php (74%) rename src/{ => PocketMine}/pmf/PMF.php (100%) rename src/{ => PocketMine}/pmf/Plugin.php (100%) rename src/{ => PocketMine}/recipes/Crafting.php (100%) rename src/{ => PocketMine}/recipes/Fuel.php (100%) rename src/{ => PocketMine}/recipes/Smelt.php (100%) rename src/{ => PocketMine}/tests/ServerSuiteTest.php (100%) rename src/{ => PocketMine}/tile/Chest.php (100%) rename src/{ => PocketMine}/tile/Container.php (100%) rename src/{ => PocketMine}/tile/Furnace.php (100%) rename src/{ => PocketMine}/tile/Sign.php (100%) rename src/{ => PocketMine}/tile/Spawnable.php (100%) rename src/{ => PocketMine}/tile/Tile.php (100%) rename src/{ => PocketMine}/utils/Cache.php (100%) rename src/{ => PocketMine}/utils/Config.php (100%) rename src/{ => PocketMine}/utils/Random.php (100%) rename src/{ => PocketMine}/utils/TextFormat.php (100%) rename src/{ => PocketMine}/utils/Utils.php (100%) rename src/{ => PocketMine}/utils/VersionString.php (100%) rename src/{ => PocketMine}/wizard/Installer.php (100%) rename src/{ => PocketMine}/wizard/InstallerLang.php (100%) rename src/{utils => }/pthreads.php (100%) diff --git a/src/Achievement.php b/src/PocketMine/Achievement.php similarity index 100% rename from src/Achievement.php rename to src/PocketMine/Achievement.php diff --git a/src/BanAPI.php b/src/PocketMine/BanAPI.php similarity index 100% rename from src/BanAPI.php rename to src/PocketMine/BanAPI.php diff --git a/src/BlockAPI.php b/src/PocketMine/BlockAPI.php similarity index 100% rename from src/BlockAPI.php rename to src/PocketMine/BlockAPI.php diff --git a/src/ChatAPI.php b/src/PocketMine/ChatAPI.php similarity index 100% rename from src/ChatAPI.php rename to src/PocketMine/ChatAPI.php diff --git a/src/ConsoleAPI.php b/src/PocketMine/ConsoleAPI.php similarity index 100% rename from src/ConsoleAPI.php rename to src/PocketMine/ConsoleAPI.php diff --git a/src/Container.php b/src/PocketMine/Container.php similarity index 100% rename from src/Container.php rename to src/PocketMine/Container.php diff --git a/src/Deprecation.php b/src/PocketMine/Deprecation.php similarity index 100% rename from src/Deprecation.php rename to src/PocketMine/Deprecation.php diff --git a/src/LevelAPI.php b/src/PocketMine/LevelAPI.php similarity index 100% rename from src/LevelAPI.php rename to src/PocketMine/LevelAPI.php diff --git a/src/Player.php b/src/PocketMine/Player.php similarity index 100% rename from src/Player.php rename to src/PocketMine/Player.php diff --git a/src/PlayerAPI.php b/src/PocketMine/PlayerAPI.php similarity index 100% rename from src/PlayerAPI.php rename to src/PocketMine/PlayerAPI.php diff --git a/src/PluginAPI.php b/src/PocketMine/PluginAPI.php similarity index 100% rename from src/PluginAPI.php rename to src/PocketMine/PluginAPI.php diff --git a/PocketMine-MP.php b/src/PocketMine/PocketMine.php similarity index 98% rename from PocketMine-MP.php rename to src/PocketMine/PocketMine.php index 248ba8eaf..0e76bc1e9 100644 --- a/PocketMine-MP.php +++ b/src/PocketMine/PocketMine.php @@ -41,7 +41,7 @@ namespace PocketMine{ }else{ $path = ""; } - $fPath = \PocketMine\PATH . "src" . DIRECTORY_SEPARATOR . $path . $className . ".php"; + $fPath = \PocketMine\PATH . "src" . DIRECTORY_SEPARATOR . "PocketMine" . DIRECTORY_SEPARATOR . $path . $className . ".php"; if(file_exists($fPath)){ require_once($fPath); } @@ -59,7 +59,7 @@ namespace PocketMine{ } }); - define("PocketMine\PATH", realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR); + define("PocketMine\PATH", \getcwd() . DIRECTORY_SEPARATOR); //Startup code. Do not look at it, it can harm you. Most of them are hacks to fix date-related bugs, or basic functions used after this @@ -357,7 +357,7 @@ namespace PocketMine{ ini_set("opcache.mmap_base", bin2hex(Utils\Utils::getRandomBytes(8, false))); //Fix OPCache address errors - require_once(\PocketMine\PATH . "src/utils/pthreads.php"); + require_once(\PocketMine\PATH . "src/pthreads.php"); if(!file_exists(\PocketMine\DATA . "server.properties") and !isset($opts["no-wizard"])){ $installer = new Wizard\Installer(); diff --git a/src/Server.php b/src/PocketMine/Server.php similarity index 99% rename from src/Server.php rename to src/PocketMine/Server.php index dd144db02..43449d2a7 100644 --- a/src/Server.php +++ b/src/PocketMine/Server.php @@ -47,7 +47,7 @@ class Server{ private function load(){ $this->version = new VersionString(); if(defined("DEBUG") and DEBUG >= 0){ - @cli_set_process_title("PocketMine-MP " . MAJOR_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); define("BOOTUP_RANDOM", Utils::getRandomBytes(16)); diff --git a/src/ServerAPI.php b/src/PocketMine/ServerAPI.php similarity index 100% rename from src/ServerAPI.php rename to src/PocketMine/ServerAPI.php diff --git a/src/TimeAPI.php b/src/PocketMine/TimeAPI.php similarity index 100% rename from src/TimeAPI.php rename to src/PocketMine/TimeAPI.php diff --git a/src/block/Air.php b/src/PocketMine/block/Air.php similarity index 100% rename from src/block/Air.php rename to src/PocketMine/block/Air.php diff --git a/src/block/Bed.php b/src/PocketMine/block/Bed.php similarity index 100% rename from src/block/Bed.php rename to src/PocketMine/block/Bed.php diff --git a/src/block/Bedrock.php b/src/PocketMine/block/Bedrock.php similarity index 100% rename from src/block/Bedrock.php rename to src/PocketMine/block/Bedrock.php diff --git a/src/block/Beetroot.php b/src/PocketMine/block/Beetroot.php similarity index 100% rename from src/block/Beetroot.php rename to src/PocketMine/block/Beetroot.php diff --git a/src/block/BirchWoodStairs.php b/src/PocketMine/block/BirchWoodStairs.php similarity index 100% rename from src/block/BirchWoodStairs.php rename to src/PocketMine/block/BirchWoodStairs.php diff --git a/src/block/Block.php b/src/PocketMine/block/Block.php similarity index 100% rename from src/block/Block.php rename to src/PocketMine/block/Block.php diff --git a/src/block/Bookshelf.php b/src/PocketMine/block/Bookshelf.php similarity index 100% rename from src/block/Bookshelf.php rename to src/PocketMine/block/Bookshelf.php diff --git a/src/block/BrickStairs.php b/src/PocketMine/block/BrickStairs.php similarity index 100% rename from src/block/BrickStairs.php rename to src/PocketMine/block/BrickStairs.php diff --git a/src/block/Bricks.php b/src/PocketMine/block/Bricks.php similarity index 100% rename from src/block/Bricks.php rename to src/PocketMine/block/Bricks.php diff --git a/src/block/BrownMushroom.php b/src/PocketMine/block/BrownMushroom.php similarity index 100% rename from src/block/BrownMushroom.php rename to src/PocketMine/block/BrownMushroom.php diff --git a/src/block/BurningFurnace.php b/src/PocketMine/block/BurningFurnace.php similarity index 100% rename from src/block/BurningFurnace.php rename to src/PocketMine/block/BurningFurnace.php diff --git a/src/block/Cactus.php b/src/PocketMine/block/Cactus.php similarity index 100% rename from src/block/Cactus.php rename to src/PocketMine/block/Cactus.php diff --git a/src/block/Cake.php b/src/PocketMine/block/Cake.php similarity index 100% rename from src/block/Cake.php rename to src/PocketMine/block/Cake.php diff --git a/src/block/Carpet.php b/src/PocketMine/block/Carpet.php similarity index 100% rename from src/block/Carpet.php rename to src/PocketMine/block/Carpet.php diff --git a/src/block/Carrot.php b/src/PocketMine/block/Carrot.php similarity index 100% rename from src/block/Carrot.php rename to src/PocketMine/block/Carrot.php diff --git a/src/block/Chest.php b/src/PocketMine/block/Chest.php similarity index 100% rename from src/block/Chest.php rename to src/PocketMine/block/Chest.php diff --git a/src/block/Clay.php b/src/PocketMine/block/Clay.php similarity index 100% rename from src/block/Clay.php rename to src/PocketMine/block/Clay.php diff --git a/src/block/Coal.php b/src/PocketMine/block/Coal.php similarity index 100% rename from src/block/Coal.php rename to src/PocketMine/block/Coal.php diff --git a/src/block/CoalOre.php b/src/PocketMine/block/CoalOre.php similarity index 100% rename from src/block/CoalOre.php rename to src/PocketMine/block/CoalOre.php diff --git a/src/block/Cobblestone.php b/src/PocketMine/block/Cobblestone.php similarity index 100% rename from src/block/Cobblestone.php rename to src/PocketMine/block/Cobblestone.php diff --git a/src/block/CobblestoneStairs.php b/src/PocketMine/block/CobblestoneStairs.php similarity index 100% rename from src/block/CobblestoneStairs.php rename to src/PocketMine/block/CobblestoneStairs.php diff --git a/src/block/Cobweb.php b/src/PocketMine/block/Cobweb.php similarity index 100% rename from src/block/Cobweb.php rename to src/PocketMine/block/Cobweb.php diff --git a/src/block/CyanFlower.php b/src/PocketMine/block/CyanFlower.php similarity index 100% rename from src/block/CyanFlower.php rename to src/PocketMine/block/CyanFlower.php diff --git a/src/block/Dandelion.php b/src/PocketMine/block/Dandelion.php similarity index 100% rename from src/block/Dandelion.php rename to src/PocketMine/block/Dandelion.php diff --git a/src/block/DeadBush.php b/src/PocketMine/block/DeadBush.php similarity index 100% rename from src/block/DeadBush.php rename to src/PocketMine/block/DeadBush.php diff --git a/src/block/Diamond.php b/src/PocketMine/block/Diamond.php similarity index 100% rename from src/block/Diamond.php rename to src/PocketMine/block/Diamond.php diff --git a/src/block/DiamondOre.php b/src/PocketMine/block/DiamondOre.php similarity index 100% rename from src/block/DiamondOre.php rename to src/PocketMine/block/DiamondOre.php diff --git a/src/block/Dirt.php b/src/PocketMine/block/Dirt.php similarity index 100% rename from src/block/Dirt.php rename to src/PocketMine/block/Dirt.php diff --git a/src/block/Door.php b/src/PocketMine/block/Door.php similarity index 100% rename from src/block/Door.php rename to src/PocketMine/block/Door.php diff --git a/src/block/DoubleSlab.php b/src/PocketMine/block/DoubleSlab.php similarity index 100% rename from src/block/DoubleSlab.php rename to src/PocketMine/block/DoubleSlab.php diff --git a/src/block/DoubleWoodSlab.php b/src/PocketMine/block/DoubleWoodSlab.php similarity index 100% rename from src/block/DoubleWoodSlab.php rename to src/PocketMine/block/DoubleWoodSlab.php diff --git a/src/block/Fallable.php b/src/PocketMine/block/Fallable.php similarity index 100% rename from src/block/Fallable.php rename to src/PocketMine/block/Fallable.php diff --git a/src/block/Farmland.php b/src/PocketMine/block/Farmland.php similarity index 100% rename from src/block/Farmland.php rename to src/PocketMine/block/Farmland.php diff --git a/src/block/Fence.php b/src/PocketMine/block/Fence.php similarity index 100% rename from src/block/Fence.php rename to src/PocketMine/block/Fence.php diff --git a/src/block/FenceGate.php b/src/PocketMine/block/FenceGate.php similarity index 100% rename from src/block/FenceGate.php rename to src/PocketMine/block/FenceGate.php diff --git a/src/block/Fire.php b/src/PocketMine/block/Fire.php similarity index 100% rename from src/block/Fire.php rename to src/PocketMine/block/Fire.php diff --git a/src/block/Flowable.php b/src/PocketMine/block/Flowable.php similarity index 100% rename from src/block/Flowable.php rename to src/PocketMine/block/Flowable.php diff --git a/src/block/Furnace.php b/src/PocketMine/block/Furnace.php similarity index 100% rename from src/block/Furnace.php rename to src/PocketMine/block/Furnace.php diff --git a/src/block/Generic.php b/src/PocketMine/block/Generic.php similarity index 100% rename from src/block/Generic.php rename to src/PocketMine/block/Generic.php diff --git a/src/block/Glass.php b/src/PocketMine/block/Glass.php similarity index 100% rename from src/block/Glass.php rename to src/PocketMine/block/Glass.php diff --git a/src/block/GlassPane.php b/src/PocketMine/block/GlassPane.php similarity index 100% rename from src/block/GlassPane.php rename to src/PocketMine/block/GlassPane.php diff --git a/src/block/GlowingObsidian.php b/src/PocketMine/block/GlowingObsidian.php similarity index 100% rename from src/block/GlowingObsidian.php rename to src/PocketMine/block/GlowingObsidian.php diff --git a/src/block/GlowingRedstoneOre.php b/src/PocketMine/block/GlowingRedstoneOre.php similarity index 100% rename from src/block/GlowingRedstoneOre.php rename to src/PocketMine/block/GlowingRedstoneOre.php diff --git a/src/block/Glowstone.php b/src/PocketMine/block/Glowstone.php similarity index 100% rename from src/block/Glowstone.php rename to src/PocketMine/block/Glowstone.php diff --git a/src/block/Gold.php b/src/PocketMine/block/Gold.php similarity index 100% rename from src/block/Gold.php rename to src/PocketMine/block/Gold.php diff --git a/src/block/GoldOre.php b/src/PocketMine/block/GoldOre.php similarity index 100% rename from src/block/GoldOre.php rename to src/PocketMine/block/GoldOre.php diff --git a/src/block/Grass.php b/src/PocketMine/block/Grass.php similarity index 100% rename from src/block/Grass.php rename to src/PocketMine/block/Grass.php diff --git a/src/block/Gravel.php b/src/PocketMine/block/Gravel.php similarity index 100% rename from src/block/Gravel.php rename to src/PocketMine/block/Gravel.php diff --git a/src/block/HayBale.php b/src/PocketMine/block/HayBale.php similarity index 100% rename from src/block/HayBale.php rename to src/PocketMine/block/HayBale.php diff --git a/src/block/Ice.php b/src/PocketMine/block/Ice.php similarity index 100% rename from src/block/Ice.php rename to src/PocketMine/block/Ice.php diff --git a/src/block/Iron.php b/src/PocketMine/block/Iron.php similarity index 100% rename from src/block/Iron.php rename to src/PocketMine/block/Iron.php diff --git a/src/block/IronBars.php b/src/PocketMine/block/IronBars.php similarity index 100% rename from src/block/IronBars.php rename to src/PocketMine/block/IronBars.php diff --git a/src/block/IronDoor.php b/src/PocketMine/block/IronDoor.php similarity index 100% rename from src/block/IronDoor.php rename to src/PocketMine/block/IronDoor.php diff --git a/src/block/IronOre.php b/src/PocketMine/block/IronOre.php similarity index 100% rename from src/block/IronOre.php rename to src/PocketMine/block/IronOre.php diff --git a/src/block/JungleWoodStairs.php b/src/PocketMine/block/JungleWoodStairs.php similarity index 100% rename from src/block/JungleWoodStairs.php rename to src/PocketMine/block/JungleWoodStairs.php diff --git a/src/block/Ladder.php b/src/PocketMine/block/Ladder.php similarity index 100% rename from src/block/Ladder.php rename to src/PocketMine/block/Ladder.php diff --git a/src/block/Lapis.php b/src/PocketMine/block/Lapis.php similarity index 100% rename from src/block/Lapis.php rename to src/PocketMine/block/Lapis.php diff --git a/src/block/LapisOre.php b/src/PocketMine/block/LapisOre.php similarity index 100% rename from src/block/LapisOre.php rename to src/PocketMine/block/LapisOre.php diff --git a/src/block/Lava.php b/src/PocketMine/block/Lava.php similarity index 100% rename from src/block/Lava.php rename to src/PocketMine/block/Lava.php diff --git a/src/block/Leaves.php b/src/PocketMine/block/Leaves.php similarity index 100% rename from src/block/Leaves.php rename to src/PocketMine/block/Leaves.php diff --git a/src/block/Liquid.php b/src/PocketMine/block/Liquid.php similarity index 100% rename from src/block/Liquid.php rename to src/PocketMine/block/Liquid.php diff --git a/src/block/LitPumpkin.php b/src/PocketMine/block/LitPumpkin.php similarity index 100% rename from src/block/LitPumpkin.php rename to src/PocketMine/block/LitPumpkin.php diff --git a/src/block/Melon.php b/src/PocketMine/block/Melon.php similarity index 100% rename from src/block/Melon.php rename to src/PocketMine/block/Melon.php diff --git a/src/block/MelonStem.php b/src/PocketMine/block/MelonStem.php similarity index 100% rename from src/block/MelonStem.php rename to src/PocketMine/block/MelonStem.php diff --git a/src/block/MossStone.php b/src/PocketMine/block/MossStone.php similarity index 100% rename from src/block/MossStone.php rename to src/PocketMine/block/MossStone.php diff --git a/src/block/NetherBrick.php b/src/PocketMine/block/NetherBrick.php similarity index 100% rename from src/block/NetherBrick.php rename to src/PocketMine/block/NetherBrick.php diff --git a/src/block/NetherBrickStairs.php b/src/PocketMine/block/NetherBrickStairs.php similarity index 100% rename from src/block/NetherBrickStairs.php rename to src/PocketMine/block/NetherBrickStairs.php diff --git a/src/block/NetherReactor.php b/src/PocketMine/block/NetherReactor.php similarity index 100% rename from src/block/NetherReactor.php rename to src/PocketMine/block/NetherReactor.php diff --git a/src/block/Netherrack.php b/src/PocketMine/block/Netherrack.php similarity index 100% rename from src/block/Netherrack.php rename to src/PocketMine/block/Netherrack.php diff --git a/src/block/Obsidian.php b/src/PocketMine/block/Obsidian.php similarity index 100% rename from src/block/Obsidian.php rename to src/PocketMine/block/Obsidian.php diff --git a/src/block/Planks.php b/src/PocketMine/block/Planks.php similarity index 100% rename from src/block/Planks.php rename to src/PocketMine/block/Planks.php diff --git a/src/block/Potato.php b/src/PocketMine/block/Potato.php similarity index 100% rename from src/block/Potato.php rename to src/PocketMine/block/Potato.php diff --git a/src/block/Pumpkin.php b/src/PocketMine/block/Pumpkin.php similarity index 100% rename from src/block/Pumpkin.php rename to src/PocketMine/block/Pumpkin.php diff --git a/src/block/PumpkinStem.php b/src/PocketMine/block/PumpkinStem.php similarity index 100% rename from src/block/PumpkinStem.php rename to src/PocketMine/block/PumpkinStem.php diff --git a/src/block/Quartz.php b/src/PocketMine/block/Quartz.php similarity index 100% rename from src/block/Quartz.php rename to src/PocketMine/block/Quartz.php diff --git a/src/block/QuartzStairs.php b/src/PocketMine/block/QuartzStairs.php similarity index 100% rename from src/block/QuartzStairs.php rename to src/PocketMine/block/QuartzStairs.php diff --git a/src/block/RedMushroom.php b/src/PocketMine/block/RedMushroom.php similarity index 100% rename from src/block/RedMushroom.php rename to src/PocketMine/block/RedMushroom.php diff --git a/src/block/RedstoneOre.php b/src/PocketMine/block/RedstoneOre.php similarity index 100% rename from src/block/RedstoneOre.php rename to src/PocketMine/block/RedstoneOre.php diff --git a/src/block/Sand.php b/src/PocketMine/block/Sand.php similarity index 100% rename from src/block/Sand.php rename to src/PocketMine/block/Sand.php diff --git a/src/block/Sandstone.php b/src/PocketMine/block/Sandstone.php similarity index 100% rename from src/block/Sandstone.php rename to src/PocketMine/block/Sandstone.php diff --git a/src/block/SandstoneStairs.php b/src/PocketMine/block/SandstoneStairs.php similarity index 100% rename from src/block/SandstoneStairs.php rename to src/PocketMine/block/SandstoneStairs.php diff --git a/src/block/Sapling.php b/src/PocketMine/block/Sapling.php similarity index 100% rename from src/block/Sapling.php rename to src/PocketMine/block/Sapling.php diff --git a/src/block/SignPost.php b/src/PocketMine/block/SignPost.php similarity index 100% rename from src/block/SignPost.php rename to src/PocketMine/block/SignPost.php diff --git a/src/block/Slab.php b/src/PocketMine/block/Slab.php similarity index 100% rename from src/block/Slab.php rename to src/PocketMine/block/Slab.php diff --git a/src/block/Snow.php b/src/PocketMine/block/Snow.php similarity index 100% rename from src/block/Snow.php rename to src/PocketMine/block/Snow.php diff --git a/src/block/SnowLayer.php b/src/PocketMine/block/SnowLayer.php similarity index 100% rename from src/block/SnowLayer.php rename to src/PocketMine/block/SnowLayer.php diff --git a/src/block/Solid.php b/src/PocketMine/block/Solid.php similarity index 100% rename from src/block/Solid.php rename to src/PocketMine/block/Solid.php diff --git a/src/block/SoulSand.php b/src/PocketMine/block/SoulSand.php similarity index 100% rename from src/block/SoulSand.php rename to src/PocketMine/block/SoulSand.php diff --git a/src/block/Sponge.php b/src/PocketMine/block/Sponge.php similarity index 100% rename from src/block/Sponge.php rename to src/PocketMine/block/Sponge.php diff --git a/src/block/SpruceWoodStairs.php b/src/PocketMine/block/SpruceWoodStairs.php similarity index 100% rename from src/block/SpruceWoodStairs.php rename to src/PocketMine/block/SpruceWoodStairs.php diff --git a/src/block/Stair.php b/src/PocketMine/block/Stair.php similarity index 100% rename from src/block/Stair.php rename to src/PocketMine/block/Stair.php diff --git a/src/block/StillLava.php b/src/PocketMine/block/StillLava.php similarity index 100% rename from src/block/StillLava.php rename to src/PocketMine/block/StillLava.php diff --git a/src/block/StillWater.php b/src/PocketMine/block/StillWater.php similarity index 100% rename from src/block/StillWater.php rename to src/PocketMine/block/StillWater.php diff --git a/src/block/Stone.php b/src/PocketMine/block/Stone.php similarity index 100% rename from src/block/Stone.php rename to src/PocketMine/block/Stone.php diff --git a/src/block/StoneBrickStairs.php b/src/PocketMine/block/StoneBrickStairs.php similarity index 100% rename from src/block/StoneBrickStairs.php rename to src/PocketMine/block/StoneBrickStairs.php diff --git a/src/block/StoneBricks.php b/src/PocketMine/block/StoneBricks.php similarity index 100% rename from src/block/StoneBricks.php rename to src/PocketMine/block/StoneBricks.php diff --git a/src/block/StoneWall.php b/src/PocketMine/block/StoneWall.php similarity index 100% rename from src/block/StoneWall.php rename to src/PocketMine/block/StoneWall.php diff --git a/src/block/Stonecutter.php b/src/PocketMine/block/Stonecutter.php similarity index 100% rename from src/block/Stonecutter.php rename to src/PocketMine/block/Stonecutter.php diff --git a/src/block/Sugarcane.php b/src/PocketMine/block/Sugarcane.php similarity index 100% rename from src/block/Sugarcane.php rename to src/PocketMine/block/Sugarcane.php diff --git a/src/block/TNT.php b/src/PocketMine/block/TNT.php similarity index 100% rename from src/block/TNT.php rename to src/PocketMine/block/TNT.php diff --git a/src/block/TallGrass.php b/src/PocketMine/block/TallGrass.php similarity index 100% rename from src/block/TallGrass.php rename to src/PocketMine/block/TallGrass.php diff --git a/src/block/Torch.php b/src/PocketMine/block/Torch.php similarity index 100% rename from src/block/Torch.php rename to src/PocketMine/block/Torch.php diff --git a/src/block/Transparent.php b/src/PocketMine/block/Transparent.php similarity index 100% rename from src/block/Transparent.php rename to src/PocketMine/block/Transparent.php diff --git a/src/block/Trapdoor.php b/src/PocketMine/block/Trapdoor.php similarity index 100% rename from src/block/Trapdoor.php rename to src/PocketMine/block/Trapdoor.php diff --git a/src/block/WallSign.php b/src/PocketMine/block/WallSign.php similarity index 100% rename from src/block/WallSign.php rename to src/PocketMine/block/WallSign.php diff --git a/src/block/Water.php b/src/PocketMine/block/Water.php similarity index 100% rename from src/block/Water.php rename to src/PocketMine/block/Water.php diff --git a/src/block/Wheat.php b/src/PocketMine/block/Wheat.php similarity index 100% rename from src/block/Wheat.php rename to src/PocketMine/block/Wheat.php diff --git a/src/block/Wood.php b/src/PocketMine/block/Wood.php similarity index 100% rename from src/block/Wood.php rename to src/PocketMine/block/Wood.php diff --git a/src/block/WoodDoor.php b/src/PocketMine/block/WoodDoor.php similarity index 100% rename from src/block/WoodDoor.php rename to src/PocketMine/block/WoodDoor.php diff --git a/src/block/WoodSlab.php b/src/PocketMine/block/WoodSlab.php similarity index 100% rename from src/block/WoodSlab.php rename to src/PocketMine/block/WoodSlab.php diff --git a/src/block/WoodStairs.php b/src/PocketMine/block/WoodStairs.php similarity index 100% rename from src/block/WoodStairs.php rename to src/PocketMine/block/WoodStairs.php diff --git a/src/block/Wool.php b/src/PocketMine/block/Wool.php similarity index 100% rename from src/block/Wool.php rename to src/PocketMine/block/Wool.php diff --git a/src/block/Workbench.php b/src/PocketMine/block/Workbench.php similarity index 100% rename from src/block/Workbench.php rename to src/PocketMine/block/Workbench.php diff --git a/src/build/compile.sh b/src/PocketMine/build/compile.sh old mode 100755 new mode 100644 similarity index 100% rename from src/build/compile.sh rename to src/PocketMine/build/compile.sh diff --git a/src/build/installer.sh b/src/PocketMine/build/installer.sh similarity index 100% rename from src/build/installer.sh rename to src/PocketMine/build/installer.sh diff --git a/src/build/jenkins.sh b/src/PocketMine/build/jenkins.sh similarity index 100% rename from src/build/jenkins.sh rename to src/PocketMine/build/jenkins.sh diff --git a/src/constants/GeneralConstants.php b/src/PocketMine/constants/GeneralConstants.php similarity index 100% rename from src/constants/GeneralConstants.php rename to src/PocketMine/constants/GeneralConstants.php diff --git a/src/entity/Ageable.php b/src/PocketMine/entity/Ageable.php similarity index 100% rename from src/entity/Ageable.php rename to src/PocketMine/entity/Ageable.php diff --git a/src/entity/Animal.php b/src/PocketMine/entity/Animal.php similarity index 100% rename from src/entity/Animal.php rename to src/PocketMine/entity/Animal.php diff --git a/src/entity/Arrow.php b/src/PocketMine/entity/Arrow.php similarity index 100% rename from src/entity/Arrow.php rename to src/PocketMine/entity/Arrow.php diff --git a/src/entity/Attachable.php b/src/PocketMine/entity/Attachable.php similarity index 100% rename from src/entity/Attachable.php rename to src/PocketMine/entity/Attachable.php diff --git a/src/entity/Chicken.php b/src/PocketMine/entity/Chicken.php similarity index 100% rename from src/entity/Chicken.php rename to src/PocketMine/entity/Chicken.php diff --git a/src/entity/Colorable.php b/src/PocketMine/entity/Colorable.php similarity index 100% rename from src/entity/Colorable.php rename to src/PocketMine/entity/Colorable.php diff --git a/src/entity/Cow.php b/src/PocketMine/entity/Cow.php similarity index 100% rename from src/entity/Cow.php rename to src/PocketMine/entity/Cow.php diff --git a/src/entity/Creature.php b/src/PocketMine/entity/Creature.php similarity index 100% rename from src/entity/Creature.php rename to src/PocketMine/entity/Creature.php diff --git a/src/entity/Creeper.php b/src/PocketMine/entity/Creeper.php similarity index 100% rename from src/entity/Creeper.php rename to src/PocketMine/entity/Creeper.php diff --git a/src/entity/Damageable.php b/src/PocketMine/entity/Damageable.php similarity index 100% rename from src/entity/Damageable.php rename to src/PocketMine/entity/Damageable.php diff --git a/src/entity/DroppedItem.php b/src/PocketMine/entity/DroppedItem.php similarity index 100% rename from src/entity/DroppedItem.php rename to src/PocketMine/entity/DroppedItem.php diff --git a/src/entity/Egg.php b/src/PocketMine/entity/Egg.php similarity index 100% rename from src/entity/Egg.php rename to src/PocketMine/entity/Egg.php diff --git a/src/entity/EnderPearl.php b/src/PocketMine/entity/EnderPearl.php similarity index 100% rename from src/entity/EnderPearl.php rename to src/PocketMine/entity/EnderPearl.php diff --git a/src/entity/Enderman.php b/src/PocketMine/entity/Enderman.php similarity index 100% rename from src/entity/Enderman.php rename to src/PocketMine/entity/Enderman.php diff --git a/src/entity/Entity.php b/src/PocketMine/entity/Entity.php similarity index 100% rename from src/entity/Entity.php rename to src/PocketMine/entity/Entity.php diff --git a/src/entity/Explosive.php b/src/PocketMine/entity/Explosive.php similarity index 100% rename from src/entity/Explosive.php rename to src/PocketMine/entity/Explosive.php diff --git a/src/entity/FallingBlock.php b/src/PocketMine/entity/FallingBlock.php similarity index 100% rename from src/entity/FallingBlock.php rename to src/PocketMine/entity/FallingBlock.php diff --git a/src/entity/Hanging.php b/src/PocketMine/entity/Hanging.php similarity index 100% rename from src/entity/Hanging.php rename to src/PocketMine/entity/Hanging.php diff --git a/src/entity/Human.php b/src/PocketMine/entity/Human.php similarity index 100% rename from src/entity/Human.php rename to src/PocketMine/entity/Human.php diff --git a/src/entity/InventorySource.php b/src/PocketMine/entity/InventorySource.php similarity index 100% rename from src/entity/InventorySource.php rename to src/PocketMine/entity/InventorySource.php diff --git a/src/entity/Living.php b/src/PocketMine/entity/Living.php similarity index 100% rename from src/entity/Living.php rename to src/PocketMine/entity/Living.php diff --git a/src/entity/Minecart.php b/src/PocketMine/entity/Minecart.php similarity index 100% rename from src/entity/Minecart.php rename to src/PocketMine/entity/Minecart.php diff --git a/src/entity/Monster.php b/src/PocketMine/entity/Monster.php similarity index 100% rename from src/entity/Monster.php rename to src/PocketMine/entity/Monster.php diff --git a/src/entity/NPC.php b/src/PocketMine/entity/NPC.php similarity index 100% rename from src/entity/NPC.php rename to src/PocketMine/entity/NPC.php diff --git a/src/entity/Ocelot.php b/src/PocketMine/entity/Ocelot.php similarity index 100% rename from src/entity/Ocelot.php rename to src/PocketMine/entity/Ocelot.php diff --git a/src/entity/Painting.php b/src/PocketMine/entity/Painting.php similarity index 100% rename from src/entity/Painting.php rename to src/PocketMine/entity/Painting.php diff --git a/src/entity/Pig.php b/src/PocketMine/entity/Pig.php similarity index 100% rename from src/entity/Pig.php rename to src/PocketMine/entity/Pig.php diff --git a/src/entity/PigZombie.php b/src/PocketMine/entity/PigZombie.php similarity index 100% rename from src/entity/PigZombie.php rename to src/PocketMine/entity/PigZombie.php diff --git a/src/entity/Projectile.php b/src/PocketMine/entity/Projectile.php similarity index 100% rename from src/entity/Projectile.php rename to src/PocketMine/entity/Projectile.php diff --git a/src/entity/ProjectileSource.php b/src/PocketMine/entity/ProjectileSource.php similarity index 100% rename from src/entity/ProjectileSource.php rename to src/PocketMine/entity/ProjectileSource.php diff --git a/src/entity/RealHuman.php b/src/PocketMine/entity/RealHuman.php similarity index 100% rename from src/entity/RealHuman.php rename to src/PocketMine/entity/RealHuman.php diff --git a/src/entity/Rideable.php b/src/PocketMine/entity/Rideable.php similarity index 100% rename from src/entity/Rideable.php rename to src/PocketMine/entity/Rideable.php diff --git a/src/entity/Sheep.php b/src/PocketMine/entity/Sheep.php similarity index 100% rename from src/entity/Sheep.php rename to src/PocketMine/entity/Sheep.php diff --git a/src/entity/Silverfish.php b/src/PocketMine/entity/Silverfish.php similarity index 100% rename from src/entity/Silverfish.php rename to src/PocketMine/entity/Silverfish.php diff --git a/src/entity/Skeleton.php b/src/PocketMine/entity/Skeleton.php similarity index 100% rename from src/entity/Skeleton.php rename to src/PocketMine/entity/Skeleton.php diff --git a/src/entity/Slime.php b/src/PocketMine/entity/Slime.php similarity index 100% rename from src/entity/Slime.php rename to src/PocketMine/entity/Slime.php diff --git a/src/entity/Snowball.php b/src/PocketMine/entity/Snowball.php similarity index 100% rename from src/entity/Snowball.php rename to src/PocketMine/entity/Snowball.php diff --git a/src/entity/Spider.php b/src/PocketMine/entity/Spider.php similarity index 100% rename from src/entity/Spider.php rename to src/PocketMine/entity/Spider.php diff --git a/src/entity/TNTPrimed.php b/src/PocketMine/entity/TNTPrimed.php similarity index 100% rename from src/entity/TNTPrimed.php rename to src/PocketMine/entity/TNTPrimed.php diff --git a/src/entity/Tameable.php b/src/PocketMine/entity/Tameable.php similarity index 100% rename from src/entity/Tameable.php rename to src/PocketMine/entity/Tameable.php diff --git a/src/entity/Vehicle.php b/src/PocketMine/entity/Vehicle.php similarity index 100% rename from src/entity/Vehicle.php rename to src/PocketMine/entity/Vehicle.php diff --git a/src/entity/Villager.php b/src/PocketMine/entity/Villager.php similarity index 100% rename from src/entity/Villager.php rename to src/PocketMine/entity/Villager.php diff --git a/src/entity/Wolf.php b/src/PocketMine/entity/Wolf.php similarity index 100% rename from src/entity/Wolf.php rename to src/PocketMine/entity/Wolf.php diff --git a/src/entity/Zombie.php b/src/PocketMine/entity/Zombie.php similarity index 100% rename from src/entity/Zombie.php rename to src/PocketMine/entity/Zombie.php diff --git a/src/event/CancellableEvent.php b/src/PocketMine/event/CancellableEvent.php similarity index 100% rename from src/event/CancellableEvent.php rename to src/PocketMine/event/CancellableEvent.php diff --git a/src/event/Event.php b/src/PocketMine/event/Event.php similarity index 100% rename from src/event/Event.php rename to src/PocketMine/event/Event.php diff --git a/src/event/EventHandler.php b/src/PocketMine/event/EventHandler.php similarity index 100% rename from src/event/EventHandler.php rename to src/PocketMine/event/EventHandler.php diff --git a/src/event/EventPriority.php b/src/PocketMine/event/EventPriority.php similarity index 100% rename from src/event/EventPriority.php rename to src/PocketMine/event/EventPriority.php diff --git a/src/event/entity/EntityArmorChangeEvent.php b/src/PocketMine/event/entity/EntityArmorChangeEvent.php similarity index 100% rename from src/event/entity/EntityArmorChangeEvent.php rename to src/PocketMine/event/entity/EntityArmorChangeEvent.php diff --git a/src/event/entity/EntityEvent.php b/src/PocketMine/event/entity/EntityEvent.php similarity index 100% rename from src/event/entity/EntityEvent.php rename to src/PocketMine/event/entity/EntityEvent.php diff --git a/src/event/entity/EntityInventoryChangeEvent.php b/src/PocketMine/event/entity/EntityInventoryChangeEvent.php similarity index 100% rename from src/event/entity/EntityInventoryChangeEvent.php rename to src/PocketMine/event/entity/EntityInventoryChangeEvent.php diff --git a/src/event/entity/EntityLevelChangeEvent.php b/src/PocketMine/event/entity/EntityLevelChangeEvent.php similarity index 100% rename from src/event/entity/EntityLevelChangeEvent.php rename to src/PocketMine/event/entity/EntityLevelChangeEvent.php diff --git a/src/event/entity/EntityMotionEvent.php b/src/PocketMine/event/entity/EntityMotionEvent.php similarity index 100% rename from src/event/entity/EntityMotionEvent.php rename to src/PocketMine/event/entity/EntityMotionEvent.php diff --git a/src/event/entity/EntityMoveEvent.php b/src/PocketMine/event/entity/EntityMoveEvent.php similarity index 100% rename from src/event/entity/EntityMoveEvent.php rename to src/PocketMine/event/entity/EntityMoveEvent.php diff --git a/src/event/player/PlayerEquipmentChangeEvent.php b/src/PocketMine/event/player/PlayerEquipmentChangeEvent.php similarity index 100% rename from src/event/player/PlayerEquipmentChangeEvent.php rename to src/PocketMine/event/player/PlayerEquipmentChangeEvent.php diff --git a/src/event/player/PlayerEvent.php b/src/PocketMine/event/player/PlayerEvent.php similarity index 100% rename from src/event/player/PlayerEvent.php rename to src/PocketMine/event/player/PlayerEvent.php diff --git a/src/event/plugin/PluginEvent.php b/src/PocketMine/event/plugin/PluginEvent.php similarity index 100% rename from src/event/plugin/PluginEvent.php rename to src/PocketMine/event/plugin/PluginEvent.php diff --git a/src/event/server/DataPacketReceiveEvent.php b/src/PocketMine/event/server/DataPacketReceiveEvent.php similarity index 100% rename from src/event/server/DataPacketReceiveEvent.php rename to src/PocketMine/event/server/DataPacketReceiveEvent.php diff --git a/src/event/server/DataPacketSendEvent.php b/src/PocketMine/event/server/DataPacketSendEvent.php similarity index 100% rename from src/event/server/DataPacketSendEvent.php rename to src/PocketMine/event/server/DataPacketSendEvent.php diff --git a/src/event/server/PacketReceiveEvent.php b/src/PocketMine/event/server/PacketReceiveEvent.php similarity index 100% rename from src/event/server/PacketReceiveEvent.php rename to src/PocketMine/event/server/PacketReceiveEvent.php diff --git a/src/event/server/PacketSendEvent.php b/src/PocketMine/event/server/PacketSendEvent.php similarity index 100% rename from src/event/server/PacketSendEvent.php rename to src/PocketMine/event/server/PacketSendEvent.php diff --git a/src/event/server/ServerEvent.php b/src/PocketMine/event/server/ServerEvent.php similarity index 100% rename from src/event/server/ServerEvent.php rename to src/PocketMine/event/server/ServerEvent.php diff --git a/src/event/tile/TileEvent.php b/src/PocketMine/event/tile/TileEvent.php similarity index 100% rename from src/event/tile/TileEvent.php rename to src/PocketMine/event/tile/TileEvent.php diff --git a/src/event/tile/TileInventoryChangeEvent.php b/src/PocketMine/event/tile/TileInventoryChangeEvent.php similarity index 100% rename from src/event/tile/TileInventoryChangeEvent.php rename to src/PocketMine/event/tile/TileInventoryChangeEvent.php diff --git a/src/item/Apple.php b/src/PocketMine/item/Apple.php similarity index 100% rename from src/item/Apple.php rename to src/PocketMine/item/Apple.php diff --git a/src/item/Bed.php b/src/PocketMine/item/Bed.php similarity index 100% rename from src/item/Bed.php rename to src/PocketMine/item/Bed.php diff --git a/src/item/BeetrootSeeds.php b/src/PocketMine/item/BeetrootSeeds.php similarity index 100% rename from src/item/BeetrootSeeds.php rename to src/PocketMine/item/BeetrootSeeds.php diff --git a/src/item/BeetrootSoup.php b/src/PocketMine/item/BeetrootSoup.php similarity index 100% rename from src/item/BeetrootSoup.php rename to src/PocketMine/item/BeetrootSoup.php diff --git a/src/item/Block.php b/src/PocketMine/item/Block.php similarity index 100% rename from src/item/Block.php rename to src/PocketMine/item/Block.php diff --git a/src/item/Bowl.php b/src/PocketMine/item/Bowl.php similarity index 100% rename from src/item/Bowl.php rename to src/PocketMine/item/Bowl.php diff --git a/src/item/Brick.php b/src/PocketMine/item/Brick.php similarity index 100% rename from src/item/Brick.php rename to src/PocketMine/item/Brick.php diff --git a/src/item/Bucket.php b/src/PocketMine/item/Bucket.php similarity index 100% rename from src/item/Bucket.php rename to src/PocketMine/item/Bucket.php diff --git a/src/item/Cake.php b/src/PocketMine/item/Cake.php similarity index 100% rename from src/item/Cake.php rename to src/PocketMine/item/Cake.php diff --git a/src/item/Carrot.php b/src/PocketMine/item/Carrot.php similarity index 100% rename from src/item/Carrot.php rename to src/PocketMine/item/Carrot.php diff --git a/src/item/Coal.php b/src/PocketMine/item/Coal.php similarity index 100% rename from src/item/Coal.php rename to src/PocketMine/item/Coal.php diff --git a/src/item/Diamond.php b/src/PocketMine/item/Diamond.php similarity index 100% rename from src/item/Diamond.php rename to src/PocketMine/item/Diamond.php diff --git a/src/item/Feather.php b/src/PocketMine/item/Feather.php similarity index 100% rename from src/item/Feather.php rename to src/PocketMine/item/Feather.php diff --git a/src/item/FlintSteel.php b/src/PocketMine/item/FlintSteel.php similarity index 100% rename from src/item/FlintSteel.php rename to src/PocketMine/item/FlintSteel.php diff --git a/src/item/GoldIngot.php b/src/PocketMine/item/GoldIngot.php similarity index 100% rename from src/item/GoldIngot.php rename to src/PocketMine/item/GoldIngot.php diff --git a/src/item/IronAxe.php b/src/PocketMine/item/IronAxe.php similarity index 100% rename from src/item/IronAxe.php rename to src/PocketMine/item/IronAxe.php diff --git a/src/item/IronDoor.php b/src/PocketMine/item/IronDoor.php similarity index 100% rename from src/item/IronDoor.php rename to src/PocketMine/item/IronDoor.php diff --git a/src/item/IronHoe.php b/src/PocketMine/item/IronHoe.php similarity index 100% rename from src/item/IronHoe.php rename to src/PocketMine/item/IronHoe.php diff --git a/src/item/IronIngot.php b/src/PocketMine/item/IronIngot.php similarity index 100% rename from src/item/IronIngot.php rename to src/PocketMine/item/IronIngot.php diff --git a/src/item/IronPickaxe.php b/src/PocketMine/item/IronPickaxe.php similarity index 100% rename from src/item/IronPickaxe.php rename to src/PocketMine/item/IronPickaxe.php diff --git a/src/item/IronShovel.php b/src/PocketMine/item/IronShovel.php similarity index 100% rename from src/item/IronShovel.php rename to src/PocketMine/item/IronShovel.php diff --git a/src/item/Item.php b/src/PocketMine/item/Item.php similarity index 100% rename from src/item/Item.php rename to src/PocketMine/item/Item.php diff --git a/src/item/MelonSeeds.php b/src/PocketMine/item/MelonSeeds.php similarity index 100% rename from src/item/MelonSeeds.php rename to src/PocketMine/item/MelonSeeds.php diff --git a/src/item/MushroomStew.php b/src/PocketMine/item/MushroomStew.php similarity index 100% rename from src/item/MushroomStew.php rename to src/PocketMine/item/MushroomStew.php diff --git a/src/item/Painting.php b/src/PocketMine/item/Painting.php similarity index 100% rename from src/item/Painting.php rename to src/PocketMine/item/Painting.php diff --git a/src/item/Potato.php b/src/PocketMine/item/Potato.php similarity index 100% rename from src/item/Potato.php rename to src/PocketMine/item/Potato.php diff --git a/src/item/PumpkinSeeds.php b/src/PocketMine/item/PumpkinSeeds.php similarity index 100% rename from src/item/PumpkinSeeds.php rename to src/PocketMine/item/PumpkinSeeds.php diff --git a/src/item/Sign.php b/src/PocketMine/item/Sign.php similarity index 100% rename from src/item/Sign.php rename to src/PocketMine/item/Sign.php diff --git a/src/item/SpawnEgg.php b/src/PocketMine/item/SpawnEgg.php similarity index 100% rename from src/item/SpawnEgg.php rename to src/PocketMine/item/SpawnEgg.php diff --git a/src/item/Stick.php b/src/PocketMine/item/Stick.php similarity index 100% rename from src/item/Stick.php rename to src/PocketMine/item/Stick.php diff --git a/src/item/Sugarcane.php b/src/PocketMine/item/Sugarcane.php similarity index 100% rename from src/item/Sugarcane.php rename to src/PocketMine/item/Sugarcane.php diff --git a/src/item/WheatSeeds.php b/src/PocketMine/item/WheatSeeds.php similarity index 100% rename from src/item/WheatSeeds.php rename to src/PocketMine/item/WheatSeeds.php diff --git a/src/item/WoodenAxe.php b/src/PocketMine/item/WoodenAxe.php similarity index 100% rename from src/item/WoodenAxe.php rename to src/PocketMine/item/WoodenAxe.php diff --git a/src/item/WoodenDoor.php b/src/PocketMine/item/WoodenDoor.php similarity index 100% rename from src/item/WoodenDoor.php rename to src/PocketMine/item/WoodenDoor.php diff --git a/src/item/WoodenPickaxe.php b/src/PocketMine/item/WoodenPickaxe.php similarity index 100% rename from src/item/WoodenPickaxe.php rename to src/PocketMine/item/WoodenPickaxe.php diff --git a/src/item/WoodenShovel.php b/src/PocketMine/item/WoodenShovel.php similarity index 100% rename from src/item/WoodenShovel.php rename to src/PocketMine/item/WoodenShovel.php diff --git a/src/item/WoodenSword.php b/src/PocketMine/item/WoodenSword.php similarity index 100% rename from src/item/WoodenSword.php rename to src/PocketMine/item/WoodenSword.php diff --git a/src/lang/Installer/af_ZA.ini b/src/PocketMine/lang/Installer/af_ZA.ini similarity index 100% rename from src/lang/Installer/af_ZA.ini rename to src/PocketMine/lang/Installer/af_ZA.ini diff --git a/src/lang/Installer/ar_SA.ini b/src/PocketMine/lang/Installer/ar_SA.ini similarity index 100% rename from src/lang/Installer/ar_SA.ini rename to src/PocketMine/lang/Installer/ar_SA.ini diff --git a/src/lang/Installer/cs_CZ.ini b/src/PocketMine/lang/Installer/cs_CZ.ini similarity index 100% rename from src/lang/Installer/cs_CZ.ini rename to src/PocketMine/lang/Installer/cs_CZ.ini diff --git a/src/lang/Installer/de_DE.ini b/src/PocketMine/lang/Installer/de_DE.ini similarity index 100% rename from src/lang/Installer/de_DE.ini rename to src/PocketMine/lang/Installer/de_DE.ini diff --git a/src/lang/Installer/el_GR.ini b/src/PocketMine/lang/Installer/el_GR.ini similarity index 100% rename from src/lang/Installer/el_GR.ini rename to src/PocketMine/lang/Installer/el_GR.ini diff --git a/src/lang/Installer/en.ini b/src/PocketMine/lang/Installer/en.ini similarity index 100% rename from src/lang/Installer/en.ini rename to src/PocketMine/lang/Installer/en.ini diff --git a/src/lang/Installer/en_AU.ini b/src/PocketMine/lang/Installer/en_AU.ini similarity index 100% rename from src/lang/Installer/en_AU.ini rename to src/PocketMine/lang/Installer/en_AU.ini diff --git a/src/lang/Installer/en_CA.ini b/src/PocketMine/lang/Installer/en_CA.ini similarity index 100% rename from src/lang/Installer/en_CA.ini rename to src/PocketMine/lang/Installer/en_CA.ini diff --git a/src/lang/Installer/en_GB.ini b/src/PocketMine/lang/Installer/en_GB.ini similarity index 100% rename from src/lang/Installer/en_GB.ini rename to src/PocketMine/lang/Installer/en_GB.ini diff --git a/src/lang/Installer/en_PT.ini b/src/PocketMine/lang/Installer/en_PT.ini similarity index 100% rename from src/lang/Installer/en_PT.ini rename to src/PocketMine/lang/Installer/en_PT.ini diff --git a/src/lang/Installer/en_US.ini b/src/PocketMine/lang/Installer/en_US.ini similarity index 100% rename from src/lang/Installer/en_US.ini rename to src/PocketMine/lang/Installer/en_US.ini diff --git a/src/lang/Installer/es_AR.ini b/src/PocketMine/lang/Installer/es_AR.ini similarity index 100% rename from src/lang/Installer/es_AR.ini rename to src/PocketMine/lang/Installer/es_AR.ini diff --git a/src/lang/Installer/es_ES.ini b/src/PocketMine/lang/Installer/es_ES.ini similarity index 100% rename from src/lang/Installer/es_ES.ini rename to src/PocketMine/lang/Installer/es_ES.ini diff --git a/src/lang/Installer/es_MX.ini b/src/PocketMine/lang/Installer/es_MX.ini similarity index 100% rename from src/lang/Installer/es_MX.ini rename to src/PocketMine/lang/Installer/es_MX.ini diff --git a/src/lang/Installer/et_EE.ini b/src/PocketMine/lang/Installer/et_EE.ini similarity index 100% rename from src/lang/Installer/et_EE.ini rename to src/PocketMine/lang/Installer/et_EE.ini diff --git a/src/lang/Installer/fi_FI.ini b/src/PocketMine/lang/Installer/fi_FI.ini similarity index 100% rename from src/lang/Installer/fi_FI.ini rename to src/PocketMine/lang/Installer/fi_FI.ini diff --git a/src/lang/Installer/fr_FR.ini b/src/PocketMine/lang/Installer/fr_FR.ini similarity index 100% rename from src/lang/Installer/fr_FR.ini rename to src/PocketMine/lang/Installer/fr_FR.ini diff --git a/src/lang/Installer/ga_IE.ini b/src/PocketMine/lang/Installer/ga_IE.ini similarity index 100% rename from src/lang/Installer/ga_IE.ini rename to src/PocketMine/lang/Installer/ga_IE.ini diff --git a/src/lang/Installer/he_IL.ini b/src/PocketMine/lang/Installer/he_IL.ini similarity index 100% rename from src/lang/Installer/he_IL.ini rename to src/PocketMine/lang/Installer/he_IL.ini diff --git a/src/lang/Installer/id_ID.ini b/src/PocketMine/lang/Installer/id_ID.ini similarity index 100% rename from src/lang/Installer/id_ID.ini rename to src/PocketMine/lang/Installer/id_ID.ini diff --git a/src/lang/Installer/it_IT.ini b/src/PocketMine/lang/Installer/it_IT.ini similarity index 100% rename from src/lang/Installer/it_IT.ini rename to src/PocketMine/lang/Installer/it_IT.ini diff --git a/src/lang/Installer/ja_JP.ini b/src/PocketMine/lang/Installer/ja_JP.ini similarity index 100% rename from src/lang/Installer/ja_JP.ini rename to src/PocketMine/lang/Installer/ja_JP.ini diff --git a/src/lang/Installer/ko_KR.ini b/src/PocketMine/lang/Installer/ko_KR.ini similarity index 100% rename from src/lang/Installer/ko_KR.ini rename to src/PocketMine/lang/Installer/ko_KR.ini diff --git a/src/lang/Installer/lv_LV.ini b/src/PocketMine/lang/Installer/lv_LV.ini similarity index 100% rename from src/lang/Installer/lv_LV.ini rename to src/PocketMine/lang/Installer/lv_LV.ini diff --git a/src/lang/Installer/ms_MY.ini b/src/PocketMine/lang/Installer/ms_MY.ini similarity index 100% rename from src/lang/Installer/ms_MY.ini rename to src/PocketMine/lang/Installer/ms_MY.ini diff --git a/src/lang/Installer/mt_MT.ini b/src/PocketMine/lang/Installer/mt_MT.ini similarity index 100% rename from src/lang/Installer/mt_MT.ini rename to src/PocketMine/lang/Installer/mt_MT.ini diff --git a/src/lang/Installer/nl_NL.ini b/src/PocketMine/lang/Installer/nl_NL.ini similarity index 100% rename from src/lang/Installer/nl_NL.ini rename to src/PocketMine/lang/Installer/nl_NL.ini diff --git a/src/lang/Installer/no_NO.ini b/src/PocketMine/lang/Installer/no_NO.ini similarity index 100% rename from src/lang/Installer/no_NO.ini rename to src/PocketMine/lang/Installer/no_NO.ini diff --git a/src/lang/Installer/pl_PL.ini b/src/PocketMine/lang/Installer/pl_PL.ini similarity index 100% rename from src/lang/Installer/pl_PL.ini rename to src/PocketMine/lang/Installer/pl_PL.ini diff --git a/src/lang/Installer/pt_PT.ini b/src/PocketMine/lang/Installer/pt_PT.ini similarity index 100% rename from src/lang/Installer/pt_PT.ini rename to src/PocketMine/lang/Installer/pt_PT.ini diff --git a/src/lang/Installer/ru_RU.ini b/src/PocketMine/lang/Installer/ru_RU.ini similarity index 100% rename from src/lang/Installer/ru_RU.ini rename to src/PocketMine/lang/Installer/ru_RU.ini diff --git a/src/lang/Installer/sv_SE.ini b/src/PocketMine/lang/Installer/sv_SE.ini similarity index 100% rename from src/lang/Installer/sv_SE.ini rename to src/PocketMine/lang/Installer/sv_SE.ini diff --git a/src/lang/Installer/th_TH.ini b/src/PocketMine/lang/Installer/th_TH.ini similarity index 100% rename from src/lang/Installer/th_TH.ini rename to src/PocketMine/lang/Installer/th_TH.ini diff --git a/src/lang/Installer/tlh_AA.ini b/src/PocketMine/lang/Installer/tlh_AA.ini similarity index 100% rename from src/lang/Installer/tlh_AA.ini rename to src/PocketMine/lang/Installer/tlh_AA.ini diff --git a/src/lang/Installer/tr_TR.ini b/src/PocketMine/lang/Installer/tr_TR.ini similarity index 100% rename from src/lang/Installer/tr_TR.ini rename to src/PocketMine/lang/Installer/tr_TR.ini diff --git a/src/lang/Installer/uk_UA.ini b/src/PocketMine/lang/Installer/uk_UA.ini similarity index 100% rename from src/lang/Installer/uk_UA.ini rename to src/PocketMine/lang/Installer/uk_UA.ini diff --git a/src/lang/Installer/vi_VN.ini b/src/PocketMine/lang/Installer/vi_VN.ini similarity index 100% rename from src/lang/Installer/vi_VN.ini rename to src/PocketMine/lang/Installer/vi_VN.ini diff --git a/src/lang/Installer/zh_CN.ini b/src/PocketMine/lang/Installer/zh_CN.ini similarity index 100% rename from src/lang/Installer/zh_CN.ini rename to src/PocketMine/lang/Installer/zh_CN.ini diff --git a/src/lang/Installer/zu_ZA.ini b/src/PocketMine/lang/Installer/zu_ZA.ini similarity index 100% rename from src/lang/Installer/zu_ZA.ini rename to src/PocketMine/lang/Installer/zu_ZA.ini diff --git a/src/level/Explosion.php b/src/PocketMine/level/Explosion.php similarity index 100% rename from src/level/Explosion.php rename to src/PocketMine/level/Explosion.php diff --git a/src/level/Level.php b/src/PocketMine/level/Level.php similarity index 100% rename from src/level/Level.php rename to src/PocketMine/level/Level.php diff --git a/src/level/LevelImport.php b/src/PocketMine/level/LevelImport.php similarity index 59% rename from src/level/LevelImport.php rename to src/PocketMine/level/LevelImport.php index b073fba95..9ac45aa8e 100644 --- a/src/level/LevelImport.php +++ b/src/PocketMine/level/LevelImport.php @@ -1,6 +1,6 @@ path = $path; } - + public function import(){ - if(file_exists($this->path."tileEntities.dat")){ //OldPM - $level = unserialize(file_get_contents($this->path."level.dat")); - console("[INFO] Importing OldPM level \"".$level["LevelName"]."\" to PMF format"); - $entities = new Config($this->path."entities.yml", CONFIG_YAML, unserialize(file_get_contents($this->path."entities.dat"))); + if(file_exists($this->path . "tileEntities.dat")){ //OldPM + $level = unserialize(file_get_contents($this->path . "level.dat")); + console("[INFO] Importing OldPM level \"" . $level["LevelName"] . "\" to PMF format"); + $entities = new Config($this->path . "entities.yml", Config::YAML, unserialize(file_get_contents($this->path . "entities.dat"))); $entities->save(); - $tiles = new Config($this->path."tiles.yml", CONFIG_YAML, unserialize(file_get_contents($this->path."tileEntities.dat"))); + $tiles = new Config($this->path . "tiles.yml", Config::YAML, unserialize(file_get_contents($this->path . "tileEntities.dat"))); $tiles->save(); - }elseif(file_exists($this->path."chunks.dat") and file_exists($this->path."level.dat")){ //Pocket + } elseif(file_exists($this->path . "chunks.dat") and file_exists($this->path . "level.dat")){ //Pocket $nbt = new NBT(NBT::LITTLE_ENDIAN); - $nbt->read(substr(file_get_contents($this->path."level.dat"), 8)); + $nbt->read(substr(file_get_contents($this->path . "level.dat"), 8)); $level = $nbt->getData(); if($level->LevelName == ""){ - $level->LevelName = "world".time(); + $level->LevelName = "world" . time(); } - console("[INFO] Importing Pocket level \"".$level->LevelName."\" to PMF format"); + console("[INFO] Importing Pocket level \"" . $level->LevelName . "\" to PMF format"); unset($level->Player); - $nbt->read(substr(file_get_contents($this->path."entities.dat"), 12)); + $nbt->read(substr(file_get_contents($this->path . "entities.dat"), 12)); $entities = $nbt->getData(); if(!isset($entities->TileEntities)){ $entities->TileEntities = array(); } $tiles = $entities->TileEntities; $entities = $entities->Entities; - $entities = new Config($this->path."entities.yml", CONFIG_YAML, $entities); + $entities = new Config($this->path . "entities.yml", Config::YAML, $entities); $entities->save(); - $tiles = new Config($this->path."tiles.yml", CONFIG_YAML, $tiles); + $tiles = new Config($this->path . "tiles.yml", Config::YAML, $tiles); $tiles->save(); - }else{ + } else{ return false; } - - $pmf = new PMFLevel($this->path."level.pmf", array( + + $pmf = new LevelFormat($this->path . "level.pmf", array( "name" => $level->LevelName, "seed" => $level->RandomSeed, "time" => $level->Time, @@ -70,7 +77,7 @@ class LevelImport{ "extra" => "" )); $chunks = new PocketChunkParser(); - $chunks->loadFile($this->path."chunks.dat"); + $chunks->loadFile($this->path . "chunks.dat"); $chunks->loadMap(); for($Z = 0; $Z < 16; ++$Z){ for($X = 0; $X < 16; ++$X){ @@ -82,8 +89,10 @@ class LevelImport{ 4 => "", 5 => "", 6 => "", - 7 => "" + 7 => "" ); + + $pmf->initCleanChunk($X, $Z); for($z = 0; $z < 16; ++$z){ for($x = 0; $x < 16; ++$x){ $block = $chunks->getChunkColumn($X, $Z, $x, $z, 0); @@ -101,18 +110,19 @@ class LevelImport{ $pmf->setPopulated($X, $Z); $pmf->saveChunk($X, $Z); } - console("[NOTICE] Importing level ".ceil(($Z + 1)/0.16)."%"); + console("[NOTICE] Importing level " . ceil(($Z + 1) / 0.16) . "%"); } $chunks->map = null; $chunks = null; - @unlink($this->path."level.dat"); - @unlink($this->path."level.dat_old"); - @unlink($this->path."player.dat"); - @unlink($this->path."entities.dat"); - @unlink($this->path."chunks.dat"); - @unlink($this->path."chunks.dat.gz"); - @unlink($this->path."tiles.dat"); + @unlink($this->path . "level.dat"); + @unlink($this->path . "level.dat_old"); + @unlink($this->path . "player.dat"); + @unlink($this->path . "entities.dat"); + @unlink($this->path . "chunks.dat"); + @unlink($this->path . "chunks.dat.gz"); + @unlink($this->path . "tiles.dat"); unset($chunks, $level, $entities, $tiles, $nbt); + return true; } diff --git a/src/level/PocketChunkParser.php b/src/PocketMine/level/PocketChunkParser.php similarity index 100% rename from src/level/PocketChunkParser.php rename to src/PocketMine/level/PocketChunkParser.php diff --git a/src/level/Position.php b/src/PocketMine/level/Position.php similarity index 100% rename from src/level/Position.php rename to src/PocketMine/level/Position.php diff --git a/src/level/WorldGenerator.php b/src/PocketMine/level/WorldGenerator.php similarity index 100% rename from src/level/WorldGenerator.php rename to src/PocketMine/level/WorldGenerator.php diff --git a/src/level/generator/Flat.php b/src/PocketMine/level/generator/Flat.php similarity index 100% rename from src/level/generator/Flat.php rename to src/PocketMine/level/generator/Flat.php diff --git a/src/level/generator/Generator.php b/src/PocketMine/level/generator/Generator.php similarity index 100% rename from src/level/generator/Generator.php rename to src/PocketMine/level/generator/Generator.php diff --git a/src/level/generator/Normal.php b/src/PocketMine/level/generator/Normal.php similarity index 100% rename from src/level/generator/Normal.php rename to src/PocketMine/level/generator/Normal.php diff --git a/src/level/generator/noise/Generator.php b/src/PocketMine/level/generator/noise/Generator.php similarity index 100% rename from src/level/generator/noise/Generator.php rename to src/PocketMine/level/generator/noise/Generator.php diff --git a/src/level/generator/noise/Perlin.php b/src/PocketMine/level/generator/noise/Perlin.php similarity index 100% rename from src/level/generator/noise/Perlin.php rename to src/PocketMine/level/generator/noise/Perlin.php diff --git a/src/level/generator/noise/Simplex.php b/src/PocketMine/level/generator/noise/Simplex.php similarity index 100% rename from src/level/generator/noise/Simplex.php rename to src/PocketMine/level/generator/noise/Simplex.php diff --git a/src/level/generator/object/BigTree.php b/src/PocketMine/level/generator/object/BigTree.php similarity index 100% rename from src/level/generator/object/BigTree.php rename to src/PocketMine/level/generator/object/BigTree.php diff --git a/src/level/generator/object/Object.php b/src/PocketMine/level/generator/object/Object.php similarity index 100% rename from src/level/generator/object/Object.php rename to src/PocketMine/level/generator/object/Object.php diff --git a/src/level/generator/object/Ore.php b/src/PocketMine/level/generator/object/Ore.php similarity index 100% rename from src/level/generator/object/Ore.php rename to src/PocketMine/level/generator/object/Ore.php diff --git a/src/level/generator/object/OreType.php b/src/PocketMine/level/generator/object/OreType.php similarity index 100% rename from src/level/generator/object/OreType.php rename to src/PocketMine/level/generator/object/OreType.php diff --git a/src/level/generator/object/PineTree.php b/src/PocketMine/level/generator/object/PineTree.php similarity index 100% rename from src/level/generator/object/PineTree.php rename to src/PocketMine/level/generator/object/PineTree.php diff --git a/src/level/generator/object/Pond.php b/src/PocketMine/level/generator/object/Pond.php similarity index 100% rename from src/level/generator/object/Pond.php rename to src/PocketMine/level/generator/object/Pond.php diff --git a/src/level/generator/object/SmallTree.php b/src/PocketMine/level/generator/object/SmallTree.php similarity index 100% rename from src/level/generator/object/SmallTree.php rename to src/PocketMine/level/generator/object/SmallTree.php diff --git a/src/level/generator/object/SpruceTree.php b/src/PocketMine/level/generator/object/SpruceTree.php similarity index 100% rename from src/level/generator/object/SpruceTree.php rename to src/PocketMine/level/generator/object/SpruceTree.php diff --git a/src/level/generator/object/TallGrass.php b/src/PocketMine/level/generator/object/TallGrass.php similarity index 100% rename from src/level/generator/object/TallGrass.php rename to src/PocketMine/level/generator/object/TallGrass.php diff --git a/src/level/generator/object/Tree.php b/src/PocketMine/level/generator/object/Tree.php similarity index 100% rename from src/level/generator/object/Tree.php rename to src/PocketMine/level/generator/object/Tree.php diff --git a/src/level/generator/populator/Mineshaft.php b/src/PocketMine/level/generator/populator/Mineshaft.php similarity index 100% rename from src/level/generator/populator/Mineshaft.php rename to src/PocketMine/level/generator/populator/Mineshaft.php diff --git a/src/level/generator/populator/Ore.php b/src/PocketMine/level/generator/populator/Ore.php similarity index 100% rename from src/level/generator/populator/Ore.php rename to src/PocketMine/level/generator/populator/Ore.php diff --git a/src/level/generator/populator/Pond.php b/src/PocketMine/level/generator/populator/Pond.php similarity index 100% rename from src/level/generator/populator/Pond.php rename to src/PocketMine/level/generator/populator/Pond.php diff --git a/src/level/generator/populator/Populator.php b/src/PocketMine/level/generator/populator/Populator.php similarity index 100% rename from src/level/generator/populator/Populator.php rename to src/PocketMine/level/generator/populator/Populator.php diff --git a/src/level/generator/populator/TallGrass.php b/src/PocketMine/level/generator/populator/TallGrass.php similarity index 100% rename from src/level/generator/populator/TallGrass.php rename to src/PocketMine/level/generator/populator/TallGrass.php diff --git a/src/level/generator/populator/Tree.php b/src/PocketMine/level/generator/populator/Tree.php similarity index 100% rename from src/level/generator/populator/Tree.php rename to src/PocketMine/level/generator/populator/Tree.php diff --git a/src/math/AxisAlignedBB.php b/src/PocketMine/math/AxisAlignedBB.php similarity index 100% rename from src/math/AxisAlignedBB.php rename to src/PocketMine/math/AxisAlignedBB.php diff --git a/src/math/Math.php b/src/PocketMine/math/Math.php similarity index 100% rename from src/math/Math.php rename to src/PocketMine/math/Math.php diff --git a/src/math/Matrix.php b/src/PocketMine/math/Matrix.php similarity index 100% rename from src/math/Matrix.php rename to src/PocketMine/math/Matrix.php diff --git a/src/math/Vector2.php b/src/PocketMine/math/Vector2.php similarity index 100% rename from src/math/Vector2.php rename to src/PocketMine/math/Vector2.php diff --git a/src/math/Vector3.php b/src/PocketMine/math/Vector3.php similarity index 100% rename from src/math/Vector3.php rename to src/PocketMine/math/Vector3.php diff --git a/src/math/VectorMath.php b/src/PocketMine/math/VectorMath.php similarity index 100% rename from src/math/VectorMath.php rename to src/PocketMine/math/VectorMath.php diff --git a/src/nbt/NBT.php b/src/PocketMine/nbt/NBT.php similarity index 100% rename from src/nbt/NBT.php rename to src/PocketMine/nbt/NBT.php diff --git a/src/nbt/tag/Byte.php b/src/PocketMine/nbt/tag/Byte.php similarity index 100% rename from src/nbt/tag/Byte.php rename to src/PocketMine/nbt/tag/Byte.php diff --git a/src/nbt/tag/Byte_Array.php b/src/PocketMine/nbt/tag/Byte_Array.php similarity index 100% rename from src/nbt/tag/Byte_Array.php rename to src/PocketMine/nbt/tag/Byte_Array.php diff --git a/src/nbt/tag/Compound.php b/src/PocketMine/nbt/tag/Compound.php similarity index 100% rename from src/nbt/tag/Compound.php rename to src/PocketMine/nbt/tag/Compound.php diff --git a/src/nbt/tag/Double.php b/src/PocketMine/nbt/tag/Double.php similarity index 100% rename from src/nbt/tag/Double.php rename to src/PocketMine/nbt/tag/Double.php diff --git a/src/nbt/tag/End.php b/src/PocketMine/nbt/tag/End.php similarity index 100% rename from src/nbt/tag/End.php rename to src/PocketMine/nbt/tag/End.php diff --git a/src/nbt/tag/Enum.php b/src/PocketMine/nbt/tag/Enum.php similarity index 100% rename from src/nbt/tag/Enum.php rename to src/PocketMine/nbt/tag/Enum.php diff --git a/src/nbt/tag/Float.php b/src/PocketMine/nbt/tag/Float.php similarity index 100% rename from src/nbt/tag/Float.php rename to src/PocketMine/nbt/tag/Float.php diff --git a/src/nbt/tag/Int.php b/src/PocketMine/nbt/tag/Int.php similarity index 100% rename from src/nbt/tag/Int.php rename to src/PocketMine/nbt/tag/Int.php diff --git a/src/nbt/tag/Int_Array.php b/src/PocketMine/nbt/tag/Int_Array.php similarity index 100% rename from src/nbt/tag/Int_Array.php rename to src/PocketMine/nbt/tag/Int_Array.php diff --git a/src/nbt/tag/Long.php b/src/PocketMine/nbt/tag/Long.php similarity index 100% rename from src/nbt/tag/Long.php rename to src/PocketMine/nbt/tag/Long.php diff --git a/src/nbt/tag/NamedTag.php b/src/PocketMine/nbt/tag/NamedTag.php similarity index 100% rename from src/nbt/tag/NamedTag.php rename to src/PocketMine/nbt/tag/NamedTag.php diff --git a/src/nbt/tag/Short.php b/src/PocketMine/nbt/tag/Short.php similarity index 100% rename from src/nbt/tag/Short.php rename to src/PocketMine/nbt/tag/Short.php diff --git a/src/nbt/tag/String.php b/src/PocketMine/nbt/tag/String.php similarity index 100% rename from src/nbt/tag/String.php rename to src/PocketMine/nbt/tag/String.php diff --git a/src/nbt/tag/Tag.php b/src/PocketMine/nbt/tag/Tag.php similarity index 100% rename from src/nbt/tag/Tag.php rename to src/PocketMine/nbt/tag/Tag.php diff --git a/src/network/Handler.php b/src/PocketMine/network/Handler.php similarity index 100% rename from src/network/Handler.php rename to src/PocketMine/network/Handler.php diff --git a/src/network/Packet.php b/src/PocketMine/network/Packet.php similarity index 100% rename from src/network/Packet.php rename to src/PocketMine/network/Packet.php diff --git a/src/network/UDPSocket.php b/src/PocketMine/network/UDPSocket.php similarity index 100% rename from src/network/UDPSocket.php rename to src/PocketMine/network/UDPSocket.php diff --git a/src/network/protocol/AddEntityPacket.php b/src/PocketMine/network/protocol/AddEntityPacket.php similarity index 100% rename from src/network/protocol/AddEntityPacket.php rename to src/PocketMine/network/protocol/AddEntityPacket.php diff --git a/src/network/protocol/AddItemEntityPacket.php b/src/PocketMine/network/protocol/AddItemEntityPacket.php similarity index 100% rename from src/network/protocol/AddItemEntityPacket.php rename to src/PocketMine/network/protocol/AddItemEntityPacket.php diff --git a/src/network/protocol/AddMobPacket.php b/src/PocketMine/network/protocol/AddMobPacket.php similarity index 100% rename from src/network/protocol/AddMobPacket.php rename to src/PocketMine/network/protocol/AddMobPacket.php diff --git a/src/network/protocol/AddPaintingPacket.php b/src/PocketMine/network/protocol/AddPaintingPacket.php similarity index 100% rename from src/network/protocol/AddPaintingPacket.php rename to src/PocketMine/network/protocol/AddPaintingPacket.php diff --git a/src/network/protocol/AddPlayerPacket.php b/src/PocketMine/network/protocol/AddPlayerPacket.php similarity index 100% rename from src/network/protocol/AddPlayerPacket.php rename to src/PocketMine/network/protocol/AddPlayerPacket.php diff --git a/src/network/protocol/AdventureSettingsPacket.php b/src/PocketMine/network/protocol/AdventureSettingsPacket.php similarity index 100% rename from src/network/protocol/AdventureSettingsPacket.php rename to src/PocketMine/network/protocol/AdventureSettingsPacket.php diff --git a/src/network/protocol/AnimatePacket.php b/src/PocketMine/network/protocol/AnimatePacket.php similarity index 100% rename from src/network/protocol/AnimatePacket.php rename to src/PocketMine/network/protocol/AnimatePacket.php diff --git a/src/network/protocol/ChatPacket.php b/src/PocketMine/network/protocol/ChatPacket.php similarity index 100% rename from src/network/protocol/ChatPacket.php rename to src/PocketMine/network/protocol/ChatPacket.php diff --git a/src/network/protocol/ChunkDataPacket.php b/src/PocketMine/network/protocol/ChunkDataPacket.php similarity index 100% rename from src/network/protocol/ChunkDataPacket.php rename to src/PocketMine/network/protocol/ChunkDataPacket.php diff --git a/src/network/protocol/ClientConnectPacket.php b/src/PocketMine/network/protocol/ClientConnectPacket.php similarity index 100% rename from src/network/protocol/ClientConnectPacket.php rename to src/PocketMine/network/protocol/ClientConnectPacket.php diff --git a/src/network/protocol/ClientHandshakePacket.php b/src/PocketMine/network/protocol/ClientHandshakePacket.php similarity index 100% rename from src/network/protocol/ClientHandshakePacket.php rename to src/PocketMine/network/protocol/ClientHandshakePacket.php diff --git a/src/network/protocol/ContainerClosePacket.php b/src/PocketMine/network/protocol/ContainerClosePacket.php similarity index 100% rename from src/network/protocol/ContainerClosePacket.php rename to src/PocketMine/network/protocol/ContainerClosePacket.php diff --git a/src/network/protocol/ContainerOpenPacket.php b/src/PocketMine/network/protocol/ContainerOpenPacket.php similarity index 100% rename from src/network/protocol/ContainerOpenPacket.php rename to src/PocketMine/network/protocol/ContainerOpenPacket.php diff --git a/src/network/protocol/ContainerSetContentPacket.php b/src/PocketMine/network/protocol/ContainerSetContentPacket.php similarity index 100% rename from src/network/protocol/ContainerSetContentPacket.php rename to src/PocketMine/network/protocol/ContainerSetContentPacket.php diff --git a/src/network/protocol/ContainerSetDataPacket.php b/src/PocketMine/network/protocol/ContainerSetDataPacket.php similarity index 100% rename from src/network/protocol/ContainerSetDataPacket.php rename to src/PocketMine/network/protocol/ContainerSetDataPacket.php diff --git a/src/network/protocol/ContainerSetSlotPacket.php b/src/PocketMine/network/protocol/ContainerSetSlotPacket.php similarity index 100% rename from src/network/protocol/ContainerSetSlotPacket.php rename to src/PocketMine/network/protocol/ContainerSetSlotPacket.php diff --git a/src/network/protocol/DataPacket.php b/src/PocketMine/network/protocol/DataPacket.php similarity index 100% rename from src/network/protocol/DataPacket.php rename to src/PocketMine/network/protocol/DataPacket.php diff --git a/src/network/protocol/DisconnectPacket.php b/src/PocketMine/network/protocol/DisconnectPacket.php similarity index 100% rename from src/network/protocol/DisconnectPacket.php rename to src/PocketMine/network/protocol/DisconnectPacket.php diff --git a/src/network/protocol/DropItemPacket.php b/src/PocketMine/network/protocol/DropItemPacket.php similarity index 100% rename from src/network/protocol/DropItemPacket.php rename to src/PocketMine/network/protocol/DropItemPacket.php diff --git a/src/network/protocol/EntityDataPacket.php b/src/PocketMine/network/protocol/EntityDataPacket.php similarity index 100% rename from src/network/protocol/EntityDataPacket.php rename to src/PocketMine/network/protocol/EntityDataPacket.php diff --git a/src/network/protocol/EntityEventPacket.php b/src/PocketMine/network/protocol/EntityEventPacket.php similarity index 100% rename from src/network/protocol/EntityEventPacket.php rename to src/PocketMine/network/protocol/EntityEventPacket.php diff --git a/src/network/protocol/ExplodePacket.php b/src/PocketMine/network/protocol/ExplodePacket.php similarity index 100% rename from src/network/protocol/ExplodePacket.php rename to src/PocketMine/network/protocol/ExplodePacket.php diff --git a/src/network/protocol/HurtArmorPacket.php b/src/PocketMine/network/protocol/HurtArmorPacket.php similarity index 100% rename from src/network/protocol/HurtArmorPacket.php rename to src/PocketMine/network/protocol/HurtArmorPacket.php diff --git a/src/network/protocol/Info.php b/src/PocketMine/network/protocol/Info.php similarity index 100% rename from src/network/protocol/Info.php rename to src/PocketMine/network/protocol/Info.php diff --git a/src/network/protocol/InteractPacket.php b/src/PocketMine/network/protocol/InteractPacket.php similarity index 100% rename from src/network/protocol/InteractPacket.php rename to src/PocketMine/network/protocol/InteractPacket.php diff --git a/src/network/protocol/LevelEventPacket.php b/src/PocketMine/network/protocol/LevelEventPacket.php similarity index 100% rename from src/network/protocol/LevelEventPacket.php rename to src/PocketMine/network/protocol/LevelEventPacket.php diff --git a/src/network/protocol/LoginPacket.php b/src/PocketMine/network/protocol/LoginPacket.php similarity index 100% rename from src/network/protocol/LoginPacket.php rename to src/PocketMine/network/protocol/LoginPacket.php diff --git a/src/network/protocol/LoginStatusPacket.php b/src/PocketMine/network/protocol/LoginStatusPacket.php similarity index 100% rename from src/network/protocol/LoginStatusPacket.php rename to src/PocketMine/network/protocol/LoginStatusPacket.php diff --git a/src/network/protocol/MessagePacket.php b/src/PocketMine/network/protocol/MessagePacket.php similarity index 100% rename from src/network/protocol/MessagePacket.php rename to src/PocketMine/network/protocol/MessagePacket.php diff --git a/src/network/protocol/MoveEntityPacket.php b/src/PocketMine/network/protocol/MoveEntityPacket.php similarity index 100% rename from src/network/protocol/MoveEntityPacket.php rename to src/PocketMine/network/protocol/MoveEntityPacket.php diff --git a/src/network/protocol/MoveEntityPacket_PosRot.php b/src/PocketMine/network/protocol/MoveEntityPacket_PosRot.php similarity index 100% rename from src/network/protocol/MoveEntityPacket_PosRot.php rename to src/PocketMine/network/protocol/MoveEntityPacket_PosRot.php diff --git a/src/network/protocol/MovePlayerPacket.php b/src/PocketMine/network/protocol/MovePlayerPacket.php similarity index 100% rename from src/network/protocol/MovePlayerPacket.php rename to src/PocketMine/network/protocol/MovePlayerPacket.php diff --git a/src/network/protocol/PingPacket.php b/src/PocketMine/network/protocol/PingPacket.php similarity index 100% rename from src/network/protocol/PingPacket.php rename to src/PocketMine/network/protocol/PingPacket.php diff --git a/src/network/protocol/PlayerActionPacket.php b/src/PocketMine/network/protocol/PlayerActionPacket.php similarity index 100% rename from src/network/protocol/PlayerActionPacket.php rename to src/PocketMine/network/protocol/PlayerActionPacket.php diff --git a/src/network/protocol/PlayerArmorEquipmentPacket.php b/src/PocketMine/network/protocol/PlayerArmorEquipmentPacket.php similarity index 100% rename from src/network/protocol/PlayerArmorEquipmentPacket.php rename to src/PocketMine/network/protocol/PlayerArmorEquipmentPacket.php diff --git a/src/network/protocol/PlayerEquipmentPacket.php b/src/PocketMine/network/protocol/PlayerEquipmentPacket.php similarity index 100% rename from src/network/protocol/PlayerEquipmentPacket.php rename to src/PocketMine/network/protocol/PlayerEquipmentPacket.php diff --git a/src/network/protocol/PongPacket.php b/src/PocketMine/network/protocol/PongPacket.php similarity index 100% rename from src/network/protocol/PongPacket.php rename to src/PocketMine/network/protocol/PongPacket.php diff --git a/src/network/protocol/ReadyPacket.php b/src/PocketMine/network/protocol/ReadyPacket.php similarity index 100% rename from src/network/protocol/ReadyPacket.php rename to src/PocketMine/network/protocol/ReadyPacket.php diff --git a/src/network/protocol/RemoveBlockPacket.php b/src/PocketMine/network/protocol/RemoveBlockPacket.php similarity index 100% rename from src/network/protocol/RemoveBlockPacket.php rename to src/PocketMine/network/protocol/RemoveBlockPacket.php diff --git a/src/network/protocol/RemoveEntityPacket.php b/src/PocketMine/network/protocol/RemoveEntityPacket.php similarity index 100% rename from src/network/protocol/RemoveEntityPacket.php rename to src/PocketMine/network/protocol/RemoveEntityPacket.php diff --git a/src/network/protocol/RemovePlayerPacket.php b/src/PocketMine/network/protocol/RemovePlayerPacket.php similarity index 100% rename from src/network/protocol/RemovePlayerPacket.php rename to src/PocketMine/network/protocol/RemovePlayerPacket.php diff --git a/src/network/protocol/RequestChunkPacket.php b/src/PocketMine/network/protocol/RequestChunkPacket.php similarity index 100% rename from src/network/protocol/RequestChunkPacket.php rename to src/PocketMine/network/protocol/RequestChunkPacket.php diff --git a/src/network/protocol/RespawnPacket.php b/src/PocketMine/network/protocol/RespawnPacket.php similarity index 100% rename from src/network/protocol/RespawnPacket.php rename to src/PocketMine/network/protocol/RespawnPacket.php diff --git a/src/network/protocol/RotateHeadPacket.php b/src/PocketMine/network/protocol/RotateHeadPacket.php similarity index 100% rename from src/network/protocol/RotateHeadPacket.php rename to src/PocketMine/network/protocol/RotateHeadPacket.php diff --git a/src/network/protocol/SendInventoryPacket.php b/src/PocketMine/network/protocol/SendInventoryPacket.php similarity index 100% rename from src/network/protocol/SendInventoryPacket.php rename to src/PocketMine/network/protocol/SendInventoryPacket.php diff --git a/src/network/protocol/ServerHandshakePacket.php b/src/PocketMine/network/protocol/ServerHandshakePacket.php similarity index 100% rename from src/network/protocol/ServerHandshakePacket.php rename to src/PocketMine/network/protocol/ServerHandshakePacket.php diff --git a/src/network/protocol/SetEntityDataPacket.php b/src/PocketMine/network/protocol/SetEntityDataPacket.php similarity index 100% rename from src/network/protocol/SetEntityDataPacket.php rename to src/PocketMine/network/protocol/SetEntityDataPacket.php diff --git a/src/network/protocol/SetEntityMotionPacket.php b/src/PocketMine/network/protocol/SetEntityMotionPacket.php similarity index 100% rename from src/network/protocol/SetEntityMotionPacket.php rename to src/PocketMine/network/protocol/SetEntityMotionPacket.php diff --git a/src/network/protocol/SetHealthPacket.php b/src/PocketMine/network/protocol/SetHealthPacket.php similarity index 100% rename from src/network/protocol/SetHealthPacket.php rename to src/PocketMine/network/protocol/SetHealthPacket.php diff --git a/src/network/protocol/SetSpawnPositionPacket.php b/src/PocketMine/network/protocol/SetSpawnPositionPacket.php similarity index 100% rename from src/network/protocol/SetSpawnPositionPacket.php rename to src/PocketMine/network/protocol/SetSpawnPositionPacket.php diff --git a/src/network/protocol/SetTimePacket.php b/src/PocketMine/network/protocol/SetTimePacket.php similarity index 100% rename from src/network/protocol/SetTimePacket.php rename to src/PocketMine/network/protocol/SetTimePacket.php diff --git a/src/network/protocol/StartGamePacket.php b/src/PocketMine/network/protocol/StartGamePacket.php similarity index 100% rename from src/network/protocol/StartGamePacket.php rename to src/PocketMine/network/protocol/StartGamePacket.php diff --git a/src/network/protocol/TakeItemEntityPacket.php b/src/PocketMine/network/protocol/TakeItemEntityPacket.php similarity index 100% rename from src/network/protocol/TakeItemEntityPacket.php rename to src/PocketMine/network/protocol/TakeItemEntityPacket.php diff --git a/src/network/protocol/TileEventPacket.php b/src/PocketMine/network/protocol/TileEventPacket.php similarity index 100% rename from src/network/protocol/TileEventPacket.php rename to src/PocketMine/network/protocol/TileEventPacket.php diff --git a/src/network/protocol/UnknownPacket.php b/src/PocketMine/network/protocol/UnknownPacket.php similarity index 100% rename from src/network/protocol/UnknownPacket.php rename to src/PocketMine/network/protocol/UnknownPacket.php diff --git a/src/network/protocol/UpdateBlockPacket.php b/src/PocketMine/network/protocol/UpdateBlockPacket.php similarity index 100% rename from src/network/protocol/UpdateBlockPacket.php rename to src/PocketMine/network/protocol/UpdateBlockPacket.php diff --git a/src/network/protocol/UseItemPacket.php b/src/PocketMine/network/protocol/UseItemPacket.php similarity index 100% rename from src/network/protocol/UseItemPacket.php rename to src/PocketMine/network/protocol/UseItemPacket.php diff --git a/src/network/query/QueryHandler.php b/src/PocketMine/network/query/QueryHandler.php similarity index 100% rename from src/network/query/QueryHandler.php rename to src/PocketMine/network/query/QueryHandler.php diff --git a/src/network/query/QueryPacket.php b/src/PocketMine/network/query/QueryPacket.php similarity index 100% rename from src/network/query/QueryPacket.php rename to src/PocketMine/network/query/QueryPacket.php diff --git a/src/network/raknet/Info.php b/src/PocketMine/network/raknet/Info.php similarity index 100% rename from src/network/raknet/Info.php rename to src/PocketMine/network/raknet/Info.php diff --git a/src/network/raknet/Packet.php b/src/PocketMine/network/raknet/Packet.php similarity index 100% rename from src/network/raknet/Packet.php rename to src/PocketMine/network/raknet/Packet.php diff --git a/src/network/rcon/RCON.php b/src/PocketMine/network/rcon/RCON.php similarity index 100% rename from src/network/rcon/RCON.php rename to src/PocketMine/network/rcon/RCON.php diff --git a/src/network/rcon/RCONInstance.php b/src/PocketMine/network/rcon/RCONInstance.php similarity index 100% rename from src/network/rcon/RCONInstance.php rename to src/PocketMine/network/rcon/RCONInstance.php diff --git a/src/network/upnp/PortForward.php b/src/PocketMine/network/upnp/PortForward.php similarity index 100% rename from src/network/upnp/PortForward.php rename to src/PocketMine/network/upnp/PortForward.php diff --git a/src/network/upnp/RemovePortForward.php b/src/PocketMine/network/upnp/RemovePortForward.php similarity index 100% rename from src/network/upnp/RemovePortForward.php rename to src/PocketMine/network/upnp/RemovePortForward.php diff --git a/src/pmf/LevelFormat.php b/src/PocketMine/pmf/LevelFormat.php similarity index 74% rename from src/pmf/LevelFormat.php rename to src/PocketMine/pmf/LevelFormat.php index aee710596..be43c0eed 100644 --- a/src/pmf/LevelFormat.php +++ b/src/PocketMine/pmf/LevelFormat.php @@ -86,47 +86,40 @@ class LevelFormat extends PMF{ } } } - + public function saveData(){ - $this->levelData["version"] = PMFLevel::VERSION; + $this->levelData["version"] = self::VERSION; @ftruncate($this->fp, 5); $this->seek(5); $this->write(chr($this->levelData["version"])); - $this->write(Utils::writeShort(strlen($this->levelData["name"])).$this->levelData["name"]); + $this->write(Utils::writeShort(strlen($this->levelData["name"])) . $this->levelData["name"]); $this->write(Utils::writeInt($this->levelData["seed"])); $this->write(Utils::writeInt($this->levelData["time"])); $this->write(Utils::writeFloat($this->levelData["spawnX"])); $this->write(Utils::writeFloat($this->levelData["spawnY"])); $this->write(Utils::writeFloat($this->levelData["spawnZ"])); $this->write(chr($this->levelData["height"])); - $this->write(Utils::writeShort(strlen($this->levelData["generator"])).$this->levelData["generator"]); + $this->write(Utils::writeShort(strlen($this->levelData["generator"])) . $this->levelData["generator"]); $settings = serialize($this->levelData["generatorSettings"]); - $this->write(Utils::writeShort(strlen($settings)).$settings); - $extra = gzdeflate($this->levelData["extra"], PMFLevel::DEFLATE_LEVEL); - $this->write(Utils::writeShort(strlen($extra)).$extra); + $this->write(Utils::writeShort(strlen($settings)) . $settings); + $extra = zlib_encode($this->levelData["extra"], self::ZLIB_ENCODING, self::ZLIB_LEVEL); + $this->write(Utils::writeShort(strlen($extra)) . $extra); } - + private function createBlank(){ $this->saveData(); - @mkdir(dirname($this->file)."/chunks/", 0755); - if(!file_exists(dirname($this->file)."/entities.yml")){ - $entities = new Config(dirname($this->file)."/entities.yml", CONFIG_YAML); - $entities->save(); - } - if(!file_exists(dirname($this->file)."/tiles.yml")){ - $tiles = new Config(dirname($this->file)."/tiles.yml", CONFIG_YAML); - $tiles->save(); - } + @mkdir(dirname($this->file) . "/chunks/", 0755); } - + protected function parseLevel(){ if($this->getType() !== 0x00){ return false; } $this->seek(5); $this->levelData["version"] = ord($this->read(1)); - if($this->levelData["version"] > PMFLevel::VERSION){ - console("[ERROR] New unsupported PMF Level format version #".$this->levelData["version"].", current version is #".PMFLevel::VERSION); + if($this->levelData["version"] > self::VERSION){ + console("[ERROR] New unsupported PMF Level format version #" . $this->levelData["version"] . ", current version is #" . self::VERSION); + return false; } $this->levelData["name"] = $this->read(Utils::readShort($this->read(2), false)); @@ -138,22 +131,32 @@ class LevelFormat extends PMF{ if($this->levelData["version"] === 0){ $this->read(1); $this->levelData["height"] = ord($this->read(1)); - }else{ + } else{ $this->levelData["height"] = ord($this->read(1)); if($this->levelData["height"] !== 8){ return false; } $this->levelData["generator"] = $this->read(Utils::readShort($this->read(2), false)); $this->levelData["generatorSettings"] = unserialize($this->read(Utils::readShort($this->read(2), false))); - - } - $this->levelData["extra"] = @gzinflate($this->read(Utils::readShort($this->read(2), false))); + } + $this->levelData["extra"] = @zlib_decode($this->read(Utils::readShort($this->read(2), false))); + + $upgrade = false; if($this->levelData["version"] === 0){ $this->upgrade_From0_To1(); + $upgrade = true; + } + if($this->levelData["version"] === 1){ + $this->upgrade_From1_To2(); + $upgrade = true; + } + + if($upgrade === true){ + $this->saveData(); } } - + private function upgrade_From0_To1(){ console("[NOTICE] Old PMF Level format version #0 detected, upgrading to version #1"); for($index = 0; $index < 256; ++$index){ @@ -161,11 +164,11 @@ class LevelFormat extends PMF{ $Z = $index >> 4; $bitflags = Utils::readShort($this->read(2)); - $oldPath = dirname($this->file)."/chunks/".$Z.".".$X.".pmc"; + $oldPath = dirname($this->file) . "/chunks/" . $Z . "." . $X . ".pmc"; $chunkOld = gzopen($oldPath, "rb"); - $newPath = dirname($this->file)."/chunks/".(($X ^ $Z) & 0xff)."/".$Z.".".$X.".pmc"; + $newPath = dirname($this->file) . "/chunks/" . (($X ^ $Z) & 0xff) . "/" . $Z . "." . $X . ".pmc"; @mkdir(dirname($newPath)); - $chunkNew = gzopen($newPath, "wb".PMFLevel::DEFLATE_LEVEL); + $chunkNew = gzopen($newPath, "wb1"); gzwrite($chunkNew, chr($bitflags) . "\x00\x00\x00\x01"); while(gzeof($chunkOld) === false){ gzwrite($chunkNew, gzread($chunkOld, 65535)); @@ -204,18 +207,18 @@ class LevelFormat extends PMF{ public static function getIndex($X, $Z){ return ($Z << 16) | ($X < 0 ? (~--$X & 0x7fff) | 0x8000 : $X & 0x7fff); } - + public static function getXZ($index, &$X = null, &$Z = null){ $Z = $index >> 16; $X = ($index & 0x8000) === 0x8000 ? -($index & 0x7fff) : $index & 0x7fff; return array($X, $Z); } - + private function getChunkPath($X, $Z){ - return dirname($this->file)."/chunks/".(((int) $X ^ (int) $Z) & 0xff)."/".$Z.".".$X.".pmc"; + return dirname($this->file) . "/chunks/" . (((int) $X ^ (int) $Z) & 0xff) . "/" . $Z . "." . $X . ".pmc"; } - + public function generateChunk($X, $Z){ $path = $this->getChunkPath($X, $Z); if(!file_exists(dirname($path))){ @@ -233,29 +236,31 @@ class LevelFormat extends PMF{ $this->populateChunk($X + 1, $Z - 1); $this->populateChunk($X - 1, $Z - 1); $this->populateChunk($X - 1, $Z + 1); + return $ret; } } - + public function populateChunk($X, $Z){ if($this->level instanceof Level){ if($this->isGenerating === 0 and - $this->isChunkLoaded($X, $Z) and - !$this->isPopulated($X, $Z) and - $this->isGenerated($X - 1, $Z) and - $this->isGenerated($X, $Z - 1) and - $this->isGenerated($X + 1, $Z) and - $this->isGenerated($X, $Z + 1) and - $this->isGenerated($X + 1, $Z + 1) and - $this->isGenerated($X - 1, $Z - 1) and - $this->isGenerated($X + 1, $Z - 1) and - $this->isGenerated($X - 1, $Z + 1)){ + $this->isChunkLoaded($X, $Z) and + !$this->isPopulated($X, $Z) and + $this->isGenerated($X - 1, $Z) and + $this->isGenerated($X, $Z - 1) and + $this->isGenerated($X + 1, $Z) and + $this->isGenerated($X, $Z + 1) and + $this->isGenerated($X + 1, $Z + 1) and + $this->isGenerated($X - 1, $Z - 1) and + $this->isGenerated($X + 1, $Z - 1) and + $this->isGenerated($X - 1, $Z + 1) + ){ $this->level->populateChunk($X, $Z); $this->saveChunk($X, $Z); } } } - + public function loadChunk($X, $Z){ if($this->isChunkLoaded($X, $Z)){ return true; @@ -267,45 +272,59 @@ class LevelFormat extends PMF{ return false; } if($this->isGenerating === 0){ - $this->populateChunk($X, $Z); + $this->populateChunk($X, $Z); } + return true; } - - $chunk = @gzopen($path, "rb"); + + $chunk = file_get_contents($path); if($chunk === false){ return false; } + $chunk = zlib_decode($chunk); + $offset = 0; + $this->chunkInfo[$index] = array( - 0 => ord(gzread($chunk, 1)), - 1 => Utils::readInt(gzread($chunk, 4)), + 0 => ord($chunk{0}), + 1 => Utils::readInt(substr($chunk, 1, 4)), ); + $offset += 5; + $len = Utils::readInt(substr($chunk, $offset, 4)); + $offset += 4; + $nbt = new NBT(NBT::BIG_ENDIAN); + $nbt->read(substr($chunk, $offset, $len)); + $this->chunkInfo[$index][2] = $nbt; + $offset += $len; $this->chunks[$index] = array(); $this->chunkChange[$index] = array(-1 => false); + $this->chunkInfo[$index][3] = substr($chunk, $offset, 256); //Biome data + $offset += 256; for($Y = 0; $Y < 8; ++$Y){ if(($this->chunkInfo[$index][0] & (1 << $Y)) !== 0){ // 4096 + 2048 + 2048, Block Data, Meta, Light - if(strlen($this->chunks[$index][$Y] = gzread($chunk, 8192)) < 8192){ + if(strlen($this->chunks[$index][$Y] = substr($chunk, $offset, 8192)) < 8192){ console("[NOTICE] Empty corrupt chunk detected [$X,$Z,:$Y], recovering contents", true, true, 2); $this->fillMiniChunk($X, $Z, $Y); } - }else{ + $offset += 8192; + } else{ $this->chunks[$index][$Y] = false; } } - @gzclose($chunk); if($this->isGenerating === 0 and !$this->isPopulated($X, $Z)){ $this->populateChunk($X, $Z); } + return true; } - + public function unloadChunk($X, $Z, $save = true){ $X = (int) $X; $Z = (int) $Z; if(!$this->isChunkLoaded($X, $Z)){ return false; - }elseif($save !== false){ + } elseif($save !== false){ $this->saveChunk($X, $Z); } $index = self::getIndex($X, $Z); @@ -313,27 +332,40 @@ class LevelFormat extends PMF{ $this->chunkChange[$index] = null; $this->chunkInfo[$index] = null; unset($this->chunks[$index], $this->chunkChange[$index], $this->chunkInfo[$index]); + return true; } - + public function isChunkLoaded($X, $Z){ $index = self::getIndex($X, $Z); if(!isset($this->chunks[$index])){ return false; } + return true; } - - public function isMiniChunkEmpty($X, $Z, $Y){ + + protected function cleanChunk($X, $Z){ $index = self::getIndex($X, $Z); - if(isset($this->chunks[$index]) and $this->chunks[$index][$Y] !== false){ - if(substr_count($this->chunks[$index][$Y], "\x00") < 8192){ - return false; + if(isset($this->chunks[$index])){ + for($Y = 0; $Y < 8; ++$Y){ + if($this->chunks[$index][$Y] !== false and substr_count($this->chunks[$index][$Y], "\x00") === 8192){ + $this->chunks[$index][$Y] = false; + $this->chunkInfo[$index][0] &= ~(1 << $Y); + } } } - return true; } - + + public function isMiniChunkEmpty($X, $Z, $Y){ + $index = self::getIndex($X, $Z); + if(!isset($this->chunks[$index]) or $this->chunks[$index][$Y] === false){ + return true; + } + + return false; + } + protected function fillMiniChunk($X, $Z, $Y){ if($this->isChunkLoaded($X, $Z) === false){ return false; @@ -343,9 +375,10 @@ class LevelFormat extends PMF{ $this->chunkChange[$index][-1] = true; $this->chunkChange[$index][$Y] = 8192; $this->chunkInfo[$index][0] |= 1 << $Y; + return true; } - + public function getMiniChunk($X, $Z, $Y){ if($this->isChunkLoaded($X, $Z) === false and $this->loadChunk($X, $Z) === false){ return str_repeat("\x00", 8192); @@ -354,9 +387,10 @@ class LevelFormat extends PMF{ if(!isset($this->chunks[$index][$Y]) or $this->chunks[$index][$Y] === false){ return str_repeat("\x00", 8192); } + return $this->chunks[$index][$Y]; } - + public function initCleanChunk($X, $Z){ $index = self::getIndex($X, $Z); if(!isset($this->chunks[$index])){ @@ -368,7 +402,7 @@ class LevelFormat extends PMF{ 4 => false, 5 => false, 6 => false, - 7 => false, + 7 => false, ); $this->chunkChange[$index] = array( -1 => true, @@ -381,17 +415,26 @@ class LevelFormat extends PMF{ 6 => 8192, 7 => 8192, ); + $nbt = new NBT(NBT::BIG_ENDIAN); + $nbt->setData(new Compound("", array( + "Entities" => new Enum("Entities", array()), + "TileEntities" => new Enum("TileEntities", array()) + ))); + $nbt->Entities->setTagType(NBT::TAG_Compound); + $nbt->TileEntities->setTagType(NBT::TAG_Compound); $this->chunkInfo[$index] = array( 0 => 0, 1 => 0, + 2 => $nbt, + 3 => str_repeat("\x00", 256), ); } } - + public function setMiniChunk($X, $Z, $Y, $data){ if($this->isGenerating > 0){ $this->initCleanChunk($X, $Z); - }elseif($this->isChunkLoaded($X, $Z) === false){ + } elseif($this->isChunkLoaded($X, $Z) === false){ $this->loadChunk($X, $Z); } if(strlen($data) !== 8192){ @@ -402,9 +445,10 @@ class LevelFormat extends PMF{ $this->chunkChange[$index][-1] = true; $this->chunkChange[$index][$Y] = 8192; $this->chunkInfo[$index][0] |= 1 << $Y; + return true; } - + public function getBlockID($x, $y, $z){ if($y > 127 or $y < 0){ return 0; @@ -420,9 +464,38 @@ class LevelFormat extends PMF{ $aZ = $z - ($Z << 4); $aY = $y - ($Y << 4); $b = ord($this->chunks[$index][$Y]{(int) ($aY + ($aX << 5) + ($aZ << 9))}); - return $b; + + return $b; } - + + + public function getBiome($x, $z){ + $X = $x >> 4; + $Z = $z >> 4; + $index = self::getIndex($X, $Z); + if(!isset($this->chunks[$index])){ + return 0; + } + $aX = $x - ($X << 4); + $aZ = $z - ($Z << 4); + + return ord($this->chunkInfo[$index][3]{$aX + ($aZ << 4)}); + } + + public function setBiome($x, $z, $biome){ + $X = $x >> 4; + $Z = $z >> 4; + $index = self::getIndex($X, $Z); + if(!isset($this->chunks[$index])){ + return false; + } + $aX = $x - ($X << 4); + $aZ = $z - ($Z << 4); + $this->chunkInfo[$index][3]{$aX + ($aZ << 4)} = chr((int) $biome); + + return true; + } + public function setBlockID($x, $y, $z, $block){ if($y > 127 or $y < 0){ return false; @@ -441,13 +514,14 @@ class LevelFormat extends PMF{ $this->chunks[$index][$Y]{(int) ($aY + ($aX << 5) + ($aZ << 9))} = chr($block); if(!isset($this->chunkChange[$index][$Y])){ $this->chunkChange[$index][$Y] = 1; - }else{ + } else{ ++$this->chunkChange[$index][$Y]; } $this->chunkChange[$index][-1] = true; + return true; } - + public function getBlockDamage($x, $y, $z){ if($y > 127 or $y < 0){ return 0; @@ -465,12 +539,13 @@ class LevelFormat extends PMF{ $m = ord($this->chunks[$index][$Y]{(int) (($aY >> 1) + 16 + ($aX << 5) + ($aZ << 9))}); if(($y & 1) === 0){ $m = $m & 0x0F; - }else{ + } else{ $m = $m >> 4; } - return $m; + + return $m; } - + public function setBlockDamage($x, $y, $z, $damage){ if($y > 127 or $y < 0){ return false; @@ -490,7 +565,7 @@ class LevelFormat extends PMF{ $old_m = ord($this->chunks[$index][$Y]{$mindex}); if(($y & 1) === 0){ $m = ($old_m & 0xF0) | $damage; - }else{ + } else{ $m = ($damage << 4) | ($old_m & 0x0F); } @@ -498,12 +573,14 @@ class LevelFormat extends PMF{ $this->chunks[$index][$Y]{$mindex} = chr($m); if(!isset($this->chunkChange[$index][$Y])){ $this->chunkChange[$index][$Y] = 1; - }else{ + } else{ ++$this->chunkChange[$index][$Y]; } $this->chunkChange[$index][-1] = true; + return true; } + return false; } @@ -512,13 +589,13 @@ class LevelFormat extends PMF{ $Z = $z >> 4; $Y = $y >> 4; if($y < 0 or $y > 127){ - return array(AIR, 0); + return array(0, 0); } $index = self::getIndex($X, $Z); if(!isset($this->chunks[$index]) and $this->loadChunk($X, $Z) === false){ - return array(AIR, 0); - }elseif($this->chunks[$index][$Y] === false){ - return array(AIR, 0); + return array(0, 0); + } elseif($this->chunks[$index][$Y] === false){ + return array(0, 0); } $aX = $x - ($X << 4); $aZ = $z - ($Z << 4); @@ -527,12 +604,13 @@ class LevelFormat extends PMF{ $m = ord($this->chunks[$index][$Y]{(int) (($aY >> 1) + 16 + ($aX << 5) + ($aZ << 9))}); if(($y & 1) === 0){ $m = $m & 0x0F; - }else{ + } else{ $m = $m >> 4; } - return array($b, $m); + + return array($b, $m); } - + public function setBlock($x, $y, $z, $block, $meta = 0){ if($y > 127 or $y < 0){ return false; @@ -545,7 +623,7 @@ class LevelFormat extends PMF{ $index = self::getIndex($X, $Z); if(!isset($this->chunks[$index]) and $this->loadChunk($X, $Z) === false){ return false; - }elseif($this->chunks[$index][$Y] === false){ + } elseif($this->chunks[$index][$Y] === false){ $this->fillMiniChunk($X, $Z, $Y); } $aX = $x - ($X << 4); @@ -557,7 +635,7 @@ class LevelFormat extends PMF{ $old_m = ord($this->chunks[$index][$Y]{$mindex}); if(($y & 1) === 0){ $m = ($old_m & 0xF0) | $meta; - }else{ + } else{ $m = ($meta << 4) | ($old_m & 0x0F); } @@ -566,54 +644,78 @@ class LevelFormat extends PMF{ $this->chunks[$index][$Y]{$mindex} = chr($m); if(!isset($this->chunkChange[$index][$Y])){ $this->chunkChange[$index][$Y] = 1; - }else{ + } else{ ++$this->chunkChange[$index][$Y]; } $this->chunkChange[$index][-1] = true; + return true; } + return false; } - - public function saveChunk($X, $Z){ + + public function getChunkNBT($X, $Z){ + if(!$this->isChunkLoaded($X, $Z) and $this->loadChunk($X, $Z) === false){ + return false; + } + $index = self::getIndex($X, $Z); + + return $this->chunkInfo[$index][2]; + } + + public function setChunkNBT($X, $Z, NBT $nbt){ + if(!$this->isChunkLoaded($X, $Z) and $this->loadChunk($X, $Z) === false){ + return false; + } + $index = self::getIndex($X, $Z); + $this->chunkChange[$index][-1] = true; + $this->chunkInfo[$index][2] = $nbt; + } + + public function saveChunk($X, $Z, $force = false){ $X = (int) $X; $Z = (int) $Z; if(!$this->isChunkLoaded($X, $Z)){ return false; } $index = self::getIndex($X, $Z); - if(!isset($this->chunkChange[$index]) or $this->chunkChange[$index][-1] === false){//No changes in chunk + if($force !== true and (!isset($this->chunkChange[$index]) or $this->chunkChange[$index][-1] === false)){ //No changes in chunk return true; } - + $path = $this->getChunkPath($X, $Z); if(!file_exists(dirname($path))){ @mkdir(dirname($path), 0755); } $bitmap = 0; + $this->cleanChunk($X, $Z); for($Y = 0; $Y < 8; ++$Y){ if($this->chunks[$index][$Y] !== false and ((isset($this->chunkChange[$index][$Y]) and $this->chunkChange[$index][$Y] === 0) or !$this->isMiniChunkEmpty($X, $Z, $Y))){ $bitmap |= 1 << $Y; - }else{ + } else{ $this->chunks[$index][$Y] = false; } $this->chunkChange[$index][$Y] = 0; } - $chunk = @gzopen($path, "wb".PMFLevel::DEFLATE_LEVEL); - gzwrite($chunk, chr($bitmap)); - gzwrite($chunk, Utils::writeInt($this->chunkInfo[$index][1])); + $this->chunkInfo[$index][0] = $bitmap; + $this->chunkChange[$index][-1] = false; + $chunk = b""; + $chunk .= chr($bitmap); + $chunk .= Utils::writeInt($this->chunkInfo[$index][1]); + $namedtag = $this->chunkInfo[$index][2]->write(); + $chunk .= Utils::writeInt(strlen($namedtag)) . $namedtag; + $chunk .= $this->chunkInfo[$index][3]; //biomes for($Y = 0; $Y < 8; ++$Y){ $t = 1 << $Y; if(($bitmap & $t) === $t){ - gzwrite($chunk, $this->chunks[$index][$Y]); + $chunk .= $this->chunks[$index][$Y]; } } - gzclose($chunk); - $this->chunkChange[$index][-1] = false; - $this->chunkInfo[$index][0] = $bitmap; + file_put_contents($path, zlib_encode($chunk, self::ZLIB_ENCODING, self::ZLIB_LEVEL)); return true; } - + public function setPopulated($X, $Z){ if(!$this->isChunkLoaded($X, $Z)){ return false; @@ -621,32 +723,33 @@ class LevelFormat extends PMF{ $index = self::getIndex($X, $Z); $this->chunkInfo[$index][1] |= 0b00000000000000000000000000000001; } - - public function unsetPopulated($X, $Z){ + + public function unsetPopulated($X, $Z){ if(!$this->isChunkLoaded($X, $Z)){ return false; } $index = self::getIndex($X, $Z); $this->chunkInfo[$index][1] &= ~0b00000000000000000000000000000001; } - + public function isPopulated($X, $Z){ if(!$this->isChunkLoaded($X, $Z)){ return false; } $index = self::getIndex($X, $Z); + return ($this->chunkInfo[$index][1] & 0b00000000000000000000000000000001) > 0; } - + public function isGenerated($X, $Z){ return file_exists($this->getChunkPath($X, $Z)); } - - public function doSaveRound(){ + + public function doSaveRound($force = false){ foreach($this->chunks as $index => $chunk){ self::getXZ($index, $X, $Z); - $this->saveChunk($X, $Z); + $this->saveChunk($X, $Z, $force); } } -} +} \ No newline at end of file diff --git a/src/pmf/PMF.php b/src/PocketMine/pmf/PMF.php similarity index 100% rename from src/pmf/PMF.php rename to src/PocketMine/pmf/PMF.php diff --git a/src/pmf/Plugin.php b/src/PocketMine/pmf/Plugin.php similarity index 100% rename from src/pmf/Plugin.php rename to src/PocketMine/pmf/Plugin.php diff --git a/src/recipes/Crafting.php b/src/PocketMine/recipes/Crafting.php similarity index 100% rename from src/recipes/Crafting.php rename to src/PocketMine/recipes/Crafting.php diff --git a/src/recipes/Fuel.php b/src/PocketMine/recipes/Fuel.php similarity index 100% rename from src/recipes/Fuel.php rename to src/PocketMine/recipes/Fuel.php diff --git a/src/recipes/Smelt.php b/src/PocketMine/recipes/Smelt.php similarity index 100% rename from src/recipes/Smelt.php rename to src/PocketMine/recipes/Smelt.php diff --git a/src/tests/ServerSuiteTest.php b/src/PocketMine/tests/ServerSuiteTest.php similarity index 100% rename from src/tests/ServerSuiteTest.php rename to src/PocketMine/tests/ServerSuiteTest.php diff --git a/src/tile/Chest.php b/src/PocketMine/tile/Chest.php similarity index 100% rename from src/tile/Chest.php rename to src/PocketMine/tile/Chest.php diff --git a/src/tile/Container.php b/src/PocketMine/tile/Container.php similarity index 100% rename from src/tile/Container.php rename to src/PocketMine/tile/Container.php diff --git a/src/tile/Furnace.php b/src/PocketMine/tile/Furnace.php similarity index 100% rename from src/tile/Furnace.php rename to src/PocketMine/tile/Furnace.php diff --git a/src/tile/Sign.php b/src/PocketMine/tile/Sign.php similarity index 100% rename from src/tile/Sign.php rename to src/PocketMine/tile/Sign.php diff --git a/src/tile/Spawnable.php b/src/PocketMine/tile/Spawnable.php similarity index 100% rename from src/tile/Spawnable.php rename to src/PocketMine/tile/Spawnable.php diff --git a/src/tile/Tile.php b/src/PocketMine/tile/Tile.php similarity index 100% rename from src/tile/Tile.php rename to src/PocketMine/tile/Tile.php diff --git a/src/utils/Cache.php b/src/PocketMine/utils/Cache.php similarity index 100% rename from src/utils/Cache.php rename to src/PocketMine/utils/Cache.php diff --git a/src/utils/Config.php b/src/PocketMine/utils/Config.php similarity index 100% rename from src/utils/Config.php rename to src/PocketMine/utils/Config.php diff --git a/src/utils/Random.php b/src/PocketMine/utils/Random.php similarity index 100% rename from src/utils/Random.php rename to src/PocketMine/utils/Random.php diff --git a/src/utils/TextFormat.php b/src/PocketMine/utils/TextFormat.php similarity index 100% rename from src/utils/TextFormat.php rename to src/PocketMine/utils/TextFormat.php diff --git a/src/utils/Utils.php b/src/PocketMine/utils/Utils.php similarity index 100% rename from src/utils/Utils.php rename to src/PocketMine/utils/Utils.php diff --git a/src/utils/VersionString.php b/src/PocketMine/utils/VersionString.php similarity index 100% rename from src/utils/VersionString.php rename to src/PocketMine/utils/VersionString.php diff --git a/src/wizard/Installer.php b/src/PocketMine/wizard/Installer.php similarity index 100% rename from src/wizard/Installer.php rename to src/PocketMine/wizard/Installer.php diff --git a/src/wizard/InstallerLang.php b/src/PocketMine/wizard/InstallerLang.php similarity index 100% rename from src/wizard/InstallerLang.php rename to src/PocketMine/wizard/InstallerLang.php diff --git a/src/utils/pthreads.php b/src/pthreads.php similarity index 100% rename from src/utils/pthreads.php rename to src/pthreads.php diff --git a/start.cmd b/start.cmd index b0735d956..0dc2112b8 100644 --- a/start.cmd +++ b/start.cmd @@ -2,16 +2,25 @@ TITLE PocketMine-MP server software for Minecraft: Pocket Edition cd /d %~dp0 if exist bin\php\php.exe ( - if exist bin\mintty.exe ( - start "" bin\mintty.exe -o Columns=88 -o Rows=32 -o AllowBlinking=0 -o FontQuality=3 -o Font="DejaVu Sans Mono" -o FontHeight=10 -o CursorType=0 -o CursorBlinks=1 -h error -t "PocketMine-MP" -i bin/pocketmine.ico -w max bin\php\php.exe -d enable_dl=On PocketMine-MP.php --enable-ansi %* - ) else ( - bin\php\php.exe -d enable_dl=On PocketMine-MP.php %* - ) + set PHP_BINARY=bin\php\php.exe ) else ( - if exist bin\mintty.exe ( - start "" bin\mintty.exe -o Columns=88 -o Rows=32 -o AllowBlinking=0 -o FontQuality=3 -o Font="DejaVu Sans Mono" -o FontHeight=10 -o CursorType=0 -o CursorBlinks=1 -h error -t "PocketMine-MP" -i bin/pocketmine.ico -w max php -d enable_dl=On PocketMine-MP.php --enable-ansi %* + set PHP_BINARY=php +) + +if exist src\PocketMine\PocketMine.php ( + set POCKETMINE_FILE=src\PocketMine\PocketMine.php +) else ( + if exist PocketMine-MP.phar ( + set POCKETMINE_FILE=PocketMine-MP.phar ) else ( - php -d enable_dl=On PocketMine-MP.php %* + echo "Couldn't find a valid PocketMine-MP installation" + pause + exit 1 ) ) +if exist bin\mintty.exe ( + start "" bin\mintty.exe -o Columns=88 -o Rows=32 -o AllowBlinking=0 -o FontQuality=3 -o Font="DejaVu Sans Mono" -o FontHeight=10 -o CursorType=0 -o CursorBlinks=1 -h error -t "PocketMine-MP" -i bin/pocketmine.ico -w max %PHP_BINARY% -d enable_dl=On %POCKETMINE_FILE% --enable-ansi %* +) else ( + %PHP_BINARY% -d enable_dl=On %POCKETMINE_FILE% %* +) diff --git a/start.sh b/start.sh index 0192764bd..f9485cb34 100755 --- a/start.sh +++ b/start.sh @@ -1,8 +1,61 @@ #!/bin/bash DIR="$(cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd)" cd "$DIR" -if [ -f ./bin/php5/bin/php ]; then - exec ./bin/php5/bin/php -d enable_dl=On PocketMine-MP.php $@ -else - exec php -d enable_dl=On PocketMine-MP.php $@ + +DO_LOOP="no" + +while getopts "p:f:l" OPTION; do + case $OPTION in + p) + PHP_BINARY="$OPTARG" + ;; + f) + POCKETMINE_FILE="$OPTARG" + ;; + l) + DO_LOOP="yes" + ;; + \?) + echo "Invalid option: -$OPTION$OPTARG" >&2 + exit 1 + ;; + esac +done + +if [ "$PHP_BINARY" == "" ]; then + if [ -f ./bin/php5/bin/php ]; then + PHP_BINARY="./bin/php5/bin/php" + elif [ type php 2>/dev/null ]; then + PHP_BINARY=$(type -p php) + else + echo "Couldn't find a working PHP binary, please use the installer." + exit 1 + fi +fi + +if [ "$POCKETMINE_FILE" == "" ]; then + if [ -f ./src/PocketMine/PocketMine.php ]; then + POCKETMINE_FILE="./src/PocketMine/PocketMine.php" + elif [ -f ./PocketMine-MP.phar ]; then + POCKETMINE_FILE="./PocketMine-MP.phar" + else + echo "Couldn't find a valid PocketMine-MP installation" + exit 1 + fi +fi + +LOOPS=0 + +set +e +while [ "$LOOPS" -eq 0 ] || [ "$DO_LOOP" == "yes" ]; do + if [ "$DO_LOOP" == "yes" ]; then + "$PHP_BINARY" -d enable_dl=On "$POCKETMINE_FILE" $@ + else + exec "$PHP_BINARY" -d enable_dl=On "$POCKETMINE_FILE" $@ + fi + ((LOOPS++)) +done + +if [ ${LOOPS} -gt 1 ]; then + echo "Restarted $LOOPS times" fi \ No newline at end of file