mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 00:39:45 +00:00
pass 2, manual removal of incorrect non-nullable phpdoc types
This commit is contained in:
parent
67bcc1c0fb
commit
1b33143f4f
@ -74,7 +74,6 @@ abstract class Command{
|
||||
public $timings;
|
||||
|
||||
/**
|
||||
* @param string $usageMessage
|
||||
* @param string[] $aliases
|
||||
*/
|
||||
public function __construct(string $name, string $description = "", ?string $usageMessage = null, array $aliases = []){
|
||||
|
@ -38,7 +38,6 @@ class Location extends Position{
|
||||
* @param float|int $x
|
||||
* @param float|int $y
|
||||
* @param float|int $z
|
||||
* @param World $world
|
||||
*/
|
||||
public function __construct($x = 0, $y = 0, $z = 0, float $yaw = 0.0, float $pitch = 0.0, ?World $world = null){
|
||||
$this->yaw = $yaw;
|
||||
@ -47,10 +46,6 @@ class Location extends Position{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param World|null $world default null
|
||||
* @param float $yaw default 0.0
|
||||
* @param float $pitch default 0.0
|
||||
*
|
||||
* @return Location
|
||||
*/
|
||||
public static function fromObject(Vector3 $pos, ?World $world = null, float $yaw = 0.0, float $pitch = 0.0){
|
||||
|
@ -33,9 +33,6 @@ class EntityEffectAddEvent extends EntityEffectEvent{
|
||||
/** @var EffectInstance|null */
|
||||
private $oldEffect;
|
||||
|
||||
/**
|
||||
* @param EffectInstance $oldEffect
|
||||
*/
|
||||
public function __construct(Entity $entity, EffectInstance $effect, ?EffectInstance $oldEffect = null){
|
||||
parent::__construct($entity, $effect);
|
||||
$this->oldEffect = $oldEffect;
|
||||
|
@ -85,11 +85,6 @@ class BanList{
|
||||
$this->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $reason
|
||||
* @param \DateTime $expires
|
||||
* @param string $source
|
||||
*/
|
||||
public function addBan(string $target, ?string $reason = null, ?\DateTime $expires = null, ?string $source = null) : BanEntry{
|
||||
$entry = new BanEntry($target);
|
||||
$entry->setSource($source ?? $entry->getSource());
|
||||
|
@ -26,9 +26,6 @@ namespace pocketmine\permission;
|
||||
abstract class DefaultPermissions{
|
||||
public const ROOT = "pocketmine";
|
||||
|
||||
/**
|
||||
* @param Permission $parent
|
||||
*/
|
||||
public static function registerPermission(Permission $perm, ?Permission $parent = null) : Permission{
|
||||
if($parent instanceof Permission){
|
||||
$parent->getChildren()[$perm->getName()] = true;
|
||||
|
@ -41,10 +41,6 @@ interface Permissible extends ServerOperator{
|
||||
*/
|
||||
public function hasPermission($name) : bool;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param bool $value
|
||||
*/
|
||||
public function addAttachment(Plugin $plugin, ?string $name = null, ?bool $value = null) : PermissionAttachment;
|
||||
|
||||
public function removeAttachment(PermissionAttachment $attachment) : void;
|
||||
|
@ -91,9 +91,6 @@ class PermissibleBase implements Permissible{
|
||||
|
||||
/**
|
||||
* //TODO: tick scheduled attachments
|
||||
*
|
||||
* @param string $name
|
||||
* @param bool $value
|
||||
*/
|
||||
public function addAttachment(Plugin $plugin, ?string $name = null, ?bool $value = null) : PermissionAttachment{
|
||||
if(!$plugin->isEnabled()){
|
||||
|
@ -44,10 +44,6 @@ trait PermissibleDelegateTrait{
|
||||
return $this->perm->hasPermission($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param bool $value
|
||||
*/
|
||||
public function addAttachment(Plugin $plugin, ?string $name = null, ?bool $value = null) : PermissionAttachment{
|
||||
return $this->perm->addAttachment($plugin, $name, $value);
|
||||
}
|
||||
|
@ -56,8 +56,6 @@ class Permission{
|
||||
/**
|
||||
* Creates a new Permission object to be attached to Permissible objects
|
||||
*
|
||||
* @param string $description
|
||||
* @param string $defaultValue
|
||||
* @param bool[] $children
|
||||
*/
|
||||
public function __construct(string $name, ?string $description = null, ?string $defaultValue = null, array $children = []){
|
||||
|
@ -136,8 +136,6 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
|
||||
|
||||
/**
|
||||
* Validates the given username.
|
||||
*
|
||||
* @param string $name
|
||||
*/
|
||||
public static function isValidUserName(?string $name) : bool{
|
||||
if($name === null){
|
||||
|
@ -181,8 +181,6 @@ class PluginManager{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $newLoaders
|
||||
*
|
||||
* @return Plugin[]
|
||||
*/
|
||||
public function loadPlugins(string $directory, ?array $newLoaders = null) : array{
|
||||
|
@ -146,9 +146,6 @@ class TimingsHandler{
|
||||
/** @var int */
|
||||
private $violations = 0;
|
||||
|
||||
/**
|
||||
* @param TimingsHandler $parent
|
||||
*/
|
||||
public function __construct(string $name, ?TimingsHandler $parent = null){
|
||||
$this->name = $name;
|
||||
$this->parent = $parent;
|
||||
|
@ -59,8 +59,6 @@ final class UUID{
|
||||
|
||||
/**
|
||||
* Creates an UUID from an hexadecimal representation
|
||||
*
|
||||
* @param int $version
|
||||
*/
|
||||
public static function fromString(string $uuid, ?int $version = null) : UUID{
|
||||
return self::fromBinary(hex2bin(str_replace("-", "", trim($uuid))), $version);
|
||||
@ -69,8 +67,6 @@ final class UUID{
|
||||
/**
|
||||
* Creates an UUID from a binary representation
|
||||
*
|
||||
* @param int $version
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public static function fromBinary(string $uuid, ?int $version = null) : UUID{
|
||||
|
@ -35,7 +35,6 @@ class Position extends Vector3{
|
||||
* @param float|int $x
|
||||
* @param float|int $y
|
||||
* @param float|int $z
|
||||
* @param World $world
|
||||
*/
|
||||
public function __construct($x = 0, $y = 0, $z = 0, ?World $world = null){
|
||||
parent::__construct($x, $y, $z);
|
||||
|
@ -1379,9 +1379,6 @@ class World implements ChunkManager{
|
||||
$this->timings->setBlock->stopTiming();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Vector3 $motion
|
||||
*/
|
||||
public function dropItem(Vector3 $source, Item $item, ?Vector3 $motion = null, int $delay = 10) : ?ItemEntity{
|
||||
if($item->isNull()){
|
||||
return null;
|
||||
@ -1432,7 +1429,6 @@ class World implements ChunkManager{
|
||||
* It'll try to lower the durability if Item is a tool, and set it to Air if broken.
|
||||
*
|
||||
* @param Item $item reference parameter (if null, can break anything)
|
||||
* @param Player $player
|
||||
*/
|
||||
public function useBreakOn(Vector3 $vector, Item &$item = null, ?Player $player = null, bool $createParticles = false) : bool{
|
||||
$vector = $vector->floor();
|
||||
@ -1686,8 +1682,6 @@ class World implements ChunkManager{
|
||||
/**
|
||||
* Returns the entities near the current one inside the AxisAlignedBB
|
||||
*
|
||||
* @param Entity $entity
|
||||
*
|
||||
* @return Entity[]
|
||||
*/
|
||||
public function getNearbyEntities(AxisAlignedBB $bb, ?Entity $entity = null) : array{
|
||||
|
Loading…
x
Reference in New Issue
Block a user