Compare commits

2 Commits

Author SHA1 Message Date
8172bf50e1 Fix for older Version
Some checks failed
SteamWarCI Build failed
2025-05-30 16:10:37 +02:00
8d95dad33b Changes
Some checks failed
SteamWarCI Build failed
2025-03-02 16:08:36 +01:00
6 changed files with 23 additions and 21 deletions

View File

@@ -25,9 +25,9 @@ compileJava.options.encoding = 'UTF-8'
repositories { repositories {
mavenCentral() mavenCentral()
maven { maven { url = 'https://nexus.codecrafter47.de/content/repositories/public' }
url = 'https://nexus.codecrafter47.de/content/repositories/public' maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
} maven { url = 'https://repo.minebench.de' }
} }
dependencies { dependencies {
@@ -36,6 +36,7 @@ dependencies {
annotationProcessor 'org.projectlombok:lombok:1.18.22' annotationProcessor 'org.projectlombok:lombok:1.18.22'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22' testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
implementation files("${projectDir}/lib/BungeeCord.jar") compileOnly 'net.md-5:bungeecord-api:1.19-R0.1-SNAPSHOT'
implementation 'codecrafter47.bungeetablistplus:bungeetablistplus-api-bungee:3.5.2' compileOnly 'net.md-5:bungeecord-proxy:1.20-R0.3-SNAPSHOT'
// implementation 'codecrafter47.bungeetablistplus:bungeetablistplus-api-bungee:3.5.2'
} }

View File

@@ -1 +1 @@
rootProject.name = 'SteamWarTeamserver' rootProject.name = 'SteamWarTeamserverIntegration'

View File

@@ -1,6 +1,6 @@
name: SteamWarBungeeTeamserver name: SteamWarTeamserverIntegration
version: 1.0.0 version: 1.0.0
main: de.steamwar.SteamWarBungeeTeamserver main: de.steamwar.SteamWarBungeeTeamserver
softDepends: softDepends:
- BungeeTabListPlus - BungeeTabListPlus

View File

@@ -102,7 +102,7 @@ public class SteamwarConnectionListener implements Listener {
if (!ConfigSystem.isEnabled()) return; if (!ConfigSystem.isEnabled()) return;
String address = preLoginEvent.getConnection().getSocketAddress().toString(); String address = preLoginEvent.getConnection().getSocketAddress().toString();
if (address.startsWith("/78.31.71.136:")) { if (address.startsWith("/178.63.72.88:")) {
InitialHandler initialHandler = (InitialHandler) preLoginEvent.getConnection(); InitialHandler initialHandler = (InitialHandler) preLoginEvent.getConnection();
String extraData = initialHandler.getExtraDataInHandshake(); String extraData = initialHandler.getExtraDataInHandshake();
String[] split = extraData.split("\0"); String[] split = extraData.split("\0");

View File

@@ -19,18 +19,25 @@
package de.steamwar.utils; package de.steamwar.utils;
import codecrafter47.bungeetablistplus.api.bungee.BungeeTabListPlusAPI;
import de.codecrafter47.taboverlay.TabView;
import lombok.experimental.UtilityClass; import lombok.experimental.UtilityClass;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
import java.lang.reflect.Method;
@UtilityClass @UtilityClass
public class BungeeTabListPlusFixer { public class BungeeTabListPlusFixer {
public static void remove(ProxiedPlayer player) { public static void remove(ProxiedPlayer player) {
TabView tabView = BungeeTabListPlusAPI.getTabViewForPlayer(player); try {
if (tabView != null) { Class clazz = Class.forName("codecrafter47.bungeetablistplus.api.bungee.BungeeTabListPlusAPI");
tabView.deactivate(); Method getTabViewForPlayer = clazz.getMethod("getTabViewForPlayer", ProxiedPlayer.class);
Object tabView = getTabViewForPlayer.invoke(null, player);
if (tabView != null) {
Method deactivate = getTabViewForPlayer.getReturnType().getMethod("deactivate");
deactivate.invoke(tabView);
}
} catch (Exception e) {
e.printStackTrace();
} }
} }
} }

View File

@@ -1,8 +1,2 @@
build: build:
- "ln -s /home/gitea/lib" - "./gradlew build --no-deamon"
- "cp ~/gradle.properties ."
- "chmod u+x build.gradle"
- "./gradlew build"
artifacts:
"/binarys/SteamWarTeamserver.jar": "build/libs/SteamWarTeamserver.jar"