From 2d172ffe6bfc8e390126dc81fd12ddbd1170b41b Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Wed, 8 Oct 2025 18:32:32 +0200 Subject: [PATCH] Implement basic techhider --- .../fightsystem/utils/TechHiderWrapper.java | 6 ++- .../HiderCore_TechHider/build.gradle.kts | 35 ++++++++++++++++ .../de/steamwar/core/events/AntiNocom.java | 0 .../steamwar/entity/RFallingBlockEntity.java | 0 .../src/de/steamwar/techhider/BlockIds.java | 0 .../src/de/steamwar/techhider/ChunkHider.java | 0 .../de/steamwar/techhider/ProtocolUtils.java | 0 .../steamwar/techhider/ProtocolWrapper.java | 0 .../src/de/steamwar/techhider/TechHider.java | 0 .../HiderCore_TechHider_14/build.gradle.kts | 32 ++++++++++++++ .../src/de/steamwar/techhider/BlockIds14.java | 0 .../de/steamwar/techhider/ChunkHider14.java | 0 .../steamwar/techhider/ProtocolWrapper14.java | 0 .../HiderCore_TechHider_18/build.gradle.kts | 32 ++++++++++++++ .../de/steamwar/techhider/ChunkHider18.java | 0 .../steamwar/techhider/ProtocolWrapper18.java | 0 .../HiderCore_TechHider_19/build.gradle.kts | 32 ++++++++++++++ .../steamwar/techhider/ProtocolWrapper19.java | 0 .../HiderCore_TechHider_21/build.gradle.kts | 32 ++++++++++++++ .../de/steamwar/techhider/ChunkHider21.java | 0 .../HiderCore_TechHider_8/build.gradle.kts | 30 +++++++++++++ .../src/de/steamwar/techhider/BlockIds8.java | 0 .../de/steamwar/techhider/ChunkHider8.java | 0 .../steamwar/techhider/ProtocolWrapper8.java | 0 .../HiderCore_TechHider_9/build.gradle.kts | 31 ++++++++++++++ .../de/steamwar/techhider/ChunkHider9.java | 0 HiderCore/build.gradle.kts | 42 +++++++++++++++++++ .../src/de/steamwar/core/Core.java | 12 +++++- SpigotCore/build.gradle.kts | 1 + settings.gradle.kts | 11 +++++ 30 files changed, 292 insertions(+), 4 deletions(-) create mode 100644 HiderCore/HiderCore_TechHider/build.gradle.kts rename {SpigotCore/SpigotCore_Main => HiderCore/HiderCore_TechHider}/src/de/steamwar/core/events/AntiNocom.java (100%) rename {SpigotCore/SpigotCore_Main => HiderCore/HiderCore_TechHider}/src/de/steamwar/entity/RFallingBlockEntity.java (100%) rename {SpigotCore/SpigotCore_Main => HiderCore/HiderCore_TechHider}/src/de/steamwar/techhider/BlockIds.java (100%) rename {SpigotCore/SpigotCore_Main => HiderCore/HiderCore_TechHider}/src/de/steamwar/techhider/ChunkHider.java (100%) rename {SpigotCore/SpigotCore_Main => HiderCore/HiderCore_TechHider}/src/de/steamwar/techhider/ProtocolUtils.java (100%) rename {SpigotCore/SpigotCore_Main => HiderCore/HiderCore_TechHider}/src/de/steamwar/techhider/ProtocolWrapper.java (100%) rename {SpigotCore/SpigotCore_Main => HiderCore/HiderCore_TechHider}/src/de/steamwar/techhider/TechHider.java (100%) create mode 100644 HiderCore/HiderCore_TechHider_14/build.gradle.kts rename {SpigotCore/SpigotCore_14 => HiderCore/HiderCore_TechHider_14}/src/de/steamwar/techhider/BlockIds14.java (100%) rename {SpigotCore/SpigotCore_14 => HiderCore/HiderCore_TechHider_14}/src/de/steamwar/techhider/ChunkHider14.java (100%) rename {SpigotCore/SpigotCore_14 => HiderCore/HiderCore_TechHider_14}/src/de/steamwar/techhider/ProtocolWrapper14.java (100%) create mode 100644 HiderCore/HiderCore_TechHider_18/build.gradle.kts rename {SpigotCore/SpigotCore_18 => HiderCore/HiderCore_TechHider_18}/src/de/steamwar/techhider/ChunkHider18.java (100%) rename {SpigotCore/SpigotCore_18 => HiderCore/HiderCore_TechHider_18}/src/de/steamwar/techhider/ProtocolWrapper18.java (100%) create mode 100644 HiderCore/HiderCore_TechHider_19/build.gradle.kts rename {SpigotCore/SpigotCore_19 => HiderCore/HiderCore_TechHider_19}/src/de/steamwar/techhider/ProtocolWrapper19.java (100%) create mode 100644 HiderCore/HiderCore_TechHider_21/build.gradle.kts rename {SpigotCore/SpigotCore_21 => HiderCore/HiderCore_TechHider_21}/src/de/steamwar/techhider/ChunkHider21.java (100%) create mode 100644 HiderCore/HiderCore_TechHider_8/build.gradle.kts rename {SpigotCore/SpigotCore_8 => HiderCore/HiderCore_TechHider_8}/src/de/steamwar/techhider/BlockIds8.java (100%) rename {SpigotCore/SpigotCore_8 => HiderCore/HiderCore_TechHider_8}/src/de/steamwar/techhider/ChunkHider8.java (100%) rename {SpigotCore/SpigotCore_8 => HiderCore/HiderCore_TechHider_8}/src/de/steamwar/techhider/ProtocolWrapper8.java (100%) create mode 100644 HiderCore/HiderCore_TechHider_9/build.gradle.kts rename {SpigotCore/SpigotCore_9 => HiderCore/HiderCore_TechHider_9}/src/de/steamwar/techhider/ChunkHider9.java (100%) create mode 100644 HiderCore/build.gradle.kts diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/TechHiderWrapper.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/TechHiderWrapper.java index bf890168..09dd76c0 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/TechHiderWrapper.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/TechHiderWrapper.java @@ -60,14 +60,16 @@ public class TechHiderWrapper extends StateDependent implements TechHider.Locati public TechHiderWrapper() { super(ENABLED, FightState.Schem); + SecretKey key1; techHider = new TechHider(this, Config.ObfuscateWith, Config.HiddenBlocks, Config.HiddenBlockEntities); try { - key = new SecretKeySpec(Files.readAllBytes(new File(System.getProperty("user.home"), "hullhider.key").toPath()), "AES"); + key1 = new SecretKeySpec(Files.readAllBytes(new File(System.getProperty("user.home"), "hullhider.key").toPath()), "AES"); } catch (IOException e) { - throw new SecurityException(e); + key1 = new SecretKeySpec(new byte[32], "AES"); } + key = key1; new StateDependentListener(ENABLED, FightState.Schem, this); register(); } diff --git a/HiderCore/HiderCore_TechHider/build.gradle.kts b/HiderCore/HiderCore_TechHider/build.gradle.kts new file mode 100644 index 00000000..8caf097f --- /dev/null +++ b/HiderCore/HiderCore_TechHider/build.gradle.kts @@ -0,0 +1,35 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2025 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +plugins { + steamwar.java +} + +tasks.compileJava { + options.isWarnings = false +} + +dependencies { + compileOnly(project(":CommonCore", "default")) + compileOnly(project(":SpigotCore:SpigotCore_Main", "default")) + + compileOnly(libs.spigotapi) + compileOnly(libs.netty) + compileOnly(libs.fastutil) +} \ No newline at end of file diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/events/AntiNocom.java b/HiderCore/HiderCore_TechHider/src/de/steamwar/core/events/AntiNocom.java similarity index 100% rename from SpigotCore/SpigotCore_Main/src/de/steamwar/core/events/AntiNocom.java rename to HiderCore/HiderCore_TechHider/src/de/steamwar/core/events/AntiNocom.java diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RFallingBlockEntity.java b/HiderCore/HiderCore_TechHider/src/de/steamwar/entity/RFallingBlockEntity.java similarity index 100% rename from SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RFallingBlockEntity.java rename to HiderCore/HiderCore_TechHider/src/de/steamwar/entity/RFallingBlockEntity.java diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/BlockIds.java b/HiderCore/HiderCore_TechHider/src/de/steamwar/techhider/BlockIds.java similarity index 100% rename from SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/BlockIds.java rename to HiderCore/HiderCore_TechHider/src/de/steamwar/techhider/BlockIds.java diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ChunkHider.java b/HiderCore/HiderCore_TechHider/src/de/steamwar/techhider/ChunkHider.java similarity index 100% rename from SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ChunkHider.java rename to HiderCore/HiderCore_TechHider/src/de/steamwar/techhider/ChunkHider.java diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ProtocolUtils.java b/HiderCore/HiderCore_TechHider/src/de/steamwar/techhider/ProtocolUtils.java similarity index 100% rename from SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ProtocolUtils.java rename to HiderCore/HiderCore_TechHider/src/de/steamwar/techhider/ProtocolUtils.java diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ProtocolWrapper.java b/HiderCore/HiderCore_TechHider/src/de/steamwar/techhider/ProtocolWrapper.java similarity index 100% rename from SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ProtocolWrapper.java rename to HiderCore/HiderCore_TechHider/src/de/steamwar/techhider/ProtocolWrapper.java diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/TechHider.java b/HiderCore/HiderCore_TechHider/src/de/steamwar/techhider/TechHider.java similarity index 100% rename from SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/TechHider.java rename to HiderCore/HiderCore_TechHider/src/de/steamwar/techhider/TechHider.java diff --git a/HiderCore/HiderCore_TechHider_14/build.gradle.kts b/HiderCore/HiderCore_TechHider_14/build.gradle.kts new file mode 100644 index 00000000..b5b07afd --- /dev/null +++ b/HiderCore/HiderCore_TechHider_14/build.gradle.kts @@ -0,0 +1,32 @@ +/* + * This file is a part of the SteamWAR software. + * + * Copyright (C) 2025 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +plugins { + steamwar.java +} + +dependencies { + compileOnly(project(":CommonCore", "default")) + compileOnly(project(":HiderCore:HiderCore_TechHider", "default")) + compileOnly(project(":SpigotCore:SpigotCore_Main", "default")) + compileOnly(project(":HiderCore:HiderCore_TechHider_8", "default")) + compileOnly(project(":HiderCore:HiderCore_TechHider_9", "default")) + + compileOnly(libs.nms14) +} \ No newline at end of file diff --git a/SpigotCore/SpigotCore_14/src/de/steamwar/techhider/BlockIds14.java b/HiderCore/HiderCore_TechHider_14/src/de/steamwar/techhider/BlockIds14.java similarity index 100% rename from SpigotCore/SpigotCore_14/src/de/steamwar/techhider/BlockIds14.java rename to HiderCore/HiderCore_TechHider_14/src/de/steamwar/techhider/BlockIds14.java diff --git a/SpigotCore/SpigotCore_14/src/de/steamwar/techhider/ChunkHider14.java b/HiderCore/HiderCore_TechHider_14/src/de/steamwar/techhider/ChunkHider14.java similarity index 100% rename from SpigotCore/SpigotCore_14/src/de/steamwar/techhider/ChunkHider14.java rename to HiderCore/HiderCore_TechHider_14/src/de/steamwar/techhider/ChunkHider14.java diff --git a/SpigotCore/SpigotCore_14/src/de/steamwar/techhider/ProtocolWrapper14.java b/HiderCore/HiderCore_TechHider_14/src/de/steamwar/techhider/ProtocolWrapper14.java similarity index 100% rename from SpigotCore/SpigotCore_14/src/de/steamwar/techhider/ProtocolWrapper14.java rename to HiderCore/HiderCore_TechHider_14/src/de/steamwar/techhider/ProtocolWrapper14.java diff --git a/HiderCore/HiderCore_TechHider_18/build.gradle.kts b/HiderCore/HiderCore_TechHider_18/build.gradle.kts new file mode 100644 index 00000000..835b169c --- /dev/null +++ b/HiderCore/HiderCore_TechHider_18/build.gradle.kts @@ -0,0 +1,32 @@ +/* + * This file is a part of the SteamWAR software. + * + * Copyright (C) 2025 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +plugins { + steamwar.java +} + +dependencies { + compileOnly(project(":CommonCore", "default")) + compileOnly(project(":HiderCore:HiderCore_TechHider", "default")) + compileOnly(project(":SpigotCore:SpigotCore_Main", "default")) + + compileOnly(libs.nms18) + compileOnly(libs.netty) + compileOnly(libs.spigotapi) +} \ No newline at end of file diff --git a/SpigotCore/SpigotCore_18/src/de/steamwar/techhider/ChunkHider18.java b/HiderCore/HiderCore_TechHider_18/src/de/steamwar/techhider/ChunkHider18.java similarity index 100% rename from SpigotCore/SpigotCore_18/src/de/steamwar/techhider/ChunkHider18.java rename to HiderCore/HiderCore_TechHider_18/src/de/steamwar/techhider/ChunkHider18.java diff --git a/SpigotCore/SpigotCore_18/src/de/steamwar/techhider/ProtocolWrapper18.java b/HiderCore/HiderCore_TechHider_18/src/de/steamwar/techhider/ProtocolWrapper18.java similarity index 100% rename from SpigotCore/SpigotCore_18/src/de/steamwar/techhider/ProtocolWrapper18.java rename to HiderCore/HiderCore_TechHider_18/src/de/steamwar/techhider/ProtocolWrapper18.java diff --git a/HiderCore/HiderCore_TechHider_19/build.gradle.kts b/HiderCore/HiderCore_TechHider_19/build.gradle.kts new file mode 100644 index 00000000..8c2d66af --- /dev/null +++ b/HiderCore/HiderCore_TechHider_19/build.gradle.kts @@ -0,0 +1,32 @@ +/* + * This file is a part of the SteamWAR software. + * + * Copyright (C) 2025 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +plugins { + steamwar.java +} + +dependencies { + compileOnly(project(":CommonCore", "default")) + compileOnly(project(":HiderCore:HiderCore_TechHider", "default")) + compileOnly(project(":SpigotCore:SpigotCore_Main", "default")) + compileOnly(project(":HiderCore:HiderCore_TechHider_18", "default")) + + compileOnly(libs.nms19) + compileOnly(libs.spigotapi) +} \ No newline at end of file diff --git a/SpigotCore/SpigotCore_19/src/de/steamwar/techhider/ProtocolWrapper19.java b/HiderCore/HiderCore_TechHider_19/src/de/steamwar/techhider/ProtocolWrapper19.java similarity index 100% rename from SpigotCore/SpigotCore_19/src/de/steamwar/techhider/ProtocolWrapper19.java rename to HiderCore/HiderCore_TechHider_19/src/de/steamwar/techhider/ProtocolWrapper19.java diff --git a/HiderCore/HiderCore_TechHider_21/build.gradle.kts b/HiderCore/HiderCore_TechHider_21/build.gradle.kts new file mode 100644 index 00000000..2e5c1f6d --- /dev/null +++ b/HiderCore/HiderCore_TechHider_21/build.gradle.kts @@ -0,0 +1,32 @@ +/* + * This file is a part of the SteamWAR software. + * + * Copyright (C) 2025 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +plugins { + steamwar.java +} + +dependencies { + compileOnly(project(":CommonCore", "default")) + compileOnly(project(":HiderCore:HiderCore_TechHider", "default")) + compileOnly(project(":SpigotCore:SpigotCore_Main", "default")) + + compileOnly(libs.nms21) + compileOnly(libs.netty) + compileOnly(libs.spigotapi) +} \ No newline at end of file diff --git a/SpigotCore/SpigotCore_21/src/de/steamwar/techhider/ChunkHider21.java b/HiderCore/HiderCore_TechHider_21/src/de/steamwar/techhider/ChunkHider21.java similarity index 100% rename from SpigotCore/SpigotCore_21/src/de/steamwar/techhider/ChunkHider21.java rename to HiderCore/HiderCore_TechHider_21/src/de/steamwar/techhider/ChunkHider21.java diff --git a/HiderCore/HiderCore_TechHider_8/build.gradle.kts b/HiderCore/HiderCore_TechHider_8/build.gradle.kts new file mode 100644 index 00000000..68aa27c4 --- /dev/null +++ b/HiderCore/HiderCore_TechHider_8/build.gradle.kts @@ -0,0 +1,30 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2025 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +plugins { + steamwar.java +} + +dependencies { + compileOnly(project(":CommonCore", "default")) + compileOnly(project(":HiderCore:HiderCore_TechHider", "default")) + compileOnly(project(":SpigotCore:SpigotCore_Main", "default")) + + compileOnly(libs.nms8) +} \ No newline at end of file diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/techhider/BlockIds8.java b/HiderCore/HiderCore_TechHider_8/src/de/steamwar/techhider/BlockIds8.java similarity index 100% rename from SpigotCore/SpigotCore_8/src/de/steamwar/techhider/BlockIds8.java rename to HiderCore/HiderCore_TechHider_8/src/de/steamwar/techhider/BlockIds8.java diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/techhider/ChunkHider8.java b/HiderCore/HiderCore_TechHider_8/src/de/steamwar/techhider/ChunkHider8.java similarity index 100% rename from SpigotCore/SpigotCore_8/src/de/steamwar/techhider/ChunkHider8.java rename to HiderCore/HiderCore_TechHider_8/src/de/steamwar/techhider/ChunkHider8.java diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/techhider/ProtocolWrapper8.java b/HiderCore/HiderCore_TechHider_8/src/de/steamwar/techhider/ProtocolWrapper8.java similarity index 100% rename from SpigotCore/SpigotCore_8/src/de/steamwar/techhider/ProtocolWrapper8.java rename to HiderCore/HiderCore_TechHider_8/src/de/steamwar/techhider/ProtocolWrapper8.java diff --git a/HiderCore/HiderCore_TechHider_9/build.gradle.kts b/HiderCore/HiderCore_TechHider_9/build.gradle.kts new file mode 100644 index 00000000..3191ef1f --- /dev/null +++ b/HiderCore/HiderCore_TechHider_9/build.gradle.kts @@ -0,0 +1,31 @@ +/* + * This file is a part of the SteamWAR software. + * + * Copyright (C) 2025 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +plugins { + steamwar.java +} + +dependencies { + compileOnly(project(":CommonCore", "default")) + compileOnly(project(":HiderCore:HiderCore_TechHider", "default")) + compileOnly(project(":SpigotCore:SpigotCore_Main", "default")) + compileOnly(project(":HiderCore:HiderCore_TechHider_8", "default")) + + compileOnly(libs.nms9) +} \ No newline at end of file diff --git a/SpigotCore/SpigotCore_9/src/de/steamwar/techhider/ChunkHider9.java b/HiderCore/HiderCore_TechHider_9/src/de/steamwar/techhider/ChunkHider9.java similarity index 100% rename from SpigotCore/SpigotCore_9/src/de/steamwar/techhider/ChunkHider9.java rename to HiderCore/HiderCore_TechHider_9/src/de/steamwar/techhider/ChunkHider9.java diff --git a/HiderCore/build.gradle.kts b/HiderCore/build.gradle.kts new file mode 100644 index 00000000..251e8126 --- /dev/null +++ b/HiderCore/build.gradle.kts @@ -0,0 +1,42 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2025 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +plugins { + `java-library` + alias(libs.plugins.shadow) +} + +tasks.build { + finalizedBy(tasks.shadowJar) +} + +dependencies { + api(project(":HiderCore:HiderCore_TechHider")) + + implementation(project(":HiderCore:HiderCore_TechHider_8")) + implementation(project(":HiderCore:HiderCore_TechHider_9")) + implementation(project(":HiderCore:HiderCore_TechHider_14")) + implementation(project(":HiderCore:HiderCore_TechHider_18")) + implementation(project(":HiderCore:HiderCore_TechHider_19")) + implementation(project(":HiderCore:HiderCore_TechHider_21")) { + attributes { + attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 21) + } + } +} \ No newline at end of file diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/Core.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/Core.java index 91c05851..2c8b522c 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/Core.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/Core.java @@ -23,7 +23,6 @@ import com.comphenix.tinyprotocol.TinyProtocol; import de.steamwar.Reflection; import de.steamwar.command.*; import de.steamwar.core.authlib.AuthlibInjector; -import de.steamwar.core.events.AntiNocom; import de.steamwar.core.events.ChattingEvent; import de.steamwar.core.events.PlayerJoinedEvent; import de.steamwar.core.events.WorldLoadEvent; @@ -110,7 +109,16 @@ public class Core extends JavaPlugin { TinyProtocol.init(); CheckpointUtils.signalHandler(); - new AntiNocom(); + + // AntiNocom moved to HiderCore - will be initialized if HiderCore is present + try { + Class antiNocomClass = Class.forName("de.steamwar.core.events.AntiNocom"); + antiNocomClass.getDeclaredConstructor().newInstance(); + } catch (ClassNotFoundException ignored) { + // HiderCore not present, skip AntiNocom + } catch (Exception e) { + getLogger().log(Level.WARNING, "Failed to initialize AntiNocom", e); + } if(Core.getVersion() >= 19) new ServerDataHandler(); diff --git a/SpigotCore/build.gradle.kts b/SpigotCore/build.gradle.kts index d615cfc7..074b0d15 100644 --- a/SpigotCore/build.gradle.kts +++ b/SpigotCore/build.gradle.kts @@ -30,6 +30,7 @@ dependencies { api(project(":CommonCore")) api(project(":CommandFramework")) api(project(":SpigotCore:SpigotCore_Main")) + api(project(":HiderCore")) implementation(project(":SpigotCore:SpigotCore_8")) implementation(project(":SpigotCore:SpigotCore_9")) diff --git a/settings.gradle.kts b/settings.gradle.kts index 3bb2a9d8..61baafb9 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -190,6 +190,17 @@ include( "CommonCore:Network" ) +include( + "HiderCore", + "HiderCore:HiderCore_TechHider", + "HiderCore:HiderCore_TechHider_8", + "HiderCore:HiderCore_TechHider_9", + "HiderCore:HiderCore_TechHider_14", + "HiderCore:HiderCore_TechHider_18", + "HiderCore:HiderCore_TechHider_19", + "HiderCore:HiderCore_TechHider_21" +) + include( "FightSystem", "FightSystem:FightSystem_8",