mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 23:37:45 +00:00
Switched gamemode handler to Player object
This commit is contained in:
@@ -154,10 +154,10 @@ class BlockAPI{
|
||||
public function playerBlockBreak(Player $player, Vector3 $vector){
|
||||
|
||||
$target = $this->getBlock($vector);
|
||||
if($target->isBreakable === false or $this->server->gamemode === 2){
|
||||
return $this->cancelAction($target);
|
||||
}
|
||||
$item = $player->equipment;
|
||||
if(!$target->isBreakable($item, $player) or $this->server->gamemode === 2){
|
||||
return $this->cancelAction($target);
|
||||
}
|
||||
|
||||
|
||||
if($this->server->api->dhandle("player.block.break", array("player" => $player, "target" => $target, "item" => $item)) !== false){
|
||||
|
@@ -135,7 +135,7 @@ class ServerAPI{
|
||||
console("[NOTICE] \x1b[33mA new DEVELOPMENT version of PocketMine-MP has been released");
|
||||
console("[NOTICE] \x1b[33mVersion \"".$info["development"]["version"]."\" [".substr($info["development"]["commit"], 0, 10)."]");
|
||||
console("[NOTICE] \x1b[36mIf you want to update, get the latest version at ".$info["development"]["download"]);
|
||||
console("[NOTICE] This message will dissapear when you issue the command \"/update-done\"");
|
||||
console("[NOTICE] This message will dissapear after issuing the command \"/update-done\"");
|
||||
sleep(3);
|
||||
}else{
|
||||
$this->setProperty("last-update", time());
|
||||
|
Reference in New Issue
Block a user