strip extra blank lines (php-cs-fixer)

This commit is contained in:
Dylan K. Taylor 2020-01-22 14:50:29 +00:00
parent 9cd6b3e1c7
commit f624871b3f
193 changed files with 0 additions and 243 deletions

View File

@ -432,7 +432,6 @@ class MemoryManager{
fwrite($obData, "$hash@$className: " . json_encode($info, JSON_UNESCAPED_SLASHES) . "\n"); fwrite($obData, "$hash@$className: " . json_encode($info, JSON_UNESCAPED_SLASHES) . "\n");
} }
}while($continue); }while($continue);
$logger->info("[Dump] Wrote " . count($objects) . " objects"); $logger->info("[Dump] Wrote " . count($objects) . " objects");

View File

@ -202,7 +202,6 @@ use const M_PI;
use const M_SQRT3; use const M_SQRT3;
use const PHP_INT_MAX; use const PHP_INT_MAX;
/** /**
* Main class that handles networking, recovery, and packet sending to the server part * Main class that handles networking, recovery, and packet sending to the server part
*/ */
@ -227,7 +226,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
return $lname !== "rcon" and $lname !== "console" and $len >= 1 and $len <= 16 and preg_match("/[^A-Za-z0-9_ ]/", $name) === 0; return $lname !== "rcon" and $lname !== "console" and $len >= 1 and $len <= 16 and preg_match("/[^A-Za-z0-9_ ]/", $name) === 0;
} }
/** @var SourceInterface */ /** @var SourceInterface */
protected $interface; protected $interface;
@ -254,7 +252,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
*/ */
protected $lastPingMeasure = 1; protected $lastPingMeasure = 1;
/** @var float */ /** @var float */
public $creationTime = 0; public $creationTime = 0;
@ -1128,7 +1125,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
} }
unset($unloadChunks[$index]); unset($unloadChunks[$index]);
/* Bottom left quadrant */ /* Bottom left quadrant */
if(!isset($this->usedChunks[$index = Level::chunkHash($centerX - $x - 1, $centerZ - $z - 1)]) or $this->usedChunks[$index] === false){ if(!isset($this->usedChunks[$index = Level::chunkHash($centerX - $x - 1, $centerZ - $z - 1)]) or $this->usedChunks[$index] === false){
$newOrder[$index] = true; $newOrder[$index] = true;

View File

@ -1398,7 +1398,6 @@ class Server{
$this->doTitleTick = ((bool) $this->getProperty("console.title-tick", true)) && Terminal::hasFormattingCodes(); $this->doTitleTick = ((bool) $this->getProperty("console.title-tick", true)) && Terminal::hasFormattingCodes();
$consoleSender = new ConsoleCommandSender(); $consoleSender = new ConsoleCommandSender();
PermissionManager::getInstance()->subscribeToPermission(Server::BROADCAST_CHANNEL_ADMINISTRATIVE, $consoleSender); PermissionManager::getInstance()->subscribeToPermission(Server::BROADCAST_CHANNEL_ADMINISTRATIVE, $consoleSender);
@ -1478,14 +1477,12 @@ class Server{
$this->network = new Network($this); $this->network = new Network($this);
$this->network->setName($this->getMotd()); $this->network->setName($this->getMotd());
$this->logger->info($this->getLanguage()->translateString("pocketmine.server.info", [ $this->logger->info($this->getLanguage()->translateString("pocketmine.server.info", [
$this->getName(), $this->getName(),
(\pocketmine\IS_DEVELOPMENT_BUILD ? TextFormat::YELLOW : "") . $this->getPocketMineVersion() . TextFormat::RESET (\pocketmine\IS_DEVELOPMENT_BUILD ? TextFormat::YELLOW : "") . $this->getPocketMineVersion() . TextFormat::RESET
])); ]));
$this->logger->info($this->getLanguage()->translateString("pocketmine.server.license", [$this->getName()])); $this->logger->info($this->getLanguage()->translateString("pocketmine.server.license", [$this->getName()]));
Timings::init(); Timings::init();
TimingsHandler::setEnabled((bool) $this->getProperty("settings.enable-profiling", false)); TimingsHandler::setEnabled((bool) $this->getProperty("settings.enable-profiling", false));
@ -1757,7 +1754,6 @@ class Server{
} }
} }
/** /**
* @return void * @return void
*/ */
@ -1806,7 +1802,6 @@ class Server{
return true; return true;
} }
$sender->sendMessage($this->getLanguage()->translateString(TextFormat::RED . "%commands.generic.notFound")); $sender->sendMessage($this->getLanguage()->translateString(TextFormat::RED . "%commands.generic.notFound"));
return false; return false;
@ -1963,7 +1958,6 @@ class Server{
$this->sendUsage(SendUsageTask::TYPE_OPEN); $this->sendUsage(SendUsageTask::TYPE_OPEN);
} }
if($this->getProperty("network.upnp-forwarding", false)){ if($this->getProperty("network.upnp-forwarding", false)){
$this->logger->info("[UPnP] Trying to port forward..."); $this->logger->info("[UPnP] Trying to port forward...");
try{ try{
@ -2294,7 +2288,6 @@ class Server{
$this->uniquePlayers = []; $this->uniquePlayers = [];
} }
/** /**
* @return BaseLang * @return BaseLang
*/ */
@ -2359,7 +2352,6 @@ class Server{
//TODO: add raw packet events //TODO: add raw packet events
} }
/** /**
* Tries to execute a server tick * Tries to execute a server tick
*/ */

View File

@ -30,7 +30,6 @@ if(defined('pocketmine\_VERSION_INFO_INCLUDED')){
} }
const _VERSION_INFO_INCLUDED = true; const _VERSION_INFO_INCLUDED = true;
const NAME = "PocketMine-MP"; const NAME = "PocketMine-MP";
const BASE_VERSION = "3.11.5"; const BASE_VERSION = "3.11.5";
const IS_DEVELOPMENT_BUILD = true; const IS_DEVELOPMENT_BUILD = true;

View File

@ -26,7 +26,6 @@ namespace pocketmine\block;
use pocketmine\item\Item; use pocketmine\item\Item;
use pocketmine\math\AxisAlignedBB; use pocketmine\math\AxisAlignedBB;
/** /**
* Air block * Air block
*/ */

View File

@ -67,7 +67,6 @@ class Block extends Position implements BlockIds, Metadatable{
/** @var AxisAlignedBB|null */ /** @var AxisAlignedBB|null */
protected $boundingBox = null; protected $boundingBox = null;
/** @var AxisAlignedBB[]|null */ /** @var AxisAlignedBB[]|null */
protected $collisionBoxes = null; protected $collisionBoxes = null;

View File

@ -41,7 +41,6 @@ abstract class Crops extends Flowable{
return false; return false;
} }
public function onActivate(Item $item, Player $player = null) : bool{ public function onActivate(Item $item, Player $player = null) : bool{
if($this->meta < 7 and $item->getId() === Item::DYE and $item->getDamage() === 0x0F){ //Bonemeal if($this->meta < 7 and $item->getId() === Item::DYE and $item->getDamage() === 0x0F){ //Bonemeal
$block = clone $this; $block = clone $this;

View File

@ -39,7 +39,6 @@ class Dandelion extends Flowable{
return "Dandelion"; return "Dandelion";
} }
public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{ public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{
$down = $this->getSide(Vector3::SIDE_DOWN); $down = $this->getSide(Vector3::SIDE_DOWN);
if($down->getId() === Block::GRASS or $down->getId() === Block::DIRT or $down->getId() === Block::FARMLAND){ if($down->getId() === Block::GRASS or $down->getId() === Block::DIRT or $down->getId() === Block::FARMLAND){

View File

@ -29,7 +29,6 @@ use pocketmine\math\AxisAlignedBB;
use pocketmine\math\Vector3; use pocketmine\math\Vector3;
use pocketmine\Player; use pocketmine\Player;
abstract class Door extends Transparent{ abstract class Door extends Transparent{
public function isSolid() : bool{ public function isSolid() : bool{

View File

@ -48,7 +48,6 @@ class Farmland extends Transparent{
return BlockToolType::TYPE_SHOVEL; return BlockToolType::TYPE_SHOVEL;
} }
protected function recalculateBoundingBox() : ?AxisAlignedBB{ protected function recalculateBoundingBox() : ?AxisAlignedBB{
return new AxisAlignedBB( return new AxisAlignedBB(
$this->x, $this->x,

View File

@ -39,7 +39,6 @@ class FenceGate extends Transparent{
return BlockToolType::TYPE_AXE; return BlockToolType::TYPE_AXE;
} }
protected function recalculateBoundingBox() : ?AxisAlignedBB{ protected function recalculateBoundingBox() : ?AxisAlignedBB{
if(($this->getDamage() & 0x04) > 0){ if(($this->getDamage() & 0x04) > 0){

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\block; namespace pocketmine\block;
class Furnace extends BurningFurnace{ class Furnace extends BurningFurnace{
protected $id = self::FURNACE; protected $id = self::FURNACE;

View File

@ -1,6 +1,5 @@
<?php <?php
/* /*
* *
* ____ _ _ __ __ _ __ __ ____ * ____ _ _ __ __ _ __ __ ____

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\block; namespace pocketmine\block;
use pocketmine\item\TieredTool; use pocketmine\item\TieredTool;
class GlowingObsidian extends Solid{ class GlowingObsidian extends Solid{

View File

@ -90,7 +90,6 @@ class Ladder extends Transparent{
); );
} }
public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{ public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{
if(!$blockClicked->isTransparent()){ if(!$blockClicked->isTransparent()){
$faces = [ $faces = [

View File

@ -68,7 +68,6 @@ class Leaves extends Transparent{
return true; return true;
} }
protected function findLog(Block $pos, array &$visited, int $distance, ?int $fromSide = null) : bool{ protected function findLog(Block $pos, array &$visited, int $distance, ?int $fromSide = null) : bool{
$index = $pos->x . "." . $pos->y . "." . $pos->z; $index = $pos->x . "." . $pos->y . "." . $pos->z;
if(isset($visited[$index])){ if(isset($visited[$index])){

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\block; namespace pocketmine\block;
class MossyCobblestone extends Cobblestone{ class MossyCobblestone extends Cobblestone{
protected $id = self::MOSSY_COBBLESTONE; protected $id = self::MOSSY_COBBLESTONE;

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\block; namespace pocketmine\block;
use pocketmine\event\block\BlockGrowEvent; use pocketmine\event\block\BlockGrowEvent;
use pocketmine\item\Item; use pocketmine\item\Item;
use pocketmine\item\ItemFactory; use pocketmine\item\ItemFactory;

View File

@ -57,7 +57,6 @@ class SignPost extends Transparent{
return null; return null;
} }
public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{ public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{
if($face !== Vector3::SIDE_DOWN){ if($face !== Vector3::SIDE_DOWN){

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\block; namespace pocketmine\block;
class Sponge extends Solid{ class Sponge extends Solid{
protected $id = self::SPONGE; protected $id = self::SPONGE;

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\block; namespace pocketmine\block;
abstract class Transparent extends Block{ abstract class Transparent extends Block{
public function isTransparent() : bool{ public function isTransparent() : bool{

View File

@ -55,7 +55,6 @@ class WaterLily extends Flowable{
); );
} }
public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{ public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{
if($blockClicked instanceof Water){ if($blockClicked instanceof Water){
$up = $blockClicked->getSide(Vector3::SIDE_UP); $up = $blockClicked->getSide(Vector3::SIDE_UP);

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\block; namespace pocketmine\block;
class Wood2 extends Wood{ class Wood2 extends Wood{
public const ACACIA = 0; public const ACACIA = 0;

View File

@ -101,7 +101,6 @@ abstract class Command{
return $this->permission; return $this->permission;
} }
/** /**
* @return void * @return void
*/ */

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\command; namespace pocketmine\command;
interface CommandExecutor{ interface CommandExecutor{
/** /**

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\command; namespace pocketmine\command;
interface CommandMap{ interface CommandMap{
/** /**
@ -47,5 +46,4 @@ interface CommandMap{
*/ */
public function getCommand(string $name); public function getCommand(string $name);
} }

View File

@ -135,7 +135,6 @@ class SimpleCommandMap implements CommandMap{
]); ]);
} }
public function registerAll(string $fallbackPrefix, array $commands){ public function registerAll(string $fallbackPrefix, array $commands){
foreach($commands as $command){ foreach($commands as $command){
$this->register($fallbackPrefix, $command); $this->register($fallbackPrefix, $command);
@ -274,7 +273,6 @@ class SimpleCommandMap implements CommandMap{
return $this->knownCommands; return $this->knownCommands;
} }
/** /**
* @return void * @return void
*/ */
@ -296,7 +294,6 @@ class SimpleCommandMap implements CommandMap{
$commandName = ""; $commandName = "";
$command = $this->matchCommand($commandName, $args); $command = $this->matchCommand($commandName, $args);
if($command === null){ if($command === null){
$bad[] = $commandString; $bad[] = $commandString;
}elseif($commandName === $alias){ }elseif($commandName === $alias){

View File

@ -124,7 +124,6 @@ class EffectCommand extends VanillaCommand{
self::broadcastCommandMessage($sender, new TranslationContainer("%commands.effect.success", [$effect->getName(), $instance->getAmplifier(), $player->getDisplayName(), $instance->getDuration() / 20, $effect->getId()])); self::broadcastCommandMessage($sender, new TranslationContainer("%commands.effect.success", [$effect->getName(), $instance->getAmplifier(), $player->getDisplayName(), $instance->getDuration() / 20, $effect->getId()]));
} }
return true; return true;
} }
} }

View File

@ -88,7 +88,6 @@ class EnchantCommand extends VanillaCommand{
$item->addEnchantment(new EnchantmentInstance($enchantment, $level)); $item->addEnchantment(new EnchantmentInstance($enchantment, $level));
$player->getInventory()->setItemInHand($item); $player->getInventory()->setItemInHand($item);
self::broadcastCommandMessage($sender, new TranslationContainer("%commands.enchant.success", [$player->getName()])); self::broadcastCommandMessage($sender, new TranslationContainer("%commands.enchant.success", [$player->getName()]));
return true; return true;
} }

View File

@ -68,7 +68,6 @@ class KickCommand extends VanillaCommand{
$sender->sendMessage(new TranslationContainer(TextFormat::RED . "%commands.generic.player.notFound")); $sender->sendMessage(new TranslationContainer(TextFormat::RED . "%commands.generic.player.notFound"));
} }
return true; return true;
} }
} }

View File

@ -119,7 +119,6 @@ class ParticleCommand extends VanillaCommand{
return true; return true;
} }
$sender->sendMessage(new TranslationContainer("commands.particle.success", [$name, $count])); $sender->sendMessage(new TranslationContainer("commands.particle.success", [$name, $count]));
$random = new Random((int) (microtime(true) * 1000) + mt_rand()); $random = new Random((int) (microtime(true) * 1000) + mt_rand());

View File

@ -85,7 +85,6 @@ class TimeCommand extends VanillaCommand{
return true; return true;
} }
if(count($args) < 2){ if(count($args) < 2){
throw new InvalidCommandSyntaxException(); throw new InvalidCommandSyntaxException();
} }

View File

@ -21,10 +21,8 @@
declare(strict_types=1); declare(strict_types=1);
namespace pocketmine\command\defaults; namespace pocketmine\command\defaults;
use pocketmine\command\CommandSender; use pocketmine\command\CommandSender;
use pocketmine\command\utils\InvalidCommandSyntaxException; use pocketmine\command\utils\InvalidCommandSyntaxException;
use pocketmine\Player; use pocketmine\Player;

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\entity; namespace pocketmine\entity;
interface Ageable{ interface Ageable{
public function isBaby() : bool; public function isBaby() : bool;
} }

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\entity; namespace pocketmine\entity;
abstract class Animal extends Creature implements Ageable{ abstract class Animal extends Creature implements Ageable{
public function isBaby() : bool{ public function isBaby() : bool{

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\entity; namespace pocketmine\entity;
abstract class Creature extends Living{ abstract class Creature extends Living{
} }

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\entity; namespace pocketmine\entity;
interface Damageable{ interface Damageable{
} }

View File

@ -465,7 +465,6 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
/** @var Vector3 */ /** @var Vector3 */
public $temporalVector; public $temporalVector;
/** @var float */ /** @var float */
public $lastYaw; public $lastYaw;
/** @var float */ /** @var float */
@ -1353,7 +1352,6 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
return true; return true;
} }
$this->timings->startTiming(); $this->timings->startTiming();
if($this->hasMovementUpdate()){ if($this->hasMovementUpdate()){
@ -1382,7 +1380,6 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
$hasUpdate = $this->entityBaseTick($tickDiff); $hasUpdate = $this->entityBaseTick($tickDiff);
Timings::$timerEntityBaseTick->stopTiming(); Timings::$timerEntityBaseTick->stopTiming();
$this->timings->stopTiming(); $this->timings->stopTiming();
//if($this->isStatic()) //if($this->isStatic())
@ -1511,7 +1508,6 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
$this->isCollided = $this->onGround; $this->isCollided = $this->onGround;
$this->updateFallState($dy, $this->onGround); $this->updateFallState($dy, $this->onGround);
Timings::$entityMoveTimer->stopTiming(); Timings::$entityMoveTimer->stopTiming();
return true; return true;
@ -1596,7 +1592,6 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
$this->boundingBox->offset(0, 0, $dz); $this->boundingBox->offset(0, 0, $dz);
if($this->stepHeight > 0 and $fallingFlag and $this->ySize < 0.05 and ($movX != $dx or $movZ != $dz)){ if($this->stepHeight > 0 and $fallingFlag and $this->ySize < 0.05 and ($movX != $dx or $movZ != $dz)){
$cx = $dx; $cx = $dx;
$cy = $dy; $cy = $dy;

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\entity; namespace pocketmine\entity;
interface Explosive{ interface Explosive{
/** /**

View File

@ -187,7 +187,6 @@ abstract class Living extends Entity implements Damageable{
} }
} }
public function hasLineOfSight(Entity $entity) : bool{ public function hasLineOfSight(Entity $entity) : bool{
//TODO: head height //TODO: head height
return true; return true;

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\entity; namespace pocketmine\entity;
abstract class Monster extends Creature{ abstract class Monster extends Creature{
} }

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\entity; namespace pocketmine\entity;
interface NPC{ interface NPC{
} }

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\entity; namespace pocketmine\entity;
interface Rideable{ interface Rideable{
} }

View File

@ -78,7 +78,6 @@ class Squid extends WaterAnimal{
return new Vector3(mt_rand(-1000, 1000) / 1000, mt_rand(-500, 500) / 1000, mt_rand(-1000, 1000) / 1000); return new Vector3(mt_rand(-1000, 1000) / 1000, mt_rand(-500, 500) / 1000, mt_rand(-1000, 1000) / 1000);
} }
public function entityBaseTick(int $tickDiff = 1) : bool{ public function entityBaseTick(int $tickDiff = 1) : bool{
if($this->closed){ if($this->closed){
return false; return false;

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\entity; namespace pocketmine\entity;
abstract class Vehicle extends Entity implements Rideable{ abstract class Vehicle extends Entity implements Rideable{
} }

View File

@ -67,7 +67,6 @@ class ItemEntity extends Entity{
$this->owner = $this->namedtag->getString("Owner", $this->owner); $this->owner = $this->namedtag->getString("Owner", $this->owner);
$this->thrower = $this->namedtag->getString("Thrower", $this->thrower); $this->thrower = $this->namedtag->getString("Thrower", $this->thrower);
$itemTag = $this->namedtag->getCompoundTag("Item"); $itemTag = $this->namedtag->getCompoundTag("Item");
if($itemTag === null){ if($itemTag === null){
throw new \UnexpectedValueException("Invalid " . get_class($this) . " entity: expected \"Item\" NBT tag not found"); throw new \UnexpectedValueException("Invalid " . get_class($this) . " entity: expected \"Item\" NBT tag not found");
@ -78,7 +77,6 @@ class ItemEntity extends Entity{
throw new \UnexpectedValueException("Item for " . get_class($this) . " is invalid"); throw new \UnexpectedValueException("Item for " . get_class($this) . " is invalid");
} }
(new ItemSpawnEvent($this))->call(); (new ItemSpawnEvent($this))->call();
} }

View File

@ -86,7 +86,6 @@ class PaintingMotive{
/** @var int */ /** @var int */
protected $height; protected $height;
public function __construct(int $width, int $height, string $name){ public function __construct(int $width, int $height, string $name){
$this->name = $name; $this->name = $name;
$this->width = $width; $this->width = $width;

View File

@ -48,7 +48,6 @@ class PrimedTNT extends Entity implements Explosive{
public $canCollide = false; public $canCollide = false;
public function attack(EntityDamageEvent $source) : void{ public function attack(EntityDamageEvent $source) : void{
if($source->getCause() === EntityDamageEvent::CAUSE_VOID){ if($source->getCause() === EntityDamageEvent::CAUSE_VOID){
parent::attack($source); parent::attack($source);
@ -70,7 +69,6 @@ class PrimedTNT extends Entity implements Explosive{
$this->level->broadcastLevelEvent($this, LevelEventPacket::EVENT_SOUND_IGNITE); $this->level->broadcastLevelEvent($this, LevelEventPacket::EVENT_SOUND_IGNITE);
} }
public function canCollideWith(Entity $entity) : bool{ public function canCollideWith(Entity $entity) : bool{
return false; return false;
} }

View File

@ -265,7 +265,6 @@ abstract class Projectile extends Entity{
$this->checkChunks(); $this->checkChunks();
$this->checkBlockCollision(); $this->checkBlockCollision();
Timings::$entityMoveTimer->stopTiming(); Timings::$entityMoveTimer->stopTiming();
} }

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\entity\projectile; namespace pocketmine\entity\projectile;
interface ProjectileSource{ interface ProjectileSource{
} }

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\event; namespace pocketmine\event;
/** /**
* Events that can be cancelled must use the interface Cancellable * Events that can be cancelled must use the interface Cancellable
*/ */

View File

@ -91,7 +91,6 @@ class HandlerList{
return self::$allLists; return self::$allLists;
} }
/** @var string */ /** @var string */
private $class; private $class;
/** @var RegisteredListener[][] */ /** @var RegisteredListener[][] */

View File

@ -84,7 +84,6 @@ class BlockBreakEvent extends BlockEvent implements Cancellable{
$this->instaBreak = $instaBreak; $this->instaBreak = $instaBreak;
} }
/** /**
* @return Item[] * @return Item[]
*/ */

View File

@ -73,7 +73,6 @@ class EntityDamageEvent extends EntityEvent implements Cancellable{
/** @var int */ /** @var int */
private $attackCooldown = 10; private $attackCooldown = 10;
/** /**
* @param float[] $modifiers * @param float[] $modifiers
*/ */

View File

@ -21,7 +21,6 @@
declare(strict_types=1); declare(strict_types=1);
namespace pocketmine\event\level; namespace pocketmine\event\level;
use pocketmine\level\format\Chunk; use pocketmine\level\format\Chunk;

View File

@ -21,7 +21,6 @@
declare(strict_types=1); declare(strict_types=1);
namespace pocketmine\event\level; namespace pocketmine\event\level;
use pocketmine\level\format\Chunk; use pocketmine\level\format\Chunk;

View File

@ -21,7 +21,6 @@
declare(strict_types=1); declare(strict_types=1);
namespace pocketmine\event\player\cheat; namespace pocketmine\event\player\cheat;
use pocketmine\event\Cancellable; use pocketmine\event\Cancellable;

View File

@ -21,7 +21,6 @@
declare(strict_types=1); declare(strict_types=1);
namespace pocketmine\event\plugin; namespace pocketmine\event\plugin;
class PluginDisableEvent extends PluginEvent{ class PluginDisableEvent extends PluginEvent{

View File

@ -21,7 +21,6 @@
declare(strict_types=1); declare(strict_types=1);
namespace pocketmine\event\plugin; namespace pocketmine\event\plugin;
class PluginEnableEvent extends PluginEvent{ class PluginEnableEvent extends PluginEvent{

View File

@ -25,7 +25,6 @@ namespace pocketmine\event\server;
use pocketmine\utils\Utils; use pocketmine\utils\Utils;
/** /**
* Called when the server is in a low-memory state as defined by the properties * Called when the server is in a low-memory state as defined by the properties
* Plugins should free caches or other non-essential data. * Plugins should free caches or other non-essential data.

View File

@ -421,7 +421,6 @@ abstract class BaseInventory implements Inventory{
} }
} }
/** /**
* @param Player|Player[] $target * @param Player|Player[] $target
*/ */

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class Apple extends Food{ class Apple extends Food{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::APPLE, $meta, "Apple"); parent::__construct(self::APPLE, $meta, "Apple");

View File

@ -21,7 +21,6 @@
declare(strict_types=1); declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
use pocketmine\event\entity\EntityDamageEvent; use pocketmine\event\entity\EntityDamageEvent;

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class BeetrootSoup extends Food{ class BeetrootSoup extends Food{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::BEETROOT_SOUP, $meta, "Beetroot Soup"); parent::__construct(self::BEETROOT_SOUP, $meta, "Beetroot Soup");

View File

@ -65,7 +65,6 @@ class Bow extends Tool{
$p = $diff / 20; $p = $diff / 20;
$baseForce = min((($p ** 2) + $p * 2) / 3, 1); $baseForce = min((($p ** 2) + $p * 2) / 3, 1);
$entity = Entity::createEntity("Arrow", $player->getLevel(), $nbt, $player, $baseForce >= 1); $entity = Entity::createEntity("Arrow", $player->getLevel(), $nbt, $player, $baseForce >= 1);
if($entity instanceof Projectile){ if($entity instanceof Projectile){
$infinity = $this->hasEnchantment(Enchantment::INFINITY); $infinity = $this->hasEnchantment(Enchantment::INFINITY);

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class Bowl extends Item{ class Bowl extends Item{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::BOWL, $meta, "Bowl"); parent::__construct(self::BOWL, $meta, "Bowl");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class ChainBoots extends Armor{ class ChainBoots extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::CHAIN_BOOTS, $meta, "Chainmail Boots"); parent::__construct(self::CHAIN_BOOTS, $meta, "Chainmail Boots");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class ChainChestplate extends Armor{ class ChainChestplate extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::CHAIN_CHESTPLATE, $meta, "Chain Chestplate"); parent::__construct(self::CHAIN_CHESTPLATE, $meta, "Chain Chestplate");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class ChainHelmet extends Armor{ class ChainHelmet extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::CHAIN_HELMET, $meta, "Chainmail Helmet"); parent::__construct(self::CHAIN_HELMET, $meta, "Chainmail Helmet");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class ChainLeggings extends Armor{ class ChainLeggings extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::CHAIN_LEGGINGS, $meta, "Chain Leggings"); parent::__construct(self::CHAIN_LEGGINGS, $meta, "Chain Leggings");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class Coal extends Item{ class Coal extends Item{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::COAL, $meta, "Coal"); parent::__construct(self::COAL, $meta, "Coal");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class DiamondBoots extends Armor{ class DiamondBoots extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::DIAMOND_BOOTS, $meta, "Diamond Boots"); parent::__construct(self::DIAMOND_BOOTS, $meta, "Diamond Boots");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class DiamondChestplate extends Armor{ class DiamondChestplate extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::DIAMOND_CHESTPLATE, $meta, "Diamond Chestplate"); parent::__construct(self::DIAMOND_CHESTPLATE, $meta, "Diamond Chestplate");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class DiamondHelmet extends Armor{ class DiamondHelmet extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::DIAMOND_HELMET, $meta, "Diamond Helmet"); parent::__construct(self::DIAMOND_HELMET, $meta, "Diamond Helmet");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class DiamondLeggings extends Armor{ class DiamondLeggings extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::DIAMOND_LEGGINGS, $meta, "Diamond Leggings"); parent::__construct(self::DIAMOND_LEGGINGS, $meta, "Diamond Leggings");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class GoldBoots extends Armor{ class GoldBoots extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::GOLD_BOOTS, $meta, "Gold Boots"); parent::__construct(self::GOLD_BOOTS, $meta, "Gold Boots");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class GoldChestplate extends Armor{ class GoldChestplate extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::GOLD_CHESTPLATE, $meta, "Gold Chestplate"); parent::__construct(self::GOLD_CHESTPLATE, $meta, "Gold Chestplate");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class GoldHelmet extends Armor{ class GoldHelmet extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::GOLD_HELMET, $meta, "Gold Helmet"); parent::__construct(self::GOLD_HELMET, $meta, "Gold Helmet");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class GoldLeggings extends Armor{ class GoldLeggings extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::GOLD_LEGGINGS, $meta, "Gold Leggings"); parent::__construct(self::GOLD_LEGGINGS, $meta, "Gold Leggings");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class IronBoots extends Armor{ class IronBoots extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::IRON_BOOTS, $meta, "Iron Boots"); parent::__construct(self::IRON_BOOTS, $meta, "Iron Boots");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class IronChestplate extends Armor{ class IronChestplate extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::IRON_CHESTPLATE, $meta, "Iron Chestplate"); parent::__construct(self::IRON_CHESTPLATE, $meta, "Iron Chestplate");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class IronHelmet extends Armor{ class IronHelmet extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::IRON_HELMET, $meta, "Iron Helmet"); parent::__construct(self::IRON_HELMET, $meta, "Iron Helmet");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class IronLeggings extends Armor{ class IronLeggings extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::IRON_LEGGINGS, $meta, "Iron Leggings"); parent::__construct(self::IRON_LEGGINGS, $meta, "Iron Leggings");

View File

@ -60,7 +60,6 @@ class Item implements ItemIds, \JsonSerializable{
public const TAG_DISPLAY_NAME = "Name"; public const TAG_DISPLAY_NAME = "Name";
public const TAG_DISPLAY_LORE = "Lore"; public const TAG_DISPLAY_LORE = "Lore";
/** @var LittleEndianNBTStream */ /** @var LittleEndianNBTStream */
private static $cachedParser = null; private static $cachedParser = null;
@ -111,7 +110,6 @@ class Item implements ItemIds, \JsonSerializable{
return ItemFactory::fromString($str, $multiple); return ItemFactory::fromString($str, $multiple);
} }
/** @var Item[] */ /** @var Item[] */
private static $creative = []; private static $creative = [];

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class LeatherBoots extends Armor{ class LeatherBoots extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::LEATHER_BOOTS, $meta, "Leather Boots"); parent::__construct(self::LEATHER_BOOTS, $meta, "Leather Boots");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class LeatherCap extends Armor{ class LeatherCap extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::LEATHER_CAP, $meta, "Leather Cap"); parent::__construct(self::LEATHER_CAP, $meta, "Leather Cap");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class LeatherPants extends Armor{ class LeatherPants extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::LEATHER_PANTS, $meta, "Leather Pants"); parent::__construct(self::LEATHER_PANTS, $meta, "Leather Pants");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class LeatherTunic extends Armor{ class LeatherTunic extends Armor{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::LEATHER_TUNIC, $meta, "Leather Tunic"); parent::__construct(self::LEATHER_TUNIC, $meta, "Leather Tunic");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item; namespace pocketmine\item;
class Stick extends Item{ class Stick extends Item{
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
parent::__construct(self::STICK, $meta, "Stick"); parent::__construct(self::STICK, $meta, "Stick");

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item\enchantment; namespace pocketmine\item\enchantment;
class EnchantmentEntry{ class EnchantmentEntry{
/** @var Enchantment[] */ /** @var Enchantment[] */

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\item\enchantment; namespace pocketmine\item\enchantment;
class EnchantmentList{ class EnchantmentList{
/** @var \SplFixedArray|EnchantmentEntry[] */ /** @var \SplFixedArray|EnchantmentEntry[] */

View File

@ -202,7 +202,6 @@ class Explosion{
} }
} }
$air = ItemFactory::get(Item::AIR); $air = ItemFactory::get(Item::AIR);
foreach($this->affectedBlocks as $block){ foreach($this->affectedBlocks as $block){

View File

@ -1104,7 +1104,6 @@ class Level implements ChunkManager, Metadatable{
$entity->scheduleUpdate(); $entity->scheduleUpdate();
} }
foreach($chunk->getSubChunks() as $Y => $subChunk){ foreach($chunk->getSubChunks() as $Y => $subChunk){
if(!($subChunk instanceof EmptySubChunk)){ if(!($subChunk instanceof EmptySubChunk)){
$k = mt_rand(0, 0xfffffffff); //36 bits $k = mt_rand(0, 0xfffffffff); //36 bits
@ -1247,7 +1246,6 @@ class Level implements ChunkManager, Metadatable{
} }
} }
return $collides; return $collides;
} }
@ -1900,7 +1898,6 @@ class Level implements ChunkManager, Metadatable{
} }
} }
if($player !== null){ if($player !== null){
$ev = new BlockPlaceEvent($player, $hand, $blockReplace, $blockClicked, $item); $ev = new BlockPlaceEvent($player, $hand, $blockReplace, $blockClicked, $item);
if($this->checkSpawnProtection($player, $blockClicked)){ if($this->checkSpawnProtection($player, $blockClicked)){
@ -2054,7 +2051,6 @@ class Level implements ChunkManager, Metadatable{
return $currentTarget; return $currentTarget;
} }
/** /**
* Returns a list of the Tile entities in this level * Returns a list of the Tile entities in this level
* *

View File

@ -43,13 +43,10 @@ abstract class Biome{
public const ICE_PLAINS = 12; public const ICE_PLAINS = 12;
public const SMALL_MOUNTAINS = 20; public const SMALL_MOUNTAINS = 20;
public const BIRCH_FOREST = 27; public const BIRCH_FOREST = 27;
public const MAX_BIOMES = 256; public const MAX_BIOMES = 256;
/** @var Biome[]|\SplFixedArray */ /** @var Biome[]|\SplFixedArray */
@ -101,7 +98,6 @@ abstract class Biome{
self::register(self::ICE_PLAINS, new IcePlainsBiome()); self::register(self::ICE_PLAINS, new IcePlainsBiome());
self::register(self::SMALL_MOUNTAINS, new SmallMountainsBiome()); self::register(self::SMALL_MOUNTAINS, new SmallMountainsBiome());
self::register(self::BIRCH_FOREST, new ForestBiome(ForestBiome::TYPE_BIRCH)); self::register(self::BIRCH_FOREST, new ForestBiome(ForestBiome::TYPE_BIRCH));

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\level\biome; namespace pocketmine\level\biome;
class DesertBiome extends SandyBiome{ class DesertBiome extends SandyBiome{
public function __construct(){ public function __construct(){

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace pocketmine\level\biome; namespace pocketmine\level\biome;
class SmallMountainsBiome extends MountainsBiome{ class SmallMountainsBiome extends MountainsBiome{
public function __construct(){ public function __construct(){

View File

@ -252,7 +252,6 @@ class LevelDB extends BaseLevelProvider{
$buffer = $nbt->write($levelData); $buffer = $nbt->write($levelData);
file_put_contents($path . "level.dat", Binary::writeLInt(self::CURRENT_STORAGE_VERSION) . Binary::writeLInt(strlen($buffer)) . $buffer); file_put_contents($path . "level.dat", Binary::writeLInt(self::CURRENT_STORAGE_VERSION) . Binary::writeLInt(strlen($buffer)) . $buffer);
$db = self::createDB($path); $db = self::createDB($path);
if($generatorType === self::GENERATOR_FLAT and isset($options["preset"])){ if($generatorType === self::GENERATOR_FLAT and isset($options["preset"])){

View File

@ -21,10 +21,8 @@
declare(strict_types=1); declare(strict_types=1);
namespace pocketmine\level\format\io\region; namespace pocketmine\level\format\io\region;
class CorruptedRegionException extends RegionException{ class CorruptedRegionException extends RegionException{
} }

View File

@ -21,10 +21,8 @@
declare(strict_types=1); declare(strict_types=1);
namespace pocketmine\level\format\io\region; namespace pocketmine\level\format\io\region;
class RegionException extends \RuntimeException{ class RegionException extends \RuntimeException{
} }

View File

@ -59,7 +59,6 @@ abstract class Generator{
*/ */
abstract public function __construct(array $settings = []); abstract public function __construct(array $settings = []);
public function init(ChunkManager $level, Random $random) : void{ public function init(ChunkManager $level, Random $random) : void{
$this->level = $level; $this->level = $level;
$this->random = $random; $this->random = $random;

Some files were not shown because too many files have changed in this diff Show More