diff --git a/src/API/EntityAPI.php b/src/API/EntityAPI.php index eeb7b37a4..a33afc23e 100644 --- a/src/API/EntityAPI.php +++ b/src/API/EntityAPI.php @@ -50,12 +50,12 @@ class EntityAPI{ $this->harm($eid, -$heal, $cause); } - public function harm($eid, $attack = 1, $cause){ + public function harm($eid, $attack = 1, $cause, $force = false){ $e = $this->get($eid); if($e === false or $e->dead === true){ return false; } - $e->setHealth($e->getHealth() - $attack, $cause); + $e->setHealth($e->getHealth() - $attack, $cause, $force); } public function add($class, $type = 0, $data = array()){ diff --git a/src/API/PlayerAPI.php b/src/API/PlayerAPI.php index 934a4ca05..07ac566f2 100644 --- a/src/API/PlayerAPI.php +++ b/src/API/PlayerAPI.php @@ -127,7 +127,7 @@ class PlayerAPI{ case "kill": $player = $this->get(implode(" ", $params)); if($player !== false){ - $this->server->api->entity->harm($player->eid, 20, "console"); + $this->server->api->entity->harm($player->eid, 20, "console", true); }else{ console("[INFO] Usage: /kill "); } diff --git a/src/API/PluginAPI.php b/src/API/PluginAPI.php index b029af743..5376e0c28 100644 --- a/src/API/PluginAPI.php +++ b/src/API/PluginAPI.php @@ -125,6 +125,7 @@ class PluginAPI extends stdClass{ return false; } $path = FILE_PATH."plugins/".$p[1]["name"]."/"; + @mkdir($path); $this->plugins[$p[1]["class"]][1]["path"] = $path; $cnf = new Config($path."config.yml", CONFIG_YAML, $default); $cnf->save(); diff --git a/src/common/config.php b/src/common/config.php index 1a95dd30c..af0bea219 100644 --- a/src/common/config.php +++ b/src/common/config.php @@ -38,6 +38,6 @@ ini_set("memory_limit", "256M"); define("LOG", true); define("MAGIC", "\x00\xff\xff\x00\xfe\xfe\xfe\xfe\xfd\xfd\xfd\xfd\x12\x34\x56\x78"); define("TEST_MD5", "d0ca3786e53b615bb4fb9f5094d5c9a7"); -define("MAJOR_VERSION", "Alpha_1.0.8"); +define("MAJOR_VERSION", "Alpha_1.1dev"); define("CURRENT_PROTOCOL", 5); define("CURRENT_MINECRAFT_VERSION", "v0.5.0 alpha"); \ No newline at end of file