Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-08 17:20:24 +01:00
Fix #515 Disconnect Message not being fixed json
Dieser Commit ist enthalten in:
Ursprung
1a6b98deca
Commit
9ccbdb69c5
@ -11,10 +11,12 @@ import us.myles.ViaVersion.api.data.UserConnection;
|
|||||||
import us.myles.ViaVersion.api.minecraft.item.Item;
|
import us.myles.ViaVersion.api.minecraft.item.Item;
|
||||||
import us.myles.ViaVersion.api.minecraft.metadata.Metadata;
|
import us.myles.ViaVersion.api.minecraft.metadata.Metadata;
|
||||||
import us.myles.ViaVersion.api.protocol.Protocol;
|
import us.myles.ViaVersion.api.protocol.Protocol;
|
||||||
|
import us.myles.ViaVersion.api.remapper.PacketRemapper;
|
||||||
import us.myles.ViaVersion.api.remapper.ValueTransformer;
|
import us.myles.ViaVersion.api.remapper.ValueTransformer;
|
||||||
import us.myles.ViaVersion.api.type.Type;
|
import us.myles.ViaVersion.api.type.Type;
|
||||||
import us.myles.ViaVersion.api.type.types.version.Metadata1_8Type;
|
import us.myles.ViaVersion.api.type.types.version.Metadata1_8Type;
|
||||||
import us.myles.ViaVersion.api.type.types.version.MetadataList1_8Type;
|
import us.myles.ViaVersion.api.type.types.version.MetadataList1_8Type;
|
||||||
|
import us.myles.ViaVersion.packets.State;
|
||||||
import us.myles.ViaVersion.protocols.base.ProtocolInfo;
|
import us.myles.ViaVersion.protocols.base.ProtocolInfo;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9to1_8.listeners.*;
|
import us.myles.ViaVersion.protocols.protocol1_9to1_8.listeners.*;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9to1_8.packets.*;
|
import us.myles.ViaVersion.protocols.protocol1_9to1_8.packets.*;
|
||||||
@ -95,6 +97,15 @@ public class Protocol1_9TO1_8 extends Protocol {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void registerPackets() {
|
protected void registerPackets() {
|
||||||
|
// Disconnect workaround (JSON!)
|
||||||
|
registerOutgoing(State.LOGIN, 0x00, 0x00, new PacketRemapper() {
|
||||||
|
@Override
|
||||||
|
public void registerMap() {
|
||||||
|
map(Type.STRING, Protocol1_9TO1_8.FIX_JSON); // 0 - Reason
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Other Handlers
|
||||||
SpawnPackets.register(this);
|
SpawnPackets.register(this);
|
||||||
InventoryPackets.register(this);
|
InventoryPackets.register(this);
|
||||||
EntityPackets.register(this);
|
EntityPackets.register(this);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren