Formatting

This commit is contained in:
Shoghi Cervantes 2014-04-01 19:48:28 +02:00
parent b4cc3bbd43
commit 7e9304a0c9
20 changed files with 23 additions and 27 deletions

View File

@ -20,6 +20,7 @@
*/
namespace pocketmine;
use pocketmine\utils\TextFormat;
/**

View File

@ -22,7 +22,6 @@
namespace pocketmine;
use pocketmine\nbt\NBT;
use pocketmine\nbt\tag\Compound;
class OfflinePlayer implements IPlayer{
@ -114,5 +113,4 @@ class OfflinePlayer implements IPlayer{
}
}

View File

@ -31,12 +31,6 @@ use pocketmine\math\Vector3 as Vector3;
use pocketmine\nbt\NBT;
use pocketmine\nbt\tag\Byte;
use pocketmine\nbt\tag\Compound;
use pocketmine\nbt\tag\Double;
use pocketmine\nbt\tag\Enum;
use pocketmine\nbt\tag\Float;
use pocketmine\nbt\tag\Int;
use pocketmine\nbt\tag\Long;
use pocketmine\nbt\tag\Short;
use pocketmine\nbt\tag\String;
use pocketmine\network\protocol\AdventureSettingsPacket;
use pocketmine\network\protocol\ChunkDataPacket;
@ -69,7 +63,6 @@ use pocketmine\tile\Furnace;
use pocketmine\tile\Sign;
use pocketmine\tile\Spawnable;
use pocketmine\tile\Tile;
use pocketmine\utils\Config;
use pocketmine\utils\TextFormat;
use pocketmine\utils\Utils;

View File

@ -464,6 +464,7 @@ class Server{
if($result === null){
$result = new OfflinePlayer($this, $name);
}
return $result;
}
@ -568,10 +569,12 @@ class Server{
console("[NOTICE] Player data not found for \"" . $name . "\", creating new profile");
}
$this->saveOfflinePlayerData($name, $nbt);
return $nbt;
}else{
$nbt = new NBT(NBT::BIG_ENDIAN);
$nbt->readCompressed(file_get_contents($path . "$name.dat"));
return $nbt->getData();
}
}
@ -607,6 +610,7 @@ class Server{
}
}
}
return $found;
}

View File

@ -21,11 +21,9 @@
namespace pocketmine\command\defaults;
use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\Player;
use pocketmine\Server;
use pocketmine\utils\TextFormat;
class ListCommand extends VanillaCommand{

View File

@ -23,7 +23,6 @@ namespace pocketmine\command\defaults;
use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\Player;
use pocketmine\Server;
class StopCommand extends VanillaCommand{

View File

@ -34,11 +34,11 @@ use pocketmine\level\Position;
use pocketmine\math\AxisAlignedBB;
use pocketmine\math\Vector3 as Vector3;
use pocketmine\nbt\tag\Compound;
use pocketmine\Network;
use pocketmine\network\protocol\MoveEntityPacket_PosRot;
use pocketmine\network\protocol\MovePlayerPacket;
use pocketmine\network\protocol\RemoveEntityPacket;
use pocketmine\network\protocol\SetEntityMotionPacket;
use pocketmine\Network;
use pocketmine\network\protocol\SetTimePacket;
use pocketmine\Player;
use pocketmine\pmf\LevelFormat;

View File

@ -29,13 +29,13 @@ use pocketmine\nbt\tag\Byte;
use pocketmine\nbt\tag\Compound;
use pocketmine\nbt\tag\Enum;
use pocketmine\nbt\tag\Short;
use pocketmine\Network;
use pocketmine\network\protocol\AddPlayerPacket;
use pocketmine\network\protocol\ContainerSetContentPacket;
use pocketmine\network\protocol\PlayerArmorEquipmentPacket;
use pocketmine\network\protocol\PlayerEquipmentPacket;
use pocketmine\network\protocol\RemovePlayerPacket;
use pocketmine\network\protocol\SetEntityMotionPacket;
use pocketmine\Network;
use pocketmine\Player;
use pocketmine\Server;

View File

@ -21,8 +21,8 @@
namespace pocketmine\event\player;
use pocketmine\event\Cancellable;
use pocketmine\Event;
use pocketmine\event\Cancellable;
use pocketmine\item\Item;
use pocketmine\Player;

View File

@ -21,8 +21,8 @@
namespace pocketmine\event\server;
use pocketmine\event;
use pocketmine\event\Cancellable;
use pocketmine\event;
use pocketmine\network\protocol\DataPacket;
use pocketmine\Player;

View File

@ -21,8 +21,8 @@
namespace pocketmine\event\server;
use pocketmine\event;
use pocketmine\event\Cancellable;
use pocketmine\event;
use pocketmine\network\protocol\DataPacket;
use pocketmine\Player;

View File

@ -21,8 +21,8 @@
namespace pocketmine\event\tile;
use pocketmine\Event;
use pocketmine\event\Cancellable;
use pocketmine\Event;
use pocketmine\item\Item;
use pocketmine\tile\Tile;

View File

@ -26,7 +26,6 @@
namespace pocketmine\network\query;
use pocketmine\level\Level;
use pocketmine\Player;
use pocketmine\Server;
use pocketmine\utils\Utils;

View File

@ -102,6 +102,7 @@ class PermissibleBase implements Permissible{
if(($perm = Server::getInstance()->getPluginManager()->getPermission($name)) !== null){
$perm = $perm->getDefault();
return $perm === Permission::DEFAULT_TRUE or ($this->isOp() and $perm === Permission::DEFAULT_OP) or (!$this->isOp() and $perm === Permission::DEFAULT_NOT_OP);
}else{
return Permission::$DEFAULT_PERMISSION === Permission::DEFAULT_TRUE or ($this->isOp() and Permission::$DEFAULT_PERMISSION === Permission::DEFAULT_OP) or (!$this->isOp() and Permission::$DEFAULT_PERMISSION === Permission::DEFAULT_NOT_OP);

View File

@ -73,6 +73,7 @@ class PharPluginLoader implements PluginLoader{
return null;
}
}
return null;
}

View File

@ -555,6 +555,7 @@ class PluginManager{
$pluginCmds[] = $newCmd;
}
}
return $pluginCmds;
}
@ -617,6 +618,7 @@ class PluginManager{
public function registerEvents(Listener $listener, Plugin $plugin){
if(!$plugin->isEnabled()){
trigger_error("Plugin attempted to register " . get_class($listener) . " while not enabled", E_USER_WARNING);
return;
}

View File

@ -26,10 +26,10 @@ use pocketmine\item\Item;
use pocketmine\nbt\tag\Byte;
use pocketmine\nbt\tag\Compound;
use pocketmine\nbt\tag\Short;
use pocketmine\Network;
use pocketmine\network\protocol\ContainerOpenPacket;
use pocketmine\network\protocol\ContainerSetContentPacket;
use pocketmine\network\protocol\TileEventPacket;
use pocketmine\Network;
use pocketmine\Player;
use pocketmine\Server;