mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 12: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(){
|
public function getPacket(){
|
||||||
return $this->packet;
|
$packetCurrent = clone $this->packet;
|
||||||
|
$packetCurrent->PROTOCOL = ProtocolInfo::CURRENT_PROTOCOL;
|
||||||
|
return $packetCurrent;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPlayer(){
|
public function getPlayer(){
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,9 @@ class DataPacketSendEvent extends ServerEvent implements CancellableEvent{
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPacket(){
|
public function getPacket(){
|
||||||
return $this->packet;
|
$packetCurrent = clone $this->packet;
|
||||||
|
$packetCurrent->PROTOCOL = ProtocolInfo::CURRENT_PROTOCOL;
|
||||||
|
return $packetCurrent;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPlayer(){
|
public function getPlayer(){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue