Cleaned up bool comparison mess

This commit is contained in:
Dylan K. Taylor
2018-03-19 14:10:55 +00:00
parent 24c5d7557e
commit ac5a91b67e
39 changed files with 141 additions and 141 deletions

View File

@ -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");
}

View File

@ -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";