Compare commits
2 Commits
5cd8dff8bf
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 8172bf50e1 | |||
| 8d95dad33b |
11
build.gradle
11
build.gradle
@@ -25,9 +25,9 @@ compileJava.options.encoding = 'UTF-8'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
||||
maven {
|
||||
url = 'https://nexus.codecrafter47.de/content/repositories/public'
|
||||
}
|
||||
maven { url = 'https://nexus.codecrafter47.de/content/repositories/public' }
|
||||
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
|
||||
maven { url = 'https://repo.minebench.de' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -36,6 +36,7 @@ dependencies {
|
||||
annotationProcessor 'org.projectlombok:lombok:1.18.22'
|
||||
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
|
||||
|
||||
implementation files("${projectDir}/lib/BungeeCord.jar")
|
||||
implementation 'codecrafter47.bungeetablistplus:bungeetablistplus-api-bungee:3.5.2'
|
||||
compileOnly 'net.md-5:bungeecord-api:1.19-R0.1-SNAPSHOT'
|
||||
compileOnly 'net.md-5:bungeecord-proxy:1.20-R0.3-SNAPSHOT'
|
||||
// implementation 'codecrafter47.bungeetablistplus:bungeetablistplus-api-bungee:3.5.2'
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
rootProject.name = 'SteamWarTeamserver'
|
||||
rootProject.name = 'SteamWarTeamserverIntegration'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: SteamWarBungeeTeamserver
|
||||
name: SteamWarTeamserverIntegration
|
||||
version: 1.0.0
|
||||
main: de.steamwar.SteamWarBungeeTeamserver
|
||||
|
||||
softDepends:
|
||||
- BungeeTabListPlus
|
||||
- BungeeTabListPlus
|
||||
|
||||
@@ -102,7 +102,7 @@ public class SteamwarConnectionListener implements Listener {
|
||||
if (!ConfigSystem.isEnabled()) return;
|
||||
|
||||
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();
|
||||
String extraData = initialHandler.getExtraDataInHandshake();
|
||||
String[] split = extraData.split("\0");
|
||||
|
||||
@@ -19,18 +19,25 @@
|
||||
|
||||
package de.steamwar.utils;
|
||||
|
||||
import codecrafter47.bungeetablistplus.api.bungee.BungeeTabListPlusAPI;
|
||||
import de.codecrafter47.taboverlay.TabView;
|
||||
import lombok.experimental.UtilityClass;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
@UtilityClass
|
||||
public class BungeeTabListPlusFixer {
|
||||
|
||||
public static void remove(ProxiedPlayer player) {
|
||||
TabView tabView = BungeeTabListPlusAPI.getTabViewForPlayer(player);
|
||||
if (tabView != null) {
|
||||
tabView.deactivate();
|
||||
try {
|
||||
Class clazz = Class.forName("codecrafter47.bungeetablistplus.api.bungee.BungeeTabListPlusAPI");
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,2 @@
|
||||
build:
|
||||
- "ln -s /home/gitea/lib"
|
||||
- "cp ~/gradle.properties ."
|
||||
- "chmod u+x build.gradle"
|
||||
- "./gradlew build"
|
||||
|
||||
artifacts:
|
||||
"/binarys/SteamWarTeamserver.jar": "build/libs/SteamWarTeamserver.jar"
|
||||
- "./gradlew build --no-deamon"
|
||||
|
||||
Reference in New Issue
Block a user