diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 6dbb4ebea..3c44f8a62 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -3677,19 +3677,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ return false; } - /** - * @deprecated This functionality is now performed in {@link Player#teleport}. - * - * @param Vector3 $pos - * @param float|null $yaw - * @param float|null $pitch - * - * @return bool - */ - public function teleportImmediate(Vector3 $pos, float $yaw = null, float $pitch = null) : bool{ - return $this->teleport($pos, $yaw, $pitch); - } - protected function addDefaultWindows(){ $this->addWindow($this->getInventory(), ContainerIds::INVENTORY, true); diff --git a/src/pocketmine/Server.php b/src/pocketmine/Server.php index 1b5d11772..fd09c6c82 100644 --- a/src/pocketmine/Server.php +++ b/src/pocketmine/Server.php @@ -519,16 +519,6 @@ class Server{ return -1; } - /** - * @deprecated Moved to {@link Level#getDifficultyFromString} - * - * @param string $str - * @return int - */ - public static function getDifficultyFromString(string $str) : int{ - return Level::getDifficultyFromString($str); - } - /** * Returns Server global difficulty. Note that this may be overridden in individual Levels. * @return int @@ -1252,18 +1242,6 @@ class Server{ return false; } - /** - * @deprecated - * - * @param string $variable - * @param bool $defaultValue - * - * @return bool - */ - public function getConfigBoolean(string $variable, bool $defaultValue = false) : bool{ - return $this->getConfigBool($variable, $defaultValue); - } - /** * @param string $variable * @param bool $value diff --git a/src/pocketmine/block/Block.php b/src/pocketmine/block/Block.php index d910015e6..8c9b30339 100644 --- a/src/pocketmine/block/Block.php +++ b/src/pocketmine/block/Block.php @@ -319,14 +319,6 @@ class Block extends Position implements BlockIds, Metadatable{ return 10; } - /** - * @deprecated - * @return float - */ - public function getResistance() : float{ - return $this->getBlastResistance(); - } - /** * Returns the block's resistance to explosions. Usually 5x hardness. * @return float diff --git a/src/pocketmine/event/entity/EntityTeleportEvent.php b/src/pocketmine/event/entity/EntityTeleportEvent.php index 0eddfd0c8..0c57d4327 100644 --- a/src/pocketmine/event/entity/EntityTeleportEvent.php +++ b/src/pocketmine/event/entity/EntityTeleportEvent.php @@ -48,14 +48,6 @@ class EntityTeleportEvent extends EntityEvent implements Cancellable{ return $this->from; } - /** - * @deprecated This method has no effect or use. - * @param Position $from - */ - public function setFrom(Position $from){ - $this->from = $from; - } - /** * @return Position */ diff --git a/src/pocketmine/event/inventory/CraftItemEvent.php b/src/pocketmine/event/inventory/CraftItemEvent.php index 170287cde..bac5f4a13 100644 --- a/src/pocketmine/event/inventory/CraftItemEvent.php +++ b/src/pocketmine/event/inventory/CraftItemEvent.php @@ -47,18 +47,6 @@ class CraftItemEvent extends Event implements Cancellable{ return $this->transaction; } - /** - * @deprecated This returns a one-dimensional array of ingredients and does not account for the positioning of - * items in the crafting grid. Prefer getting the input map from the transaction instead. - * - * @return Item[] - */ - public function getInput() : array{ - return array_map(function(Item $item) : Item{ - return clone $item; - }, array_merge(...$this->transaction->getInputMap())); - } - /** * @return Recipe */ diff --git a/src/pocketmine/event/player/PlayerAnimationEvent.php b/src/pocketmine/event/player/PlayerAnimationEvent.php index 4ddf132eb..5c58a9db4 100644 --- a/src/pocketmine/event/player/PlayerAnimationEvent.php +++ b/src/pocketmine/event/player/PlayerAnimationEvent.php @@ -32,12 +32,6 @@ use pocketmine\Player; class PlayerAnimationEvent extends PlayerEvent implements Cancellable{ public static $handlerList = null; - /** - * @deprecated This is dependent on the protocol and should not be here. - * Use the constants in {@link pocketmine\network\mcpe\protocol\AnimatePacket} instead. - */ - public const ARM_SWING = 1; - /** @var int */ private $animationType; diff --git a/src/pocketmine/event/player/PlayerItemHeldEvent.php b/src/pocketmine/event/player/PlayerItemHeldEvent.php index 5f0385452..48281f633 100644 --- a/src/pocketmine/event/player/PlayerItemHeldEvent.php +++ b/src/pocketmine/event/player/PlayerItemHeldEvent.php @@ -55,20 +55,6 @@ class PlayerItemHeldEvent extends PlayerEvent implements Cancellable{ return $this->hotbarSlot; } - /** - * @deprecated This is currently an alias of {@link getSlot} - * - * Some background for confused future readers: Before MCPE 1.2, hotbar slots and inventory slots were not the same - * thing - a hotbar slot was a link to a certain slot in the inventory. - * As of 1.2, hotbar slots are now always linked to their respective slots in the inventory, meaning that the two - * are now synonymous, rendering the separate methods obsolete. - * - * @return int - */ - public function getInventorySlot() : int{ - return $this->getSlot(); - } - /** * Returns the item in the slot that the player is trying to equip. * diff --git a/src/pocketmine/inventory/PlayerInventory.php b/src/pocketmine/inventory/PlayerInventory.php index 1fe62368c..210c886b2 100644 --- a/src/pocketmine/inventory/PlayerInventory.php +++ b/src/pocketmine/inventory/PlayerInventory.php @@ -107,14 +107,6 @@ class PlayerInventory extends EntityInventory{ return $this->getItem($hotbarSlot); } - /** - * @deprecated - * @return int - */ - public function getHeldItemSlot() : int{ - return $this->getHeldItemIndex(); - } - /** * Returns the hotbar slot number the holder is currently holding. * @return int diff --git a/src/pocketmine/item/Item.php b/src/pocketmine/item/Item.php index 78d307e91..d63b41654 100644 --- a/src/pocketmine/item/Item.php +++ b/src/pocketmine/item/Item.php @@ -857,19 +857,6 @@ class Item implements ItemIds, \JsonSerializable{ return $this->equals($other, true, true) and $this->count === $other->count; } - /** - * @deprecated Use {@link Item#equals} instead, this method will be removed in the future. - * - * @param Item $item - * @param bool $checkDamage - * @param bool $checkCompound - * - * @return bool - */ - final public function deepEquals(Item $item, bool $checkDamage = true, bool $checkCompound = true) : bool{ - return $this->equals($item, $checkDamage, $checkCompound); - } - /** * @return string */ diff --git a/src/pocketmine/level/Level.php b/src/pocketmine/level/Level.php index 6075f24ba..a8903d7c5 100644 --- a/src/pocketmine/level/Level.php +++ b/src/pocketmine/level/Level.php @@ -1123,16 +1123,6 @@ class Level implements ChunkManager, Metadatable{ } } - /** - * @deprecated This method will be removed in the future due to misleading/ambiguous name. Use {@link Level#scheduleDelayedBlockUpdate} instead. - * - * @param Vector3 $pos - * @param int $delay - */ - public function scheduleUpdate(Vector3 $pos, int $delay){ - $this->scheduleDelayedBlockUpdate($pos, $delay); - } - /** * Schedules a block update to be executed after the specified number of ticks. * Blocks will be updated with the scheduled update type.