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 {
|
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'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
rootProject.name = 'SteamWarTeamserver'
|
rootProject.name = 'SteamWarTeamserverIntegration'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: SteamWarBungeeTeamserver
|
name: SteamWarTeamserverIntegration
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
main: de.steamwar.SteamWarBungeeTeamserver
|
main: de.steamwar.SteamWarBungeeTeamserver
|
||||||
|
|
||||||
|
|||||||
@@ -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");
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user