mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Cleaned up bool comparison mess
This commit is contained in:
@ -48,7 +48,7 @@ class BanList{
|
||||
* @return bool
|
||||
*/
|
||||
public function isEnabled() : bool{
|
||||
return $this->enabled === true;
|
||||
return $this->enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -172,7 +172,7 @@ class BanList{
|
||||
$this->removeExpired();
|
||||
$fp = @fopen($this->file, "w");
|
||||
if(is_resource($fp)){
|
||||
if($flag === true){
|
||||
if($flag){
|
||||
fwrite($fp, "# Updated " . strftime("%x %H:%M", time()) . " by " . Server::getInstance()->getName() . " " . Server::getInstance()->getPocketMineVersion() . "\n");
|
||||
fwrite($fp, "# victim name | ban date | banned by | banned until | reason\n\n");
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ class Permission{
|
||||
*/
|
||||
public static function getByName($value) : string{
|
||||
if(is_bool($value)){
|
||||
if($value === true){
|
||||
if($value){
|
||||
return "true";
|
||||
}else{
|
||||
return "false";
|
||||
|
Reference in New Issue
Block a user