You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
::create() was introduced to solve the issue of forgetting to initialize packet fields, which led to many confusing issues for plugin devs.
In furtherance of this goal, we need to prevent the use of new WhateverPacket entirely, and require the usage of WhateverPacket::create() exclusively. This would likely be achieved by making DataPacket::__construct() private, and introducing a DataPacket::fromBuffer() : static static method.
The text was updated successfully, but these errors were encountered:
::create() was introduced to solve the issue of forgetting to initialize packet fields, which led to many confusing issues for plugin devs.
In furtherance of this goal, we need to prevent the use of
new WhateverPacket
entirely, and require the usage ofWhateverPacket::create()
exclusively. This would likely be achieved by makingDataPacket::__construct()
private, and introducing aDataPacket::fromBuffer() : static
static method.The text was updated successfully, but these errors were encountered: