mirror of
https://github.com/GeyserMC/Floodgate.git
synced 2026-01-06 15:42:03 +00:00
Use even less reflection on Velocity and fixed artifact location
This commit is contained in:
18
.github/workflows/build.yml
vendored
18
.github/workflows/build.yml
vendored
@@ -44,7 +44,7 @@ jobs:
|
||||
if: success()
|
||||
with:
|
||||
name: Floodgate Bungee
|
||||
path: bungee/build/libs/floodgate-bungee.jar
|
||||
path: bungee/isolated/build/libs/floodgate-bungee.jar
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Archive artifacts (Floodgate Spigot)
|
||||
@@ -53,7 +53,7 @@ jobs:
|
||||
if: success()
|
||||
with:
|
||||
name: Floodgate Spigot
|
||||
path: spigot/build/libs/floodgate-spigot.jar
|
||||
path: spigot/isolated/build/libs/floodgate-spigot.jar
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Archive artifacts (Floodgate Velocity)
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
if: success()
|
||||
with:
|
||||
name: Floodgate Velocity
|
||||
path: velocity/build/libs/floodgate-velocity.jar
|
||||
path: velocity/isolated/build/libs/floodgate-velocity.jar
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Publish to Maven Repository
|
||||
@@ -83,9 +83,9 @@ jobs:
|
||||
appID: ${{ secrets.RELEASE_APP_ID }}
|
||||
appPrivateKey: ${{ secrets.RELEASE_APP_PK }}
|
||||
files: |
|
||||
bungee:bungee/build/libs/floodgate-bungee.jar
|
||||
spigot:spigot/build/libs/floodgate-spigot.jar
|
||||
velocity:velocity/build/libs/floodgate-velocity.jar
|
||||
bungee:bungee/isolated/build/libs/floodgate-bungee.jar
|
||||
spigot:spigot/isolated/build/libs/floodgate-spigot.jar
|
||||
velocity:velocity/isolated/build/libs/floodgate-velocity.jar
|
||||
releaseEnabled: false
|
||||
saveMetadata: true
|
||||
|
||||
@@ -118,9 +118,9 @@ jobs:
|
||||
# Create the build folder
|
||||
ssh -o StrictHostKeyChecking=no -i id_ecdsa $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP mkdir -p "~/uploads/$PROJECT/$GITHUB_RUN_NUMBER/"
|
||||
# Copy over artifacts
|
||||
rsync -P -e "ssh -o StrictHostKeyChecking=no -i id_ecdsa" bungee/build/libs/floodgate-bungee.jar $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/uploads/$PROJECT/$GITHUB_RUN_NUMBER/
|
||||
rsync -P -e "ssh -o StrictHostKeyChecking=no -i id_ecdsa" spigot/build/libs/floodgate-spigot.jar $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/uploads/$PROJECT/$GITHUB_RUN_NUMBER/
|
||||
rsync -P -e "ssh -o StrictHostKeyChecking=no -i id_ecdsa" velocity/build/libs/floodgate-velocity.jar $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/uploads/$PROJECT/$GITHUB_RUN_NUMBER/
|
||||
rsync -P -e "ssh -o StrictHostKeyChecking=no -i id_ecdsa" bungee/isolated/build/libs/floodgate-bungee.jar $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/uploads/$PROJECT/$GITHUB_RUN_NUMBER/
|
||||
rsync -P -e "ssh -o StrictHostKeyChecking=no -i id_ecdsa" spigot/isolated/build/libs/floodgate-spigot.jar $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/uploads/$PROJECT/$GITHUB_RUN_NUMBER/
|
||||
rsync -P -e "ssh -o StrictHostKeyChecking=no -i id_ecdsa" velocity/isolated/build/libs/floodgate-velocity.jar $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/uploads/$PROJECT/$GITHUB_RUN_NUMBER/
|
||||
# Run the build script
|
||||
rsync -P -e "ssh -o StrictHostKeyChecking=no -i id_ecdsa" metadata.json $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/uploads/$PROJECT/$GITHUB_RUN_NUMBER/
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@ import io.micronaut.context.ApplicationContext;
|
||||
import io.micronaut.inject.qualifiers.Qualifiers;
|
||||
import java.nio.file.Path;
|
||||
import org.geysermc.floodgate.core.FloodgatePlatform;
|
||||
import org.geysermc.floodgate.core.util.ReflectionUtils;
|
||||
import org.geysermc.floodgate.isolation.library.LibraryManager;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@@ -50,7 +49,6 @@ public class VelocityPlatform extends FloodgatePlatform {
|
||||
@Inject
|
||||
public VelocityPlatform(LibraryManager manager) {
|
||||
super(manager);
|
||||
ReflectionUtils.setPrefix("com.velocitypowered.proxy");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -27,7 +27,6 @@ package org.geysermc.floodgate.velocity.addon.data;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
import static org.geysermc.floodgate.core.util.ReflectionUtils.getField;
|
||||
import static org.geysermc.floodgate.core.util.ReflectionUtils.getPrefixedClass;
|
||||
import static org.geysermc.floodgate.core.util.ReflectionUtils.setValue;
|
||||
|
||||
import com.velocitypowered.proxy.connection.MinecraftConnection;
|
||||
@@ -50,20 +49,14 @@ import org.geysermc.floodgate.core.logger.FloodgateLogger;
|
||||
|
||||
public final class VelocityProxyDataHandler extends CommonNettyDataHandler {
|
||||
private static final Field REMOTE_ADDRESS;
|
||||
|
||||
private static final Class<?> INITIAL_LOGIN_SESSION_HANDLER;
|
||||
private static final Field FORCE_KEY_AUTHENTICATION;
|
||||
|
||||
static {
|
||||
Class<?> minecraftConnection = getPrefixedClass("connection.MinecraftConnection");
|
||||
REMOTE_ADDRESS = getField(minecraftConnection, "remoteAddress");
|
||||
REMOTE_ADDRESS = getField(MinecraftConnection.class, "remoteAddress");
|
||||
requireNonNull(REMOTE_ADDRESS, "remoteAddress cannot be null");
|
||||
|
||||
INITIAL_LOGIN_SESSION_HANDLER = getPrefixedClass("connection.client.InitialLoginSessionHandler");
|
||||
requireNonNull(INITIAL_LOGIN_SESSION_HANDLER, "InitialLoginSessionHandler cannot be null");
|
||||
|
||||
// allowed to be null if it's an old Velocity version
|
||||
FORCE_KEY_AUTHENTICATION = getField(INITIAL_LOGIN_SESSION_HANDLER, "forceKeyAuthentication");
|
||||
FORCE_KEY_AUTHENTICATION = getField(InitialLoginSessionHandler.class, "forceKeyAuthentication");
|
||||
requireNonNull(FORCE_KEY_AUTHENTICATION, "forceKeyAuthentication cannot be null");
|
||||
}
|
||||
|
||||
private final FloodgateLogger logger;
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
package org.geysermc.floodgate.velocity.player;
|
||||
|
||||
import static org.geysermc.floodgate.core.util.ReflectionUtils.getField;
|
||||
import static org.geysermc.floodgate.core.util.ReflectionUtils.getPrefixedClass;
|
||||
import static org.geysermc.floodgate.core.util.ReflectionUtils.getValue;
|
||||
|
||||
import com.velocitypowered.proxy.connection.MinecraftConnection;
|
||||
@@ -44,7 +43,6 @@ import org.geysermc.floodgate.core.connection.ConnectionManager;
|
||||
|
||||
@Singleton
|
||||
public class VelocityConnectionManager extends ConnectionManager {
|
||||
private static final Class<?> LOGIN_INBOUND_CONNECTION;
|
||||
private static final Field INITIAL_CONNECTION_DELEGATE;
|
||||
|
||||
@Inject
|
||||
@@ -84,7 +82,6 @@ public class VelocityConnectionManager extends ConnectionManager {
|
||||
}
|
||||
|
||||
static {
|
||||
LOGIN_INBOUND_CONNECTION = getPrefixedClass("connection.client.LoginInboundConnection");
|
||||
INITIAL_CONNECTION_DELEGATE = getField(LOGIN_INBOUND_CONNECTION, "delegate");
|
||||
INITIAL_CONNECTION_DELEGATE = getField(LoginInboundConnection.class, "delegate");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user