mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-10-06 10:27:31 +02:00
Merge pull request #1344 from astei/dont-send-empty-register
Don't try to send register messages without channels
This commit is contained in:
commit
a2d9489ad5
@ -178,7 +178,12 @@ public class InventoryPackets {
|
||||
Via.getPlatform().getLogger().warning("Ignoring plugin channel in outgoing REGISTER: " + channels[i]);
|
||||
}
|
||||
}
|
||||
wrapper.write(Type.REMAINING_BYTES, Joiner.on('\0').join(rewrittenChannels).getBytes(StandardCharsets.UTF_8));
|
||||
if (!rewrittenChannels.isEmpty()) {
|
||||
wrapper.write(Type.REMAINING_BYTES, Joiner.on('\0').join(rewrittenChannels).getBytes(StandardCharsets.UTF_8));
|
||||
} else {
|
||||
wrapper.cancel();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
wrapper.set(Type.STRING, 0, channel);
|
||||
|
Loading…
Reference in New Issue
Block a user