3
0
Mirror von https://github.com/Moulberry/AxiomPaperPlugin.git synchronisiert 2024-11-08 17:40:04 +01:00

Log data versions when incompatible

Dieser Commit ist enthalten in:
Moulberry 2023-10-10 14:33:32 +08:00
Ursprung 6de6ff0d28
Commit d7523cba6a

Datei anzeigen

@ -46,8 +46,10 @@ public class HelloPacketListener implements PluginMessageListener {
int dataVersion = friendlyByteBuf.readVarInt();
friendlyByteBuf.readNbt(); // Discard
if (dataVersion != SharedConstants.getCurrentVersion().getDataVersion().getVersion()) {
player.kick(Component.text("Axiom: Incompatible data version detected, are you using ViaVersion?"));
int serverDataVersion = SharedConstants.getCurrentVersion().getDataVersion().getVersion();
if (dataVersion != serverDataVersion) {
player.kick(Component.text("Axiom: Incompatible data version detected (client " + dataVersion +
", server " + serverDataVersion + "), are you using ViaVersion?"));
return;
}