From 358fea9645eb24fb7d120ede8b33f6dac2ed85bd Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 5 Aug 2019 17:20:48 +0100 Subject: [PATCH] Move Location to Entity namespace --- changelogs/4.0-snapshot.md | 1 + src/entity/Entity.php | 2 +- src/{world => entity}/Location.php | 4 +++- src/event/player/PlayerMoveEvent.php | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) rename src/{world => entity}/Location.php (96%) diff --git a/changelogs/4.0-snapshot.md b/changelogs/4.0-snapshot.md index 5fed11267..f7bd51f92 100644 --- a/changelogs/4.0-snapshot.md +++ b/changelogs/4.0-snapshot.md @@ -692,6 +692,7 @@ This version features substantial changes to the network system, improving coher - `ChunkLoader->onChunkLoaded()` -> `ChunkListener->onChunkLoaded()` - `ChunkLoader->onChunkPopulated()` -> `ChunkListener->onChunkPopulated()` - `ChunkLoader->onChunkUnloaded()` -> `ChunkListener->onChunkUnloaded()` +- `Location` has been moved to `pocketmine\entity\Location`. #### Particles - `pocketmine\world\particle\Particle` no longer extends `pocketmine\math\Vector3`, and has been converted to an interface. diff --git a/src/entity/Entity.php b/src/entity/Entity.php index 804500b67..757408644 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -59,7 +59,7 @@ use pocketmine\Server; use pocketmine\timings\Timings; use pocketmine\timings\TimingsHandler; use pocketmine\world\format\Chunk; -use pocketmine\world\Location; +use pocketmine\entity\Location; use pocketmine\world\Position; use pocketmine\world\World; use function abs; diff --git a/src/world/Location.php b/src/entity/Location.php similarity index 96% rename from src/world/Location.php rename to src/entity/Location.php index 96349af86..c9e8703b8 100644 --- a/src/world/Location.php +++ b/src/entity/Location.php @@ -21,9 +21,11 @@ declare(strict_types=1); -namespace pocketmine\world; +namespace pocketmine\entity; use pocketmine\math\Vector3; +use pocketmine\world\Position; +use pocketmine\world\World; class Location extends Position{ diff --git a/src/event/player/PlayerMoveEvent.php b/src/event/player/PlayerMoveEvent.php index 7678eed05..86e152a51 100644 --- a/src/event/player/PlayerMoveEvent.php +++ b/src/event/player/PlayerMoveEvent.php @@ -26,7 +26,7 @@ namespace pocketmine\event\player; use pocketmine\event\Cancellable; use pocketmine\event\CancellableTrait; use pocketmine\player\Player; -use pocketmine\world\Location; +use pocketmine\entity\Location; class PlayerMoveEvent extends PlayerEvent implements Cancellable{ use CancellableTrait;