mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
feat: getProtocol()
This commit is contained in:
parent
896eb736f0
commit
5b4110b285
6 changed files with 41 additions and 12 deletions
|
|
@ -665,7 +665,7 @@ class BlockAPI{
|
|||
|
||||
private function cancelAction(Block $block, Player $player, $send = true){
|
||||
$player->addBlockUpdateIntoQueue($block->x, $block->y, $block->z, $block->getID(), $block->getMetadata());
|
||||
if($send === true && $player->PROTOCOL >= ProtocolInfo12::CURRENT_PROTOCOL_11){
|
||||
if($send === true && $player->getProtocol() >= ProtocolInfo12::CURRENT_PROTOCOL_11){
|
||||
$player->sendInventory();
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -533,7 +533,7 @@ class PlayerAPI{
|
|||
public static function decodeProtocol($ip, $port){
|
||||
foreach(ServerAPI::request()->clients as $p) {
|
||||
if($p->ip == $ip && $p->port == $port){
|
||||
return $p->PROTOCOL;
|
||||
return $p->getProtocol();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue