mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 20:28:31 +00:00
Remove deprecated things
This commit is contained in:
parent
f903dbfe00
commit
f0535df96d
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user