mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2025-03-07 13:48:00 +08:00
Fix NPE caused by client-side CUI packets
This commit is contained in:
parent
b2f55cfe8f
commit
495e5924c7
@ -46,6 +46,10 @@ public static void init() {
|
||||
}
|
||||
|
||||
public static void onPacketData(CustomPayloadEvent event) {
|
||||
if (event.getSource().isClientSide()) {
|
||||
// Ignore client-side packets
|
||||
return;
|
||||
}
|
||||
ServerPlayer player = event.getSource().getSender();
|
||||
LocalSession session = ForgeWorldEdit.inst.getSession(player);
|
||||
String text = event.getPayload().toString(StandardCharsets.UTF_8);
|
||||
|
Loading…
Reference in New Issue
Block a user