Casting cleanup and removed some 32-bit string-int leftovers

This commit is contained in:
Dylan K. Taylor
2017-08-17 11:24:49 +01:00
parent 77376d3e33
commit 5b4035253b
6 changed files with 25 additions and 24 deletions

View File

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