mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Fix some doc comments
This commit is contained in:
parent
7c8586684e
commit
0c35c16727
@ -537,7 +537,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
* @param SourceInterface $interface
|
* @param SourceInterface $interface
|
||||||
* @param null $clientID
|
* @param null $clientID
|
||||||
* @param string $ip
|
* @param string $ip
|
||||||
* @param integer $port
|
* @param int $port
|
||||||
*/
|
*/
|
||||||
public function __construct(SourceInterface $interface, $clientID, $ip, $port){
|
public function __construct(SourceInterface $interface, $clientID, $ip, $port){
|
||||||
$this->interface = $interface;
|
$this->interface = $interface;
|
||||||
|
@ -27,7 +27,7 @@ namespace {
|
|||||||
case is_array($var):
|
case is_array($var):
|
||||||
echo str_repeat(" ", $cnt) . "array(" . count($var) . ") {" . PHP_EOL;
|
echo str_repeat(" ", $cnt) . "array(" . count($var) . ") {" . PHP_EOL;
|
||||||
foreach($var as $key => $value){
|
foreach($var as $key => $value){
|
||||||
echo str_repeat(" ", $cnt + 1) . "[" . (is_integer($key) ? $key : '"' . $key . '"') . "]=>" . PHP_EOL;
|
echo str_repeat(" ", $cnt + 1) . "[" . (is_int($key) ? $key : '"' . $key . '"') . "]=>" . PHP_EOL;
|
||||||
++$cnt;
|
++$cnt;
|
||||||
safe_var_dump($value);
|
safe_var_dump($value);
|
||||||
--$cnt;
|
--$cnt;
|
||||||
|
@ -30,7 +30,7 @@ interface CommandExecutor{
|
|||||||
* @param string $label
|
* @param string $label
|
||||||
* @param string[] $args
|
* @param string[] $args
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function onCommand(CommandSender $sender, Command $command, $label, array $args);
|
public function onCommand(CommandSender $sender, Command $command, $label, array $args);
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ interface CommandMap{
|
|||||||
* @param CommandSender $sender
|
* @param CommandSender $sender
|
||||||
* @param string $cmdLine
|
* @param string $cmdLine
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function dispatch(CommandSender $sender, $cmdLine);
|
public function dispatch(CommandSender $sender, $cmdLine);
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ class BlockBreakEvent extends BlockEvent implements Cancellable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param boolean $instaBreak
|
* @param bool $instaBreak
|
||||||
*/
|
*/
|
||||||
public function setInstaBreak($instaBreak){
|
public function setInstaBreak($instaBreak){
|
||||||
$this->instaBreak = (bool) $instaBreak;
|
$this->instaBreak = (bool) $instaBreak;
|
||||||
|
@ -1113,7 +1113,7 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
/**
|
/**
|
||||||
* @param Entity $entity
|
* @param Entity $entity
|
||||||
* @param AxisAlignedBB $bb
|
* @param AxisAlignedBB $bb
|
||||||
* @param boolean $entities
|
* @param bool $entities
|
||||||
*
|
*
|
||||||
* @return AxisAlignedBB[]
|
* @return AxisAlignedBB[]
|
||||||
*/
|
*/
|
||||||
@ -1248,7 +1248,7 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
* Gets the Block object on the Vector3 location
|
* Gets the Block object on the Vector3 location
|
||||||
*
|
*
|
||||||
* @param Vector3 $pos
|
* @param Vector3 $pos
|
||||||
* @param boolean $cached
|
* @param bool $cached
|
||||||
*
|
*
|
||||||
* @return Block
|
* @return Block
|
||||||
*/
|
*/
|
||||||
|
@ -51,7 +51,7 @@ interface Metadatable{
|
|||||||
*
|
*
|
||||||
* @param string $metadataKey
|
* @param string $metadataKey
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function hasMetadata($metadataKey);
|
public function hasMetadata($metadataKey);
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ interface Permissible extends ServerOperator{
|
|||||||
*
|
*
|
||||||
* @param string|Permission $name
|
* @param string|Permission $name
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isPermissionSet($name);
|
public function isPermissionSet($name);
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ class PluginManager{
|
|||||||
/**
|
/**
|
||||||
* @param string $loaderName A PluginLoader class name
|
* @param string $loaderName A PluginLoader class name
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function registerInterface($loaderName){
|
public function registerInterface($loaderName){
|
||||||
if(is_subclass_of($loaderName, PluginLoader::class)){
|
if(is_subclass_of($loaderName, PluginLoader::class)){
|
||||||
@ -381,7 +381,7 @@ class PluginManager{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param boolean $op
|
* @param bool $op
|
||||||
*
|
*
|
||||||
* @return Permission[]
|
* @return Permission[]
|
||||||
*/
|
*/
|
||||||
@ -422,7 +422,7 @@ class PluginManager{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param boolean $op
|
* @param bool $op
|
||||||
*/
|
*/
|
||||||
private function dirtyPermissibles($op){
|
private function dirtyPermissibles($op){
|
||||||
foreach($this->getDefaultPermSubscriptions($op) as $p){
|
foreach($this->getDefaultPermSubscriptions($op) as $p){
|
||||||
@ -480,7 +480,7 @@ class PluginManager{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param boolean $op
|
* @param bool $op
|
||||||
* @param Permissible $permissible
|
* @param Permissible $permissible
|
||||||
*/
|
*/
|
||||||
public function subscribeToDefaultPerms($op, Permissible $permissible){
|
public function subscribeToDefaultPerms($op, Permissible $permissible){
|
||||||
@ -492,7 +492,7 @@ class PluginManager{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param boolean $op
|
* @param bool $op
|
||||||
* @param Permissible $permissible
|
* @param Permissible $permissible
|
||||||
*/
|
*/
|
||||||
public function unsubscribeFromDefaultPerms($op, Permissible $permissible){
|
public function unsubscribeFromDefaultPerms($op, Permissible $permissible){
|
||||||
@ -504,7 +504,7 @@ class PluginManager{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param boolean $op
|
* @param bool $op
|
||||||
*
|
*
|
||||||
* @return Permissible[]
|
* @return Permissible[]
|
||||||
*/
|
*/
|
||||||
|
@ -52,7 +52,7 @@ class RegisteredListener{
|
|||||||
* @param EventExecutor $executor
|
* @param EventExecutor $executor
|
||||||
* @param int $priority
|
* @param int $priority
|
||||||
* @param Plugin $plugin
|
* @param Plugin $plugin
|
||||||
* @param boolean $ignoreCancelled
|
* @param bool $ignoreCancelled
|
||||||
* @param TimingsHandler $timings
|
* @param TimingsHandler $timings
|
||||||
*/
|
*/
|
||||||
public function __construct(Listener $listener, EventExecutor $executor, $priority, Plugin $plugin, $ignoreCancelled, TimingsHandler $timings){
|
public function __construct(Listener $listener, EventExecutor $executor, $priority, Plugin $plugin, $ignoreCancelled, TimingsHandler $timings){
|
||||||
|
@ -26,8 +26,6 @@ use pocketmine\Server;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Config
|
|
||||||
*
|
|
||||||
* Config Class for simple config manipulation of multiple formats.
|
* Config Class for simple config manipulation of multiple formats.
|
||||||
*/
|
*/
|
||||||
class Config{
|
class Config{
|
||||||
@ -48,9 +46,9 @@ class Config{
|
|||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $file;
|
private $file;
|
||||||
/** @var boolean */
|
/** @var bool */
|
||||||
private $correct = false;
|
private $correct = false;
|
||||||
/** @var integer */
|
/** @var int */
|
||||||
private $type = Config::DETECT;
|
private $type = Config::DETECT;
|
||||||
|
|
||||||
public static $formats = [
|
public static $formats = [
|
||||||
@ -168,7 +166,7 @@ class Config{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return boolean
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function check(){
|
public function check(){
|
||||||
return $this->correct === true;
|
return $this->correct === true;
|
||||||
@ -177,7 +175,7 @@ class Config{
|
|||||||
/**
|
/**
|
||||||
* @param bool $async
|
* @param bool $async
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function save($async = false){
|
public function save($async = false){
|
||||||
if($this->correct === true){
|
if($this->correct === true){
|
||||||
@ -224,7 +222,7 @@ class Config{
|
|||||||
/**
|
/**
|
||||||
* @param $k
|
* @param $k
|
||||||
*
|
*
|
||||||
* @return boolean|mixed
|
* @return bool|mixed
|
||||||
*/
|
*/
|
||||||
public function __get($k){
|
public function __get($k){
|
||||||
return $this->get($k);
|
return $this->get($k);
|
||||||
@ -241,7 +239,7 @@ class Config{
|
|||||||
/**
|
/**
|
||||||
* @param $k
|
* @param $k
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function __isset($k){
|
public function __isset($k){
|
||||||
return $this->exists($k);
|
return $this->exists($k);
|
||||||
@ -315,7 +313,7 @@ class Config{
|
|||||||
* @param $k
|
* @param $k
|
||||||
* @param mixed $default
|
* @param mixed $default
|
||||||
*
|
*
|
||||||
* @return boolean|mixed
|
* @return bool|mixed
|
||||||
*/
|
*/
|
||||||
public function get($k, $default = false){
|
public function get($k, $default = false){
|
||||||
return ($this->correct and isset($this->config[$k])) ? $this->config[$k] : $default;
|
return ($this->correct and isset($this->config[$k])) ? $this->config[$k] : $default;
|
||||||
@ -345,7 +343,7 @@ class Config{
|
|||||||
* @param $k
|
* @param $k
|
||||||
* @param bool $lowercase If set, searches Config in single-case / lowercase.
|
* @param bool $lowercase If set, searches Config in single-case / lowercase.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function exists($k, $lowercase = false){
|
public function exists($k, $lowercase = false){
|
||||||
if($lowercase === true){
|
if($lowercase === true){
|
||||||
@ -384,7 +382,7 @@ class Config{
|
|||||||
* @param $default
|
* @param $default
|
||||||
* @param $data
|
* @param $data
|
||||||
*
|
*
|
||||||
* @return integer
|
* @return int
|
||||||
*/
|
*/
|
||||||
private function fillDefaults($default, &$data){
|
private function fillDefaults($default, &$data){
|
||||||
$changed = 0;
|
$changed = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user