From bcb76b51f4b66ebb60d0bcdf98f2a535463e5ac9 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Thu, 18 Apr 2013 16:43:00 +0200 Subject: [PATCH] Fixed setting more gamemodes --- src/Player.php | 2 +- src/constants/GeneralConstants.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Player.php b/src/Player.php index 41a367617..9488f59b3 100644 --- a/src/Player.php +++ b/src/Player.php @@ -785,7 +785,7 @@ class Player{ "y" => $this->data->get("position")["y"], "z" => $this->data->get("position")["z"], "unknown1" => 0, - "gamemode" => $this->gamemode, + "gamemode" => ($this->gamemode & 0x01), "eid" => 0, )); if(($this->gamemode & 0x01) === 0x01){ diff --git a/src/constants/GeneralConstants.php b/src/constants/GeneralConstants.php index d58f9efd3..61718e9af 100644 --- a/src/constants/GeneralConstants.php +++ b/src/constants/GeneralConstants.php @@ -29,4 +29,5 @@ the Free Software Foundation, either version 3 of the License, or define("SURVIVAL", 0); define("CREATIVE", 1); define("ADVENTURE", 2); -define("VIEW", 3); \ No newline at end of file +define("VIEW", 3); +define("VIEWER", 3); \ No newline at end of file