Skip to content

Commit

Permalink
Update to latest Velocity
Browse files Browse the repository at this point in the history
  • Loading branch information
IzzelAliz committed Jan 27, 2024
1 parent 15e01aa commit 4628c58
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = 'io.izzel.arclight'
version = '1.0.0'
version = '1.1.0'

repositories {
mavenCentral()
Expand All @@ -28,9 +28,9 @@ repositories {
}

dependencies {
compileOnly "com.velocitypowered:velocity-api:3.2.0-SNAPSHOT"
compileOnly "com.velocitypowered:velocity:3.3.0-SNAPSHOT:306@jar"
annotationProcessor "com.velocitypowered:velocity-api:3.2.0-SNAPSHOT"
compileOnly "com.velocitypowered:velocity-api:3.3.0-SNAPSHOT"
compileOnly "com.velocitypowered:velocity:3.3.0-SNAPSHOT:343@jar"
annotationProcessor "com.velocitypowered:velocity-api:3.3.0-SNAPSHOT"
}

java.toolchain.languageVersion = JavaLanguageVersion.of(17)
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/izzel/arclight/lightcity/Lightcity.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import com.velocitypowered.proxy.config.VelocityConfiguration;
import com.velocitypowered.proxy.connection.client.InitialInboundConnection;
import com.velocitypowered.proxy.connection.client.LoginInboundConnection;
import com.velocitypowered.proxy.protocol.packet.Handshake;
import com.velocitypowered.proxy.protocol.packet.HandshakePacket;
import org.slf4j.Logger;

import java.util.Locale;
Expand Down Expand Up @@ -46,7 +46,7 @@ public void onConnect(ConnectionHandshakeEvent event) throws Exception {
var initConn = (InitialInboundConnection) delegateField.get(connection);
var field = InitialInboundConnection.class.getDeclaredField("handshake");
field.setAccessible(true);
var handshake = (Handshake) field.get(initConn);
var handshake = (HandshakePacket) field.get(initConn);
var host = handshake.getServerAddress();
if (host.contains("\0")) {
var split = host.split("\0", 2);
Expand Down

0 comments on commit 4628c58

Please sign in to comment.