mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Casting cleanup and removed some 32-bit string-int leftovers
This commit is contained in:
@ -428,7 +428,7 @@ class Server{
|
||||
* @return string
|
||||
*/
|
||||
public static function getGamemodeString(int $mode) : string{
|
||||
switch((int) $mode){
|
||||
switch($mode){
|
||||
case Player::SURVIVAL:
|
||||
return "%gameMode.survival";
|
||||
case Player::CREATIVE:
|
||||
@ -1209,7 +1209,7 @@ class Server{
|
||||
return (int) $v[$variable];
|
||||
}
|
||||
|
||||
return $this->properties->exists($variable) ? (int) $this->properties->get($variable) : (int) $defaultValue;
|
||||
return $this->properties->exists($variable) ? (int) $this->properties->get($variable) : $defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1217,7 +1217,7 @@ class Server{
|
||||
* @param int $value
|
||||
*/
|
||||
public function setConfigInt(string $variable, int $value){
|
||||
$this->properties->set($variable, (int) $value);
|
||||
$this->properties->set($variable, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user