Skip to content

Commit 7be3d06

Browse files
committed
1.2.1: Velocity b329+ support
1 parent 3680030 commit 7be3d06

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.0
1+
1.2.1

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ plugins() {
1111
}
1212

1313
this.group = "net.elytrium"
14-
this.version = "1.2.0"
14+
this.version = "1.2.1"
1515

1616
compileJava() {
1717
sourceCompatibility = 17

src/main/java/net/elytrium/velocitytools/hooks/HandshakeHook.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
import com.velocitypowered.proxy.network.Connections;
2525
import com.velocitypowered.proxy.protocol.MinecraftPacket;
2626
import com.velocitypowered.proxy.protocol.StateRegistry;
27-
import com.velocitypowered.proxy.protocol.packet.Disconnect;
28-
import com.velocitypowered.proxy.protocol.packet.Handshake;
27+
import com.velocitypowered.proxy.protocol.packet.DisconnectPacket;
28+
import com.velocitypowered.proxy.protocol.packet.HandshakePacket;
2929
import java.lang.reflect.Field;
3030
import java.lang.reflect.InvocationTargetException;
3131
import java.lang.reflect.Method;
@@ -38,7 +38,7 @@
3838
import net.elytrium.velocitytools.handlers.HostnamesManagerHandler;
3939
import net.kyori.adventure.text.Component;
4040

41-
public class HandshakeHook extends Handshake implements PacketHook {
41+
public class HandshakeHook extends HandshakePacket implements PacketHook {
4242

4343
private static Method GET_STATE_FOR_PROTOCOL;
4444
private static Field CONNECTION_FIELD;
@@ -82,7 +82,7 @@ public Supplier<MinecraftPacket> getHook() {
8282

8383
@Override
8484
public Class<? extends MinecraftPacket> getType() {
85-
return Handshake.class;
85+
return HandshakePacket.class;
8686
}
8787

8888
@Override
@@ -110,7 +110,7 @@ public static void reload(PreparedPacketFactory factory) {
110110

111111
DISCONNECT_PACKET = factory
112112
.createPreparedPacket(ProtocolVersion.MINIMUM_VERSION, ProtocolVersion.MAXIMUM_VERSION)
113-
.prepare(version -> Disconnect.create(kickReasonComponent, version, false));
113+
.prepare(version -> DisconnectPacket.create(kickReasonComponent, version, false));
114114

115115
DISABLE_INVALID_PROTOCOL = Settings.IMP.TOOLS.DISABLE_INVALID_PROTOCOL;
116116
} catch (NoSuchMethodException | NoSuchFieldException e) {

src/main/java/net/elytrium/velocitytools/hooks/PluginMessageHook.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import com.velocitypowered.proxy.connection.client.ConnectedPlayer;
2626
import com.velocitypowered.proxy.protocol.MinecraftPacket;
2727
import com.velocitypowered.proxy.protocol.ProtocolUtils;
28-
import com.velocitypowered.proxy.protocol.packet.PluginMessage;
28+
import com.velocitypowered.proxy.protocol.packet.PluginMessagePacket;
2929
import com.velocitypowered.proxy.protocol.util.PluginMessageUtil;
3030
import io.netty.buffer.ByteBuf;
3131
import io.netty.buffer.Unpooled;
@@ -36,7 +36,7 @@
3636
import net.elytrium.commons.utils.reflection.ReflectionException;
3737
import net.elytrium.velocitytools.Settings;
3838

39-
class PluginMessageHook extends PluginMessage implements PacketHook {
39+
class PluginMessageHook extends PluginMessagePacket implements PacketHook {
4040

4141
protected static MethodHandle SERVER_CONNECTION_BACKEND_PLAY_FIELD;
4242
protected static MethodHandle SERVER_CONNECTION_CONFIG_FIELD;
@@ -65,7 +65,7 @@ public boolean handle(MinecraftSessionHandler handler) {
6565
return super.handle(handler);
6666
}
6767

68-
private PluginMessage rewriteMinecraftBrand(PluginMessage message, ProtocolVersion protocolVersion) {
68+
private PluginMessagePacket rewriteMinecraftBrand(PluginMessagePacket message, ProtocolVersion protocolVersion) {
6969
String currentBrand = PluginMessageUtil.readBrandMessage(message.content());
7070
String rewrittenBrand = MessageFormat.format(this.inGameBrand, currentBrand);
7171
ByteBuf rewrittenBuf = Unpooled.buffer();
@@ -75,7 +75,7 @@ private PluginMessage rewriteMinecraftBrand(PluginMessage message, ProtocolVersi
7575
rewrittenBuf.writeCharSequence(rewrittenBrand, StandardCharsets.UTF_8);
7676
}
7777

78-
return new PluginMessage(message.getChannel(), rewrittenBuf);
78+
return new PluginMessagePacket(message.getChannel(), rewrittenBuf);
7979
}
8080

8181
@Override
@@ -85,7 +85,7 @@ public Supplier<MinecraftPacket> getHook() {
8585

8686
@Override
8787
public Class<? extends MinecraftPacket> getType() {
88-
return PluginMessage.class;
88+
return PluginMessagePacket.class;
8989
}
9090

9191
@Override

0 commit comments

Comments
 (0)