mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Make uniform datapacket type for plugin event
This commit is contained in:
parent
426fd93cb6
commit
047852e0bf
2 changed files with 6 additions and 2 deletions
|
|
@ -32,7 +32,9 @@ class DataPacketReceiveEvent extends ServerEvent implements CancellableEvent{
|
|||
}
|
||||
|
||||
public function getPacket(){
|
||||
return $this->packet;
|
||||
$packetCurrent = clone $this->packet;
|
||||
$packetCurrent->PROTOCOL = ProtocolInfo::CURRENT_PROTOCOL;
|
||||
return $packetCurrent;
|
||||
}
|
||||
|
||||
public function getPlayer(){
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@ class DataPacketSendEvent extends ServerEvent implements CancellableEvent{
|
|||
}
|
||||
|
||||
public function getPacket(){
|
||||
return $this->packet;
|
||||
$packetCurrent = clone $this->packet;
|
||||
$packetCurrent->PROTOCOL = ProtocolInfo::CURRENT_PROTOCOL;
|
||||
return $packetCurrent;
|
||||
}
|
||||
|
||||
public function getPlayer(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue