mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-27 10:59:07 +00:00
fix(network): 添加校验
This commit is contained in:
@@ -304,6 +304,9 @@ public class BukkitServerPlayer extends Player {
|
||||
|
||||
@Override
|
||||
public void sendCustomPayload(Key channel, byte[] data) {
|
||||
if (!VersionHelper.isOrAbove1_20_2()) {
|
||||
throw new UnsupportedOperationException("Cannot send custom payload to " + name() + " because the server is running a version below 1.20.2");
|
||||
}
|
||||
try {
|
||||
Object channelKey = KeyUtils.toResourceLocation(channel);
|
||||
Object dataPayload;
|
||||
|
||||
Reference in New Issue
Block a user