mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 00:29:54 +00:00
Removed /harm
This commit is contained in:
parent
da849a7251
commit
65110d5358
@ -36,7 +36,6 @@ class PlayerAPI{
|
|||||||
$this->server->addHandler("player.death", array($this, "handle"), 1);
|
$this->server->addHandler("player.death", array($this, "handle"), 1);
|
||||||
$this->server->api->console->register("list", "Shows connected player list", array($this, "commandHandler"));
|
$this->server->api->console->register("list", "Shows connected player list", array($this, "commandHandler"));
|
||||||
$this->server->api->console->register("kill", "Kills a player", array($this, "commandHandler"));
|
$this->server->api->console->register("kill", "Kills a player", array($this, "commandHandler"));
|
||||||
$this->server->api->console->register("harm", "Harms a player", array($this, "commandHandler"));
|
|
||||||
$this->server->api->console->register("gamemode", "Changes the player gamemode", array($this, "commandHandler"));
|
$this->server->api->console->register("gamemode", "Changes the player gamemode", array($this, "commandHandler"));
|
||||||
$this->server->api->console->register("tppos", "Teleports a player to a position", array($this, "commandHandler"));
|
$this->server->api->console->register("tppos", "Teleports a player to a position", array($this, "commandHandler"));
|
||||||
$this->server->api->console->register("tp", "Teleports a player to another player", array($this, "commandHandler"));
|
$this->server->api->console->register("tp", "Teleports a player to another player", array($this, "commandHandler"));
|
||||||
@ -185,15 +184,6 @@ class PlayerAPI{
|
|||||||
$output .= "Usage: /kill [player]\n";
|
$output .= "Usage: /kill [player]\n";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "harm":
|
|
||||||
$dmg = (int) array_shift($params);
|
|
||||||
$player = $this->get(implode(" ", $params));
|
|
||||||
if($player !== false){
|
|
||||||
$this->server->api->entity->harm($player->eid, $dmg, "console", true);
|
|
||||||
}else{
|
|
||||||
$output .= "Usage: /harm <damage> <player>\n";
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "list":
|
case "list":
|
||||||
$output .= "Player list:\n";
|
$output .= "Player list:\n";
|
||||||
foreach($this->server->clients as $c){
|
foreach($this->server->clients as $c){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user