diff --git a/.gitignore b/.gitignore index 6a46e68d..cc1b960d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ steamwar.properties # IntelliJ IDEA -.idea *.iml # VSCode diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..3d911365 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,32 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +/AndroidProjectSystem.xml +/checkstyle-idea.xml +/compiler.xml +/copilot.data.migration.agent.xml +/copilot.data.migration.ask.xml +/copilot.data.migration.ask2agent.xml +/copilot.data.migration.edit.xml +/dataSources.xml +/encodings.xml +/git_toolbox_blame.xml +/git_toolbox_prj.xml +/gradle.xml +/jarRepositories.xml +/jpa.xml +/kotlinc.xml +/misc.xml +/modules.xml +/scala_compiler.xml +/swagger-settings.xml +/uiDesigner.xml +/vcs.xml +/codeStyles/ +/inspectionProfiles/ +/modules/ \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml new file mode 100644 index 00000000..2d0d7aa3 --- /dev/null +++ b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/copyright/sw.xml b/.idea/copyright/sw.xml new file mode 100644 index 00000000..bd001ca2 --- /dev/null +++ b/.idea/copyright/sw.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/BauSystem/BauSystem_15/build.gradle.kts b/BauSystem/BauSystem_15/build.gradle.kts index 2cbe19e6..054e4ab9 100644 --- a/BauSystem/BauSystem_15/build.gradle.kts +++ b/BauSystem/BauSystem_15/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/FlatteningWrapper15.java b/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/FlatteningWrapper15.java index 266326e0..13b3932d 100644 --- a/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/FlatteningWrapper15.java +++ b/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/FlatteningWrapper15.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils; diff --git a/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/NMSWrapper15.java b/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/NMSWrapper15.java index b479e5d3..3faea278 100644 --- a/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/NMSWrapper15.java +++ b/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/NMSWrapper15.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils; diff --git a/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/PlaceItemWrapper15.java b/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/PlaceItemWrapper15.java index cbb65fd3..05164673 100644 --- a/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/PlaceItemWrapper15.java +++ b/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/PlaceItemWrapper15.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/PlayerMovementWrapper15.java b/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/PlayerMovementWrapper15.java index f290f7dd..17f67550 100644 --- a/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/PlayerMovementWrapper15.java +++ b/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/PlayerMovementWrapper15.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils; diff --git a/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/TickListener15.java b/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/TickListener15.java index f2b604ac..57b14b19 100644 --- a/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/TickListener15.java +++ b/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/TickListener15.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/TickManager15.java b/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/TickManager15.java index a56a2e35..808e63cc 100644 --- a/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/TickManager15.java +++ b/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/TickManager15.java @@ -1,25 +1,25 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils; -import de.steamwar.bausystem.region.GlobalRegion; +import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.utils.bossbar.BossBarService; import de.steamwar.bausystem.utils.tps.TPSFreezeUtils; import de.steamwar.bausystem.utils.tps.TPSLimitUtils; @@ -46,7 +46,7 @@ public class TickManager15 implements TickManager, Listener { if (currentlyStepping) { currentlyStepping = false; Bukkit.getOnlinePlayers().forEach(player -> { - BossBarService.instance.remove(player, GlobalRegion.getInstance(), "TickStep"); + BossBarService.instance.remove(player, Region.getGlobalRegion(), "TickStep"); }); } TPSWarpUtils.warp(tickRate); diff --git a/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/tps/PacketCache.java b/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/tps/PacketCache.java index 63308284..7cabdab6 100644 --- a/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/tps/PacketCache.java +++ b/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/tps/PacketCache.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils.tps; diff --git a/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/tps/TPSFreezeUtils.java b/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/tps/TPSFreezeUtils.java index bed7f7e6..3dc04cc7 100644 --- a/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/tps/TPSFreezeUtils.java +++ b/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/tps/TPSFreezeUtils.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils.tps; diff --git a/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/tps/TPSLimitUtils.java b/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/tps/TPSLimitUtils.java index 8b58b00a..31943d87 100644 --- a/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/tps/TPSLimitUtils.java +++ b/BauSystem/BauSystem_15/src/de/steamwar/bausystem/utils/tps/TPSLimitUtils.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils.tps; diff --git a/BauSystem/BauSystem_18/build.gradle.kts b/BauSystem/BauSystem_18/build.gradle.kts index d3ad4f8e..8dcf6852 100644 --- a/BauSystem/BauSystem_18/build.gradle.kts +++ b/BauSystem/BauSystem_18/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_18/src/de/steamwar/bausystem/utils/NMSWrapper18.java b/BauSystem/BauSystem_18/src/de/steamwar/bausystem/utils/NMSWrapper18.java index 9763858e..5d03b8fe 100644 --- a/BauSystem/BauSystem_18/src/de/steamwar/bausystem/utils/NMSWrapper18.java +++ b/BauSystem/BauSystem_18/src/de/steamwar/bausystem/utils/NMSWrapper18.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils; diff --git a/BauSystem/BauSystem_18/src/de/steamwar/bausystem/utils/PlayerMovementWrapper18.java b/BauSystem/BauSystem_18/src/de/steamwar/bausystem/utils/PlayerMovementWrapper18.java index 0f1ba669..512da797 100644 --- a/BauSystem/BauSystem_18/src/de/steamwar/bausystem/utils/PlayerMovementWrapper18.java +++ b/BauSystem/BauSystem_18/src/de/steamwar/bausystem/utils/PlayerMovementWrapper18.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils; diff --git a/BauSystem/BauSystem_19/build.gradle.kts b/BauSystem/BauSystem_19/build.gradle.kts index b72cbf08..e6dcaf4f 100644 --- a/BauSystem/BauSystem_19/build.gradle.kts +++ b/BauSystem/BauSystem_19/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_19/src/de/steamwar/bausystem/utils/NMSWrapper19.java b/BauSystem/BauSystem_19/src/de/steamwar/bausystem/utils/NMSWrapper19.java index 748cf86d..cf4c3fc2 100644 --- a/BauSystem/BauSystem_19/src/de/steamwar/bausystem/utils/NMSWrapper19.java +++ b/BauSystem/BauSystem_19/src/de/steamwar/bausystem/utils/NMSWrapper19.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils; diff --git a/BauSystem/BauSystem_19/src/de/steamwar/bausystem/utils/PlayerMovementWrapper19.java b/BauSystem/BauSystem_19/src/de/steamwar/bausystem/utils/PlayerMovementWrapper19.java index af152ea5..89912e3c 100644 --- a/BauSystem/BauSystem_19/src/de/steamwar/bausystem/utils/PlayerMovementWrapper19.java +++ b/BauSystem/BauSystem_19/src/de/steamwar/bausystem/utils/PlayerMovementWrapper19.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils; diff --git a/BauSystem/BauSystem_19/src/de/steamwar/bausystem/utils/TickListener19.java b/BauSystem/BauSystem_19/src/de/steamwar/bausystem/utils/TickListener19.java index 211c004b..ca3d478c 100644 --- a/BauSystem/BauSystem_19/src/de/steamwar/bausystem/utils/TickListener19.java +++ b/BauSystem/BauSystem_19/src/de/steamwar/bausystem/utils/TickListener19.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_20/build.gradle.kts b/BauSystem/BauSystem_20/build.gradle.kts index b1756244..3032f6ba 100644 --- a/BauSystem/BauSystem_20/build.gradle.kts +++ b/BauSystem/BauSystem_20/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_20/src/de/steamwar/bausystem/utils/NMSWrapper20.java b/BauSystem/BauSystem_20/src/de/steamwar/bausystem/utils/NMSWrapper20.java index 1cc09e56..c7a1b363 100644 --- a/BauSystem/BauSystem_20/src/de/steamwar/bausystem/utils/NMSWrapper20.java +++ b/BauSystem/BauSystem_20/src/de/steamwar/bausystem/utils/NMSWrapper20.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils; diff --git a/BauSystem/BauSystem_20/src/de/steamwar/bausystem/utils/PlaceItemWrapper20.java b/BauSystem/BauSystem_20/src/de/steamwar/bausystem/utils/PlaceItemWrapper20.java index e9fc1b0d..407a7207 100644 --- a/BauSystem/BauSystem_20/src/de/steamwar/bausystem/utils/PlaceItemWrapper20.java +++ b/BauSystem/BauSystem_20/src/de/steamwar/bausystem/utils/PlaceItemWrapper20.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_20/src/de/steamwar/bausystem/utils/PlayerMovementWrapper20.java b/BauSystem/BauSystem_20/src/de/steamwar/bausystem/utils/PlayerMovementWrapper20.java index f7866a4a..feec5e59 100644 --- a/BauSystem/BauSystem_20/src/de/steamwar/bausystem/utils/PlayerMovementWrapper20.java +++ b/BauSystem/BauSystem_20/src/de/steamwar/bausystem/utils/PlayerMovementWrapper20.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils; diff --git a/BauSystem/BauSystem_21/build.gradle.kts b/BauSystem/BauSystem_21/build.gradle.kts index 0c9e97d4..8b40ae2d 100644 --- a/BauSystem/BauSystem_21/build.gradle.kts +++ b/BauSystem/BauSystem_21/build.gradle.kts @@ -1,3 +1,22 @@ +/* + * 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 } diff --git a/BauSystem/BauSystem_21/src/de/steamwar/bausystem/utils/NMSWrapper21.java b/BauSystem/BauSystem_21/src/de/steamwar/bausystem/utils/NMSWrapper21.java index 816b9bd7..54651656 100644 --- a/BauSystem/BauSystem_21/src/de/steamwar/bausystem/utils/NMSWrapper21.java +++ b/BauSystem/BauSystem_21/src/de/steamwar/bausystem/utils/NMSWrapper21.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -35,7 +35,6 @@ import org.bukkit.Material; import org.bukkit.craftbukkit.entity.CraftPlayer; import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.entity.Player; -import org.bukkit.event.player.PlayerGameModeChangeEvent; import org.bukkit.inventory.ItemStack; import java.util.List; @@ -44,10 +43,11 @@ import java.util.Optional; public class NMSWrapper21 implements NMSWrapper { private static final Reflection.Field playerInteractManager = Reflection.getField(ServerPlayer.class, null, ServerPlayerGameMode.class); + private static final Reflection.Field playerGameMode = Reflection.getField(ServerPlayerGameMode.class, GameType.class, 0); @Override public void setInternalGameMode(Player player, GameMode gameMode) { - playerInteractManager.get(((CraftPlayer) player).getHandle()).changeGameModeForPlayer(GameType.byId(gameMode.getValue()), PlayerGameModeChangeEvent.Cause.UNKNOWN, null); + playerGameMode.set(playerInteractManager.get(((CraftPlayer) player).getHandle()), GameType.byId(gameMode.getValue())); } @Override @@ -66,7 +66,7 @@ public class NMSWrapper21 implements NMSWrapper { player.updateInventory(); } - private static final Reflection.Field gameStateChangeReason = Reflection.getField(NoClipCommand.gameStateChange, ClientboundGameEventPacket.Type.class, 12); + private static final Reflection.Field gameStateChangeReason = Reflection.getField(NoClipCommand.gameStateChange, ClientboundGameEventPacket.Type.class, 14); @Override public void setGameStateChangeReason(Object packet) { diff --git a/BauSystem/BauSystem_Main/build.gradle.kts b/BauSystem/BauSystem_Main/build.gradle.kts index 5b8f0a89..45aff756 100644 --- a/BauSystem/BauSystem_Main/build.gradle.kts +++ b/BauSystem/BauSystem_Main/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/BauSystem.properties b/BauSystem/BauSystem_Main/src/BauSystem.properties index 61c95dc7..b90933b6 100644 --- a/BauSystem/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem/BauSystem_Main/src/BauSystem.properties @@ -1,20 +1,20 @@ # -# This file is a part of the SteamWar software. +# This file is a part of the SteamWar software. # -# Copyright (C) 2021 SteamWar.de-Serverteam +# 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 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. +# 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 . +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . # PREFIX=§eBau§8System§8» TIME=HH:mm:ss @@ -137,7 +137,9 @@ BAU_INFO_ITEM_LORE_FIRE=§7Fire§8: §e{0} BAU_INFO_ITEM_LORE_COLOR=§7Color§8: §e{0} BAU_INFO_ITEM_LORE_PROTECT=§7Protect§8: §e{0} BAU_INFO_ITEM_LORE_ITEMS=§7Items§8: §e{0} -BAU_INFO_ITEM_LORE_NO_GRAVITY = §8NoGravity§8: §e{0} +BAU_INFO_ITEM_LORE_NO_GRAVITY = §7NoGravity§8: §e{0} +BAU_INFO_ITEM_LORE_TESTBLOCK=§7Testblock§8: §e{0} +BAU_INFO_ITEM_LORE_CHANGED=§7Changed§8: §e{0} BAU_INFO_COMMAND_HELP=§8/§ebauinfo §8- §7Information regarding this build server BAU_INFO_COMMAND_OWNER=§7Owner§8: §e{0} BAU_INFO_COMMAND_MEMBER=§7{0} §8[§7{1}§8]§8: §e{2} @@ -403,6 +405,7 @@ KILLCHECKER_INFO=§7Shows the overlaps of cannon kills in your build area. KILLCHECKER_INFO2=§7Only colorable blocks like Wool, Terractotta, Stained Glass and Concrete are counted. KILLCHECKER_ENABLE=§aKillchecker activated KILLCHECKER_DISABLE=§cKillchecker deactivated +KILLCHECKER_NO_BUILD=§cThere is no Build Area in this Region KILLCHECKER_BOSSBAR=§e§l{0} §7(§e{1}%§7) §e§l{2}§7 cannons # BlockCounter BLOCK_COUNTER_HELP_TOGGLE=§8/§eblockcounter §8- §7Toggle on/off @@ -737,12 +740,10 @@ REGION_ITEM_RESET=§eReset REGION_ITEM_TESTBLOCK=§eDummy REGION_ITEM_TNT_OFF=§7TNT: §eDeactivated REGION_ITEM_TNT_ONLY_TB=§7TNT: §eonly dummy -REGION_ITEM_TNT_ONLY_BUILD=§7TNT: §eonly build REGION_ITEM_TNT_ON=§7TNT: §eActivated REGION_ITEM_SELECTOR_TITLE=Tnt Mode REGION_ITEM_SELECTOR_ON=§eActivate REGION_ITEM_SELECTOR_ONLY_TB=§eonly dummy -REGION_ITEM_SELECTOR_ONLY_BUILD=§eonly build REGION_ITEM_SELECTOR_OFF=§eDeactivate #Region REGION_COLOR_HELP_COLOR=§8/§ecolor §8[§7Color§8] §8- §7Sets the color of the region @@ -817,7 +818,6 @@ REGION_TNT_HELP_MODE=§8/§etnt §8[§7Mode§8] §8- §7Set TNT behaviour to a g REGION_TNT_ON=§aTNT-Damage activated REGION_TNT_OFF=§cTNT-Damage deactivated REGION_TNT_TB=§aTNT-Damage activated outside the building area -REGION_TNT_BUILD=§aTNT-Damage activated outside the testblok area REGION_TNT_BUILD_DESTROY=§cAn explosion would have destroyed blocks in the building area REGION_TNT_TB_DESTROY=§cAn explosion would have destroyed blocks in the testblock area AFK_KICK_MESSAGE=§cNothing happened on this server for 15 minutes. @@ -939,7 +939,6 @@ SELECT_HELP=§8/§eselect §8[§7RegionsTyp§8] §8- §7Select a region type SELECT_EXTENSION_HELP=§8/§eselect §8[§7RegionsTyp§8] §8[§7Extension§8] §8- §7Select a region type with or without extension SELECT_GLOBAL_REGION=§cThe global region cannot be selected SELECT_NO_TYPE=§cThis region has no {0} -SELECT_NO_EXTENSION=§cThis region has no extension SELECT_MESSAGE=§7WorldEdit selection set to {0}, {1}, {2} and {3}, {4}, {5} SKULL_HELP=§8/§eskull §8[§eplayer§8] §8-§7 Receive a player head SKULL_INVALID=§cInvalid player name @@ -980,10 +979,12 @@ SELECT_ITEM_BAUPLATTFORM=§eBuild platform SELECT_ITEM_TESTBLOCK=§eDummy CHESTFILLER_FILLED=§eChest filled CHESTFILLER_COUNT=§7{0}§8: §e§l{1} -PISTON_HELP_1=§7Right click on piston with a slime ball to calculate the moved blocks. +PISTON_HELP_1=§7Right click on piston to calculate the moved blocks. PISTON_HELP_2=§7Count is red, if one unmoveable block is present. PISTON_HELP_3=§7Count is yellow, if too many blocks are present. PISTON_INFO=§7Moved Blocks {0}{1}§8/§712 +PISTON_ENABLED=§aCalculator enabled +PISTON_DISABLED=§cCalculator disabled # Warp WARP_LOC_X=§7X§8: §e{0} WARP_LOC_Y=§7Y§8: §e{0} @@ -1025,4 +1026,10 @@ XRAY_OFF=§cXray deactivated COLORREPLACE_HELP=§8//§ecolorreplace §8[§7color§8] §8[§7color§8] §8- §7Replace all blocks of one color with another TYPEREPLACE_HELP=§8//§etypereplace §8[§7type§8] §8[§7type§8] §8- §7Replace all blocks of one type with another # Schematic -SCHEMATIC_GUI_ITEM=§eSchematics \ No newline at end of file +SCHEMATIC_GUI_ITEM=§eSchematics +# TNTListener +TLS_MESSAGE_79=§7TLS§8> §7Tick §e{0} §8- §7TNT §e{1} +TLS_MESSAGE_80=§7TLS§8> §7Tick §e{0} §8- §7TNT §e{1} §8(§e{2} §7with Fuse 80§8) +TLS_START_HELP=§8/§etls start §8: §7Start the TNT Listener +TLS_STOP_HELP=§8/§etls stop §8: §7Stop the TNT Listener +TLS_SCOREBOARD_ELEMENT=§eTLS§8: §aon \ No newline at end of file diff --git a/BauSystem/BauSystem_Main/src/BauSystem_de.properties b/BauSystem/BauSystem_Main/src/BauSystem_de.properties index 3acad9fe..453b4079 100644 --- a/BauSystem/BauSystem_Main/src/BauSystem_de.properties +++ b/BauSystem/BauSystem_Main/src/BauSystem_de.properties @@ -1,20 +1,20 @@ # -# This file is a part of the SteamWar software. +# This file is a part of the SteamWar software. # -# Copyright (C) 2021 SteamWar.de-Serverteam +# 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 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. +# 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 . +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . # PREFIX=§eBau§8System§8» TIME=HH:mm:ss @@ -119,12 +119,9 @@ BACKUP_LORE=§eKlicken zum Laden BAU_COMMAND_HELP_INFO=§8/§ebau info §8- §7Alias für §8/§ebauinfo BAU_INFO_ITEM_NAME=§eBau-Management ## This is used in BauInfoBauGuiItem.java -BAU_INFO_ITEM_LORE_TNT=§7TNT§8: §e{0} -BAU_INFO_ITEM_LORE_FREEZE=§7Freeze§8: §e{0} -BAU_INFO_ITEM_LORE_DAMAGE=§7Damage§8: §e{0} BAU_INFO_ITEM_LORE_FIRE=§7Feuer§8: §e{0} BAU_INFO_ITEM_LORE_COLOR=§7Farbe§8: §e{0} -BAU_INFO_ITEM_LORE_PROTECT=§7Protect§8: §e{0} +BAU_INFO_ITEM_LORE_CHANGED=§7Verändert§8: §e{0} BAU_INFO_COMMAND_HELP=§8/§ebauinfo §8- §7Gibt Informationen über den Bau BAU_INFO_COMMAND_OWNER=§7Besitzer§8: §e{0} BAU_INFO_COMMAND_MEMBER=§7{0} §8[§7{1}§8]§8: §e{2} @@ -362,6 +359,7 @@ KILLCHECKER_INFO=§7Zeigt Überlappungen der Kanonen Kills im Baubereich an. KILLCHECKER_INFO2=§7Nur farbige Blöcke wie Wolle, Terracotta, Stained Glass und Concrete wird gezählt. KILLCHECKER_ENABLE=§aKillchecker aktiviert KILLCHECKER_DISABLE=§cKillchecker deaktiviert +KILLCHECKER_NO_BUILD=§cEs gibt keinen Baubereich in dieser Region KILLCHECKER_BOSSBAR=§e§l{0} §7(§e{1}%§7) §e§l{2}§7 Kanonnen # BlockCounter BLOCK_COUNTER_HELP_TOGGLE=§8/§eblockcounter §8- §7Wechsel zwischen an und aus @@ -680,12 +678,10 @@ REGION_ITEM_RESET=§eReset REGION_ITEM_TESTBLOCK=§eTestblock REGION_ITEM_TNT_OFF=§7TNT: §eAusgeschaltet REGION_ITEM_TNT_ONLY_TB=§7TNT: §enur Testblock -REGION_ITEM_TNT_ONLY_BUILD=§7TNT: §enur Baubereich REGION_ITEM_TNT_ON=§7TNT: §eEingeschaltet REGION_ITEM_SELECTOR_TITLE=Tnt Modus REGION_ITEM_SELECTOR_ON=§eEinschalten REGION_ITEM_SELECTOR_ONLY_TB=§enur Testblock -REGION_ITEM_SELECTOR_ONLY_BUILD=§enur Baubereich REGION_ITEM_SELECTOR_OFF=§eAusschalten #Region REGION_COLOR_HELP_COLOR=§8/§ecolor §8[§7Color§8] §8- §7Setze die Farbe der Region @@ -877,7 +873,6 @@ SELECT_HELP=§8/§eselect §8[§7RegionsTyp§8] §8- §7Wähle einen RegionsTyp SELECT_EXTENSION_HELP=§8/§eselect §8[§7RegionsTyp§8] §8[§7Extension§8] §8- §7Wähle einen RegionsTyp aus mit oder ohne Extension SELECT_GLOBAL_REGION=§cDie globale Region kannst du nicht auswählen SELECT_NO_TYPE=§cDiese Region hat keinen {0} -SELECT_NO_EXTENSION=§cDiese Region hat keine Ausfahrmaße SELECT_MESSAGE=§7WorldEdit auswahl auf {0}, {1}, {2} und {3}, {4}, {5} gesetzt SKULL_HELP=§8/§eskull §8[§eSpieler§8] §8-§7 Gibt einen SpielerKopf SKULL_INVALID=§cUngültiger Spieler @@ -917,10 +912,12 @@ SELECT_ITEM_BAURAHMEN=§eBaurahmen SELECT_ITEM_BAUPLATTFORM=§eBauplattform SELECT_ITEM_TESTBLOCK=§eTestblock CHESTFILLER_FILLED=§eKiste gefüllt -PISTON_HELP_1=§7Rechts Klick auf Piston mit einem Slime Ball berechnet dir die bewegten Blöcke. +PISTON_HELP_1=§7Rechts Klick auf einen Piston berechnet dir die bewegten Blöcke. PISTON_HELP_2=§7Die Anzahl ist Rot, wenn ein unmovable Block vorhanden ist. PISTON_HELP_3=§7Die Anzahl ist Gelb, wenn zu viele Blöcke vorhanden sind. PISTON_INFO=§7Bewegte Blöcke {0}{1}§8/§712 +PISTON_ENABLED=§aPiston-Berechnung aktiviert +PISTON_DISABLED=§cPiston-Berechnung deaktiviert # Warp WARP_LOC_X=§7X§8: §e{0} WARP_LOC_Y=§7Y§8: §e{0} @@ -962,4 +959,8 @@ XRAY_OFF=§cXray deaktiviert COLORREPLACE_HELP=§8//§ecolorreplace §8[§7color§8] §8[§7color§8] §8- §7Ersetzt eine Farbe mit einer anderen TYPEREPLACE_HELP=§8//§etyreplace §8[§7type§8] §8[§7type§8] §8- §7Ersetzt einen Blockgruppe mit einer anderen # Schematics -SCHEMATIC_GUI_ITEM=§eSchematics \ No newline at end of file +SCHEMATIC_GUI_ITEM=§eSchematics +TLS_MESSAGE_80=§7TLS§8> §7Tick §e{0} §8- §7TNT §e{1} §8(§e{2} §7mit Fuse 80§8) +TLS_START_HELP=§8/§etls start §8: §7Starte den TNT Listener +TLS_STOP_HELP=§8/§etls stop §8: §7Stope den TNT Listener +TLS_SCOREBOARD_ELEMENT=§eTLS§8: §aan \ No newline at end of file diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java index 1d47beb8..a854f082 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem; @@ -31,50 +31,38 @@ import de.steamwar.bausystem.features.slaves.panzern.PanzernAlgorithm; import de.steamwar.bausystem.features.tracer.TraceManager; import de.steamwar.bausystem.features.tracer.TraceRecorder; import de.steamwar.bausystem.features.world.BauScoreboard; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; -import de.steamwar.bausystem.region.loader.PrototypeLoader; -import de.steamwar.bausystem.region.loader.RegionLoader; -import de.steamwar.bausystem.region.loader.Updater; +import de.steamwar.bausystem.linkage.BauGuiItem; +import de.steamwar.bausystem.region.RegionSystem; import de.steamwar.bausystem.utils.ScoreboardElement; import de.steamwar.bausystem.utils.TickListener; import de.steamwar.bausystem.utils.TickManager; import de.steamwar.bausystem.worlddata.WorldData; import de.steamwar.command.AbstractValidator; -import de.steamwar.command.SWCommand; import de.steamwar.command.SWCommandUtils; -import de.steamwar.core.Core; +import de.steamwar.core.CRIUSleepEvent; import de.steamwar.core.WorldEditRendererCUIEditor; -import de.steamwar.linkage.LinkedInstance; -import de.steamwar.linkage.MaxVersion; -import de.steamwar.linkage.MinVersion; -import de.steamwar.linkage.PluginCheck; -import de.steamwar.linkage.api.Disable; -import de.steamwar.linkage.api.Enable; +import de.steamwar.linkage.AbstractLinker; +import de.steamwar.linkage.SpigotLinker; import de.steamwar.message.Message; -import de.steamwar.network.packets.PacketHandler; import lombok.Getter; import org.bukkit.Bukkit; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import org.bukkit.event.HandlerList; +import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.scheduler.BukkitTask; -import java.io.*; -import java.lang.reflect.Field; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; +import java.io.IOException; +import java.io.OutputStream; +import java.io.PrintStream; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; import java.util.logging.Level; -import java.util.stream.Collectors; -public class BauSystem extends JavaPlugin { +public class BauSystem extends JavaPlugin implements Listener { // This should be treated as final! public static Message MESSAGE; @@ -83,7 +71,7 @@ public class BauSystem extends JavaPlugin { @Getter private static BauSystem instance; - private final Map, Object> instances = new HashMap<>(); + private SpigotLinker linker; @Override public void onEnable() { @@ -95,113 +83,44 @@ public class BauSystem extends JavaPlugin { instance = this; SWUtils.setBausystem(instance); - try { - PrototypeLoader.load(); - RegionLoader.load(); - } catch (SecurityException e) { - Bukkit.getLogger().log(Level.SEVERE, e.getMessage(), e); - Bukkit.shutdown(); - System.exit(1); - return; - } - - new Updater(PrototypeLoader.file, PrototypeLoader::load); - new Updater(RegionLoader.file, RegionLoader::load); + RegionSystem.INSTANCE.load(); SWCommandUtils.addValidator(Player.class, validator(Permission.BUILD)); SWCommandUtils.addValidator(CommandSender.class, validator(Permission.BUILD)); SWCommandUtils.addValidator("supervisor", validator(Permission.SUPERVISOR)); SWCommandUtils.addValidator("owner", validator(Permission.OWNER)); - instances.put(BauServer.class, BauServer.getInstance()); - List> classes = new BufferedReader(new InputStreamReader(BauSystem.class.getResourceAsStream("/META-INF/annotations/de.steamwar.linkage.Linked"))) - .lines() - .map(s -> { - try { - return Class.forName(s, false, BauSystem.class.getClassLoader()); - } catch (ClassNotFoundException | NoClassDefFoundError e) { - if (e.getMessage().equals(s)) { - Bukkit.shutdown(); - throw new SecurityException(e.getMessage(), e); - } - return null; - } - }) - .filter(Objects::nonNull) - .collect(Collectors.toList()); - classes.forEach(clazz -> { - MinVersion minVersion = clazz.getAnnotation(MinVersion.class); - MaxVersion maxVersion = clazz.getAnnotation(MaxVersion.class); - PluginCheck[] pluginChecks = clazz.getAnnotationsByType(PluginCheck.class); - if (minVersion != null && Core.getVersion() < minVersion.value()) { - return; - } - if (maxVersion != null && Core.getVersion() > maxVersion.value()) { - return; - } - for (PluginCheck pluginCheck : pluginChecks) { - if (pluginCheck.has() == PluginCheck.Has.THIS && Bukkit.getPluginManager().getPlugin(pluginCheck.value()) != null) { - continue; + linker = new SpigotLinker(BauSystem.getInstance(), BauSystem.MESSAGE) { + @Override + protected void linkObject(Object any) { + super.linkObject(any); + if (any instanceof LuaLib) { + SteamWarLuaPlugin.add((LuaLib) any); } - if (pluginCheck.has() == PluginCheck.Has.NOT && Bukkit.getPluginManager().getPlugin(pluginCheck.value()) == null) { - continue; + if (any instanceof ScoreboardElement) { + BauScoreboard.addElement((ScoreboardElement) any); } - return; - } - - Object any; - try { - any = clazz.newInstance(); - } catch (InstantiationException | IllegalAccessException e) { - getLogger().log(Level.SEVERE, e.getMessage(), e); - Bukkit.shutdown(); - throw new SecurityException(e.getMessage()); - } - - instances.put(clazz, any); - if (any instanceof Enable) { - ((Enable) any).enable(); - } - if (any instanceof SWCommand) { - ((SWCommand) any).setMessage(BauSystem.MESSAGE); - } - if (any instanceof Listener) { - Bukkit.getPluginManager().registerEvents((Listener) any, BauSystem.getInstance()); - } - if (any instanceof PacketHandler) { - ((PacketHandler) any).register(); - } - if (any instanceof LuaLib) { - SteamWarLuaPlugin.add((LuaLib) any); - } - if (any instanceof ScoreboardElement) { - BauScoreboard.addElement((ScoreboardElement) any); - } - if (any instanceof BauGuiItem) { - BauGUI.addItem((BauGuiItem) any); - } - if (any instanceof PanzernAlgorithm) { - Panzern.add((PanzernAlgorithm) any); - } - if (any instanceof ConfigConverter) { - Config.addConfigConverter((ConfigConverter) any); - } - if (any instanceof BoundingBoxLoader) { - ((BoundingBoxLoader) any).load(); - } - }); - - instances.forEach((clazz, o) -> { - for (Field field : clazz.getFields()) { - if (field.getAnnotation(LinkedInstance.class) != null) { - try { - field.set(o, instances.get(field.getType())); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } + if (any instanceof BauGuiItem) { + BauGUI.addItem((BauGuiItem) any); + } + if (any instanceof PanzernAlgorithm) { + Panzern.add((PanzernAlgorithm) any); + } + if (any instanceof ConfigConverter) { + Config.addConfigConverter((ConfigConverter) any); + } + if (any instanceof BoundingBoxLoader) { + ((BoundingBoxLoader) any).load(); } } - }); + }; + try { + linker.addLinkableInstance(BauServer.getInstance()); + linker.link(); + } catch (AbstractLinker.LinkException e) { + getLogger().log(Level.SEVERE, "Could not link a class.", e); + Bukkit.shutdown(); + } TickListener.impl.init(); @@ -211,18 +130,16 @@ public class BauSystem extends JavaPlugin { new WorldEditRendererCUIEditor(); } + @EventHandler + public void onCRIUSleep(CRIUSleepEvent event) { + RegionSystem.INSTANCE.save(); + } + @Override public void onDisable() { - instances.forEach((aClass, o) -> { - if (o instanceof Listener) { - HandlerList.unregisterAll((Listener) o); - } - if (o instanceof Disable) { - ((Disable) o).disable(); - } - }); - + linker.unlink(); WorldData.write(); + RegionSystem.INSTANCE.save(); Config.getInstance().saveAll(); } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/Permission.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/Permission.java index 0985a62d..ecc1df44 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/Permission.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/Permission.java @@ -1,31 +1,30 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem; import de.steamwar.bausystem.config.BauServer; import de.steamwar.bausystem.features.world.BauMemberUpdate; -import de.steamwar.bausystem.utils.BauMemberUpdateEvent; +import de.steamwar.bausystem.linkage.GuiItem; import de.steamwar.sql.BauweltMember; import de.steamwar.sql.SteamwarUser; import lombok.AllArgsConstructor; -import org.bukkit.Bukkit; import org.bukkit.entity.Player; import java.util.HashSet; @@ -50,7 +49,7 @@ public enum Permission { return !bauweltMember.isBuild() && !bauweltMember.isSupervisor(); }), /** - * Primarily used for {@link de.steamwar.bausystem.linkage.specific.GuiItem} + * Primarily used for {@link GuiItem} */ MEMBER(bauweltMember -> { return true; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/SWUtils.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/SWUtils.java index c7c9183f..97d12dcb 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/SWUtils.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/SWUtils.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/config/BauServer.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/config/BauServer.java index ee7d48e8..fea634a2 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/config/BauServer.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/config/BauServer.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.config; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/configplayer/Config.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/configplayer/Config.java index edce8c58..77b8b706 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/configplayer/Config.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/configplayer/Config.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.configplayer; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/configplayer/ConfigConverter.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/configplayer/ConfigConverter.java index bf9f1fdf..46119887 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/configplayer/ConfigConverter.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/configplayer/ConfigConverter.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.configplayer; import yapion.hierarchy.types.YAPIONObject; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/configplayer/ConfigCreator.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/configplayer/ConfigCreator.java index f2d8a4a8..9a887208 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/configplayer/ConfigCreator.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/configplayer/ConfigCreator.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.configplayer; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/configplayer/serializer/ConfigurationSerializableSerializer.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/configplayer/serializer/ConfigurationSerializableSerializer.java index eecd1ef1..2d054c3d 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/configplayer/serializer/ConfigurationSerializableSerializer.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/configplayer/serializer/ConfigurationSerializableSerializer.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.configplayer.serializer; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributeRemoveCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributeRemoveCommand.java index 689be980..eb45a73f 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributeRemoveCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributeRemoveCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.attributescopy; @@ -24,7 +24,6 @@ import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeMapper; import de.steamwar.linkage.Linked; -import de.steamwar.linkage.MinVersion; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributeUtils.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributeUtils.java index 246e4ab9..740893dc 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributeUtils.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributeUtils.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.attributescopy; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributesCopyCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributesCopyCommand.java index 808ca339..61873303 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributesCopyCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributesCopyCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.attributescopy; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributesPlaceListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributesPlaceListener.java index 965d8bad..79cf7821 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributesPlaceListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributesPlaceListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.attributescopy; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutoStartCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutoStartCommand.java index 3401267e..72c89d0e 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutoStartCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutoStartCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.autostart; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutoStartGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutoStartGuiItem.java index f622d70b..d21ec4cb 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutoStartGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutoStartGuiItem.java @@ -1,26 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.autostart; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.linkage.Linked; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutostartListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutostartListener.java index 28126ec5..d45a7029 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutostartListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutostartListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.autostart; @@ -24,8 +24,6 @@ import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.features.tpslimit.TPSUtils; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.RegionUtils; -import de.steamwar.bausystem.region.utils.RegionExtensionType; -import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.bausystem.utils.ItemUtils; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; @@ -33,8 +31,6 @@ import lombok.Getter; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.block.data.type.Chest; -import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; @@ -43,9 +39,9 @@ import org.bukkit.event.inventory.InventoryCloseEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.inventory.ItemStack; -import java.io.File; -import java.text.SimpleDateFormat; -import java.util.*; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; @Linked public class AutostartListener implements Listener { @@ -106,11 +102,11 @@ public class AutostartListener implements Listener { public void activate(Player player) { Region region = Region.getRegion(player.getLocation()); - if (region.isGlobal()) { + if (region.getType().isGlobal()) { BauSystem.MESSAGE.send("AUTOSTART_MESSAGE_NO_REGION", player); return; } - if (!region.hasType(RegionType.TESTBLOCK)) { + if (region.getTestblockArea().isEmpty()) { BauSystem.MESSAGE.send("AUTOSTART_MESSAGE_NO_REGION", player); return; } @@ -131,20 +127,12 @@ public class AutostartListener implements Listener { event.blockList().forEach(block -> { Region region = Region.getRegion(block.getLocation()); if (!regionStartTime.containsKey(region)) return; - if (!region.hasType(RegionType.TESTBLOCK)) return; - if (!region.inRegion(block.getLocation(), RegionType.TESTBLOCK, RegionExtensionType.EXTENSION)) return; + if (!region.getTestblockArea().inRegion(block.getLocation(), true)) return; long tickDiff = TPSUtils.currentRealTick.get() - regionStartTime.remove(region); - long preFightDurationInSeconds = getPreFightDurationInSeconds(region); + long preFightDurationInSeconds = region.getGameModeConfig().Times.PreFightDuration; RegionUtils.message(region, "AUTOSTART_MESSAGE_RESULT1", tickDiff); RegionUtils.message(region, "AUTOSTART_MESSAGE_RESULT2", preFightDurationInSeconds, ((preFightDurationInSeconds * 20) - tickDiff)); RegionUtils.message(region, "AUTOSTART_MESSAGE_RESULT3"); }); } - - private int getPreFightDurationInSeconds(Region region) { - File file = region.gameModeConfig(); - if (file == null) return 30; - FileConfiguration config = YamlConfiguration.loadConfiguration(file); - return config.getInt("Times.PreFightDuration", 30); - } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/backup/BackupCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/backup/BackupCommand.java index b7911275..c934fa24 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/backup/BackupCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/backup/BackupCommand.java @@ -1,49 +1,41 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.backup; -import com.sk89q.worldedit.EditSession; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.region.Color; import de.steamwar.bausystem.region.Region; +import de.steamwar.bausystem.region.RegionBackups; +import de.steamwar.bausystem.region.flags.ChangedMode; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.ColorMode; -import de.steamwar.bausystem.region.tags.Tag; -import de.steamwar.bausystem.utils.PasteBuilder; +import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommand; -import de.steamwar.command.SWCommandUtils; import de.steamwar.command.TypeMapper; -import de.steamwar.command.TypeValidator; import de.steamwar.inventory.SWItem; import de.steamwar.inventory.SWListInv; import de.steamwar.linkage.Linked; import net.md_5.bungee.api.chat.ClickEvent; import org.bukkit.Material; +import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import java.io.File; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; +import java.util.*; import java.util.stream.Collectors; @Linked @@ -54,7 +46,7 @@ public class BackupCommand extends SWCommand { } static boolean checkGlobalRegion(Region region, Player p) { - if (region.isGlobal()) { + if (region.getType().isGlobal()) { BauSystem.MESSAGE.send("BACKUP_REGION_NO_REGION", p); return true; } @@ -67,11 +59,12 @@ public class BackupCommand extends SWCommand { if (checkGlobalRegion(region, p)) { return; } - if (!region.get(Tag.CHANGED)) { + if (region.getFlags().get(Flag.CHANGED).isWithDefault(ChangedMode.NO_CHANGE)) { BauSystem.MESSAGE.send("BACKUP_CREATE_NO_CHANGE", p); return; } - if (region.backup()) { + Optional backup = region.getBackups().create(RegionBackups.BackupType.MANUAL); + if (backup.isPresent()) { BauSystem.MESSAGE.send("BACKUP_CREATE_SUCCESS", p); } else { BauSystem.MESSAGE.send("BACKUP_CREATE_FAILURE", p); @@ -79,25 +72,12 @@ public class BackupCommand extends SWCommand { } @Register(value = "load", description = "BACKUP_HELP_LOAD") - public void backupLoad(@Validator("owner") Player p, @Mapper("backupName") String backupName) { - Region region = Region.getRegion(p.getLocation()); - if (checkGlobalRegion(region, p)) { - return; - } - - File backupFile = region.getBackupFile(backupName.replace('_', ' ')); - if (backupFile == null) { + public void backupLoad(@Validator("owner") Player p, @Mapper("backup") @ErrorMessage("BACKUP_LOAD_FAILURE") RegionBackups.Backup backup) { + if (backup.load()) { + BauSystem.MESSAGE.send("BACKUP_LOAD", p); + } else { BauSystem.MESSAGE.send("BACKUP_LOAD_FAILURE", p); - return; } - EditSession editSession = new PasteBuilder(new PasteBuilder.FileProvider(backupFile)) - .pastePoint(region.getMinPoint().add(region.getPrototype().getSizeX() / 2, 0, region.getPrototype().getSizeZ() / 2)) - .minPoint(region.getMinPoint()) - .maxPoint(region.getMaxPoint()) - .waterLevel(region.getWaterLevel()) - .run(); - region.remember(editSession); - BauSystem.MESSAGE.send("BACKUP_LOAD", p); } @Register(value = "list", description = "BACKUP_HELP_LIST") @@ -106,10 +86,10 @@ public class BackupCommand extends SWCommand { if (checkGlobalRegion(region, p)) { return; } - List backups = listBackup(p); + List backups = listBackup(p); BauSystem.MESSAGE.send("BACKUP_LIST_HEAD", p, backups.size()); - backups.forEach(s -> { - BauSystem.MESSAGE.send("BACKUP_LIST_ENTRY", p, "/backup load " + s, new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/backup load " + s), s); + backups.forEach(backup -> { + BauSystem.MESSAGE.send("BACKUP_LIST_ENTRY", p, "/backup load " + backup.getName(), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/backup load " + backup.getName()), backup.getName()); }); } @@ -119,34 +99,44 @@ public class BackupCommand extends SWCommand { if (checkGlobalRegion(region, p)) { return; } - List backups = listBackup(p); - List> swListEntries = new ArrayList<>(); + List backups = listBackup(p); + List> swListEntries = new ArrayList<>(); List lore = Arrays.asList(BauSystem.MESSAGE.parse("BACKUP_LORE", p)); for (int i = 0; i < backups.size(); i++) { - String s = backups.get(i); - SWItem swItem = new SWItem(Material.BRICK, BauSystem.MESSAGE.parse("BACKUP_ITEM_NAME", p, s), lore, false, clickType -> {}); + RegionBackups.Backup backup = backups.get(i); + SWItem swItem = new SWItem(Material.BRICK, BauSystem.MESSAGE.parse("BACKUP_ITEM_NAME", p, backup.getName()), lore, false, clickType -> {}); swItem.getItemStack().setAmount(i + 1); - swListEntries.add(new SWListInv.SWListEntry<>(swItem, s)); + swListEntries.add(new SWListInv.SWListEntry<>(swItem, backup)); } - SWListInv swListInv = new SWListInv<>(p, BauSystem.MESSAGE.parse("BACKUP_INV_NAME", p), swListEntries, (clickType, s) -> { + SWListInv swListInv = new SWListInv<>(p, BauSystem.MESSAGE.parse("BACKUP_INV_NAME", p), swListEntries, (clickType, s) -> { p.getOpenInventory().close(); - p.performCommand("backup load " + s); + backupLoad(p, s); }); swListInv.open(); } - @Mapper(value = "backupName", local = true) - public TypeMapper backupMapper() { - return SWCommandUtils.createMapper(s -> s, (commandSender, s) -> listBackup((Player) commandSender)); + @Mapper(value = "backup", local = true) + public TypeMapper backupMapper() { + return new TypeMapper<>() { + @Override + public RegionBackups.Backup map(CommandSender commandSender, String[] previousArguments, String s) { + return Region.getRegion(((Player) commandSender).getLocation()).getBackups().get(s); + } + + @Override + public Collection tabCompletes(CommandSender sender, PreviousArguments previousArguments, String s) { + return listBackup((Player) sender).stream().map(RegionBackups.Backup::getName).collect(Collectors.toList()); + } + }; } - private List listBackup(Player p) { + private List listBackup(Player p) { Region region = Region.getRegion(p.getLocation()); if (checkGlobalRegion(region, p)) { return Collections.emptyList(); } try { - return region.listBackup().stream().map(s -> s.substring(0, s.length() - 6).replace(' ', '_')).collect(Collectors.toList()); + return region.getBackups().list(); } catch (NullPointerException e) { return Collections.emptyList(); } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/bau/BauInfoBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/bau/BauInfoBauGuiItem.java index d8ba9171..12c0fa88 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/bau/BauInfoBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/bau/BauInfoBauGuiItem.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.bau; @@ -22,10 +22,10 @@ package de.steamwar.bausystem.features.bau; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.config.BauServer; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; +import de.steamwar.bausystem.region.FlagOptional; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.core.Core; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; import de.steamwar.sql.SteamwarUser; @@ -56,15 +56,10 @@ public class BauInfoBauGuiItem extends BauGuiItem { Region region = Region.getRegion(player.getLocation()); List stringList = new ArrayList<>(); for (Flag flag : Flag.getFlags()) { - if (flag == Flag.PROTECT && region.getFloorLevel() == 0) { - continue; - } - if (flag == Flag.ITEMS && Core.getVersion() < 19) { - continue; - } - Flag.Value value = region.get(flag); - if (value != null) { - stringList.add(BauSystem.MESSAGE.parse("BAU_INFO_ITEM_LORE_" + flag.name(), player, BauSystem.MESSAGE.parse(value.getChatValue(), player))); + if (!region.getFlags().has(flag).isApplicable()) continue; + FlagOptional value = region.getFlags().get(flag); + if (value.isPresent()) { + stringList.add(BauSystem.MESSAGE.parse("BAU_INFO_ITEM_LORE_" + flag.name(), player, BauSystem.MESSAGE.parse(value.getWithDefault().getChatValue(), player))); } } itemStack.setLore(stringList); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/bau/ForceSpectatorCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/bau/ForceSpectatorCommand.java index 7bef91df..a4e79c2f 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/bau/ForceSpectatorCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/bau/ForceSpectatorCommand.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -19,13 +19,11 @@ package de.steamwar.bausystem.features.bau; -import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeMapper; import de.steamwar.linkage.Linked; -import de.steamwar.techhider.TechHider; import org.bukkit.Bukkit; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/bau/InfoCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/bau/InfoCommand.java index 2d638888..adeb4c45 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/bau/InfoCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/bau/InfoCommand.java @@ -1,8 +1,28 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.features.bau; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.config.BauServer; +import de.steamwar.bausystem.region.FlagOptional; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.flags.Flag; import de.steamwar.command.SWCommand; @@ -30,12 +50,10 @@ public class InfoCommand extends SWCommand { BauSystem.MESSAGE.send("BAU_INFO_COMMAND_OWNER", p, SteamwarUser.get(bauServer.getOwnerID()).getUserName()); Region region = Region.getRegion(p.getLocation()); for (Flag flag : Flag.getFlags()) { - if (flag == Flag.PROTECT && region.getFloorLevel() == 0) { - continue; - } - Flag.Value value = region.get(flag); - if (value != null) { - BauSystem.MESSAGE.send("BAU_INFO_COMMAND_FLAG", p, BauSystem.MESSAGE.parse(flag.getChatValue(), p), BauSystem.MESSAGE.parse(value.getChatValue(), p)); + if (!region.getFlags().has(flag).isApplicable()) continue; + FlagOptional value = region.getFlags().get(flag); + if (value.isPresent()) { + BauSystem.MESSAGE.send("BAU_INFO_COMMAND_FLAG", p, BauSystem.MESSAGE.parse(flag.getChatValue(), p), BauSystem.MESSAGE.parse(value.getWithDefault().getChatValue(), p)); } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/CannonDetector.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/CannonDetector.java index 3ab4fe70..b7347cd5 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/CannonDetector.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/CannonDetector.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -23,7 +23,6 @@ import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.features.cannon.depth.Depth; import de.steamwar.bausystem.features.cannon.depth.DepthManager; import de.steamwar.bausystem.region.Region; -import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.linkage.Linked; import org.bukkit.Bukkit; import org.bukkit.entity.TNTPrimed; @@ -85,8 +84,8 @@ public class CannonDetector implements Listener { grouped.forEach((cannonKey, tntPrimeds) -> { if (tntPrimeds.size() <= 5) return; Region region = Region.getRegion(tntPrimeds.get(0).getLocation()); - if (region.isGlobal()) return; - if (!region.hasType(RegionType.TESTBLOCK)) return; + if (region.getType().isGlobal()) return; + if (region.getTestblockArea().isEmpty()) return; Depth depth = new Depth(region); DepthManager.init(tntPrimeds, depth); }); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/CannonKey.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/CannonKey.java index c260e8a9..d042554a 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/CannonKey.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/CannonKey.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -22,7 +22,6 @@ package de.steamwar.bausystem.features.cannon; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.Getter; -import org.bukkit.entity.TNTPrimed; import org.bukkit.util.Vector; import java.util.Set; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/Depth.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/Depth.java index 22ce7fde..89f0daa2 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/Depth.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/Depth.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -23,8 +23,6 @@ import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.configplayer.Config; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.RegionUtils; -import de.steamwar.bausystem.region.utils.RegionExtensionType; -import de.steamwar.bausystem.region.utils.RegionType; import net.md_5.bungee.api.chat.BaseComponent; import net.md_5.bungee.api.chat.HoverEvent; import net.md_5.bungee.api.chat.TextComponent; @@ -50,7 +48,7 @@ public class Depth { public void update(List blocks) { List blocksList = blocks.stream() - .filter(block -> region.inRegion(block.getLocation(), RegionType.TESTBLOCK, RegionExtensionType.EXTENSION)) + .filter(block -> region.getTestblockArea().inRegion(block.getLocation(), true)) .collect(Collectors.toList()); tntCount++; for (Block block : blocksList) { diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/DepthCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/DepthCommand.java index b7426fd7..b9f71398 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/DepthCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/DepthCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.cannon.depth; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/DepthManager.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/DepthManager.java index 21789d7b..fe9f45bc 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/DepthManager.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/DepthManager.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/Countingwand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/Countingwand.java index fb9316b9..bcd13a7f 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/Countingwand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/Countingwand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.countingwand; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandCommand.java index c7d9b270..f35420fe 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.countingwand; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandGuiItem.java index dbeae70d..86cb0332 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandGuiItem.java @@ -1,26 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.countingwand; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; import org.bukkit.event.inventory.ClickType; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandListener.java index 7233670a..127bb964 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.countingwand; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/design/endstone/DesignEndStone.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/design/endstone/DesignEndStone.java index f04fd5e9..fe529864 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/design/endstone/DesignEndStone.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/design/endstone/DesignEndStone.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.design.endstone; @@ -35,6 +35,7 @@ import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; +import java.util.stream.Collectors; public class DesignEndStone { @@ -44,18 +45,24 @@ public class DesignEndStone { private REntityServer entityServer = new REntityServer(); private List entities = new ArrayList<>(); private Set locations = new HashSet<>(); - private boolean wsOrAs; - private double maxBlastResistance; + private Set limited; + private boolean calculateFromBottom; public DesignEndStone(Region region) { - this.minX = region.getMinPointBuild().getX(); - this.minY = region.getMinPointBuild().getY(); - this.minZ = region.getMinPointBuild().getZ(); - this.maxX = region.getMaxPointBuild().getX(); - this.maxY = region.getMaxPointBuild().getY(); - this.maxZ = region.getMaxPointBuild().getZ(); - wsOrAs = region.getName().startsWith("ws") || region.getName().startsWith("as"); - maxBlastResistance = wsOrAs ? 6.1 : 9.0; + this.minX = region.getBuildArea().getMinPoint(false).getX(); + this.minY = region.getBuildArea().getMinPoint(false).getY(); + this.minZ = region.getBuildArea().getMinPoint(false).getZ(); + this.maxX = region.getBuildArea().getMaxPoint(false).getX(); + this.maxY = region.getBuildArea().getMaxPoint(false).getY(); + this.maxZ = region.getBuildArea().getMaxPoint(false).getZ(); + + limited = region.getGameModeConfig().Schematic.Limited + .entrySet() + .stream() + .filter(entry -> entry.getValue() == 0) + .flatMap(entry -> entry.getKey().stream()) + .collect(Collectors.toSet()); + calculateFromBottom = region.getGameModeConfig().Arena.NoFloor; entityServer.setCallback((player, rEntity, entityAction) -> { if (entityAction != REntityServer.EntityAction.ATTACK) return; @@ -76,7 +83,7 @@ public class DesignEndStone { calc(minX, minY, maxZ, maxX, maxY, maxZ, 0, 0, -1, maxZ - minZ); calc(minX, minY, minZ, minX, maxY, maxZ, 1, 0, 0, maxX - minX); calc(maxX, minY, minZ, maxX, maxY, maxZ, -1, 0, 0, maxX - minX); - if (wsOrAs) { + if (calculateFromBottom) { calc(minX, minY, minZ, maxX, minY, maxZ, 0, 1, 0, maxY - minY + 1); } else { int airBlocks = 0; @@ -106,7 +113,7 @@ public class DesignEndStone { int cz = z + step * dirZ; Material material = WORLD.getBlockAt(cx, cy, cz).getType(); - if (material != Material.WATER && material != Material.LAVA && material.getBlastResistance() >= maxBlastResistance) { + if (material != Material.WATER && material != Material.LAVA && limited.contains(material)) { Location location = new Location(WORLD, cx + 0.5, cy, cz + 0.5); if (!locations.add(location)) break; RFallingBlockEntity entity = new RFallingBlockEntity(entityServer, location, Material.RED_STAINED_GLASS); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/design/endstone/DesignEndStoneCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/design/endstone/DesignEndStoneCommand.java index 92934c23..79d0d408 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/design/endstone/DesignEndStoneCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/design/endstone/DesignEndStoneCommand.java @@ -1,27 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.design.endstone; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.region.Region; -import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.bausystem.utils.BauMemberUpdateEvent; import de.steamwar.command.SWCommand; import de.steamwar.linkage.Linked; @@ -49,7 +48,11 @@ public class DesignEndStoneCommand extends SWCommand implements Listener { @Register(description = "DESIGN_ENDSTONE_COMMAND_HELP") public void genericCommand(@Validator Player player) { Region region = Region.getRegion(player.getLocation()); - if (!region.hasType(RegionType.BUILD)) { + if (region.getBuildArea().isEmpty()) { + BauSystem.MESSAGE.send("DESIGN_ENDSTONE_REGION_ERROR", player); + return; + } + if (!region.getGameModeConfig().loaded) { BauSystem.MESSAGE.send("DESIGN_ENDSTONE_REGION_ERROR", player); return; } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detoblock.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detoblock.java index 85facc7a..c27aeb33 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detoblock.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detoblock.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.detonator; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detonator.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detonator.java index 80d5b33b..5ba2bca8 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detonator.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detonator.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.detonator; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorBauGuiItem.java index 3f633663..aa2767bf 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorBauGuiItem.java @@ -1,26 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.detonator; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; import org.bukkit.event.inventory.ClickType; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorCommand.java index c8d493bd..5c936c49 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.detonator; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorListener.java index cabe00c6..9d70d11a 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.detonator; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/storage/DetonatorStorage.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/storage/DetonatorStorage.java index 104abf29..3ec07c66 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/storage/DetonatorStorage.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/storage/DetonatorStorage.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.detonator.storage; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/storage/ItemStorage.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/storage/ItemStorage.java index 71b6edb4..f95c590a 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/storage/ItemStorage.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/storage/ItemStorage.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.detonator.storage; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGUI.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGUI.java index 4c71acf4..4f9605a9 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGUI.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGUI.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.gui; @@ -23,7 +23,7 @@ import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.SWUtils; import de.steamwar.bausystem.features.gui.editor.BauGuiMapping; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.inventory.SWInventory; import lombok.Getter; import lombok.experimental.UtilityClass; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGUICommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGUICommand.java index f6810ef7..fb47155d 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGUICommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGUICommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.gui; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGuiBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGuiBauGuiItem.java index c03b458a..bae48658 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGuiBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGuiBauGuiItem.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.gui; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; import net.md_5.bungee.api.ChatColor; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGuiListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGuiListener.java index 5895019f..283f582a 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGuiListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGuiListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.gui; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiEditor.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiEditor.java index b548b60e..092c95cf 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiEditor.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiEditor.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.gui.editor; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.features.gui.BauGUI; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.core.TrickyTrialsWrapper; import de.steamwar.data.CMDs; import de.steamwar.inventory.SWItem; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiEditorGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiEditorGuiItem.java index b1a76041..e20819a1 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiEditorGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiEditorGuiItem.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.gui.editor; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; import org.bukkit.Material; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiMapping.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiMapping.java index 90cc1fb4..7dfed54d 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiMapping.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiMapping.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.gui.editor; @@ -22,7 +22,7 @@ package de.steamwar.bausystem.features.gui.editor; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.configplayer.Config; import de.steamwar.bausystem.features.gui.BauGUI; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import lombok.Getter; import lombok.Setter; import org.bukkit.Bukkit; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/DefaultHotbar.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/DefaultHotbar.java index 9e374ee4..602f1817 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/DefaultHotbar.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/DefaultHotbar.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.hotbar; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/HotbarCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/HotbarCommand.java index 77a13716..53c6d805 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/HotbarCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/HotbarCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.hotbar; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/HotbarListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/HotbarListener.java index 8a4c78de..11d5481d 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/HotbarListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/HotbarListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.hotbar; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/inventoryfiller/InventoryFillBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/inventoryfiller/InventoryFillBauGuiItem.java index 7e94710a..fe62c7e2 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/inventoryfiller/InventoryFillBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/inventoryfiller/InventoryFillBauGuiItem.java @@ -1,9 +1,28 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.features.inventoryfiller; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.configplayer.Config; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; import de.steamwar.linkage.LinkedInstance; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/inventoryfiller/InventoryFiller.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/inventoryfiller/InventoryFiller.java index d69e3410..a64904ce 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/inventoryfiller/InventoryFiller.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/inventoryfiller/InventoryFiller.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.inventoryfiller; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/inventoryfiller/InventoryFillerCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/inventoryfiller/InventoryFillerCommand.java index e467e3eb..0e9887ab 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/inventoryfiller/InventoryFillerCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/inventoryfiller/InventoryFillerCommand.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.features.inventoryfiller; import de.steamwar.bausystem.BauSystem; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/killchecker/Cuboid.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/killchecker/Cuboid.java index 08632a9c..7b4f8279 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/killchecker/Cuboid.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/killchecker/Cuboid.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.killchecker; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/killchecker/KillcheckerCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/killchecker/KillcheckerCommand.java index 9ca7a480..6ae13f47 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/killchecker/KillcheckerCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/killchecker/KillcheckerCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.killchecker; @@ -38,7 +38,6 @@ import org.bukkit.event.player.PlayerQuitEvent; import java.util.HashMap; import java.util.HashSet; import java.util.Map; -import java.util.Set; @Linked public class KillcheckerCommand extends SWCommand implements Listener { @@ -57,6 +56,10 @@ public class KillcheckerCommand extends SWCommand implements Listener { @Register(value = "enable", description = "KILLCHECKER_HELP_ENABLE") public void genericCommand(@Validator Player player, @OptionalValue("-outline") @StaticValue(value = {"-area", "-outline"}, allowISE = true) boolean onlyOutline) { Region region = Region.getRegion(player.getLocation()); + if (region.getBuildArea().isEmpty()) { + BauSystem.MESSAGE.send("KILLCHECKER_NO_BUILD", player); + return; + } KillcheckerVisualizer killcheckerVisualizer = visualizers.computeIfAbsent(region, region1 -> new KillcheckerVisualizer(region1, bossBarService)); killcheckerVisualizer.recalc(); killcheckerVisualizer.show(player, onlyOutline); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/killchecker/KillcheckerVisualizer.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/killchecker/KillcheckerVisualizer.java index 04822aa8..f303380d 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/killchecker/KillcheckerVisualizer.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/killchecker/KillcheckerVisualizer.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.killchecker; @@ -22,8 +22,6 @@ package de.steamwar.bausystem.features.killchecker; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.region.Point; import de.steamwar.bausystem.region.Region; -import de.steamwar.bausystem.region.utils.RegionExtensionType; -import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.bausystem.utils.bossbar.BauSystemBossbar; import de.steamwar.bausystem.utils.bossbar.BossBarService; import de.steamwar.entity.REntity; @@ -75,8 +73,8 @@ public class KillcheckerVisualizer { public KillcheckerVisualizer(Region region, BossBarService bossBarService) { this.region = region; - this.minPoint = region.getMinPoint(RegionType.BUILD, RegionExtensionType.NORMAL); - this.maxPoint = region.getMaxPoint(RegionType.BUILD, RegionExtensionType.NORMAL); + this.minPoint = region.getBuildArea().getMinPoint(false); + this.maxPoint = region.getBuildArea().getMaxPoint(false); yArea = (maxPoint.getX() - minPoint.getX()) * (maxPoint.getZ() - minPoint.getZ()); zArea = (maxPoint.getX() - minPoint.getX()) * (maxPoint.getY() - minPoint.getY()); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java index 1c023ae8..491f45aa 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loader; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderCommand.java index 021ad330..ffb8e185 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loader; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderRecorder.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderRecorder.java index cc3dce23..f9f56a37 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderRecorder.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderRecorder.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loader; @@ -44,7 +44,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.BiConsumer; -import java.util.function.Consumer; public class LoaderRecorder implements Listener { diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderScoreboardElement.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderScoreboardElement.java index fdcda57a..a51417d4 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderScoreboardElement.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderScoreboardElement.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loader; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderElement.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderElement.java index 658a9f8d..61ece4d3 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderElement.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderElement.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loader.elements; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderInteractionElement.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderInteractionElement.java index 2caacbc4..29c2be7c 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderInteractionElement.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderInteractionElement.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loader.elements; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderSettingsEnum.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderSettingsEnum.java index f1e628d0..9fae7e20 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderSettingsEnum.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderSettingsEnum.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderComparator.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderComparator.java index fa7a032e..51a5e7f3 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderComparator.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderComparator.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loader.elements.impl; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderDaylightDetector.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderDaylightDetector.java index caacd6b0..7fbb9142 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderDaylightDetector.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderDaylightDetector.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loader.elements.impl; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderLectern.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderLectern.java index 8282cf69..11c3fa35 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderLectern.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderLectern.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loader.elements.impl; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderLever.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderLever.java index c77d914d..11509fdd 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderLever.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderLever.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loader.elements.impl; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderMovement.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderMovement.java index 3fc89e5d..c3108b7c 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderMovement.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderMovement.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loader.elements.impl; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderNoteBlock.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderNoteBlock.java index 042243e0..524ea714 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderNoteBlock.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderNoteBlock.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loader.elements.impl; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderOpenable.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderOpenable.java index 46197b00..ccfda8d9 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderOpenable.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderOpenable.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loader.elements.impl; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderRepeater.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderRepeater.java index d40e4211..f8ce4295 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderRepeater.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderRepeater.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loader.elements.impl; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderTNT.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderTNT.java index f0ee034e..7dc597a3 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderTNT.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderTNT.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loader.elements.impl; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderTicks.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderTicks.java index 32e65f61..0afa23cf 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderTicks.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderTicks.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loader.elements.impl; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderWait.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderWait.java index 618be768..2ab40d9d 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderWait.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderWait.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loader.elements.impl; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loadtimer/Loadtimer.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loadtimer/Loadtimer.java index 116edba5..f1a42e1a 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loadtimer/Loadtimer.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loadtimer/Loadtimer.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loadtimer; @@ -22,8 +22,6 @@ package de.steamwar.bausystem.features.loadtimer; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.features.tpslimit.TPSUtils; import de.steamwar.bausystem.region.Region; -import de.steamwar.bausystem.region.utils.RegionExtensionType; -import de.steamwar.bausystem.region.utils.RegionType; import lombok.Getter; import org.bukkit.Bukkit; import org.bukkit.Material; @@ -158,7 +156,7 @@ public class Loadtimer implements Listener { } public void onTntExplode(EntityExplodeEvent event) { - if (region.inRegion(event.getLocation(), RegionType.BUILD, RegionExtensionType.EXTENSION) && stage == Stage.IGNITION) { + if (region.getBuildArea().inRegion(event.getLocation(), true) && stage == Stage.IGNITION) { stage = Stage.END; explode = TPSUtils.currentRealTick.get(); print(); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loadtimer/LoadtimerCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loadtimer/LoadtimerCommand.java index 503c1b47..a73e6d45 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loadtimer/LoadtimerCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loadtimer/LoadtimerCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loadtimer; @@ -39,7 +39,7 @@ public class LoadtimerCommand extends SWCommand { @Register(value = "start", description = {"LOADTIMER_HELP_START_2", "LOADTIMER_HELP_START_3"}) public void start(@Validator Player p, TimerMode mode) { Region r = Region.getRegion(p.getLocation()); - if (r.isGlobal()) return; + if (r.getType().isGlobal()) return; if (!Loadtimer.hasTimer(r)) Loadtimer.createLoadtimer(r, mode == TimerMode.HALF); } @@ -47,7 +47,7 @@ public class LoadtimerCommand extends SWCommand { @Register(value = "stop", description = "LOADTIMER_HELP_STOP") public void stop(@Validator Player p) { Region r = Region.getRegion(p.getLocation()); - if (r.isGlobal()) return; + if (r.getType().isGlobal()) return; if (Loadtimer.hasTimer(r)) Loadtimer.getTimer(r).delete(); } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loadtimer/LoadtimerGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loadtimer/LoadtimerGuiItem.java index f190d9f0..cdee3114 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loadtimer/LoadtimerGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loadtimer/LoadtimerGuiItem.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loadtimer; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.bausystem.region.Region; import de.steamwar.inventory.SWInventory; import de.steamwar.inventory.SWItem; @@ -46,7 +46,7 @@ public class LoadtimerGuiItem extends BauGuiItem { @Override public ItemStack getItem(Player player) { Region r = Region.getRegion(player.getLocation()); - if (r.isGlobal()) + if (r.getType().isGlobal()) return new SWItem(Material.BOWL, BauSystem.MESSAGE.parse("LOADTIMER_GUI_GLOBAL", player)).getItemStack(); if (Loadtimer.hasTimer(r)) { return new SWItem(Material.BOW, BauSystem.MESSAGE.parse("LOADTIMER_GUI_STOP", player)).getItemStack(); @@ -58,7 +58,7 @@ public class LoadtimerGuiItem extends BauGuiItem { @Override public boolean click(ClickType click, Player p) { Region r = Region.getRegion(p.getLocation()); - if (r.isGlobal()) return false; + if (r.getType().isGlobal()) return false; if (Loadtimer.hasTimer(r)) { p.performCommand("lt stop"); } else { diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loadtimer/LoadtimerListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loadtimer/LoadtimerListener.java index c528b9ad..bfc2736a 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loadtimer/LoadtimerListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loadtimer/LoadtimerListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.loadtimer; @@ -23,7 +23,6 @@ import de.steamwar.bausystem.region.Region; import de.steamwar.core.TrickyTrialsWrapper; import de.steamwar.linkage.Linked; import org.bukkit.Material; -import org.bukkit.entity.EntityType; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.block.BlockPlaceEvent; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracer.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracer.java index c1e08fcf..ad0bca1b 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracer.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracer.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.observer; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerCommand.java index 531eda68..7cfadf2c 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerCommand.java @@ -1,26 +1,25 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.observer; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.Permission; import de.steamwar.command.SWCommand; import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerListener.java index a2d9c991..9ef56909 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.observer; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/rayvisualizer/RayVisualizerCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/rayvisualizer/RayVisualizerCommand.java index 134db478..2346bcd3 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/rayvisualizer/RayVisualizerCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/rayvisualizer/RayVisualizerCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.rayvisualizer; @@ -30,6 +30,7 @@ import de.steamwar.entity.REntityServer; import de.steamwar.linkage.Linked; import de.steamwar.linkage.MinVersion; import org.bukkit.*; +import org.bukkit.block.data.BlockData; import org.bukkit.entity.Player; import org.bukkit.entity.TNTPrimed; import org.bukkit.event.EventHandler; @@ -38,15 +39,15 @@ import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.util.RayTraceResult; -import java.util.ArrayList; import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; @Linked @MinVersion(20) public class RayVisualizerCommand extends SWCommand implements Listener { + private BlockData VISIBLE = Material.LIME_CONCRETE.createBlockData(); + private BlockData BLOCKED = Material.RED_CONCRETE.createBlockData(); + private class CRayData { private CRay[] rays = new CRay[27 * 400]; private boolean[] used = new boolean[27 * 400]; @@ -108,28 +109,23 @@ public class RayVisualizerCommand extends SWCommand implements Listener { Bukkit.getScheduler().runTaskTimer(BauSystem.getInstance(), () -> { if (server.getPlayers().isEmpty()) return; - Map> primedList = WORLD.getEntitiesByClass(TNTPrimed.class) - .stream() - .collect(Collectors.groupingBy(TNTPrimed::getFuseTicks)); + List primedList = WORLD.getEntitiesByClass(TNTPrimed.class) + .stream().toList(); rayData.reset(); if (primedList.isEmpty()) return; - - List fuseTicks = primedList.keySet().stream().sorted().collect(Collectors.toList()); - List current = new ArrayList<>(); - for (int i = 0; i < fuseTicks.size(); i++) { - List tnts = primedList.get(fuseTicks.get(i)); - calculateRays(current, tnts); - current.addAll(tnts); - } + calculateRays(primedList, primedList); }, 1, 1); } private void calculateRays(List fromTNTs, List toTNTs) { - for (TNTPrimed from : fromTNTs) { - if (!from.isInWater()) continue; - for (TNTPrimed to : toTNTs) { + for (TNTPrimed to : toTNTs) { + int hitting = 0; + int total = 0; + for (TNTPrimed from : fromTNTs) { if (from == to) continue; + if (from.getFuseTicks() >= to.getFuseTicks()) continue; if (to.getLocation().distanceSquared(from.getLocation()) > 25) continue; + if (!from.isInWater()) continue; Location fromLoc = from.getLocation(); Location toLoc = to.getLocation().clone().add(-0.49, 0, -0.49); @@ -143,16 +139,29 @@ public class RayVisualizerCommand extends SWCommand implements Listener { for (int dz = 0; dz < 3; dz++) { Location end = toLoc.clone().add(minX + dx * spacing, 0 + dy * spacing, minZ + dz * spacing); RayTraceResult result = fromLoc.getWorld().rayTraceBlocks(fromLoc, end.clone().subtract(fromLoc).toVector(), end.distance(fromLoc), FluidCollisionMode.NEVER, true); - if (result != null && result.getHitBlock() != null) { - continue; - } CRay cRay = rayData.get(fromLoc, end); if (cRay == null) continue; cRay.setFrom(fromLoc); cRay.setTo(end); + if (result != null && result.getHitBlock() != null) { + cRay.setBlock(BLOCKED); + } else { + cRay.setBlock(VISIBLE); + hitting++; + } } } } + total += 27; + } + + if (total == 0) { + to.setCustomNameVisible(false); + } else { + int remainder = hitting % 27; + int whole = hitting / 27; + to.setCustomNameVisible(true); + to.setCustomName("§e" + whole + " " + remainder + "/27"); } } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ColorCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ColorCommand.java index 545219a2..68d84be3 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ColorCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ColorCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region; @@ -23,10 +23,8 @@ import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.config.BauServer; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.RegionUtils; +import de.steamwar.bausystem.region.flags.ColorMode; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.ColorMode; -import de.steamwar.bausystem.region.utils.RegionExtensionType; -import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.bausystem.utils.PasteBuilder; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeValidator; @@ -52,22 +50,24 @@ public class ColorCommand extends SWCommand { @Register(description = "REGION_COLOR_HELP_COLOR_TYPE") public void genericColorSet(@Validator Player p, ColorMode color, ColorizationType colorizationType) { if (colorizationType == ColorizationType.GLOBAL) { - Region.setGlobal(Flag.COLOR, color); + Region.getRegions().forEach(region -> { + region.getFlags().set(Flag.COLOR, color); + }); BauSystem.MESSAGE.send("REGION_COLOR_GLOBAL", p, BauSystem.MESSAGE.parse(color.getChatValue(), p)); return; } Region region = Region.getRegion(p.getLocation()); - if (region.isGlobal()) { + if (!region.getFlags().has(Flag.COLOR).isWritable()) { BauSystem.MESSAGE.send("REGION_COLOR_NO_REGION", p); return; } - region.set(Flag.COLOR, color); + region.getFlags().set(Flag.COLOR, color); try { - PasteBuilder pasteBuilder = new PasteBuilder(new PasteBuilder.FileProvider(region.getResetFile(RegionType.NORMAL))) + PasteBuilder pasteBuilder = new PasteBuilder(new PasteBuilder.FileProvider(region.getArea().getResetFile())) .ignoreAir(true) .onlyColors(true) - .color(color.getColor()); - region.reset(pasteBuilder, RegionType.NORMAL, RegionExtensionType.NORMAL); + .color(color); + region.getArea().reset(pasteBuilder, false); RegionUtils.message(region, "REGION_REGION_COLORED"); RegionUtils.message(region, "REGION_REGION_COLORED_FAILED"); } catch (SecurityException e) { diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/FireCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/FireCommand.java index 3a0d4403..af660b25 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/FireCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/FireCommand.java @@ -1,31 +1,29 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region; -import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.RegionUtils; +import de.steamwar.bausystem.region.flags.FireMode; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.FireMode; import de.steamwar.command.SWCommand; -import de.steamwar.command.TypeValidator; import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; @@ -55,14 +53,12 @@ public class FireCommand extends SWCommand { } private boolean toggle(Region region) { - switch (region.getPlain(Flag.FIRE, FireMode.class)) { - case ALLOW: - region.set(Flag.FIRE, FireMode.DENY); - return true; - default: - case DENY: - region.set(Flag.FIRE, FireMode.ALLOW); - return false; + if (region.getFlags().get(Flag.FIRE).isWithDefault(FireMode.ALLOW)) { + region.getFlags().set(Flag.FIRE, FireMode.DENY); + return true; + } else { + region.getFlags().set(Flag.FIRE, FireMode.ALLOW); + return false; } } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/FireListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/FireListener.java index 3cf4d1dc..8f862e9d 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/FireListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/FireListener.java @@ -1,9 +1,28 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.features.region; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.region.Region; +import de.steamwar.bausystem.region.flags.FireMode; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.FireMode; import de.steamwar.bausystem.utils.ScoreboardElement; import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; @@ -17,12 +36,12 @@ public class FireListener implements Listener, ScoreboardElement { @EventHandler public void onFireDamage(BlockBurnEvent e) { - if (Region.getRegion(e.getBlock().getLocation()).getPlain(Flag.FIRE, FireMode.class) == FireMode.DENY) e.setCancelled(true); + if (Region.getRegion(e.getBlock().getLocation()).getFlags().get(Flag.FIRE).isWithDefault(FireMode.DENY)) e.setCancelled(true); } @EventHandler public void onFireSpread(BlockSpreadEvent e) { - if (Region.getRegion(e.getBlock().getLocation()).getPlain(Flag.FIRE, FireMode.class) == FireMode.DENY) e.setCancelled(true); + if (Region.getRegion(e.getBlock().getLocation()).getFlags().get(Flag.FIRE).isWithDefault(FireMode.DENY)) e.setCancelled(true); } @Override @@ -37,7 +56,7 @@ public class FireListener implements Listener, ScoreboardElement { @Override public String get(Region region, Player p) { - if (region.get(Flag.FIRE) == Flag.FIRE.getDefaultValue()) return null; - return "§e" + BauSystem.MESSAGE.parse(Flag.FIRE.getChatValue(), p) + "§8: " + BauSystem.MESSAGE.parse(region.get(Flag.FIRE).getChatValue(), p); + if (region.getFlags().get(Flag.FIRE).isWithDefault(FireMode.DENY)) return null; + return "§e" + BauSystem.MESSAGE.parse(Flag.FIRE.getChatValue(), p) + "§8: " + BauSystem.MESSAGE.parse(region.getFlags().get(Flag.FIRE).getWithDefault().getChatValue(), p); } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/FreezeCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/FreezeCommand.java index d154ce66..928db20e 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/FreezeCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/FreezeCommand.java @@ -1,31 +1,29 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region; -import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.RegionUtils; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.FreezeMode; +import de.steamwar.bausystem.region.flags.FreezeMode; import de.steamwar.command.SWCommand; -import de.steamwar.command.TypeValidator; import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; @@ -55,14 +53,12 @@ public class FreezeCommand extends SWCommand { } private boolean toggle(Region region) { - switch (region.getPlain(Flag.FREEZE, FreezeMode.class)) { - case ACTIVE: - region.set(Flag.FREEZE, FreezeMode.INACTIVE); - return false; - default: - case INACTIVE: - region.set(Flag.FREEZE, FreezeMode.ACTIVE); - return true; + if (region.getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) { + region.getFlags().set(Flag.FREEZE, FreezeMode.INACTIVE); + return false; + } else { + region.getFlags().set(Flag.FREEZE, FreezeMode.ACTIVE); + return true; } } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/FreezeListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/FreezeListener.java index 673867e7..03d81b62 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/FreezeListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/FreezeListener.java @@ -1,9 +1,28 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.features.region; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.FreezeMode; +import de.steamwar.bausystem.region.flags.FreezeMode; import de.steamwar.bausystem.utils.ScoreboardElement; import de.steamwar.core.Core; import de.steamwar.core.TrickyTrialsWrapper; @@ -29,9 +48,7 @@ public class FreezeListener implements Listener, ScoreboardElement { @EventHandler public void onEntitySpawn(EntitySpawnEvent e) { - if (Region.getRegion(e.getLocation()).get(Flag.FREEZE) == FreezeMode.INACTIVE) { - return; - } + if (Region.getRegion(e.getLocation()).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.INACTIVE)) return; e.setCancelled(true); if (e.getEntityType() == TrickyTrialsWrapper.impl.getTntEntityType()) { Bukkit.getScheduler().runTaskLater(BauSystem.getInstance(), () -> { @@ -43,8 +60,7 @@ public class FreezeListener implements Listener, ScoreboardElement { @EventHandler public void onBlockCanBuild(BlockCanBuildEvent e) { if (!e.isBuildable()) return; - if (Region.getRegion(e.getBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.INACTIVE) - return; + if (Region.getRegion(e.getBlock().getLocation()).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.INACTIVE)) return; if (e.getMaterial() == Material.TNT) { e.setBuildable(false); e.getBlock().setType(Material.TNT, false); @@ -53,14 +69,14 @@ public class FreezeListener implements Listener, ScoreboardElement { @EventHandler public void onEntityChangeBlock(EntityChangeBlockEvent e) { - if (Region.getRegion(e.getBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) { + if (Region.getRegion(e.getBlock().getLocation()).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) { e.setCancelled(true); } } @EventHandler public void onPhysicsEvent(BlockPhysicsEvent e) { - if (Region.getRegion(e.getBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) { + if (Region.getRegion(e.getBlock().getLocation()).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) { if (e.getSourceBlock().getType() == Material.NOTE_BLOCK) { BlockState state = e.getSourceBlock().getState(); NoteBlock noteBlock = (NoteBlock) state.getBlockData(); @@ -85,143 +101,44 @@ public class FreezeListener implements Listener, ScoreboardElement { @EventHandler public void onPistonExtend(BlockPistonExtendEvent e) { - if (Region.getRegion(e.getBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) { + if (Region.getRegion(e.getBlock().getLocation()).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) { e.setCancelled(true); } } - @EventHandler - public void onNotePlay(NotePlayEvent event) { - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=45, z=98},type=CYAN_TERRACOTTA,data=Block{minecraft:cyan_terracotta},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-107, y=45, z=98},type=SMOOTH_STONE,data=Block{minecraft:smooth_stone},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=45, z=98},type=CYAN_TERRACOTTA,data=Block{minecraft:cyan_terracotta},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-105, y=45, z=98},type=CYAN_TERRACOTTA,data=Block{minecraft:cyan_terracotta},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=45, z=98},type=CYAN_TERRACOTTA,data=Block{minecraft:cyan_terracotta},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=44, z=98},type=CYAN_TERRACOTTA,data=Block{minecraft:cyan_terracotta},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=45, z=98},type=CYAN_TERRACOTTA,data=Block{minecraft:cyan_terracotta},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=46, z=98},type=BARRIER,data=Block{minecraft:barrier},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=45, z=98},type=CYAN_TERRACOTTA,data=Block{minecraft:cyan_terracotta},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=45, z=97},type=CYAN_TERRACOTTA,data=Block{minecraft:cyan_terracotta},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=45, z=98},type=CYAN_TERRACOTTA,data=Block{minecraft:cyan_terracotta},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=45, z=99},type=SMOOTH_STONE,data=Block{minecraft:smooth_stone},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=custom_head,note=9,powered=true],fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-107, y=47, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=custom_head,note=9,powered=true],fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-105, y=47, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=custom_head,note=9,powered=true],fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=46, z=98},type=BARRIER,data=Block{minecraft:barrier},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=custom_head,note=9,powered=true],fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=48, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=custom_head,note=9,powered=true],fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=47, z=97},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=custom_head,note=9,powered=true],fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=47, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=46, z=97},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-107, y=46, z=97},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=46, z=97},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-105, y=46, z=97},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=46, z=97},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=45, z=97},type=CYAN_TERRACOTTA,data=Block{minecraft:cyan_terracotta},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=46, z=97},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=47, z=97},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=46, z=97},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=46, z=96},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=46, z=97},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=46, z=98},type=BARRIER,data=Block{minecraft:barrier},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=46, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-107, y=46, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=46, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-105, y=46, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=46, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=45, z=99},type=SMOOTH_STONE,data=Block{minecraft:smooth_stone},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=46, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=47, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=46, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=46, z=98},type=BARRIER,data=Block{minecraft:barrier},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=46, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=46, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-107, y=46, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-108, y=46, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-107, y=46, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=46, z=98},type=BARRIER,data=Block{minecraft:barrier},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-107, y=46, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-107, y=45, z=98},type=SMOOTH_STONE,data=Block{minecraft:smooth_stone},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-107, y=46, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-107, y=47, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-107, y=46, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-107, y=46, z=97},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-107, y=46, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-107, y=46, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-105, y=46, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=46, z=98},type=BARRIER,data=Block{minecraft:barrier},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-105, y=46, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-104, y=46, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-105, y=46, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-105, y=45, z=98},type=CYAN_TERRACOTTA,data=Block{minecraft:cyan_terracotta},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-105, y=46, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-105, y=47, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-105, y=46, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-105, y=46, z=97},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-105, y=46, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-105, y=46, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=harp,note=9,powered=true],fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=harp,note=9,powered=true],fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=harp,note=9,powered=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-107, y=47, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=harp,note=9,powered=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-105, y=47, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=harp,note=9,powered=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=46, z=98},type=BARRIER,data=Block{minecraft:barrier},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=harp,note=9,powered=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=48, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=harp,note=9,powered=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=47, z=97},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=harp,note=9,powered=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=47, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=harp,note=9,powered=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} -> CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=harp,note=9,powered=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@78078831} - - - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=46, z=100},type=SMOOTH_STONE,data=Block{minecraft:smooth_stone},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-107, y=46, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=46, z=100},type=SMOOTH_STONE,data=Block{minecraft:smooth_stone},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-105, y=46, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=46, z=100},type=SMOOTH_STONE,data=Block{minecraft:smooth_stone},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=45, z=100},type=SMOOTH_STONE,data=Block{minecraft:smooth_stone},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=46, z=100},type=SMOOTH_STONE,data=Block{minecraft:smooth_stone},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=47, z=100},type=STONE_SLAB,data=Block{minecraft:stone_slab}[type=bottom,waterlogged=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=46, z=100},type=SMOOTH_STONE,data=Block{minecraft:smooth_stone},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=46, z=99},type=SMOOTH_STONE,data=Block{minecraft:smooth_stone},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=46, z=100},type=SMOOTH_STONE,data=Block{minecraft:smooth_stone},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=46, z=101},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=48, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-107, y=48, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=48, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-105, y=48, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=48, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=47, z=100},type=STONE_SLAB,data=Block{minecraft:stone_slab}[type=bottom,waterlogged=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=48, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=49, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=48, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=48, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=48, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=48, z=101},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-107, y=47, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-105, y=47, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=46, z=99},type=SMOOTH_STONE,data=Block{minecraft:smooth_stone},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=48, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - ////[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=basedrum,note=9,powered=true],fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=47, z=100},type=STONE_SLAB,data=Block{minecraft:stone_slab}[type=bottom,waterlogged=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=101},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-107, y=47, z=101},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=101},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-105, y=47, z=101},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=101},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=46, z=101},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=101},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=48, z=101},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=101},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=47, z=100},type=STONE_SLAB,data=Block{minecraft:stone_slab}[type=bottom,waterlogged=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=101},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=47, z=102},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-107, y=47, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-108, y=47, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-107, y=47, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=47, z=100},type=STONE_SLAB,data=Block{minecraft:stone_slab}[type=bottom,waterlogged=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-107, y=47, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-107, y=46, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-107, y=47, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-107, y=48, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-107, y=47, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-107, y=47, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-107, y=47, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-107, y=47, z=101},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-105, y=47, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=47, z=100},type=STONE_SLAB,data=Block{minecraft:stone_slab}[type=bottom,waterlogged=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-105, y=47, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-104, y=47, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-105, y=47, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-105, y=46, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-105, y=47, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-105, y=48, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-105, y=47, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-105, y=47, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-105, y=47, z=100},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-105, y=47, z=101},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=basedrum,note=9,powered=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-107, y=47, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=basedrum,note=9,powered=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-105, y=47, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=basedrum,note=9,powered=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=46, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=basedrum,note=9,powered=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=48, z=98},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=basedrum,note=9,powered=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=47, z=97},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=basedrum,note=9,powered=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=47, z=99},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - //[STDOUT] CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=basedrum,note=9,powered=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} -> CraftBlock{pos=BlockPosition{x=-106, y=47, z=98},type=NOTE_BLOCK,data=Block{minecraft:note_block}[instrument=basedrum,note=9,powered=false],fluid=net.minecraft.world.level.material.FluidTypeEmpty@1531ed7b} - } - - @EventHandler public void onPistonRetract(BlockPistonRetractEvent e) { - if (Region.getRegion(e.getBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) { + if (Region.getRegion(e.getBlock().getLocation()).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) { e.setCancelled(true); } } @EventHandler public void onBlockGrow(BlockGrowEvent e) { - if (Region.getRegion(e.getBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) { + if (Region.getRegion(e.getBlock().getLocation()).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) { e.setCancelled(true); } } @EventHandler public void onRedstoneEvent(BlockRedstoneEvent e) { - if (Region.getRegion(e.getBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) { + if (Region.getRegion(e.getBlock().getLocation()).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) { e.setNewCurrent(e.getOldCurrent()); } } @EventHandler public void onBlockDispense(BlockDispenseEvent e) { - if (Region.getRegion(e.getBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) { + if (Region.getRegion(e.getBlock().getLocation()).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) { e.setCancelled(true); } } @EventHandler public void onInventoryMoveEvent(InventoryMoveItemEvent e) { - if (e.getDestination().getLocation() != null && Region.getRegion(e.getDestination().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) { + if (e.getDestination().getLocation() != null && Region.getRegion(e.getDestination().getLocation()).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) { e.setCancelled(true); - } else if (e.getSource().getLocation() != null && Region.getRegion(e.getSource().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) { + } else if (e.getSource().getLocation() != null && Region.getRegion(e.getSource().getLocation()).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) { e.setCancelled(true); } } @@ -230,7 +147,7 @@ public class FreezeListener implements Listener, ScoreboardElement { public void onBlockBreak(BlockBreakEvent e) { if (Core.getVersion() < 19) return; if (e.getPlayer().getInventory().getItemInMainHand().getType() == Material.DEBUG_STICK) return; - if (Region.getRegion(e.getBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) { + if (Region.getRegion(e.getBlock().getLocation()).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) { e.setCancelled(true); e.getBlock().setType(Material.BARRIER, false); e.getBlock().setType(Material.AIR, false); @@ -253,35 +170,35 @@ public class FreezeListener implements Listener, ScoreboardElement { @EventHandler public void onFluidLevelChange(FluidLevelChangeEvent e) { - if (Region.getRegion(e.getBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) { + if (Region.getRegion(e.getBlock().getLocation()).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) { e.setCancelled(true); } } @EventHandler public void onBlockSpread(BlockSpreadEvent e) { - if (Region.getRegion(e.getBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) { + if (Region.getRegion(e.getBlock().getLocation()).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) { e.setCancelled(true); } } @EventHandler public void onBlockFromTo(BlockFromToEvent e) { - if (Region.getRegion(e.getBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) { + if (Region.getRegion(e.getBlock().getLocation()).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) { e.setCancelled(true); } } @EventHandler public void onSpongeAbsorb(SpongeAbsorbEvent e) { - if (Region.getRegion(e.getBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) { + if (Region.getRegion(e.getBlock().getLocation()).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) { e.setCancelled(true); } } @EventHandler public void onBlockForm(BlockFormEvent e) { - if (Region.getRegion(e.getBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) { + if (Region.getRegion(e.getBlock().getLocation()).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) { e.setCancelled(true); } } @@ -289,7 +206,7 @@ public class FreezeListener implements Listener, ScoreboardElement { @EventHandler public void onPlayerInteract(PlayerInteractEvent e) { if (e.getAction() != Action.RIGHT_CLICK_BLOCK) return; - if (Region.getRegion(e.getClickedBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) { + if (Region.getRegion(e.getClickedBlock().getLocation()).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) { Block block = e.getClickedBlock(); if (block.getType() == Material.LEVER) { Switch data = ((Switch) block.getBlockData()); @@ -300,9 +217,9 @@ public class FreezeListener implements Listener, ScoreboardElement { } @EventHandler - public void onBlockFade(BlockFadeEvent event) { - if (Region.getRegion(event.getBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) { - event.setCancelled(true); + public void onBlockFade(BlockFadeEvent e) { + if (Region.getRegion(e.getBlock().getLocation()).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) { + e.setCancelled(true); } } @@ -318,7 +235,7 @@ public class FreezeListener implements Listener, ScoreboardElement { @Override public String get(Region region, Player p) { - if (region.get(Flag.FREEZE) == Flag.FREEZE.getDefaultValue()) return null; - return "§e" + BauSystem.MESSAGE.parse(Flag.FREEZE.getChatValue(), p) + "§8: " + BauSystem.MESSAGE.parse(region.get(Flag.FREEZE).getChatValue(), p); + if (region.getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.INACTIVE)) return null; + return "§e" + BauSystem.MESSAGE.parse(Flag.FREEZE.getChatValue(), p) + "§8: " + BauSystem.MESSAGE.parse(region.getFlags().get(Flag.FREEZE).getWithDefault().getChatValue(), p); } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ItemsCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ItemsCommand.java index 8c4452cb..819c8f62 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ItemsCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ItemsCommand.java @@ -1,32 +1,29 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region; -import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.region.GlobalRegion; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.RegionUtils; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.ItemMode; +import de.steamwar.bausystem.region.flags.ItemMode; import de.steamwar.command.SWCommand; -import de.steamwar.command.TypeValidator; import de.steamwar.linkage.Linked; import de.steamwar.linkage.MinVersion; import org.bukkit.entity.Player; @@ -58,14 +55,12 @@ public class ItemsCommand extends SWCommand { } private boolean toggle(Region region) { - switch (region.getPlain(Flag.ITEMS, ItemMode.class)) { - case ACTIVE: - region.set(Flag.ITEMS, ItemMode.INACTIVE); - return false; - default: - case INACTIVE: - region.set(Flag.ITEMS, ItemMode.ACTIVE); - return true; + if (region.getFlags().get(Flag.ITEMS).isWithDefault(ItemMode.ACTIVE)) { + region.getFlags().set(Flag.ITEMS, ItemMode.INACTIVE); + return false; + } else { + region.getFlags().set(Flag.ITEMS, ItemMode.ACTIVE); + return true; } } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ItemsListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ItemsListener.java index 66e1fdb7..42c1d776 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ItemsListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ItemsListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region; @@ -22,7 +22,7 @@ package de.steamwar.bausystem.features.region; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.ItemMode; +import de.steamwar.bausystem.region.flags.ItemMode; import de.steamwar.bausystem.utils.ScoreboardElement; import de.steamwar.linkage.Linked; import de.steamwar.linkage.MinVersion; @@ -35,13 +35,9 @@ import org.bukkit.event.entity.ItemSpawnEvent; @MinVersion(19) public class ItemsListener implements Listener, ScoreboardElement { - private static ItemMode getMode(Region region) { - return region.getPlain(Flag.ITEMS, ItemMode.class); - } - @EventHandler public void onItemSpawn(ItemSpawnEvent event) { - if (getMode(Region.getRegion(event.getLocation())) == ItemMode.INACTIVE) { + if (Region.getRegion(event.getLocation()).getFlags().get(Flag.ITEMS).isWithDefault(ItemMode.INACTIVE)) { event.setCancelled(true); } } @@ -58,7 +54,7 @@ public class ItemsListener implements Listener, ScoreboardElement { @Override public String get(Region region, Player p) { - if (region.get(Flag.ITEMS) == Flag.ITEMS.getDefaultValue()) return null; - return "§e" + BauSystem.MESSAGE.parse(Flag.ITEMS.getChatValue(), p) + "§8: " + BauSystem.MESSAGE.parse(region.get(Flag.ITEMS).getChatValue(), p); + if (region.getFlags().get(Flag.ITEMS).isWithDefault(ItemMode.INACTIVE)) return null; + return "§e" + BauSystem.MESSAGE.parse(Flag.ITEMS.getChatValue(), p) + "§8: " + BauSystem.MESSAGE.parse(region.getFlags().get(Flag.ITEMS).getWithDefault().getChatValue(), p); } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/NoGravityCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/NoGravityCommand.java index aeeaf588..df874d69 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/NoGravityCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/NoGravityCommand.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -22,7 +22,7 @@ package de.steamwar.bausystem.features.region; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.RegionUtils; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.NoGravityMode; +import de.steamwar.bausystem.region.flags.NoGravityMode; import de.steamwar.command.SWCommand; import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; @@ -53,14 +53,12 @@ public class NoGravityCommand extends SWCommand { } private boolean toggle(Region region) { - switch (region.getPlain(Flag.NO_GRAVITY, NoGravityMode.class)) { - case ACTIVE: - region.set(Flag.NO_GRAVITY, NoGravityMode.INACTIVE); - return false; - default: - case INACTIVE: - region.set(Flag.NO_GRAVITY, NoGravityMode.ACTIVE); - return true; + if (region.getFlags().get(Flag.NO_GRAVITY).isWithDefault(NoGravityMode.ACTIVE)) { + region.getFlags().set(Flag.NO_GRAVITY, NoGravityMode.INACTIVE); + return false; + } else { + region.getFlags().set(Flag.NO_GRAVITY, NoGravityMode.ACTIVE); + return true; } } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/NoGravityListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/NoGravityListener.java index f86403f9..4dbd109f 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/NoGravityListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/NoGravityListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -22,7 +22,7 @@ package de.steamwar.bausystem.features.region; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.NoGravityMode; +import de.steamwar.bausystem.region.flags.NoGravityMode; import de.steamwar.bausystem.utils.ScoreboardElement; import de.steamwar.linkage.Linked; import org.bukkit.entity.EntityType; @@ -34,14 +34,10 @@ import org.bukkit.event.entity.EntitySpawnEvent; @Linked public class NoGravityListener implements Listener, ScoreboardElement { - private static NoGravityMode getMode(Region region) { - return region.getPlain(Flag.NO_GRAVITY, NoGravityMode.class); - } - @EventHandler public void onEntitySpawn(EntitySpawnEvent event) { if (event.getEntityType() == EntityType.PLAYER) return; - if (getMode(Region.getRegion(event.getLocation())) == NoGravityMode.ACTIVE) { + if (Region.getRegion(event.getLocation()).getFlags().get(Flag.NO_GRAVITY).isWithDefault(NoGravityMode.ACTIVE)) { event.getEntity().setGravity(false); } } @@ -58,7 +54,7 @@ public class NoGravityListener implements Listener, ScoreboardElement { @Override public String get(Region region, Player p) { - if (region.get(Flag.NO_GRAVITY) == Flag.NO_GRAVITY.getDefaultValue()) return null; - return "§e" + BauSystem.MESSAGE.parse(Flag.NO_GRAVITY.getChatValue(), p) + "§8: " + BauSystem.MESSAGE.parse(region.get(Flag.NO_GRAVITY).getChatValue(), p); + if (region.getFlags().get(Flag.NO_GRAVITY).isWithDefault(NoGravityMode.INACTIVE)) return null; + return "§e" + BauSystem.MESSAGE.parse(Flag.NO_GRAVITY.getChatValue(), p) + "§8: " + BauSystem.MESSAGE.parse(region.getFlags().get(Flag.NO_GRAVITY).getWithDefault().getChatValue(), p); } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProtectCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProtectCommand.java index 4fc33cf0..ad79d91a 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProtectCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProtectCommand.java @@ -1,32 +1,30 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.RegionUtils; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.ProtectMode; +import de.steamwar.bausystem.region.flags.ProtectMode; import de.steamwar.command.SWCommand; -import de.steamwar.command.TypeValidator; import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; @@ -41,22 +39,18 @@ public class ProtectCommand extends SWCommand { public void genericProtectCommand(@Validator Player p) { Region region = regionCheck(p); if (region == null) return; - switch (region.getPlain(Flag.PROTECT, ProtectMode.class)) { - case ACTIVE: - region.set(Flag.PROTECT, ProtectMode.INACTIVE); - RegionUtils.actionBar(region, "REGION_PROTECT_DISABLE"); - break; - default: - case INACTIVE: - region.set(Flag.PROTECT, ProtectMode.ACTIVE); - RegionUtils.actionBar(region, "REGION_PROTECT_ENABLE"); - break; + if (region.getFlags().get(Flag.PROTECT).isWithDefault(ProtectMode.ACTIVE)) { + region.getFlags().set(Flag.PROTECT, ProtectMode.INACTIVE); + RegionUtils.actionBar(region, "REGION_PROTECT_DISABLE"); + } else { + region.getFlags().set(Flag.PROTECT, ProtectMode.ACTIVE); + RegionUtils.actionBar(region, "REGION_PROTECT_ENABLE"); } } private Region regionCheck(Player player) { Region region = Region.getRegion(player.getLocation()); - if (region.getFloorLevel() == 0) { + if (!region.getFlags().has(Flag.PROTECT).isApplicable()) { BauSystem.MESSAGE.send("REGION_PROTECT_FALSE_REGION", player); return null; } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProtectListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProtectListener.java index 65ec30de..f0b7ef16 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProtectListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProtectListener.java @@ -1,9 +1,29 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.features.region; import de.steamwar.bausystem.BauSystem; +import de.steamwar.bausystem.region.Point; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.ProtectMode; +import de.steamwar.bausystem.region.flags.ProtectMode; import de.steamwar.bausystem.utils.ScoreboardElement; import de.steamwar.linkage.Linked; import org.bukkit.Location; @@ -21,13 +41,11 @@ public class ProtectListener implements Listener, ScoreboardElement { private void explode(List blockList, Location location) { Region region = Region.getRegion(location); - if (region.getFloorLevel() == 0) { - return; - } - if (region.getPlain(Flag.PROTECT, ProtectMode.class) == ProtectMode.INACTIVE) { - return; - } - blockList.removeIf(block -> block.getY() < region.getFloorLevel()); + if (region.getFlags().get(Flag.PROTECT).isWithDefault(ProtectMode.INACTIVE)) return; + Point p1 = region.getBuildArea().getMinPoint(true); + Point p2 = region.getTestblockArea().getMinPoint(true); + int floorLevel = Math.min(p1.getY(), p2.getY()); + blockList.removeIf(block -> block.getY() < floorLevel); } @EventHandler @@ -52,8 +70,7 @@ public class ProtectListener implements Listener, ScoreboardElement { @Override public String get(Region region, Player p) { - if (region.getFloorLevel() == 0) return null; - if (region.get(Flag.PROTECT) != Flag.PROTECT.getDefaultValue()) return null; - return "§e" + BauSystem.MESSAGE.parse(Flag.PROTECT.getChatValue(), p) + "§8: " + BauSystem.MESSAGE.parse(region.get(Flag.PROTECT).getChatValue(), p); + if (region.getFlags().get(Flag.PROTECT).isWithDefault(ProtectMode.INACTIVE)) return null; + return "§e" + BauSystem.MESSAGE.parse(Flag.PROTECT.getChatValue(), p) + "§8: " + BauSystem.MESSAGE.parse(region.getFlags().get(Flag.PROTECT).getWithDefault().getChatValue(), p); } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionCommand.java index 6d8d6f4d..2d0b58b9 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region; @@ -32,30 +32,20 @@ import de.steamwar.bausystem.region.Point; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.RegionUtils; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.ColorMode; -import de.steamwar.bausystem.region.utils.RegionExtensionType; -import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.bausystem.shared.Pair; import de.steamwar.bausystem.utils.FlatteningWrapper; import de.steamwar.bausystem.utils.PasteBuilder; import de.steamwar.bausystem.utils.WorldEditUtils; -import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommand; -import de.steamwar.command.TypeMapper; import de.steamwar.linkage.Linked; import de.steamwar.linkage.LinkedInstance; import de.steamwar.sql.SchematicNode; -import net.md_5.bungee.api.chat.ClickEvent; import org.bukkit.Bukkit; import org.bukkit.Location; -import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.event.player.PlayerTeleportEvent; -import java.util.Collections; -import java.util.List; import java.util.logging.Level; -import java.util.stream.Collectors; @Linked public class RegionCommand extends SWCommand { @@ -71,7 +61,7 @@ public class RegionCommand extends SWCommand { } static boolean checkGlobalRegion(Region region, Player p) { - if (region.isGlobal()) { + if (region.getType().isGlobal()) { BauSystem.MESSAGE.send("REGION_REGION_NO_REGION", p); return true; } @@ -83,7 +73,7 @@ public class RegionCommand extends SWCommand { Region region = Region.getRegion(p.getLocation()); if (checkGlobalRegion(region, p)) return; - if (region.undo()) { + if (region.getHistory().undo()) { RegionUtils.message(region, "REGION_REGION_UNDID"); } else { BauSystem.MESSAGE.send("REGION_REGION_NOTHING_UNDO", p); @@ -97,7 +87,7 @@ public class RegionCommand extends SWCommand { return; } - if (region.redo()) { + if (region.getHistory().redo()) { RegionUtils.message(region, "REGION_REGION_REDID"); } else { BauSystem.MESSAGE.send("REGION_REGION_NOTHING_REDO", p); @@ -110,10 +100,10 @@ public class RegionCommand extends SWCommand { if(checkGlobalRegion(region, p)) return; try { - PasteBuilder pasteBuilder = new PasteBuilder(new PasteBuilder.FileProvider(region.getResetFile(RegionType.NORMAL))) + PasteBuilder pasteBuilder = new PasteBuilder(new PasteBuilder.FileProvider(region.getArea().getResetFile())) .ignoreAir(true) - .color(region.getPlain(Flag.COLOR, ColorMode.class).getColor()); - region.reset(pasteBuilder, RegionType.NORMAL, RegionExtensionType.NORMAL); + .color(region.getFlags().get(Flag.COLOR).getWithDefault()); + region.getArea().reset(pasteBuilder, false); RegionUtils.message(region, "REGION_REGION_RESTORED"); } catch (SecurityException e) { BauSystem.MESSAGE.send("REGION_REGION_FAILED_RESTORE", p); @@ -134,8 +124,8 @@ public class RegionCommand extends SWCommand { try { PasteBuilder pasteBuilder = new PasteBuilder(new PasteBuilder.SchematicProvider(node)) .ignoreAir(true) - .color(region.getPlain(Flag.COLOR, ColorMode.class).getColor()); - region.reset(pasteBuilder, RegionType.NORMAL, RegionExtensionType.NORMAL); + .color(region.getFlags().get(Flag.COLOR).getWithDefault()); + region.getArea().reset(pasteBuilder, false); RegionUtils.message(region, "REGION_REGION_RESTORED"); } catch (SecurityException e) { BauSystem.MESSAGE.send("REGION_REGION_FAILED_RESTORE", p); @@ -149,11 +139,11 @@ public class RegionCommand extends SWCommand { if (checkGlobalRegion(region, p)) { return; } - if (region.getCopyPoint() == null) { + if (region.getBuildArea().isEmpty()) { BauSystem.MESSAGE.send("REGION_REGION_TP_UNKNOWN", p); return; } - p.teleport(region.getCopyPoint().toLocation(p, 0.5, 0, 0.5), PlayerTeleportEvent.TeleportCause.COMMAND); + p.teleport(region.getBuildArea().getCopyPoint().toLocation(p, 0.5, 0, 0.5), PlayerTeleportEvent.TeleportCause.COMMAND); BauSystem.MESSAGE.send("REGION_REGION_TP_COPY", p); } @@ -164,70 +154,33 @@ public class RegionCommand extends SWCommand { if (checkGlobalRegion(region, p)) { return; } - if (region.getTestBlockPoint() == null) { + if (region.getTestblockArea().isEmpty()) { BauSystem.MESSAGE.send("REGION_REGION_TP_UNKNOWN", p); return; } - p.teleport(region.getTestBlockPoint().toLocation(p, 0.5, 0, 0.5), PlayerTeleportEvent.TeleportCause.COMMAND); + p.teleport(region.getTestblockArea().getCopyPoint().toLocation(p, 0.5, 0, 0.5), PlayerTeleportEvent.TeleportCause.COMMAND); BauSystem.MESSAGE.send("REGION_REGION_TP_TEST_BLOCK", p); } - @Register(value = "changeskin", description = "REGION_REGION_HELP_CHANGESKIN_INFO") - @Register("skin") - public void changeSkinCommand(Player p) { - Region region = Region.getRegion(p.getLocation()); - if (checkGlobalRegion(region, p)) { - return; - } - BauSystem.MESSAGE.send("REGION_REGION_CHANGESKIN_INFO", p, region.getSkin()); - String creator = region.getPrototype().getSkinMap().get(region.getSkin()).getCreator(); - if (creator != null) { - BauSystem.MESSAGE.send("REGION_REGION_CHANGESKIN_INFO_CREATOR", p, creator); - } - } - - @Register(value = "changeskin", description = "REGION_REGION_HELP_CHANGESKIN") - @Register("skin") - public void changeSkinCommand(@Validator Player p, @Mapper("skinTypeMapper") String s) { - Region region = Region.getRegion(p.getLocation()); - if (checkGlobalRegion(region, p)) { - return; - } - if (!region.getPrototype().getSkinMap().containsKey(s)) { - BauSystem.MESSAGE.send("REGION_REGION_CHANGESKIN_UNKNOWN", p); - } else { - if (region.setSkin(s)) { - BauSystem.MESSAGE.send("REGION_REGION_CHANGESKIN_CHANGE", p, s); - BauSystem.MESSAGE.send("REGION_REGION_CHANGESKIN_CHANGE_UPDATE", p, BauSystem.MESSAGE.parse("REGION_REGION_CHANGESKIN_CHANGE_UPDATE_HOVER", p), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/reset")); - } else { - BauSystem.MESSAGE.send("REGION_REGION_CHANGESKIN_INVALID", p); - } - } - } - @Register(value = "copy", description = "REGION_REGION_HELP_COPY") public void copyCommand(@Validator Player p, @OptionalValue("") @StaticValue(value = {"", "-e", "-s"}, allowISE = true) int option) { Region region = Region.getRegion(p.getLocation()); if (checkGlobalRegion(region, p)) { return; } - if (!region.hasType(RegionType.BUILD)) { + if (region.getBuildArea().isEmpty()) { BauSystem.MESSAGE.send("REGION_REGION_NO_BUILD", p); return; } - if (region.getCopyPoint() == null) { - BauSystem.MESSAGE.send("REGION_REGION_TP_UNKNOWN", p); - return; - } - Point minPoint = region.getMinPoint(RegionType.BUILD, RegionExtensionType.NORMAL); - Point maxPoint = region.getMaxPoint(RegionType.BUILD, RegionExtensionType.NORMAL); + Point minPoint = region.getBuildArea().getMinPoint(false); + Point maxPoint = region.getBuildArea().getMaxPoint(false); switch (option) { case 0: break; case 1: - minPoint = region.getMinPoint(RegionType.BUILD, RegionExtensionType.EXTENSION); - maxPoint = region.getMaxPoint(RegionType.BUILD, RegionExtensionType.EXTENSION); + minPoint = region.getBuildArea().getMinPoint(true); + maxPoint = region.getBuildArea().getMaxPoint(true); break; case 2: Pair selection = WorldEditUtils.getSelection(p); @@ -238,7 +191,7 @@ public class RegionCommand extends SWCommand { break; } - Clipboard clipboard = FlatteningWrapper.impl.copy(minPoint, maxPoint, region.getCopyPoint()); + Clipboard clipboard = FlatteningWrapper.impl.copy(minPoint, maxPoint, region.getBuildArea().getCopyPoint()); WorldEdit.getInstance() .getSessionManager() .get(BukkitAdapter.adapt(p)) @@ -252,14 +205,10 @@ public class RegionCommand extends SWCommand { if (checkGlobalRegion(region, p)) { return; } - if (!region.hasType(RegionType.BUILD)) { + if (region.getBuildArea().isEmpty()) { BauSystem.MESSAGE.send("REGION_REGION_NO_BUILD", p); return; } - if (region.getCopyPoint() == null) { - BauSystem.MESSAGE.send("REGION_REGION_TP_UNKNOWN", p); - return; - } ClipboardHolder clipboardHolder = WorldEdit.getInstance() .getSessionManager() @@ -287,13 +236,13 @@ public class RegionCommand extends SWCommand { } try (EditSession e = WorldEditUtils.getEditSession(p)) { - Operations.completeBlindly(clipboardHolder.createPaste(e).ignoreAirBlocks(ignoreAir).to(toBlockVector3(region.getCopyPoint())).build()); + Operations.completeBlindly(clipboardHolder.createPaste(e).ignoreAirBlocks(ignoreAir).to(toBlockVector3(region.getBuildArea().getCopyPoint())).build()); WorldEditUtils.addToPlayer(p, e); if (selectPasted) { Clipboard clipboard = clipboardHolder.getClipboards().get(0); - BlockVector3 minPointSelection = clipboard.getRegion().getMinimumPoint().subtract(clipboard.getOrigin()).add(toBlockVector3(region.getCopyPoint())); - BlockVector3 maxPointSelection = clipboard.getRegion().getMaximumPoint().subtract(clipboard.getOrigin()).add(toBlockVector3(region.getCopyPoint())); + BlockVector3 minPointSelection = clipboard.getRegion().getMinimumPoint().subtract(clipboard.getOrigin()).add(toBlockVector3(region.getBuildArea().getCopyPoint())); + BlockVector3 maxPointSelection = clipboard.getRegion().getMaximumPoint().subtract(clipboard.getOrigin()).add(toBlockVector3(region.getBuildArea().getCopyPoint())); FlatteningWrapper.impl.setSelection(p, Point.fromBlockVector3(minPointSelection), Point.fromBlockVector3(maxPointSelection)); } BauSystem.MESSAGE.send("REGION_REGION_PASTE_DONE", p); @@ -303,25 +252,4 @@ public class RegionCommand extends SWCommand { private BlockVector3 toBlockVector3(Point point) { return BlockVector3.at(point.getX(), point.getY(), point.getZ()); } - - - @Mapper(value = "skinTypeMapper", local = true) - private TypeMapper skinTypeMapper() { - return new TypeMapper() { - @Override - public List tabCompletes(CommandSender commandSender, PreviousArguments previousArguments, String s) { - Player p = (Player) commandSender; - Region region = Region.getRegion(p.getLocation()); - if (region.isGlobal()) { - return Collections.emptyList(); - } - return region.getPrototype().getSkinMap().keySet().stream().map(c -> c.replace(' ', '_')).collect(Collectors.toList()); - } - - @Override - public String map(CommandSender commandSender, PreviousArguments previousArguments, String s) { - return s.replace('_', ' '); - } - }; - } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionListener.java index 38b6532e..0b25e5df 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionListener.java @@ -1,27 +1,28 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.region.Region; -import de.steamwar.bausystem.region.tags.Tag; +import de.steamwar.bausystem.region.flags.ChangedMode; +import de.steamwar.bausystem.region.flags.Flag; import de.steamwar.linkage.Linked; import org.bukkit.Location; import org.bukkit.event.EventHandler; @@ -180,13 +181,7 @@ public class RegionListener implements Listener { } } - private static void tagChangedRegion(final Location location) { - new BukkitRunnable() { - @Override - public void run() { - Region.getRegion(location).set(Tag.CHANGED); - } - }.runTaskAsynchronously(BauSystem.getInstance()); + Region.getRegion(location).getFlags().set(Flag.CHANGED, ChangedMode.HAS_CHANGE); } } \ No newline at end of file diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionScoreboardElement.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionScoreboardElement.java index 246b9a01..7d6db5db 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionScoreboardElement.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionScoreboardElement.java @@ -1,31 +1,32 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.region.GlobalRegion; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.utils.ScoreboardElement; import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; +import java.util.List; + @Linked public class RegionScoreboardElement implements ScoreboardElement { @@ -41,7 +42,10 @@ public class RegionScoreboardElement implements ScoreboardElement { @Override public String get(Region region, Player p) { - if (GlobalRegion.getInstance() == region) return null; - return "§e" + BauSystem.MESSAGE.parse("SCOREBOARD_REGION", p) + "§8: §7" + region.getDisplayName(); + if (region.getType().isGlobal()) return null; + if (!region.getGameModeConfig().loaded) return null; + List names = region.getGameModeConfig().Server.ChatNames; + if (names.isEmpty()) return null; + return "§e" + BauSystem.MESSAGE.parse("SCOREBOARD_REGION", p) + "§8: §7" + names.get(0); } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ResetCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ResetCommand.java index 4490a146..430ee534 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ResetCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ResetCommand.java @@ -1,33 +1,30 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.config.BauServer; -import de.steamwar.bausystem.region.GlobalRegion; import de.steamwar.bausystem.region.Region; +import de.steamwar.bausystem.region.RegionSystem; import de.steamwar.bausystem.region.RegionUtils; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.ColorMode; -import de.steamwar.bausystem.region.utils.RegionExtensionType; -import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.bausystem.utils.PasteBuilder; import de.steamwar.command.SWCommand; import de.steamwar.linkage.Linked; @@ -55,12 +52,11 @@ public class ResetCommand extends SWCommand { Region region = regionCheck(p); if (region == null) return; try { - PasteBuilder pasteBuilder = new PasteBuilder(new PasteBuilder.FileProvider(region.getResetFile(RegionType.NORMAL))) - .color(region.getPlain(Flag.COLOR, ColorMode.class).getColor()); - region.reset(pasteBuilder, RegionType.NORMAL, RegionExtensionType.NORMAL); - for (Flag value : Flag.getResetFlags()) { - region.set(value, value.getDefaultValue()); - } + PasteBuilder pasteBuilder = new PasteBuilder(new PasteBuilder.FileProvider(region.getArea().getResetFile())) + .color(region.getFlags().get(Flag.COLOR).getWithDefault()); + region.getArea().reset(pasteBuilder, false); + region.getFlags().clear(); + region.getRegionData().clear(); RegionUtils.message(region, "REGION_RESET_RESETED"); } catch (SecurityException e) { BauSystem.MESSAGE.send("REGION_RESET_ERROR", p); @@ -88,8 +84,8 @@ public class ResetCommand extends SWCommand { } try { PasteBuilder pasteBuilder = new PasteBuilder(new PasteBuilder.SchematicProvider(node)) - .color(region.getPlain(Flag.COLOR, ColorMode.class).getColor()); - region.reset(pasteBuilder, RegionType.NORMAL, RegionExtensionType.NORMAL); + .color(region.getFlags().get(Flag.COLOR).getWithDefault()); + region.getArea().reset(pasteBuilder, true); RegionUtils.message(region, "REGION_RESET_RESETED"); } catch (SecurityException e) { BauSystem.MESSAGE.send("REGION_RESET_ERROR", p); @@ -99,7 +95,7 @@ public class ResetCommand extends SWCommand { private Region regionCheck(Player player) { Region region = Region.getRegion(player.getLocation()); - if (region == GlobalRegion.getInstance()) { + if (region == RegionSystem.INSTANCE.getGlobalRegion()) { BauSystem.MESSAGE.send("REGION_RESET_NO_REGION", player); return null; } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/TNTCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/TNTCommand.java index 27dcbe8f..ad6f86a4 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/TNTCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/TNTCommand.java @@ -1,35 +1,33 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.RegionUtils; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.TNTMode; -import de.steamwar.bausystem.region.utils.RegionType; +import de.steamwar.bausystem.region.flags.TNTMode; +import de.steamwar.bausystem.region.flags.TestblockMode; import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeMapper; -import de.steamwar.command.TypeValidator; import de.steamwar.linkage.Linked; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -74,9 +72,6 @@ public class TNTCommand extends SWCommand { case ONLY_TB: requestedMessage = getTestblockEnableMessage(); break; - case ONLY_BUILD: - requestedMessage = getBuildEnableMessage(); - break; } tntToggle(region, tntMode, requestedMessage); } @@ -92,13 +87,12 @@ public class TNTCommand extends SWCommand { Map tntModeMap = new HashMap<>(tntModeMapReduced); tntModeMap.put("testblock", TNTMode.ONLY_TB); tntModeMap.put("tb", TNTMode.ONLY_TB); - tntModeMap.put("build", TNTMode.ONLY_BUILD); - return new TypeMapper() { + return new TypeMapper<>() { @Override public List tabCompletes(CommandSender sender, PreviousArguments previousArguments, String s) { Region region = Region.getRegion(((Player) sender).getLocation()); - if (region.hasType(RegionType.TESTBLOCK) && region.hasType(RegionType.BUILD)) { + if (region.getFlags().get(Flag.TESTBLOCK).isNotWithDefault(TestblockMode.NO_VALUE)) { return new ArrayList<>(tntModeMap.keySet()); } else { return new ArrayList<>(tntModeMapReduced.keySet()); @@ -108,7 +102,7 @@ public class TNTCommand extends SWCommand { @Override public TNTMode map(CommandSender sender, PreviousArguments previousArguments, String s) { Region region = Region.getRegion(((Player) sender).getLocation()); - if (region.hasType(RegionType.TESTBLOCK) && region.hasType(RegionType.BUILD)) { + if (region.getFlags().get(Flag.TESTBLOCK).isNotWithDefault(TestblockMode.NO_VALUE)) { return tntModeMap.getOrDefault(s, null); } else { return tntModeMapReduced.getOrDefault(s, null); @@ -129,29 +123,24 @@ public class TNTCommand extends SWCommand { return "REGION_TNT_TB"; } - private String getBuildEnableMessage() { - return "REGION_TNT_BUILD"; - } - private void tntToggle(Region region, TNTMode requestedMode, String requestedMessage) { - if (requestedMode != null && region.hasType(RegionType.TESTBLOCK) && region.hasType(RegionType.BUILD)) { - region.set(Flag.TNT, requestedMode); + if (requestedMode != null && region.getFlags().get(Flag.TESTBLOCK).isNotWithDefault(TestblockMode.NO_VALUE)) { + region.getFlags().set(Flag.TNT, requestedMode); RegionUtils.actionBar(region, requestedMessage); return; } - switch (region.getPlain(Flag.TNT, TNTMode.class)) { + switch (region.getFlags().get(Flag.TNT).getWithDefault()) { case ALLOW: case ONLY_TB: - case ONLY_BUILD: - region.set(Flag.TNT, TNTMode.DENY); + region.getFlags().set(Flag.TNT, TNTMode.DENY); RegionUtils.actionBar(region, getDisableMessage()); break; case DENY: - if (region.hasType(RegionType.TESTBLOCK) && region.hasType(RegionType.BUILD)) { - region.set(Flag.TNT, TNTMode.ONLY_TB); + if (region.getFlags().get(Flag.TESTBLOCK).isNotWithDefault(TestblockMode.NO_VALUE)) { + region.getFlags().set(Flag.TNT, TNTMode.ONLY_TB); RegionUtils.actionBar(region, getTestblockEnableMessage()); } else { - region.set(Flag.TNT, TNTMode.ALLOW); + region.getFlags().set(Flag.TNT, TNTMode.ALLOW); RegionUtils.actionBar(region, getEnableMessage()); } break; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/TNTListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/TNTListener.java index a8d34de5..a8676ae2 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/TNTListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/TNTListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region; @@ -23,9 +23,7 @@ import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.RegionUtils; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.TNTMode; -import de.steamwar.bausystem.region.utils.RegionExtensionType; -import de.steamwar.bausystem.region.utils.RegionType; +import de.steamwar.bausystem.region.flags.TNTMode; import de.steamwar.bausystem.utils.ScoreboardElement; import de.steamwar.linkage.Linked; import org.bukkit.block.Block; @@ -37,7 +35,6 @@ import org.bukkit.event.block.BlockExplodeEvent; import org.bukkit.event.entity.EntityExplodeEvent; import java.util.List; -import java.util.concurrent.atomic.AtomicBoolean; @Linked public class TNTListener implements Listener, ScoreboardElement { @@ -45,27 +42,14 @@ public class TNTListener implements Listener, ScoreboardElement { private void explode(List blockList) { blockList.removeIf(block -> { Region region = Region.getRegion(block.getLocation()); - TNTMode value = region.getPlain(Flag.TNT); + TNTMode value = region.getFlags().get(Flag.TNT).getWithDefault(); if (value == TNTMode.ALLOW) { return false; } else if (value == TNTMode.ONLY_TB) { - if (region.hasType(RegionType.BUILD) && region.inRegion(block.getLocation(), RegionType.BUILD, RegionExtensionType.NORMAL)) { + if (region.getBuildArea().inRegion(block.getLocation(), true)) { RegionUtils.actionBar(region, "REGION_TNT_BUILD_DESTROY"); return true; } - if (region.hasType(RegionType.BUILD) && region.inRegion(block.getLocation(), RegionType.BUILD, RegionExtensionType.EXTENSION)) { - RegionUtils.actionBar(region, "REGION_TNT_BUILD_DESTROY"); - return true; - } - } else if (value == TNTMode.ONLY_BUILD) { - if (region.hasType(RegionType.TESTBLOCK) && region.inRegion(block.getLocation(), RegionType.TESTBLOCK, RegionExtensionType.NORMAL)) { - RegionUtils.actionBar(region, "REGION_TNT_TB_DESTROY"); - return true; - } - if (region.hasType(RegionType.TESTBLOCK) && region.inRegion(block.getLocation(), RegionType.TESTBLOCK, RegionExtensionType.EXTENSION)) { - RegionUtils.actionBar(region, "REGION_TNT_TB_DESTROY"); - return true; - } } return value == TNTMode.DENY; }); @@ -93,6 +77,7 @@ public class TNTListener implements Listener, ScoreboardElement { @Override public String get(Region region, Player p) { - return "§e" + BauSystem.MESSAGE.parse(Flag.TNT.getChatValue(), p) + "§8: " + BauSystem.MESSAGE.parse(region.get(Flag.TNT).getChatValue(), p); + if (region.getFlags().get(Flag.TNT).isWithDefault(TNTMode.ALLOW)) return null; + return "§e" + BauSystem.MESSAGE.parse(Flag.TNT.getChatValue(), p) + "§8: " + BauSystem.MESSAGE.parse(region.getFlags().get(Flag.TNT).getWithDefault().getChatValue(), p); } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java index 6b319062..d09c06a0 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java @@ -1,40 +1,37 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.config.BauServer; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.RegionUtils; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.ColorMode; import de.steamwar.bausystem.region.utils.RegionExtensionType; -import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.bausystem.utils.PasteBuilder; import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeMapper; -import de.steamwar.command.TypeValidator; import de.steamwar.linkage.Linked; import de.steamwar.linkage.LinkedInstance; +import de.steamwar.sql.BauweltMember; import de.steamwar.sql.Punishment; import de.steamwar.sql.SchematicNode; import de.steamwar.sql.SteamwarUser; @@ -43,10 +40,8 @@ import org.bukkit.Bukkit; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import java.io.IOException; import java.util.*; import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Consumer; import java.util.function.Supplier; import java.util.logging.Level; import java.util.stream.Collectors; @@ -98,15 +93,46 @@ public class TestblockCommand extends SWCommand { } } + // Beta Tester enabled + switch (BauServer.getInstance().getOwnerID()) { + case 245: + case 403: + case 1898: + case 3320: + case 4603: + case 5262: + case 5399: + case 6032: + case 7862: + case 11077: + case 11888: + case 12258: + case 16009: + if (node == null) { + node = region.getRegionData().getTestblockSchematic(); + } else { + region.getRegionData().setTestblockSchematic(node); + } + break; + default: + break; + } + + PasteBuilder.ClipboardProvider clipboardProvider; + if (node == null) { + clipboardProvider = new PasteBuilder.FileProvider(region.getTestblockArea().getResetFile()); + } else { + clipboardProvider = new PasteBuilder.SchematicProvider(node); + } + try { - PasteBuilder.ClipboardProvider clipboardProvider = node == null ? new PasteBuilder.FileProvider(region.getResetFile(RegionType.TESTBLOCK)) : new PasteBuilder.SchematicProvider(node); PasteBuilder pasteBuilder = new PasteBuilder(clipboardProvider) .ignoreAir(ignoreAir) .onlyColors(onlyColors) .removeTNT(removeTNT) .removeWater(removeWater) - .color(region.getPlain(Flag.COLOR, ColorMode.class).getColor()); - region.reset(pasteBuilder, RegionType.TESTBLOCK, regionExtensionType); + .color(region.getFlags().get(Flag.COLOR).getWithDefault()); + region.getTestblockArea().reset(pasteBuilder, regionExtensionType == RegionExtensionType.EXTENSION); RegionUtils.message(region, "REGION_TB_DONE"); } catch (SecurityException e) { BauSystem.MESSAGE.send("REGION_TB_ERROR", p); @@ -159,7 +185,7 @@ public class TestblockCommand extends SWCommand { private Region regionCheck(Player player) { Region region = Region.getRegion(player.getLocation()); - if (!region.hasType(RegionType.TESTBLOCK)) { + if (region.getTestblockArea().isEmpty()) { BauSystem.MESSAGE.send("REGION_TB_NO_REGION", player); return null; } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/ColorBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/ColorBauGuiItem.java index a38c397f..41edc648 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/ColorBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/ColorBauGuiItem.java @@ -1,31 +1,30 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; -import de.steamwar.bausystem.region.Color; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.bausystem.region.Region; +import de.steamwar.bausystem.region.flags.ColorMode; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.ColorMode; import de.steamwar.inventory.SWItem; import de.steamwar.inventory.SWListInv; import de.steamwar.linkage.Linked; @@ -45,7 +44,7 @@ public class ColorBauGuiItem extends BauGuiItem { super(2); } - private static Material mapColor(Color color) { + private static Material mapColor(ColorMode color) { switch (color) { case RED: return Material.RED_CONCRETE; @@ -85,17 +84,17 @@ public class ColorBauGuiItem extends BauGuiItem { @Override public ItemStack getItem(Player player) { Region region = Region.getRegion(player.getLocation()); - ColorMode mode = region.getPlain(Flag.COLOR, ColorMode.class); - return new SWItem(mapColor(mode.getColor()), BauSystem.MESSAGE.parse("REGION_ITEM_COLOR", player, BauSystem.MESSAGE.parse(mode.getChatValue(), player))).getItemStack(); + ColorMode mode = region.getFlags().get(Flag.COLOR).orElse(ColorMode.PINK); + return new SWItem(mapColor(mode), BauSystem.MESSAGE.parse("REGION_ITEM_COLOR", player, BauSystem.MESSAGE.parse(mode.getChatValue(), player))).getItemStack(); } @Override public boolean click(ClickType click, Player p) { p.closeInventory(); - ColorMode current = Region.getRegion(p.getLocation()).getPlain(Flag.COLOR, ColorMode.class); + ColorMode current = Region.getRegion(p.getLocation()).getFlags().get(Flag.COLOR).orElse(ColorMode.PINK); List> items = new ArrayList<>(); for (ColorMode value : ColorMode.values()) { - items.add(new SWListInv.SWListEntry<>(new SWItem(mapColor(value.getColor()), (byte) 0, "§f" + BauSystem.MESSAGE.parse(value.getChatValue(), p), Collections.emptyList(), value == current, clickType -> { + items.add(new SWListInv.SWListEntry<>(new SWItem(mapColor(value), (byte) 0, "§f" + BauSystem.MESSAGE.parse(value.getChatValue(), p), Collections.emptyList(), value == current, clickType -> { }), value)); } SWListInv inv = new SWListInv<>(p, BauSystem.MESSAGE.parse("REGION_ITEM_COLOR_CHOOSE", p), items, (clickType, colorMode) -> { diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/FireBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/FireBauGuiItem.java index 79101ee9..f7694ae9 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/FireBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/FireBauGuiItem.java @@ -1,30 +1,30 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.bausystem.region.Region; +import de.steamwar.bausystem.region.flags.FireMode; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.FireMode; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; import org.bukkit.Material; @@ -42,7 +42,10 @@ public class FireBauGuiItem extends BauGuiItem { @Override public ItemStack getItem(Player player) { Region region = Region.getRegion(player.getLocation()); - if (region.getPlain(Flag.FIRE, FireMode.class) == FireMode.ALLOW) { + if (!region.getFlags().has(Flag.FIRE).isApplicable()) { + return new SWItem(Material.BARRIER, "").getItemStack(); + } + if (region.getFlags().get(Flag.FIRE).isWithDefault(FireMode.ALLOW)) { return new SWItem(Material.FIRE_CHARGE, BauSystem.MESSAGE.parse("REGION_ITEM_FIRE_ALLOW", player)).getItemStack(); } else { return new SWItem(Material.FIREWORK_STAR, BauSystem.MESSAGE.parse("REGION_ITEM_FIRE_DISALLOW", player)).getItemStack(); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/FreezeBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/FreezeBauGuiItem.java index 1406638c..ba863785 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/FreezeBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/FreezeBauGuiItem.java @@ -1,30 +1,30 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.FreezeMode; +import de.steamwar.bausystem.region.flags.FreezeMode; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; import org.bukkit.Material; @@ -42,7 +42,10 @@ public class FreezeBauGuiItem extends BauGuiItem { @Override public ItemStack getItem(Player player) { Region region = Region.getRegion(player.getLocation()); - if (region.getPlain(Flag.FREEZE, FreezeMode.class) == FreezeMode.ACTIVE) { + if (!region.getFlags().has(Flag.FREEZE).isApplicable()) { + return new SWItem(Material.BARRIER, "").getItemStack(); + } + if (region.getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) { return new SWItem(Material.GUNPOWDER, BauSystem.MESSAGE.parse("REGION_ITEM_FREEZE_ALLOW", player)).getItemStack(); } else { return new SWItem(Material.REDSTONE, BauSystem.MESSAGE.parse("REGION_ITEM_FREEZE_DISALLOW", player)).getItemStack(); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/ProtectBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/ProtectBauGuiItem.java index a11e508d..dd7f74bd 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/ProtectBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/ProtectBauGuiItem.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region.items; @@ -22,10 +22,10 @@ package de.steamwar.bausystem.features.region.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.SWUtils; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.ProtectMode; +import de.steamwar.bausystem.region.flags.ProtectMode; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; import org.bukkit.Material; @@ -43,7 +43,10 @@ public class ProtectBauGuiItem extends BauGuiItem { @Override public ItemStack getItem(Player player) { Region region = Region.getRegion(player.getLocation()); - if (region.getPlain(Flag.PROTECT, ProtectMode.class) == ProtectMode.ACTIVE) { + if (!region.getFlags().has(Flag.PROTECT).isApplicable()) { + return new SWItem(Material.BARRIER, "").getItemStack(); + } + if (region.getFlags().get(Flag.PROTECT).isWithDefault(ProtectMode.ACTIVE)) { return SWUtils.setCustomModelData(new SWItem(Material.OBSIDIAN, BauSystem.MESSAGE.parse("REGION_ITEM_PROTECT_ALLOW", player)), 1).getItemStack(); } else { return SWUtils.setCustomModelData(new SWItem(Material.STONE, BauSystem.MESSAGE.parse("REGION_ITEM_PROTECT_DISALLOW", player)), 1).getItemStack(); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/ResetBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/ResetBauGuiItem.java index e5295b2e..2141a483 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/ResetBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/ResetBauGuiItem.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region.items; @@ -23,7 +23,7 @@ import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.SWUtils; import de.steamwar.bausystem.features.region.ResetCommand; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.inventory.SWItem; import de.steamwar.inventory.SchematicSelector; import de.steamwar.linkage.Linked; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/TestblockBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/TestblockBauGuiItem.java index 355b5209..80c5bed8 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/TestblockBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/TestblockBauGuiItem.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region.items; @@ -22,7 +22,7 @@ package de.steamwar.bausystem.features.region.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.features.region.TestblockCommand; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.inventory.SWItem; import de.steamwar.inventory.SchematicSelector; import de.steamwar.linkage.Linked; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/TntBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/TntBauGuiItem.java index 38f1b04a..d43f6895 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/TntBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/items/TntBauGuiItem.java @@ -1,31 +1,30 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.region.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.TNTMode; -import de.steamwar.bausystem.region.utils.RegionType; +import de.steamwar.bausystem.region.flags.TNTMode; import de.steamwar.inventory.SWInventory; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; @@ -43,13 +42,11 @@ public class TntBauGuiItem extends BauGuiItem { @Override public ItemStack getItem(Player player) { - switch (Region.getRegion(player.getLocation()).getPlain(Flag.TNT, TNTMode.class)) { + switch (Region.getRegion(player.getLocation()).getFlags().get(Flag.TNT).getWithDefault()) { case DENY: return new SWItem(Material.MINECART, BauSystem.MESSAGE.parse("REGION_ITEM_TNT_OFF", player)).getItemStack(); case ONLY_TB: return new SWItem(Material.TNT_MINECART, BauSystem.MESSAGE.parse("REGION_ITEM_TNT_ONLY_TB", player)).getItemStack(); - case ONLY_BUILD: - return new SWItem(Material.OBSIDIAN, BauSystem.MESSAGE.parse("REGION_ITEM_TNT_ONLY_BUILD", player)).getItemStack(); default: return new SWItem(Material.TNT, BauSystem.MESSAGE.parse("REGION_ITEM_TNT_ON", player)).getItemStack(); } @@ -58,12 +55,12 @@ public class TntBauGuiItem extends BauGuiItem { @Override public boolean click(ClickType click, Player p) { if (click == ClickType.LEFT) { - switch (Region.getRegion(p.getLocation()).getPlain(Flag.TNT, TNTMode.class)) { + switch (Region.getRegion(p.getLocation()).getFlags().get(Flag.TNT).getWithDefault()) { case DENY: updateTntMode(TNTMode.ALLOW, p); break; case ALLOW: - if (Region.getRegion(p.getLocation()).hasType(RegionType.BUILD) && Region.getRegion(p.getLocation()).hasType(RegionType.TESTBLOCK)) { + if (!Region.getRegion(p.getLocation()).getBuildArea().isEmpty() && !Region.getRegion(p.getLocation()).getTestblockArea().isEmpty()) { updateTntMode(TNTMode.ONLY_TB, p); break; } @@ -77,15 +74,11 @@ public class TntBauGuiItem extends BauGuiItem { updateTntMode(TNTMode.ALLOW, p); p.closeInventory(); })); - if (Region.getRegion(p.getLocation()).hasType(RegionType.BUILD) && Region.getRegion(p.getLocation()).hasType(RegionType.TESTBLOCK)) { + if (!Region.getRegion(p.getLocation()).getBuildArea().isEmpty() && !Region.getRegion(p.getLocation()).getTestblockArea().isEmpty()) { selector.setItem(3, new SWItem(Material.TNT_MINECART, BauSystem.MESSAGE.parse("REGION_ITEM_SELECTOR_ONLY_TB", p), clickType -> { updateTntMode(TNTMode.ONLY_TB, p); p.closeInventory(); })); - selector.setItem(5, new SWItem(Material.OBSIDIAN, BauSystem.MESSAGE.parse("REGION_ITEM_SELECTOR_ONLY_BUILD", p), clickType -> { - updateTntMode(TNTMode.ONLY_BUILD, p); - p.closeInventory(); - })); } selector.setItem(7, new SWItem(Material.MINECART, BauSystem.MESSAGE.parse("REGION_ITEM_SELECTOR_OFF", p), clickType -> { updateTntMode(TNTMode.DENY, p); @@ -101,9 +94,6 @@ public class TntBauGuiItem extends BauGuiItem { case ONLY_TB: p.performCommand("tnt tb"); break; - case ONLY_BUILD: - p.performCommand("tnt build"); - break; case ALLOW: p.performCommand("tnt on"); break; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/Hotkey.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/Hotkey.java index d149eedd..4cdb6201 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/Hotkey.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/Hotkey.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptCommand.java index 0194514f..54836375 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptCommand.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptGUI.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptGUI.java index add7ad81..5558412e 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptGUI.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptGUI.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -22,7 +22,6 @@ package de.steamwar.bausystem.features.script; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.SWUtils; import de.steamwar.bausystem.features.script.lua.SteamWarPlatform; -import de.steamwar.bausystem.utils.ItemUtils; import de.steamwar.inventory.SWAnvilInv; import de.steamwar.inventory.SWItem; import de.steamwar.inventory.SWListInv; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptHelper.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptHelper.java index 8f99b390..fd4bc826 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptHelper.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptHelper.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptListener.java index 14f8d983..0eadc3ed 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptRunner.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptRunner.java index 7ee93eb3..2a506e12 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptRunner.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptRunner.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/UnsignCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/UnsignCommand.java index c1a048cc..2b9cb37a 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/UnsignCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/UnsignCommand.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/CommandListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/CommandListener.java index da5f1f21..d52e4d9b 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/CommandListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/CommandListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -28,7 +28,6 @@ import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerCommandPreprocessEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; -import org.luaj.vm2.LuaValue; import java.util.HashMap; import java.util.HashSet; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/EventListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/EventListener.java index 4c5feada..8aade642 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/EventListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/EventListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -25,8 +25,6 @@ import de.steamwar.bausystem.features.script.ScriptRunner; import de.steamwar.bausystem.features.script.lua.SteamWarGlobalLuaPlugin; import de.steamwar.bausystem.features.script.lua.libs.StorageLib; import de.steamwar.bausystem.region.Region; -import de.steamwar.bausystem.region.utils.RegionExtensionType; -import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.core.TrickyTrialsWrapper; import de.steamwar.linkage.Linked; import org.bukkit.Bukkit; @@ -153,7 +151,7 @@ public class EventListener implements Listener { for (Player player : Bukkit.getOnlinePlayers()) { if(!Permission.BUILD.hasPermission(player)) continue; - if (tntRegion.inRegion(player.getLocation(), RegionType.NORMAL, RegionExtensionType.NORMAL)) { + if (tntRegion.getArea().inRegion(player.getLocation(), false)) { ScriptRunner.callEvent(player, SteamWarGlobalLuaPlugin.EventType.TNTSpawn, LuaValue.NIL, event); } } @@ -171,11 +169,11 @@ public class EventListener implements Listener { table.set("y", event.getLocation().getY()); table.set("z", event.getLocation().getZ()); - boolean inBuild = event.blockList().stream().anyMatch(block -> tntRegion.inRegion(block.getLocation(), RegionType.BUILD, RegionExtensionType.EXTENSION)); + boolean inBuild = event.blockList().stream().anyMatch(block -> tntRegion.getBuildArea().inRegion(block.getLocation(), true)); for (Player player : Bukkit.getOnlinePlayers()) { if(!Permission.BUILD.hasPermission(player)) continue; - if (tntRegion.inRegion(player.getLocation(), RegionType.NORMAL, RegionExtensionType.NORMAL)) { + if (tntRegion.getArea().inRegion(player.getLocation(), false)) { ScriptRunner.callEvent(player, SteamWarGlobalLuaPlugin.EventType.TNTExplode, table, event); if (inBuild) { ScriptRunner.callEvent(player, SteamWarGlobalLuaPlugin.EventType.TNTExplodeInBuild, table, event); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/HotkeyListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/HotkeyListener.java index 466f1e60..9c9de260 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/HotkeyListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/HotkeyListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/CommandRegister.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/CommandRegister.java index 3c3332a0..50cc1919 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/CommandRegister.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/CommandRegister.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarGlobalLuaPlugin.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarGlobalLuaPlugin.java index 0bec9864..95619085 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarGlobalLuaPlugin.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarGlobalLuaPlugin.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarLuaPlugin.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarLuaPlugin.java index c3370904..df6fc706 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarLuaPlugin.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarLuaPlugin.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -22,19 +22,14 @@ package de.steamwar.bausystem.features.script.lua; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.bukkit.BukkitAdapter; -import com.sk89q.worldedit.bukkit.BukkitPlayer; -import com.sk89q.worldedit.bukkit.WorldEditPlugin; import com.sk89q.worldedit.event.platform.CommandEvent; import com.sk89q.worldedit.extension.platform.Actor; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.configplayer.Config; import de.steamwar.bausystem.features.script.ScriptRunner; import de.steamwar.bausystem.features.script.lua.libs.LuaLib; import de.steamwar.bausystem.features.world.WorldEditListener; import de.steamwar.bausystem.utils.WorldEditUtils; import de.steamwar.inventory.SWAnvilInv; -import net.md_5.bungee.api.ChatMessageType; -import net.md_5.bungee.api.chat.BaseComponent; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Location; @@ -47,8 +42,6 @@ import org.luaj.vm2.LuaValue; import org.luaj.vm2.Varargs; import org.luaj.vm2.lib.*; -import java.lang.reflect.Proxy; -import java.net.InetSocketAddress; import java.util.*; import java.util.logging.Level; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarPlatform.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarPlatform.java index a35ede6e..4153582d 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarPlatform.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarPlatform.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/BossbarLib.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/BossbarLib.java index adbb334e..498f83d8 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/BossbarLib.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/BossbarLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/InventoryLib.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/InventoryLib.java index 1d14b305..9e0b6064 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/InventoryLib.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/InventoryLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/LuaLib.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/LuaLib.java index a4af0d3a..5e879802 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/LuaLib.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/LuaLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/PlayerLib.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/PlayerLib.java index d8576f81..6d23bd0c 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/PlayerLib.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/PlayerLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/RandomLib.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/RandomLib.java index 87a4dddc..663168b6 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/RandomLib.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/RandomLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/RegionLib.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/RegionLib.java index f615dad3..265d7a45 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/RegionLib.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/RegionLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -20,19 +20,17 @@ package de.steamwar.bausystem.features.script.lua.libs; import de.steamwar.bausystem.features.loader.Loader; -import de.steamwar.bausystem.region.GlobalRegion; import de.steamwar.bausystem.region.Region; -import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.FireMode; -import de.steamwar.bausystem.region.flags.flagvalues.FreezeMode; -import de.steamwar.bausystem.region.flags.flagvalues.ProtectMode; -import de.steamwar.bausystem.region.flags.flagvalues.TNTMode; +import de.steamwar.bausystem.region.RegionSystem; +import de.steamwar.bausystem.region.flags.*; import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; import org.luaj.vm2.LuaTable; import org.luaj.vm2.LuaValue; import org.luaj.vm2.lib.OneArgFunction; +import java.util.List; +import java.util.UUID; import java.util.function.Supplier; @Linked @@ -46,27 +44,29 @@ public class RegionLib implements LuaLib { private LuaTable create(Supplier region, Player player) { LuaTable table = LuaValue.tableOf(); - table.set("name", getter(() -> region.get().getName())); + table.set("name", getter(() -> region.get().getID().toString())); + table.set("id", getter(() -> region.get().getID().toString())); table.set("type", getter(() -> { - Region region1 = region.get(); - if (region1 instanceof GlobalRegion) { + Region rg = region.get(); + if (rg.getType().isGlobal()) { return "global"; - } else { - return region1.getPrototype().getName(); } + List chatNames = rg.getGameModeConfig().Server.ChatNames; + if (chatNames.isEmpty()) { + return "unknown"; + } + return chatNames.get(0).toLowerCase(); })); LuaValue tntLib = LuaValue.tableOf(); - tntLib.set("mode", getter(() -> region.get().getPlain(Flag.TNT, TNTMode.class).name())); - tntLib.set("enabled", getter(() -> region.get().getPlain(Flag.TNT, TNTMode.class) != TNTMode.DENY)); - tntLib.set("onlyTb", getter(() -> region.get().getPlain(Flag.TNT, TNTMode.class) == TNTMode.ONLY_TB)); - tntLib.set("onlyBuild", getter(() -> region.get().getPlain(Flag.TNT, TNTMode.class) == TNTMode.ONLY_BUILD)); - + tntLib.set("mode", getter(() -> region.get().getFlags().get(Flag.TNT).nameWithDefault())); + tntLib.set("enabled", getter(() -> region.get().getFlags().get(Flag.TNT).orElse(null) != TNTMode.DENY)); + tntLib.set("onlyTb", getter(() -> region.get().getFlags().get(Flag.TNT).orElse(null) == TNTMode.ONLY_TB)); table.set("tnt", tntLib); - table.set("fire", getter(() -> region.get().getPlain(Flag.FIRE, FireMode.class) == FireMode.ALLOW)); - table.set("freeze", getter(() -> region.get().getPlain(Flag.FREEZE, FreezeMode.class) == FreezeMode.ACTIVE)); - table.set("protect", getter(() -> region.get().getPlain(Flag.PROTECT, ProtectMode.class) == ProtectMode.ACTIVE)); + table.set("fire", getter(() -> region.get().getFlags().get(Flag.FIRE).orElse(null) == FireMode.ALLOW)); + table.set("freeze", getter(() -> region.get().getFlags().get(Flag.FREEZE).orElse(null) == FreezeMode.ACTIVE)); + table.set("protect", getter(() -> region.get().getFlags().get(Flag.PROTECT).orElse(null) == ProtectMode.ACTIVE)); //LuaValue traceLib = LuaValue.tableOf(); //traceLib.set("active", getter(() -> !region.get().isGlobal() && Recorder.INSTANCE.get(region.get()) instanceof ActiveTracer)); @@ -79,16 +79,16 @@ public class RegionLib implements LuaLib { Loader loader = Loader.getLoader(player); table.set("loader", getter(() -> loader == null ? "OFF" : loader.getStage().name())); - table.set("copyPoint", getter(() -> toPos(region.get().getCopyPoint()))); - table.set("minPointBuild", getter(() -> toPos(region.get().getMinPointBuild()))); - table.set("maxPointBuild", getter(() -> toPos(region.get().getMaxPointBuild()))); - table.set("minPointBuildExtension", getter(() -> toPos(region.get().getMinPointBuildExtension()))); - table.set("maxPointBuildExtension", getter(() -> toPos(region.get().getMaxPointBuildExtension()))); - table.set("testblockPoint", getter(() -> toPos(region.get().getTestBlockPoint()))); - table.set("minPointTestblock", getter(() -> toPos(region.get().getMinPointTestblock()))); - table.set("maxPointTestblock", getter(() -> toPos(region.get().getMaxPointTestblock()))); - table.set("minPointTestblockExtension", getter(() -> toPos(region.get().getMinPointTestblockExtension()))); - table.set("maxPointTestblockExtension", getter(() -> toPos(region.get().getMaxPointTestblockExtension()))); + table.set("copyPoint", getter(() -> toPos(region.get().getBuildArea().getCopyPoint()))); + table.set("minPointBuild", getter(() -> toPos(region.get().getBuildArea().getMinPoint(false)))); + table.set("maxPointBuild", getter(() -> toPos(region.get().getBuildArea().getMinPoint(false)))); + table.set("minPointBuildExtension", getter(() -> toPos(region.get().getBuildArea().getMinPoint(true)))); + table.set("maxPointBuildExtension", getter(() -> toPos(region.get().getBuildArea().getMinPoint(true)))); + table.set("testblockPoint", getter(() -> toPos(region.get().getTestblockArea().getCopyPoint()))); + table.set("minPointTestblock", getter(() -> toPos(region.get().getTestblockArea().getMinPoint(false)))); + table.set("maxPointTestblock", getter(() -> toPos(region.get().getTestblockArea().getMinPoint(false)))); + table.set("minPointTestblockExtension", getter(() -> toPos(region.get().getTestblockArea().getMinPoint(true)))); + table.set("maxPointTestblockExtension", getter(() -> toPos(region.get().getTestblockArea().getMinPoint(true)))); return table; } @@ -99,11 +99,11 @@ public class RegionLib implements LuaLib { table.set("get", new OneArgFunction() { @Override public LuaValue call(LuaValue arg) { - return create(() -> Region.getREGION_MAP().get(arg.checkjstring()), player); + return create(() -> RegionSystem.INSTANCE.getRegion(UUID.fromString(arg.checkjstring())).orElse(RegionSystem.INSTANCE.getGlobalRegion()), player); } }); - table.set("list", getter(() -> LuaValue.listOf(Region.getREGION_MAP().values().stream().map(region -> create(() -> region, player)).toArray(LuaTable[]::new)))); + table.set("list", getter(() -> LuaValue.listOf(RegionSystem.INSTANCE.getRegions().map(region -> create(() -> region, player)).toArray(LuaTable[]::new)))); return table; } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/ScoreboardLib.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/ScoreboardLib.java index af9c67ae..bf9e64bd 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/ScoreboardLib.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/ScoreboardLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -24,9 +24,7 @@ import de.steamwar.bausystem.utils.ScoreboardElement; import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; import org.luaj.vm2.LuaTable; -import org.luaj.vm2.LuaValue; import org.luaj.vm2.Varargs; -import org.luaj.vm2.lib.TwoArgFunction; import org.luaj.vm2.lib.VarArgFunction; @Linked diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/ServerLib.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/ServerLib.java index 10a41830..7a4ce0a6 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/ServerLib.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/ServerLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -21,7 +21,6 @@ package de.steamwar.bausystem.features.script.lua.libs; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.features.loader.Loader; import de.steamwar.bausystem.features.loader.LoaderRecorder; import de.steamwar.bausystem.features.tpslimit.TPSUtils; import de.steamwar.inventory.SWItem; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/StorageLib.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/StorageLib.java index 898b68a7..c1646d41 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/StorageLib.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/StorageLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -21,6 +21,7 @@ package de.steamwar.bausystem.features.script.lua.libs; import com.google.gson.*; import de.steamwar.bausystem.region.Region; +import de.steamwar.bausystem.region.RegionSystem; import de.steamwar.core.Core; import de.steamwar.linkage.Linked; import de.steamwar.linkage.api.Disable; @@ -74,7 +75,7 @@ public class StorageLib implements LuaLib, Enable, Disable { jsonObject.keySet().forEach(key -> { map.put(key, fromJson(jsonObject.get(key))); }); - Region region = Region.getREGION_MAP().get(regionStorage.getName().substring(0, regionStorage.getName().length() - ".json".length())); + Region region = RegionSystem.INSTANCE.getRegion(UUID.fromString(regionStorage.getName().substring(0, regionStorage.getName().length() - ".json".length()))).orElse(null); REGION_STORAGE.put(region, map); } catch (Exception e) {} } @@ -143,7 +144,7 @@ public class StorageLib implements LuaLib, Enable, Disable { regionStorageDirectory.mkdirs(); for (Map.Entry> entry : REGION_STORAGE.entrySet()) { try { - FileWriter fileWriter = new FileWriter(new File(regionStorageDirectory, entry.getKey().getName() + ".json")); + FileWriter fileWriter = new FileWriter(new File(regionStorageDirectory, entry.getKey().getID().toString() + ".json")); gson.toJson(toJson(entry.getValue()), fileWriter); fileWriter.close(); } catch (IOException e) {} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/TpsLib.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/TpsLib.java index 44d9a378..416e2438 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/TpsLib.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/TpsLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/TracerLib.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/TracerLib.java index 5178bdf9..5052dde8 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/TracerLib.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/TracerLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/WorldEditLib.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/WorldEditLib.java index 87d1f9fb..0d03ff4c 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/WorldEditLib.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/WorldEditLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/BlockDataConfiguration.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/BlockDataConfiguration.java index e4b6d102..48079fcf 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/BlockDataConfiguration.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/BlockDataConfiguration.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrinting.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrinting.java index e3b60f1e..85a94b45 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrinting.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrinting.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.shieldprinting; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrintingCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrintingCommand.java index 5bb60219..15448409 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrintingCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrintingCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.shieldprinting; @@ -54,7 +54,7 @@ public class ShieldPrintingCommand extends SWCommand implements Listener { @Register public void genericCommand(@Validator Player player, ShieldPrintingState shieldPrintingState) { Region region = Region.getRegion(player.getLocation()); - if (region.isGlobal()) { + if (region.getType().isGlobal()) { BauSystem.MESSAGE.send("SHIELD_PRINTING_NO_REGION", player); return; } @@ -90,7 +90,7 @@ public class ShieldPrintingCommand extends SWCommand implements Listener { @Register("stop") public void stopCommand(@Validator Player player) { Region region = Region.getRegion(player.getLocation()); - if (region.isGlobal()) { + if (region.getType().isGlobal()) { BauSystem.MESSAGE.send("SHIELD_PRINTING_NO_REGION", player); return; } @@ -111,7 +111,7 @@ public class ShieldPrintingCommand extends SWCommand implements Listener { return false; } Region region = Region.getRegion(player.getLocation()); - if (region.isGlobal()) { + if (region.getType().isGlobal()) { messageSender.send("SHIELD_PRINTING_NO_REGION", player); return false; } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrintingState.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrintingState.java index 0f782f67..8c4d75af 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrintingState.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrintingState.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.shieldprinting; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/FenceConfiguration.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/FenceConfiguration.java index c45ede3a..78d702e7 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/FenceConfiguration.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/FenceConfiguration.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/OpenableConfiguration.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/OpenableConfiguration.java index 2b444883..7234fa73 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/OpenableConfiguration.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/OpenableConfiguration.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/PistonConfiguration.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/PistonConfiguration.java index dab77b8e..622065b8 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/PistonConfiguration.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/PistonConfiguration.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -23,7 +23,6 @@ import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.features.shieldprinting.BlockDataConfiguration; import de.steamwar.inventory.SWItem; import org.bukkit.Material; -import org.bukkit.block.data.BlockData; import org.bukkit.block.data.type.Piston; import org.bukkit.entity.Player; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/PowerableConfiguration.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/PowerableConfiguration.java index 3fa84f18..3a679ed0 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/PowerableConfiguration.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/PowerableConfiguration.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/WallConfiguration.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/WallConfiguration.java index 00b57f92..4eaca8f1 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/WallConfiguration.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/WallConfiguration.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorBauGuiItem.java index d03dc55c..1e4860ad 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorBauGuiItem.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -21,7 +21,7 @@ package de.steamwar.bausystem.features.simulator; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; import org.bukkit.Material; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java index 473ebf64..6b907cea 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorStorage.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorStorage.java index 62ba488d..79899bc2 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorStorage.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorStorage.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -21,7 +21,6 @@ import com.google.common.io.Files; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.SWUtils; import de.steamwar.bausystem.features.simulator.data.Simulator; -import de.steamwar.bausystem.features.simulator.display.SimulatorCursor; import de.steamwar.bausystem.features.simulator.gui.base.SimulatorPageGui; import de.steamwar.bausystem.features.simulator.storage.SimFormatSimulatorLoader; import de.steamwar.bausystem.features.simulator.storage.SimulatorFormatSimulatorLoader; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/Simulator.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/Simulator.java index 5cb4de3c..9fb3d841 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/Simulator.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/Simulator.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/SimulatorBlockAlignedElement.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/SimulatorBlockAlignedElement.java index de0d2b69..c18179b9 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/SimulatorBlockAlignedElement.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/SimulatorBlockAlignedElement.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/SimulatorElement.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/SimulatorElement.java index 119143db..2d31b7b3 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/SimulatorElement.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/SimulatorElement.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -33,7 +33,6 @@ import yapion.hierarchy.types.YAPIONObject; import java.util.ArrayList; import java.util.Comparator; import java.util.List; -import java.util.Map; import java.util.function.BiConsumer; @Getter diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/SimulatorGroup.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/SimulatorGroup.java index 8031dd1c..1f009c0c 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/SimulatorGroup.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/SimulatorGroup.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/SimulatorPhase.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/SimulatorPhase.java index b226d124..5d40b985 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/SimulatorPhase.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/SimulatorPhase.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -25,8 +25,6 @@ import lombok.Setter; import org.bukkit.util.Vector; import yapion.hierarchy.types.YAPIONObject; -import java.util.List; -import java.util.Map; import java.util.function.BiConsumer; @Getter diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/observer/ObserverElement.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/observer/ObserverElement.java index 7fdff328..47b1cc62 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/observer/ObserverElement.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/observer/ObserverElement.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/observer/ObserverPhase.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/observer/ObserverPhase.java index e3707c3e..f69ff797 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/observer/ObserverPhase.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/observer/ObserverPhase.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/redstone/RedstoneElement.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/redstone/RedstoneElement.java index 3b949609..fdbf9fd0 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/redstone/RedstoneElement.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/redstone/RedstoneElement.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/redstone/RedstonePhase.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/redstone/RedstonePhase.java index 614be659..2a5a64fd 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/redstone/RedstonePhase.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/redstone/RedstonePhase.java @@ -2,7 +2,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/tnt/TNTElement.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/tnt/TNTElement.java index 4fbede7e..735ca292 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/tnt/TNTElement.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/tnt/TNTElement.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/tnt/TNTPhase.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/tnt/TNTPhase.java index 29f59d93..a4c95d6c 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/tnt/TNTPhase.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/data/tnt/TNTPhase.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -23,7 +23,7 @@ import de.steamwar.bausystem.features.simulator.data.SimulatorPhase; import de.steamwar.bausystem.features.simulator.execute.SimulatorAction; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.FreezeMode; +import de.steamwar.bausystem.region.flags.FreezeMode; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -65,7 +65,7 @@ public final class TNTPhase extends SimulatorPhase { @Override public void accept(World world) { Location location = position.toLocation(world); - if (Region.getRegion(location).get(Flag.FREEZE) == FreezeMode.ACTIVE) return; + if (Region.getRegion(location).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) return; TNTPrimed tnt = world.spawn(location, TNTPrimed.class); if (!xJump) tnt.setVelocity(tnt.getVelocity().setX(0)); if (!yJump) tnt.setVelocity(tnt.getVelocity().setY(0)); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/Direction.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/Direction.java index 31737266..d6125212 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/Direction.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/Direction.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.simulator.execute; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/SimulatorAction.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/SimulatorAction.java index c6c9f1da..b0014d84 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/SimulatorAction.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/SimulatorAction.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/SimulatorExecutor.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/SimulatorExecutor.java index 5192fde8..108827e3 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/SimulatorExecutor.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/SimulatorExecutor.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/SimulatorStabGenerator.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/SimulatorStabGenerator.java index 37ca8bf3..82f4d0fc 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/SimulatorStabGenerator.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/SimulatorStabGenerator.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.simulator.execute; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabData.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabData.java index dc1a6e0e..00c80eeb 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabData.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabData.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.simulator.execute; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabDirection.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabDirection.java index 4be5284b..05ccd451 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabDirection.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabDirection.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.simulator.execute; @@ -45,7 +45,7 @@ public class StabDirection extends StabStep { @Override protected void start() { try (EditSession e = WorldEdit.getInstance().getEditSessionFactory().getEditSession(new BukkitWorld(Bukkit.getWorlds().get(0)), -1)) { - e.setBlocks((com.sk89q.worldedit.regions.Region) new CuboidRegion(data.region.getMinPointTestblockExtension().toBlockVector3(), data.region.getMaxPointTestblockExtension().toBlockVector3()), Objects.requireNonNull(BlockTypes.AIR).getDefaultState().toBaseBlock()); + e.setBlocks((com.sk89q.worldedit.regions.Region) new CuboidRegion(data.region.getTestblockArea().getMinPoint(true).toBlockVector3(), data.region.getTestblockArea().getMaxPoint(true).toBlockVector3()), Objects.requireNonNull(BlockTypes.AIR).getDefaultState().toBaseBlock()); } Trace trace = TraceRecorder.instance.startRecording(data.region); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabFinalizer.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabFinalizer.java index 5c0d77aa..a69b2ee8 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabFinalizer.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabFinalizer.java @@ -1,30 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.simulator.execute; -import de.steamwar.bausystem.features.tracer.Trace; import de.steamwar.bausystem.features.tracer.TraceRecorder; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.ColorMode; -import de.steamwar.bausystem.region.utils.RegionExtensionType; -import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.bausystem.utils.PasteBuilder; import de.steamwar.bausystem.utils.bossbar.BauSystemBossbar; @@ -38,9 +34,11 @@ public class StabFinalizer extends StabStep { protected void start() { try { PasteBuilder.ClipboardProvider clipboardProvider = new PasteBuilder.ClipboardProviderImpl(data.clipboard); - PasteBuilder pasteBuilder = new PasteBuilder(clipboardProvider) - .color(data.region.getPlain(Flag.COLOR, ColorMode.class).getColor()); - data.region.reset(pasteBuilder, RegionType.TESTBLOCK, RegionExtensionType.EXTENSION); + PasteBuilder pasteBuilder = new PasteBuilder(clipboardProvider); + if (data.region.getFlags().has(Flag.COLOR).isReadable()) { + pasteBuilder.color(data.region.getFlags().get(Flag.COLOR).getWithDefault()); + } + data.region.getTestblockArea().reset(pasteBuilder, true); } catch (SecurityException e) { stop(); throw e; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabGenerator.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabGenerator.java index 4a15ebcb..809358b6 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabGenerator.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabGenerator.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.simulator.execute; @@ -22,9 +22,6 @@ package de.steamwar.bausystem.features.simulator.execute; import de.steamwar.bausystem.features.simulator.data.tnt.TNTPhase; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.ColorMode; -import de.steamwar.bausystem.region.utils.RegionExtensionType; -import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.bausystem.utils.PasteBuilder; import de.steamwar.bausystem.utils.bossbar.BauSystemBossbar; import org.bukkit.Bukkit; @@ -56,7 +53,8 @@ public class StabGenerator extends StabStep implements Listener { public void onEntityExplode(EntityExplodeEvent event) { if (Region.getRegion(event.getEntity().getLocation()) == data.region) { event.blockList().forEach(block -> { - if (!data.region.inRegion(block.getLocation(), RegionType.TESTBLOCK, RegionExtensionType.EXTENSION)) return; + if (!data.region.getTestblockArea().inRegion(block.getLocation(), true)) + return; int component = data.direction.component.apply(block.getLocation().toVector()); destroyedBlocksPerSlice.computeIfAbsent(component, __ -> new HashSet<>()) .add(block.getLocation()); @@ -72,9 +70,11 @@ public class StabGenerator extends StabStep implements Listener { protected void start() { try { PasteBuilder.ClipboardProvider clipboardProvider = new PasteBuilder.ClipboardProviderImpl(data.clipboard); - PasteBuilder pasteBuilder = new PasteBuilder(clipboardProvider) - .color(data.region.getPlain(Flag.COLOR, ColorMode.class).getColor()); - data.region.reset(pasteBuilder, RegionType.TESTBLOCK, RegionExtensionType.EXTENSION); + PasteBuilder pasteBuilder = new PasteBuilder(clipboardProvider); + if (data.region.getFlags().has(Flag.COLOR).isReadable()) { + pasteBuilder.color(data.region.getFlags().get(Flag.COLOR).getWithDefault()); + } + data.region.getTestblockArea().reset(pasteBuilder, true); } catch (SecurityException e) { stop(); throw e; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabSetup.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabSetup.java index 9662a638..16a54b40 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabSetup.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabSetup.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.simulator.execute; @@ -72,7 +72,7 @@ public class StabSetup extends StabStep { if (TraceRecorder.instance.isAutoTraceEnabledInRegion(data.region)) { TraceRecorder.instance.removeAutoTraceRegion(data.region); } - data.clipboard = FlatteningWrapper.impl.copy(data.region.getMinPointTestblockExtension(), data.region.getMaxPointTestblockExtension(), data.region.getTestBlockPoint()); + data.clipboard = FlatteningWrapper.impl.copy(data.region.getTestblockArea().getMinPoint(true), data.region.getTestblockArea().getMaxPoint(true), data.region.getTestblockArea().getCopyPoint()); new StabDirection(data); } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabStep.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabStep.java index 0375577c..5d6e426a 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabStep.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/execute/StabStep.java @@ -1,18 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.simulator.execute; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorCursorSwitcherGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorCursorSwitcherGui.java new file mode 100644 index 00000000..0344014e --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorCursorSwitcherGui.java @@ -0,0 +1,67 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.features.simulator.gui; + +import de.steamwar.bausystem.features.simulator.SimulatorCursor; +import de.steamwar.bausystem.features.simulator.data.Simulator; +import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui; +import de.steamwar.data.CMDs; +import de.steamwar.inventory.SWItem; +import org.bukkit.Material; +import org.bukkit.entity.Player; + +import java.util.Collections; + +public class SimulatorCursorSwitcherGui extends SimulatorBaseGui { + + private SimulatorBaseGui back; + + public SimulatorCursorSwitcherGui(Player player, Simulator simulator, SimulatorBaseGui back) { + super(player, simulator, 9); + this.back = back; + } + + @Override + public String title() { + return "Simulator Cursor"; + } + + @Override + public void populate() { + inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> { + back.open(); + }).setCustomModelData(CMDs.BACK)); + + int slot = 2; + SimulatorCursor.CursorType currentType = SimulatorCursor.getCursorType(player); + for (SimulatorCursor.CursorType type : SimulatorCursor.CursorType.values()) { + boolean selected = type == currentType; + SWItem swItem = new SWItem(selected ? type.material : type.nonSelectedMaterial, "§e" + type.name) + .setCustomModelData(selected ? 0 : CMDs.Simulator.NEW_PHASE) + .setLore(Collections.singletonList("§eClick to select")) + .setCallback(click -> { + SimulatorCursor.setCursorType(player, type); + player.closeInventory(); + }); + inventory.setItem(slot, swItem); + slot += 2; + } + } +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorGroupChooserGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorGroupChooserGui.java index 3c35c1fe..d517ca43 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorGroupChooserGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorGroupChooserGui.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -36,9 +36,11 @@ public class SimulatorGroupChooserGui extends SimulatorPageGui { private final SimulatorGroup parent; private final SimulatorBaseGui back; - public SimulatorGroupChooserGui(Player player, Simulator simulator, SimulatorElement subject, SimulatorGroup parent, SimulatorBaseGui back) { + public SimulatorGroupChooserGui(Player player, Simulator simulator, SimulatorElement subject, + SimulatorGroup parent, SimulatorBaseGui back) { super(player, simulator, 6 * 9, - simulator.getGroups().stream().filter(e -> e != parent).filter(e -> subject.canBeInGroup(e)).collect(Collectors.toList())); + simulator.getGroups().stream().filter(e -> e != parent).filter(e -> subject.canBeInGroup(e)) + .collect(Collectors.toList())); this.subject = subject; this.parent = parent; this.back = back; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorGroupGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorGroupGui.java index 1f433ac0..72c272b0 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorGroupGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorGroupGui.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorGroupSettingsGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorGroupSettingsGui.java index 9ba30bc8..4873afe9 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorGroupSettingsGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorGroupSettingsGui.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -35,7 +35,8 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui { private final SimulatorGroup simulatorGroup; private final SimulatorBaseGui back; - public SimulatorGroupSettingsGui(Player player, Simulator simulator, SimulatorGroup simulatorGroup, SimulatorBaseGui back) { + public SimulatorGroupSettingsGui(Player player, Simulator simulator, SimulatorGroup simulatorGroup, + SimulatorBaseGui back) { super(player, simulator, 5 * 9); this.simulatorGroup = simulatorGroup; this.back = back; @@ -62,16 +63,18 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui { inventory.setItem(4, simulatorGroup.toItem(player, clickType -> { if (simulatorGroup.getMaterial() == null) return; - new SimulatorMaterialGui(player, simulator, simulatorGroup::getMaterial, simulatorGroup::setMaterial, this).open(); + new SimulatorMaterialGui(player, simulator, simulatorGroup::getMaterial, simulatorGroup::setMaterial, this) + .open(); }, clickType -> { })); // Base Tick int baseTicks = simulatorGroup.getBaseTick(); - inventory.setItem(9, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> { - simulatorGroup.changeBaseTicks(clickType.isShiftClick() ? 5 : 1); - SimulatorRenderer.update(simulator); - }).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED)); + inventory.setItem(9, + new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> { + simulatorGroup.changeBaseTicks(clickType.isShiftClick() ? 5 : 1); + SimulatorRenderer.update(simulator); + }).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED)); SWItem baseTick = new SWItem(Material.REPEATER, "§eTicks§8:§7 " + baseTicks, clickType -> { new SimulatorAnvilGui<>(player, "Ticks", baseTicks + "", Integer::parseInt, integer -> { if (integer < 0) @@ -83,14 +86,15 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui { }); baseTick.getItemStack().setAmount(Math.max(1, Math.min(baseTicks, 64))); inventory.setItem(18, baseTick); - inventory.setItem(27, new SWItem(SWItem.getDye(baseTicks > 0 ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> { - if (baseTicks - (clickType.isShiftClick() ? 5 : 1) < 0) { - simulatorGroup.changeBaseTicks(-baseTicks); - } else { - simulatorGroup.changeBaseTicks(clickType.isShiftClick() ? -5 : -1); - } - SimulatorRenderer.update(simulator); - }).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED)); + inventory.setItem(27, new SWItem(SWItem.getDye(baseTicks > 0 ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8: §e-5"), + false, clickType -> { + if (baseTicks - (clickType.isShiftClick() ? 5 : 1) < 0) { + simulatorGroup.changeBaseTicks(-baseTicks); + } else { + simulatorGroup.changeBaseTicks(clickType.isShiftClick() ? -5 : -1); + } + SimulatorRenderer.update(simulator); + }).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED)); boolean allTNT = simulatorGroup.getElements().stream().allMatch(TNTElement.class::isInstance); @@ -113,7 +117,8 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui { SimulatorRenderer.update(simulator); }); negativZItem.setEnchanted( - simulatorGroup.getElements().stream().map(TNTElement.class::cast).allMatch(tntElement -> tntElement.getAlignment().getZ() == -1)); + simulatorGroup.getElements().stream().map(TNTElement.class::cast) + .allMatch(tntElement -> tntElement.getAlignment().getZ() == -1)); inventory.setItem(20, negativZItem); SWItem positivZItem = new SWItem(Material.OAK_BUTTON, "§7Align§8: §ePositiv Z", clickType -> { @@ -124,7 +129,8 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui { SimulatorRenderer.update(simulator); }); positivZItem.setEnchanted( - simulatorGroup.getElements().stream().map(TNTElement.class::cast).allMatch(tntElement -> tntElement.getAlignment().getZ() == 1)); + simulatorGroup.getElements().stream().map(TNTElement.class::cast) + .allMatch(tntElement -> tntElement.getAlignment().getZ() == 1)); inventory.setItem(22, positivZItem); // X @@ -137,7 +143,8 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui { SimulatorRenderer.update(simulator); }); negativXItem.setEnchanted( - simulatorGroup.getElements().stream().map(TNTElement.class::cast).allMatch(tntElement -> tntElement.getAlignment().getX() == -1)); + simulatorGroup.getElements().stream().map(TNTElement.class::cast) + .allMatch(tntElement -> tntElement.getAlignment().getX() == -1)); inventory.setItem(12, negativXItem); SWItem positivXItem = new SWItem(Material.STONE_BUTTON, "§7Align§8: §ePositiv X", clickType -> { @@ -148,15 +155,17 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui { SimulatorRenderer.update(simulator); }); positivXItem.setEnchanted( - simulatorGroup.getElements().stream().map(TNTElement.class::cast).allMatch(tntElement -> tntElement.getAlignment().getX() == -1)); + simulatorGroup.getElements().stream().map(TNTElement.class::cast) + .allMatch(tntElement -> tntElement.getAlignment().getX() == -1)); inventory.setItem(30, positivXItem); } // Pos X - inventory.setItem(15, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList(allTNT ? "§7Shift§8: §e+0.0625" : "§7Shift§8: §e+5"), false, clickType -> { - simulatorGroup.move(clickType.isShiftClick() ? (allTNT ? 0.0625 : 5) : 1, 0, 0); - SimulatorRenderer.update(simulator); - }).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED)); + inventory.setItem(15, new SWItem(SWItem.getDye(10), "§e+1", + Arrays.asList(allTNT ? "§7Shift§8: §e+0.0625" : "§7Shift§8: §e+5"), false, clickType -> { + simulatorGroup.move(clickType.isShiftClick() ? (allTNT ? 0.0625 : 5) : 1, 0, 0); + SimulatorRenderer.update(simulator); + }).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED)); inventory.setItem(24, new SWItem(Material.PAPER, "§eX", clickType -> { new SimulatorAnvilGui<>(player, "Relative X", "", Double::parseDouble, number -> { if (!allTNT) { @@ -167,16 +176,18 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui { return true; }, this).setItem(Material.PAPER).open(); })); - inventory.setItem(33, new SWItem(SWItem.getDye(1), "§e-1", Arrays.asList(allTNT ? "§7Shift§8: §e-0.0625" : "§7Shift§8: §e-5"), false, clickType -> { - simulatorGroup.move(clickType.isShiftClick() ? (allTNT ? -0.0625 : -5) : -1, 0, 0); - SimulatorRenderer.update(simulator); - }).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED)); + inventory.setItem(33, new SWItem(SWItem.getDye(1), "§e-1", + Arrays.asList(allTNT ? "§7Shift§8: §e-0.0625" : "§7Shift§8: §e-5"), false, clickType -> { + simulatorGroup.move(clickType.isShiftClick() ? (allTNT ? -0.0625 : -5) : -1, 0, 0); + SimulatorRenderer.update(simulator); + }).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED)); // Pos Y - inventory.setItem(16, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList(allTNT ? "§7Shift§8: §e+0.0625" : "§7Shift§8: §e+5"), false, clickType -> { - simulatorGroup.move(0, clickType.isShiftClick() ? (allTNT ? 0.0625 : 5) : 1, 0); - SimulatorRenderer.update(simulator); - }).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED)); + inventory.setItem(16, new SWItem(SWItem.getDye(10), "§e+1", + Arrays.asList(allTNT ? "§7Shift§8: §e+0.0625" : "§7Shift§8: §e+5"), false, clickType -> { + simulatorGroup.move(0, clickType.isShiftClick() ? (allTNT ? 0.0625 : 5) : 1, 0); + SimulatorRenderer.update(simulator); + }).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED)); inventory.setItem(25, new SWItem(Material.PAPER, "§eY", clickType -> { new SimulatorAnvilGui<>(player, "Relative Y", "", Double::parseDouble, number -> { if (!allTNT) { @@ -187,16 +198,18 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui { return true; }, this).setItem(Material.PAPER).open(); })); - inventory.setItem(34, new SWItem(SWItem.getDye(1), "§e-1", Arrays.asList(allTNT ? "§7Shift§8: §e-0.0625" : "§7Shift§8: §e-5"), false, clickType -> { - simulatorGroup.move(0, clickType.isShiftClick() ? (allTNT ? -0.0625 : -5) : -1, 0); - SimulatorRenderer.update(simulator); - }).setCustomModelData(CMDs.Simulator.ENABLED_OR_DISABLED)); + inventory.setItem(34, new SWItem(SWItem.getDye(1), "§e-1", + Arrays.asList(allTNT ? "§7Shift§8: §e-0.0625" : "§7Shift§8: §e-5"), false, clickType -> { + simulatorGroup.move(0, clickType.isShiftClick() ? (allTNT ? -0.0625 : -5) : -1, 0); + SimulatorRenderer.update(simulator); + }).setCustomModelData(CMDs.Simulator.ENABLED_OR_DISABLED)); // Pos Z - inventory.setItem(17, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList(allTNT ? "§7Shift§8: §e+0.0625" : "§7Shift§8: §e+5"), false, clickType -> { - simulatorGroup.move(0, 0, clickType.isShiftClick() ? (allTNT ? 0.0625 : 5) : 1); - SimulatorRenderer.update(simulator); - }).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED)); + inventory.setItem(17, new SWItem(SWItem.getDye(10), "§e+1", + Arrays.asList(allTNT ? "§7Shift§8: §e+0.0625" : "§7Shift§8: §e+5"), false, clickType -> { + simulatorGroup.move(0, 0, clickType.isShiftClick() ? (allTNT ? 0.0625 : 5) : 1); + SimulatorRenderer.update(simulator); + }).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED)); inventory.setItem(26, new SWItem(Material.PAPER, "§eZ", clickType -> { new SimulatorAnvilGui<>(player, "Relative Z", "", Double::parseDouble, number -> { if (!allTNT) { @@ -207,9 +220,10 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui { return true; }, this).setItem(Material.PAPER).open(); })); - inventory.setItem(35, new SWItem(SWItem.getDye(1), "§e-1", Arrays.asList(allTNT ? "§7Shift§8: §e-0.0625" : "§7Shift§8: §e-5"), false, clickType -> { - simulatorGroup.move(0, 0, clickType.isShiftClick() ? (allTNT ? -0.0625 : -5) : -1); - SimulatorRenderer.update(simulator); - }).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED)); + inventory.setItem(35, new SWItem(SWItem.getDye(1), "§e-1", + Arrays.asList(allTNT ? "§7Shift§8: §e-0.0625" : "§7Shift§8: §e-5"), false, clickType -> { + simulatorGroup.move(0, 0, clickType.isShiftClick() ? (allTNT ? -0.0625 : -5) : -1); + SimulatorRenderer.update(simulator); + }).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED)); } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorGui.java index 288719de..eb99e964 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorGui.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -48,7 +48,11 @@ public class SimulatorGui extends SimulatorPageGui { inventory.setItem(4, simulator.toItem(player, clickType -> { new SimulatorMaterialGui(player, simulator, simulator::getMaterial, simulator::setMaterial, this).open(); })); - inventory.setItem(49, new SWItem(Material.REPEATER, "§eSettings", clickType -> { + SimulatorCursor.CursorType cursorType = SimulatorCursor.getCursorType(player); + inventory.setItem(48, new SWItem(cursorType.material, "§7Placing §8-§e " + cursorType.name, clickType -> { + new SimulatorCursorSwitcherGui(player, simulator, this).open(); + })); + inventory.setItem(50, new SWItem(Material.REPEATER, "§eSettings", clickType -> { new SimulatorSettingsGui(player, simulator, this).open(); }).setCustomModelData(CMDs.Simulator.SETTINGS)); } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorMaterialGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorMaterialGui.java index 50e7cb9f..e5577d2c 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorMaterialGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorMaterialGui.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorObserverGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorObserverGui.java index ab180d99..95f56982 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorObserverGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorObserverGui.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorObserverPhaseSettingsGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorObserverPhaseSettingsGui.java index be3b3458..35f9d080 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorObserverPhaseSettingsGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorObserverPhaseSettingsGui.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorObserverSettingsGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorObserverSettingsGui.java index 215826d6..fe22e577 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorObserverSettingsGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorObserverSettingsGui.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorRedstoneGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorRedstoneGui.java index 382c3ee7..2cf6d385 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorRedstoneGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorRedstoneGui.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorRedstonePhaseSettingsGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorRedstonePhaseSettingsGui.java index bd80e432..15cb75ca 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorRedstonePhaseSettingsGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorRedstonePhaseSettingsGui.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorRedstoneSettingsGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorRedstoneSettingsGui.java index 816bce7d..bd88a8a9 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorRedstoneSettingsGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorRedstoneSettingsGui.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorSettingsGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorSettingsGui.java index dd1725c1..8fa1766f 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorSettingsGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorSettingsGui.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorTNTGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorTNTGui.java index cacda08f..6aeef256 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorTNTGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorTNTGui.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorTNTPhaseSettingsGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorTNTPhaseSettingsGui.java index eb84d81f..c59f20fc 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorTNTPhaseSettingsGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorTNTPhaseSettingsGui.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorTNTSettingsGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorTNTSettingsGui.java index 518f3875..69f80537 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorTNTSettingsGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorTNTSettingsGui.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorAnvilGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorAnvilGui.java index e22c807a..87d4ed86 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorAnvilGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorAnvilGui.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorBaseGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorBaseGui.java index cfb71868..de7339c5 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorBaseGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorBaseGui.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorPageGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorPageGui.java index a6ff9f15..6270fd1b 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorPageGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorPageGui.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorScrollGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorScrollGui.java index 974f64ed..57258f82 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorScrollGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorScrollGui.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimFormatSimulatorLoader.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimFormatSimulatorLoader.java index f213227e..5257ce12 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimFormatSimulatorLoader.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimFormatSimulatorLoader.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimulatorFormatSimulatorLoader.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimulatorFormatSimulatorLoader.java index a386f86d..65815440 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimulatorFormatSimulatorLoader.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimulatorFormatSimulatorLoader.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimulatorLoader.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimulatorLoader.java index 4c9e3f92..e20de3a7 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimulatorLoader.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimulatorLoader.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimulatorSaver.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimulatorSaver.java index 9a5f5285..1f3345e4 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimulatorSaver.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/SimulatorSaver.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/YAPIONFormatSimulatorLoader.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/YAPIONFormatSimulatorLoader.java index 0c715443..c138ecb1 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/YAPIONFormatSimulatorLoader.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/storage/YAPIONFormatSimulatorLoader.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/BlockBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/BlockBoundingBox.java index f10811f8..223cdfe6 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/BlockBoundingBox.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/BlockBoundingBox.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/BoundingBoxLoader.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/BoundingBoxLoader.java index 7c2846b2..899c951c 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/BoundingBoxLoader.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/BoundingBoxLoader.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Cuboid.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Cuboid.java index c31653a5..ec959a69 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Cuboid.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Cuboid.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Laufbau.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Laufbau.java index f33f6af3..9a82f3a5 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Laufbau.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Laufbau.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauCommand.java index daff9d87..9c568a56 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauCommand.java @@ -1,31 +1,29 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.SWUtils; import de.steamwar.bausystem.shared.Pair; import de.steamwar.bausystem.utils.WorldEditUtils; import de.steamwar.command.SWCommand; -import de.steamwar.command.TypeValidator; import de.steamwar.linkage.Linked; import org.bukkit.Bukkit; import org.bukkit.Location; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauSettings.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauSettings.java index 17de9c68..857b1908 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauSettings.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauSettings.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauUtils.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauUtils.java index 9a9fb24a..4eb6c382 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauUtils.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauUtils.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/AmethystBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/AmethystBoundingBox.java index 5eec07ca..0972df97 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/AmethystBoundingBox.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/AmethystBoundingBox.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/AzaleaBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/AzaleaBoundingBox.java index 8c0409da..6ee19b36 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/AzaleaBoundingBox.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/AzaleaBoundingBox.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/BellBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/BellBoundingBox.java index b5fcbb41..eb202645 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/BellBoundingBox.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/BellBoundingBox.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/BrewingStandBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/BrewingStandBoundingBox.java index 765bea3d..8e42712a 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/BrewingStandBoundingBox.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/BrewingStandBoundingBox.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/CandleBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/CandleBoundingBox.java index 4efaee96..77cf6c9a 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/CandleBoundingBox.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/CandleBoundingBox.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/ChainBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/ChainBoundingBox.java index 6dd79442..bd480390 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/ChainBoundingBox.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/ChainBoundingBox.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/ChorusPlantBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/ChorusPlantBoundingBox.java index b169a455..e1ace28e 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/ChorusPlantBoundingBox.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/ChorusPlantBoundingBox.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/DragonEggBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/DragonEggBoundingBox.java index 2bd6a6bb..1fea5fd8 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/DragonEggBoundingBox.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/DragonEggBoundingBox.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/DripLeafBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/DripLeafBoundingBox.java index 30198624..f5b4e67f 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/DripLeafBoundingBox.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/DripLeafBoundingBox.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/FencesBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/FencesBoundingBox.java index 213a2345..e19a72b5 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/FencesBoundingBox.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/FencesBoundingBox.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/GrindstoneBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/GrindstoneBoundingBox.java index 52fa3557..59d6310d 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/GrindstoneBoundingBox.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/GrindstoneBoundingBox.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/HopperBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/HopperBoundingBox.java index 19a095b3..655ad055 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/HopperBoundingBox.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/HopperBoundingBox.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/IronBarBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/IronBarBoundingBox.java index e275b7b1..e75afb93 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/IronBarBoundingBox.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/IronBarBoundingBox.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/LanternBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/LanternBoundingBox.java index 3bf275b4..2320fbcc 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/LanternBoundingBox.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/LanternBoundingBox.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/LecternBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/LecternBoundingBox.java index 563b9bc6..ab49f3ab 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/LecternBoundingBox.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/LecternBoundingBox.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/StairBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/StairBoundingBox.java index 23807176..ff14d1b8 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/StairBoundingBox.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/StairBoundingBox.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/WallBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/WallBoundingBox.java index 855fe9b8..f5ccb209 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/WallBoundingBox.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/WallBoundingBox.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/CreatingLaufState.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/CreatingLaufState.java index e4ed312b..82b0f5f7 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/CreatingLaufState.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/CreatingLaufState.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau.states; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/LaufbauState.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/LaufbauState.java index 6843db9e..e5769ebc 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/LaufbauState.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/LaufbauState.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.laufbau.states; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ProcessingTracesState.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ProcessingTracesState.java index 94eb6549..0e21d51e 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ProcessingTracesState.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ProcessingTracesState.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/Panzern.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/Panzern.java index 2823beb0..f6ce114c 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/Panzern.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/Panzern.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.panzern; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/PanzernAlgorithm.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/PanzernAlgorithm.java index f77be675..bd1e0c9b 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/PanzernAlgorithm.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/PanzernAlgorithm.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.panzern; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/PanzernCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/PanzernCommand.java index cca7a266..b2535d24 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/PanzernCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/PanzernCommand.java @@ -1,33 +1,31 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.panzern; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.SWUtils; import de.steamwar.bausystem.shared.Pair; import de.steamwar.bausystem.utils.WorldEditUtils; import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeMapper; -import de.steamwar.command.TypeValidator; import de.steamwar.linkage.Linked; import org.bukkit.Bukkit; import org.bukkit.Location; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/PanzernResult.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/PanzernResult.java index 06db1e54..dfc4c41c 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/PanzernResult.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/PanzernResult.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.panzern; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/AdjacentHoney.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/AdjacentHoney.java index 7dd8accd..2e4eaa9d 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/AdjacentHoney.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/AdjacentHoney.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.panzern.algorithms; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/AdjacentSlime.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/AdjacentSlime.java index f25c55e4..cc45eda8 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/AdjacentSlime.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/AdjacentSlime.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.panzern.algorithms; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/CarpetWalkWay.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/CarpetWalkWay.java index 58529f2c..722b17a0 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/CarpetWalkWay.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/CarpetWalkWay.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.panzern.algorithms; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/LadderWalkWay.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/LadderWalkWay.java index 2a32bd7a..6f354c48 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/LadderWalkWay.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/LadderWalkWay.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.panzern.algorithms; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/PistonLine.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/PistonLine.java index 3fabd420..59fd2e02 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/PistonLine.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/PistonLine.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.panzern.algorithms; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/PowerableActivation.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/PowerableActivation.java index 41b7f69d..9466de5d 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/PowerableActivation.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/PowerableActivation.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.panzern.algorithms; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/SlabOnRedstone.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/SlabOnRedstone.java index 207f1d57..27af48a4 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/SlabOnRedstone.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/SlabOnRedstone.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.panzern.algorithms; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/SlabOnTorch.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/SlabOnTorch.java index beebb532..b7fbf516 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/SlabOnTorch.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/SlabOnTorch.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.panzern.algorithms; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/StairWalkWay.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/StairWalkWay.java index 1f631afe..a2facd2a 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/StairWalkWay.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/StairWalkWay.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.slaves.panzern.algorithms; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/SmartPlaceCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/SmartPlaceCommand.java index 526e59e6..4eac9b8f 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/SmartPlaceCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/SmartPlaceCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.smartplace; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/SmartPlaceListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/SmartPlaceListener.java index d2c8e683..bc3d2bb0 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/SmartPlaceListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/SmartPlaceListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/team/SkinCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/team/SkinCommand.java.txt similarity index 94% rename from BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/team/SkinCommand.java rename to BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/team/SkinCommand.java.txt index 8394691e..b97127b1 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/team/SkinCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/team/SkinCommand.java.txt @@ -19,11 +19,10 @@ package de.steamwar.bausystem.features.team; +import com.sk89q.worldedit.EditSession; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.features.team.boundary.BoundaryViewer; -import de.steamwar.bausystem.region.Prototype; import de.steamwar.bausystem.region.Region; -import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeMapper; @@ -69,14 +68,14 @@ public class SkinCommand extends SWCommand { return; } Region region = Region.getRegion(p.getLocation()); - if (region.isGlobal()) { + if (region.getType().isGlobal()) { BauSystem.MESSAGE.send("SKIN_NO_REGION", p); return; } String name = String.join(" ", names); File arenaFile = new File("sections19/" + name + "/" + typeKuerzel + "Arena.schem"); - File testblockFile = region.hasType(RegionType.TESTBLOCK) ? new File("sections19/" + name + "/" + typeKuerzel + "Testblock.schem") : null; + File testblockFile = !region.getTestblockArea().isEmpty() ? new File("sections19/" + name + "/" + typeKuerzel + "Testblock.schem") : null; arenaFile.getParentFile().mkdirs(); if (testblockFile != null) { @@ -91,9 +90,11 @@ public class SkinCommand extends SWCommand { return; } - Region.copy(region.getMinPoint(), region.getMaxPoint(), arenaFile); + EditSession editSession = region.getArea().copy(false); + // TODO: Save editSession to file if (testblockFile != null) { - Region.copy(region.getMinPointTestblock(), region.getMaxPointTestblock(), testblockFile); + editSession = region.getTestblockArea().copy(false); + // TODO: Save editSession to file } YAPIONObject yapionObject = new YAPIONObject(); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/team/boundary/BoundaryViewer.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/team/boundary/BoundaryViewer.java index 51bef65c..2c0d81b9 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/team/boundary/BoundaryViewer.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/team/boundary/BoundaryViewer.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.team.boundary; @@ -22,9 +22,7 @@ package de.steamwar.bausystem.features.team.boundary; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.region.Point; import de.steamwar.bausystem.region.Region; -import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.core.TrickyParticleWrapper; -import de.steamwar.core.TrickyTrialsWrapper; import de.steamwar.linkage.Linked; import org.bukkit.Bukkit; import org.bukkit.Particle; @@ -48,22 +46,19 @@ public class BoundaryViewer implements Listener { } viewers.forEach(player -> { Region region = Region.getRegion(player.getLocation()); - if (region.isGlobal()) return; + if (region.getType().isGlobal()) return; showRegion(region, player); - if (region.getLinkedRegion() != null) { - showRegion(region.getLinkedRegion(), player); - } }); }, 20, 20); } private void showRegion(Region region, Player player) { - drawCuboid(player, TrickyParticleWrapper.impl.getVillagerHappy(), region.getMinPoint(), region.getMaxPoint()); - if (region.hasType(RegionType.TESTBLOCK)) { - drawCuboid(player, Particle.END_ROD, region.getMinPointTestblockExtension(), region.getMaxPointTestblockExtension()); + drawCuboid(player, TrickyParticleWrapper.impl.getVillagerHappy(), region.getArea().getMinPoint(false), region.getArea().getMaxPoint(false)); + if (!region.getTestblockArea().isEmpty()) { + drawCuboid(player, Particle.END_ROD, region.getTestblockArea().getMinPoint(true), region.getTestblockArea().getMaxPoint(true)); } - if (region.hasType(RegionType.BUILD)) { - drawCuboid(player, Particle.END_ROD, region.getMinPointBuildExtension(), region.getMaxPointBuildExtension()); + if (!region.getBuildArea().isEmpty()) { + drawCuboid(player, Particle.END_ROD, region.getBuildArea().getMinPoint(true), region.getBuildArea().getMaxPoint(true)); } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/TechHiderCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/TechHiderCommand.java index 38725cf0..7cb18b50 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/TechHiderCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/TechHiderCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.techhider; @@ -34,16 +34,12 @@ import de.steamwar.linkage.LinkedInstance; import de.steamwar.techhider.TechHider; import net.md_5.bungee.api.ChatMessageType; import org.bukkit.Bukkit; -import org.bukkit.Material; import org.bukkit.command.CommandSender; -import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerQuitEvent; -import java.io.File; import java.util.*; import java.util.stream.Collectors; @@ -63,32 +59,22 @@ public class TechHiderCommand extends SWCommand implements Listener, ScoreboardE @Register(description = "TECHHIDER_HELP") public void toggleHider(@Validator Player player) { Region region = Region.getRegion(player.getLocation()); - if (region.isGlobal()) { + if (region.getType().isGlobal()) { BauSystem.MESSAGE.send("TECHHIDER_GLOBAL", player); return; } Optional techHider = techHiders.computeIfAbsent(region, rg -> { - File file = rg.gameModeConfig(); - if (file == null) { - return Optional.empty(); - } - - FileConfiguration config = YamlConfiguration.loadConfiguration(file); - if (!config.getBoolean("Techhider.Active", false)) { + if (!region.getGameModeConfig().Techhider.Active) { return Optional.empty(); } hidden.put(rg, new HashSet<>()); - String obfuscateWith = config.getString("Techhider.ObfuscateWith", "end_stone"); - Set hiddenBlocks = Collections.unmodifiableSet(new HashSet<>(config.getStringList("Techhider.HiddenBlocks"))); - Set hiddenBlockEntities = Collections.unmodifiableSet(new HashSet<>(config.getStringList("Techhider.HiddenBlockEntities"))); - - TechHider current = new TechHider((TechHider.LocationEvaluator) (p, cX, cY) -> { - if (rg.buildChunkOutside(cX, cY)) return true; + TechHider current = new TechHider((p, cX, cY) -> { + if (rg.getBuildArea().isChunkOutside(cX, cY)) return true; return !hidden.get(rg).contains(p); - }, Material.valueOf(obfuscateWith.toUpperCase()), hiddenBlocks.stream().map(String::toUpperCase).map(Material::valueOf).collect(Collectors.toSet()), hiddenBlockEntities); + }, region.getGameModeConfig().Techhider.ObfuscateWith, region.getGameModeConfig().Techhider.HiddenBlocks, region.getGameModeConfig().Techhider.HiddenBlockEntities); current.enable(); return Optional.of(current); @@ -105,7 +91,7 @@ public class TechHiderCommand extends SWCommand implements Listener, ScoreboardE hidden.get(region).add(player); BauSystem.MESSAGE.sendPrefixless("TECHHIDER_ON", player, ChatMessageType.ACTION_BAR); } - region.forEachChunk((x, z) -> { + region.getBuildArea().forEachChunk((x, z) -> { CraftbukkitWrapper.impl.sendChunk(player, x, z); }); } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCount.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCount.java index 84853b8c..06234b99 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCount.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCount.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.testblock.blockcounter; @@ -24,7 +24,6 @@ import de.steamwar.bausystem.features.tpslimit.TPSUtils; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.RegionUtils; import lombok.ToString; -import org.bukkit.Bukkit; import org.bukkit.block.Block; import org.bukkit.scheduler.BukkitTask; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCounter.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCounter.java index 8b0796b8..8cb56745 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCounter.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCounter.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.testblock.blockcounter; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCounterCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCounterCommand.java index a31cba2b..90b99526 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCounterCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCounterCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.testblock.blockcounter; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCounterListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCounterListener.java index 979e5fe3..c4f711d8 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCounterListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/blockcounter/BlockCounterListener.java @@ -1,27 +1,25 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.testblock.blockcounter; import de.steamwar.bausystem.region.Region; -import de.steamwar.bausystem.region.utils.RegionExtensionType; -import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.linkage.Linked; import org.bukkit.block.Block; import org.bukkit.event.EventHandler; @@ -37,11 +35,13 @@ public class BlockCounterListener implements Listener { @EventHandler public void onEntityExplode(EntityExplodeEvent event) { Region region = Region.getRegion(event.getLocation()); - if (region.isGlobal()) { + if (region.getType().isGlobal()) { return; } List blockList = event.blockList(); - blockList = blockList.stream().filter(block -> region.inRegion(block.getLocation(), RegionType.TESTBLOCK, RegionExtensionType.EXTENSION)).collect(Collectors.toList()); + blockList = blockList.stream() + .filter(block -> region.getTestblockArea().inRegion(block.getLocation(), true)) + .collect(Collectors.toList()); if (blockList.isEmpty()) { return; } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tntlistener/TLSCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tntlistener/TLSCommand.java new file mode 100644 index 00000000..355803dc --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tntlistener/TLSCommand.java @@ -0,0 +1,46 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.features.tntlistener; + +import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; +import de.steamwar.linkage.LinkedInstance; +import org.bukkit.entity.Player; + +@Linked +public class TLSCommand extends SWCommand { + + @LinkedInstance + private TLSListener listener; + + public TLSCommand() { + super("tntlistener", "tls"); + } + + @Register(value = "start", description = "TLS_START_HELP") + public void start(@Validator Player player) { + listener.startListening(player); + } + + @Register(value = "stop", description = "TLS_STOP_HELP") + public void stop(@Validator Player player) { + listener.stopListening(player); + } +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tntlistener/TLSListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tntlistener/TLSListener.java new file mode 100644 index 00000000..9b587d8f --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tntlistener/TLSListener.java @@ -0,0 +1,143 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.features.tntlistener; + +import de.steamwar.bausystem.BauSystem; +import de.steamwar.bausystem.features.tpslimit.TPSUtils; +import de.steamwar.bausystem.region.Region; +import de.steamwar.linkage.Linked; +import de.steamwar.linkage.LinkedInstance; +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; +import org.bukkit.entity.TNTPrimed; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.EntitySpawnEvent; +import org.bukkit.event.player.PlayerQuitEvent; + +import java.util.*; + +@Linked +public class TLSListener implements Listener { + + @LinkedInstance + private BauSystem bauSystem; + + private final Map> primedTNT = new HashMap<>(); + + private final Set regionSheduled = new HashSet<>(); + + private final Map regionReferenceTick = new HashMap<>(); + + private final Set listeningPlayers = new HashSet<>(); + + private boolean listening = false; + + //TODO: Make adjustable per region + private final long maxDelay = 120; + + @EventHandler(ignoreCancelled = true) + public void onTNTSpawn(EntitySpawnEvent event) { + if (!(event.getEntity() instanceof TNTPrimed tnt)) return; + if (!listening) return; + + Region eventRegion = Region.getRegion(event.getLocation()); + + // Add tnt to the list + primedTNT.computeIfAbsent(eventRegion, rg -> new ArrayList<>()).add(tnt); + + // Update the relativeTick + long currentTick = TPSUtils.currentRealTick.get(); + + long referenceTick = regionReferenceTick.getOrDefault(eventRegion, 0L); + if (currentTick - referenceTick > maxDelay) { + referenceTick = currentTick; + regionReferenceTick.put(eventRegion, referenceTick); + } + long relativeTick = currentTick - referenceTick; + + this.messageNextTick(eventRegion, relativeTick); + } + + public void messageNextTick(Region region, long relativeTick) { + /* + * Some TNT can be spawned so late in the gt, that they do not get processed, + * essentially lengthening their fuse by 1gt. To detect this, shedule the + * message at the start of the next (server side) gt. If the tnt got processed it has a + * Fuse of 79, else 80. + */ + + if (!regionSheduled.add(region)) { + return; + } + + Bukkit.getScheduler().runTaskLater(BauSystem.getInstance(), () -> messagePlayer(region, relativeTick), 1); + } + + private void messagePlayer(Region region, long relativeTick) { + + regionSheduled.remove(region); + + int primed80 = 0; + int primed79 = 0; + for (TNTPrimed tnt : primedTNT.getOrDefault(region, Collections.emptyList())) { + if (tnt.getFuseTicks() == 80) { + primed80++; + } else if (tnt.getFuseTicks() == 79) { + primed79++; + } + } + primedTNT.remove(region); + + /* + * Message the player, if there are tnt with Fuse 80 use special message + */ + for (Player p : listeningPlayers) { + if (region.getArea().inRegion(p.getLocation(), false)) { + if (primed80 > 0) { + BauSystem.MESSAGE.sendPrefixless("TLS_MESSAGE_80", p, relativeTick, primed79 + primed80, primed80); + } else { + BauSystem.MESSAGE.sendPrefixless("TLS_MESSAGE_79", p, relativeTick, primed79); + } + } + } + } + + @EventHandler + public void onPlayerQuit(PlayerQuitEvent event) { + stopListening(event.getPlayer()); + } + + public void startListening(Player player) { + listeningPlayers.add(player); + this.listening = true; + } + + public void stopListening(Player player) { + listeningPlayers.remove(player); + if (listeningPlayers.isEmpty()) { + this.listening = false; + } + } + + public boolean isActiveFor(Player player) { + return listeningPlayers.contains(player); + } +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tntlistener/TLSScoreboardElement.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tntlistener/TLSScoreboardElement.java new file mode 100644 index 00000000..0dec6609 --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tntlistener/TLSScoreboardElement.java @@ -0,0 +1,55 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.features.tntlistener; + +import de.steamwar.bausystem.BauSystem; +import de.steamwar.bausystem.Permission; +import de.steamwar.bausystem.region.Region; +import de.steamwar.bausystem.utils.ScoreboardElement; +import de.steamwar.linkage.Linked; +import de.steamwar.linkage.LinkedInstance; +import org.bukkit.entity.Player; + +@Linked +public class TLSScoreboardElement implements ScoreboardElement { + + @LinkedInstance + private TLSListener listener; + + @Override + public ScoreboardGroup getGroup() { + return ScoreboardGroup.OTHER; + } + + @Override + public int order() { + return 2; + } + + @Override + public String get(Region region, Player p) { + if (!Permission.BUILD.hasPermission(p)) return null; + if (listener.isActiveFor(p)) { + return BauSystem.MESSAGE.parse("TLS_SCOREBOARD_ELEMENT", p); + } else { + return null; + } + } +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSCommand.java index f3f4cc62..265b6800 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.tpslimit; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSSystem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSSystem.java index f84ab72e..9eafc09b 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSSystem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSSystem.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -22,8 +22,7 @@ package de.steamwar.bausystem.features.tpslimit; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.SWUtils; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; -import de.steamwar.bausystem.region.GlobalRegion; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.utils.ScoreboardElement; import de.steamwar.bausystem.utils.TickEndEvent; @@ -85,14 +84,14 @@ public class TPSSystem implements Listener { private void bossbar() { if ((TickManager.impl.isStepping() || TickManager.impl.isSprinting()) && TickManager.impl.getRemainingTicks() > 0) { Bukkit.getOnlinePlayers().forEach(player -> { - BauSystemBossbar bossbar = BossBarService.instance.get(player, GlobalRegion.getInstance(), "TickStep"); + BauSystemBossbar bossbar = BossBarService.instance.get(player, Region.getGlobalRegion(), "TickStep"); bossbar.setColor(BarColor.YELLOW); bossbar.setTitle(BauSystem.MESSAGE.parse("TICK_BOSSBAR", player, TickManager.impl.getDoneTicks(), TickManager.impl.getTotalTicks())); bossbar.setProgress(TickManager.impl.getDoneTicks() / (double) TickManager.impl.getTotalTicks()); }); } else { Bukkit.getOnlinePlayers().forEach(player -> { - BossBarService.instance.remove(player, GlobalRegion.getInstance(), "TickStep"); + BossBarService.instance.remove(player, Region.getGlobalRegion(), "TickStep"); }); } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSUtils.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSUtils.java index d920b5fa..1d972064 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSUtils.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSUtils.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.tpslimit; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TNTPoint.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TNTPoint.java index a33c52f0..53ac62fb 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TNTPoint.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TNTPoint.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -20,8 +20,6 @@ package de.steamwar.bausystem.features.tracer; import de.steamwar.bausystem.region.Region; -import de.steamwar.bausystem.region.utils.RegionExtensionType; -import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.core.Core; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -39,7 +37,7 @@ import java.util.Optional; */ @AllArgsConstructor(access = AccessLevel.PACKAGE) @Getter -public class TNTPoint{ +public class TNTPoint { /** * Unique number to identify records being of the same tnt */ @@ -99,7 +97,7 @@ public class TNTPoint{ * Constructor for object creation in trace recording */ protected TNTPoint(int tntId, TNTPrimed tnt, boolean explosion, boolean afterFirstExplosion, long ticksSinceStart, - List history, List destroyedBlocks) { + List history, List destroyedBlocks) { this.tntId = tntId; this.explosion = explosion; if (Core.getVersion() > 15) { @@ -117,12 +115,10 @@ public class TNTPoint{ boolean buildDestroy = false; boolean testblockDestroy = false; for (Block destroyedBlock : destroyedBlocks) { - if (Region.getRegion(destroyedBlock.getLocation()).inRegion(destroyedBlock.getLocation(), RegionType.BUILD, - RegionExtensionType.EXTENSION)) { + if (Region.getRegion(destroyedBlock.getLocation()).getBuildArea().inRegion(destroyedBlock.getLocation(), true)) { buildDestroy = true; } - if (Region.getRegion(destroyedBlock.getLocation()).inRegion(destroyedBlock.getLocation(), - RegionType.TESTBLOCK, RegionExtensionType.EXTENSION)) { + if (Region.getRegion(destroyedBlock.getLocation()).getTestblockArea().inRegion(destroyedBlock.getLocation(), true)) { testblockDestroy = true; } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/Trace.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/Trace.java index 2c7cf22c..15b19470 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/Trace.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/Trace.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java index 9fe03e06..cfe50f55 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceManager.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceManager.java index 060db33b..b0891a69 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceManager.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceManager.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -25,12 +25,10 @@ import de.steamwar.bausystem.features.tracer.rendering.dynamicflags.AtFlag; import de.steamwar.bausystem.features.tracer.rendering.dynamicflags.IsolateFlag; import de.steamwar.bausystem.region.Region; import de.steamwar.linkage.Linked; -import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerQuitEvent; -import org.bukkit.event.server.PluginEnableEvent; import java.io.File; import java.util.*; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecorder.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecorder.java index aef9f12c..c976fa14 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecorder.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecorder.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecordingWrapper.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecordingWrapper.java index 38cde80d..0f416915 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecordingWrapper.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecordingWrapper.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRepository.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRepository.java index 899ea5f1..f0efe32a 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRepository.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRepository.java @@ -1,6 +1,26 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.features.tracer; import de.steamwar.bausystem.region.Region; +import de.steamwar.bausystem.region.RegionSystem; import lombok.Cleanup; import lombok.SneakyThrows; import org.bukkit.Bukkit; @@ -17,7 +37,7 @@ public class TraceRepository { /** * Increment this when changing serialisation format */ - public static final int SERIALISATION_VERSION = 2; + public static final int SERIALISATION_VERSION = 3; public static final int WRITE_TICK_DATA = 0b00000001; public static final int EXPLOSION = 0b00000010; public static final int IN_WATER = 0b00000100; @@ -30,8 +50,19 @@ public class TraceRepository { public static Trace readTrace(File recordsFile) { @Cleanup ObjectInputStream reader = new ObjectInputStream(new GZIPInputStream(new FileInputStream(recordsFile))); - UUID uuid = UUID.fromString(reader.readUTF()); - Region region = Region.getREGION_MAP().get(reader.readUTF()); + UUID uuid; + try { + uuid = UUID.fromString(reader.readUTF()); + } catch (IllegalArgumentException e) { + return null; + } + Region region; + try { + region = RegionSystem.INSTANCE.getRegion(UUID.fromString(reader.readUTF())).orElse(null); + if (region == null) return null; + } catch (IllegalArgumentException e) { + return null; + } Date date = (Date) reader.readObject(); int serialisationVersion = reader.readInt(); if (serialisationVersion != SERIALISATION_VERSION) { @@ -46,7 +77,7 @@ public class TraceRepository { protected static void writeTrace(Trace trace, List records) { ObjectOutputStream outputStream = new ObjectOutputStream(new GZIPOutputStream(new FileOutputStream(trace.getRecordsSaveFile()))); outputStream.writeUTF(trace.getUuid().toString()); - outputStream.writeUTF(trace.getRegion().getName()); + outputStream.writeUTF(trace.getRegion().getID().toString()); outputStream.writeObject(trace.getDate()); outputStream.writeInt(SERIALISATION_VERSION); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceScoreboardElement.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceScoreboardElement.java index f7b20f8c..44fb4d63 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceScoreboardElement.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceScoreboardElement.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/BundleFilter.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/BundleFilter.java index 9380b3f8..1337f0b4 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/BundleFilter.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/BundleFilter.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/PlayerTraceShowData.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/PlayerTraceShowData.java index 4029f2e2..40bbb238 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/PlayerTraceShowData.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/PlayerTraceShowData.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/TraceEntity.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/TraceEntity.java index 75b893ab..6eea719d 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/TraceEntity.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/TraceEntity.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/ViewFlag.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/ViewFlag.java index 9aa83f13..3e1dff3e 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/ViewFlag.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/ViewFlag.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/dynamicflags/AtFlag.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/dynamicflags/AtFlag.java index 776eead4..2826ceec 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/dynamicflags/AtFlag.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/dynamicflags/AtFlag.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/dynamicflags/IsolateFlag.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/dynamicflags/IsolateFlag.java index 4ee99408..8c86fcaf 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/dynamicflags/IsolateFlag.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/dynamicflags/IsolateFlag.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/BindCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/BindCommand.java index 9a93977e..23443d88 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/BindCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/BindCommand.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.features.util; import com.sk89q.worldedit.EditSession; @@ -8,7 +27,6 @@ import com.sk89q.worldedit.extension.platform.Actor; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.SWUtils; -import de.steamwar.bausystem.features.script.ScriptCommand; import de.steamwar.bausystem.features.script.ScriptRunner; import de.steamwar.bausystem.features.world.WorldEditListener; import de.steamwar.bausystem.utils.WorldEditUtils; @@ -28,10 +46,12 @@ import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.persistence.PersistentDataType; -import org.luaj.vm2.LuaValue; import java.lang.reflect.Field; -import java.util.*; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; +import java.util.Objects; import java.util.logging.Level; import java.util.stream.Collectors; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/BookReplaceCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/BookReplaceCommand.java index c534e38d..b5cde0e3 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/BookReplaceCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/BookReplaceCommand.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.features.util; import de.steamwar.command.SWCommand; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/ClearCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/ClearCommand.java index 1df08e5d..af16422a 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/ClearCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/ClearCommand.java @@ -1,28 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.Permission; import de.steamwar.command.SWCommand; -import de.steamwar.command.TypeValidator; import de.steamwar.linkage.Linked; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/DebugStickCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/DebugStickCommand.java index 5b87464c..7b64f743 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/DebugStickCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/DebugStickCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/DeclutterCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/DeclutterCommand.java index 7d3f5938..8a613cb3 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/DeclutterCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/DeclutterCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/DragonEggCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/DragonEggCommand.java index b9cc7442..c6bde626 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/DragonEggCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/DragonEggCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/GamemodeCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/GamemodeCommand.java index 876586a2..9e3da950 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/GamemodeCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/GamemodeCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/KillAllCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/KillAllCommand.java index e08b40c0..0f84246f 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/KillAllCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/KillAllCommand.java @@ -1,32 +1,28 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.SWUtils; -import de.steamwar.bausystem.region.GlobalRegion; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.RegionUtils; -import de.steamwar.bausystem.region.utils.RegionExtensionType; -import de.steamwar.bausystem.region.utils.RegionSelectionType; -import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.command.SWCommand; import de.steamwar.linkage.Linked; import org.bukkit.Bukkit; @@ -53,7 +49,7 @@ public class KillAllCommand extends SWCommand { public void genericCommand(@Validator Player player, RegionSelectionType regionSelectionType) { Region region = Region.getRegion(player.getLocation()); AtomicLong count = new AtomicLong(0); - if (regionSelectionType == RegionSelectionType.GLOBAL || GlobalRegion.getInstance() == region) { + if (regionSelectionType == RegionSelectionType.GLOBAL || region.getType().isGlobal()) { WORLD.getEntities() .stream() .filter(e -> !(e instanceof Player)) @@ -66,7 +62,7 @@ public class KillAllCommand extends SWCommand { WORLD.getEntities() .stream() .filter(e -> !(e instanceof Player)) - .filter(e -> region.inRegion(e.getLocation(), RegionType.NORMAL, RegionExtensionType.NORMAL)) + .filter(e -> region.getArea().inRegion(e.getLocation(), false)) .forEach(entity -> { entity.remove(); count.incrementAndGet(); @@ -74,5 +70,4 @@ public class KillAllCommand extends SWCommand { RegionUtils.actionBar(region, "OTHER_KILLALL_REGION", count.get()); } } - } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/MaterialCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/MaterialCommand.java index 5993eeec..69b53897 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/MaterialCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/MaterialCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/MaterialLazyInit.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/MaterialLazyInit.java index 8beb38b1..f05e0de9 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/MaterialLazyInit.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/MaterialLazyInit.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/NightVisionCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/NightVisionCommand.java index 0308846d..2f884047 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/NightVisionCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/NightVisionCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/NoClipCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/NoClipCommand.java index 03055780..ad97dac0 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/NoClipCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/NoClipCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/PistonCalculator.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/PistonCalculator.java index 4479ff63..7ca9b730 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/PistonCalculator.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/PistonCalculator.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util; @@ -49,20 +49,26 @@ import java.util.stream.Collectors; @MinVersion(20) public class PistonCalculator implements Listener { - private final Map DEBOUNCE = new HashMap<>(); + private final Map debounce = new HashMap<>(); + protected final Set disablePistonCalculator = new HashSet<>(); @EventHandler public void onPlayerInteract(PlayerInteractEvent event) { if (!Permission.BUILD.hasPermission(event.getPlayer())) return; if (event.getAction() != Action.RIGHT_CLICK_BLOCK) return; - if (event.hasItem() && event.getItem().getType() == Material.SLIME_BALL) { - } else if (event.hasItem()) return; + if (event.getItem() == null) { + } else if (event.getItem() != null && event.getItem().getType() == Material.SLIME_BALL) { + } else if (!event.getItem().getType().isBlock()) { + debounce.put(event.getPlayer(), System.currentTimeMillis()); + return; + } else return; if (event.getClickedBlock() == null) return; Block clickedBlock = event.getClickedBlock(); Material blockType = clickedBlock.getType(); if (!(blockType == Material.PISTON || blockType == Material.STICKY_PISTON)) return; - if (System.currentTimeMillis() - DEBOUNCE.getOrDefault(event.getPlayer(), 0L) <= 200) return; - DEBOUNCE.put(event.getPlayer(), System.currentTimeMillis()); + if (disablePistonCalculator.contains(event.getPlayer())) return; + if (System.currentTimeMillis() - debounce.getOrDefault(event.getPlayer(), 0L) <= 200) return; + debounce.put(event.getPlayer(), System.currentTimeMillis()); Location location = event.getClickedBlock().getLocation(); if (pistOrders.containsKey(location)) { @@ -87,6 +93,7 @@ public class PistonCalculator implements Listener { @EventHandler public void onBlockPistonExtend(BlockPistonExtendEvent event) { + if (pistOrders.isEmpty()) return; Bukkit.getScheduler().runTaskLater(BauSystem.getInstance(), () -> { movePistOrders(event.getDirection(), event.getBlocks()); pistOrders.values().forEach(PistOrder::calculate); @@ -95,6 +102,7 @@ public class PistonCalculator implements Listener { @EventHandler public void onBlockPistonRetract(BlockPistonRetractEvent event) { + if (pistOrders.isEmpty()) return; Bukkit.getScheduler().runTaskLater(BauSystem.getInstance(), () -> { movePistOrders(event.getDirection(), event.getBlocks()); pistOrders.values().forEach(PistOrder::calculate); @@ -117,6 +125,7 @@ public class PistonCalculator implements Listener { @EventHandler public void onBlockPlace(BlockPlaceEvent event) { + if (pistOrders.isEmpty()) return; Bukkit.getScheduler().runTaskLater(BauSystem.getInstance(), () -> { pistOrders.values().forEach(PistOrder::calculate); }, 1); @@ -124,6 +133,7 @@ public class PistonCalculator implements Listener { @EventHandler public void onBlockBreak(BlockBreakEvent event) { + if (pistOrders.isEmpty()) return; if (pistOrders.containsKey(event.getBlock().getLocation())) { PistOrder pistOrder = pistOrders.remove(event.getBlock().getLocation()); pistOrder.server.close(); @@ -135,11 +145,14 @@ public class PistonCalculator implements Listener { @EventHandler public void onPlayerQuit(PlayerQuitEvent event) { - DEBOUNCE.remove(event.getPlayer()); + debounce.remove(event.getPlayer()); + disablePistonCalculator.remove(event.getPlayer()); + } + public void clear(Player player) { Set toRemove = new HashSet<>(); pistOrders.forEach((location, pistOrder) -> { - pistOrder.server.removePlayer(event.getPlayer()); + pistOrder.server.removePlayer(player); if (pistOrder.server.getPlayers().isEmpty()) { toRemove.add(location); pistOrder.server.close(); @@ -217,6 +230,29 @@ public class PistonCalculator implements Listener { Block block = current.getRelative(face); if (block.getType().isAir()) continue; if (isImmovable(block) || block.getPistonMoveReaction() == PistonMoveReaction.BREAK) continue; + if (face != direction || face == direction.getOppositeFace()) { + switch (block.getType()) { + case BLACK_GLAZED_TERRACOTTA: + case GRAY_GLAZED_TERRACOTTA: + case BLUE_GLAZED_TERRACOTTA: + case BROWN_GLAZED_TERRACOTTA: + case CYAN_GLAZED_TERRACOTTA: + case GREEN_GLAZED_TERRACOTTA: + case LIGHT_BLUE_GLAZED_TERRACOTTA: + case LIGHT_GRAY_GLAZED_TERRACOTTA: + case LIME_GLAZED_TERRACOTTA: + case MAGENTA_GLAZED_TERRACOTTA: + case ORANGE_GLAZED_TERRACOTTA: + case PINK_GLAZED_TERRACOTTA: + case PURPLE_GLAZED_TERRACOTTA: + case RED_GLAZED_TERRACOTTA: + case WHITE_GLAZED_TERRACOTTA: + case YELLOW_GLAZED_TERRACOTTA: + continue; + default: + break; + } + } if (block.getType() != oppositeType) { if (!movedBlocks.contains(block.getLocation())) toCalc.add(block); calcDirection(null, origin, block, null, facing, direction, toCalc); @@ -248,7 +284,8 @@ public class PistonCalculator implements Listener { immovableBlocks.add(block.getLocation()); return; } - if (facing != direction && (block.equals(origin) || block.getRelative(facing.getOppositeFace()).equals(origin))) return; + if (facing != direction && (block.equals(origin) || block.getRelative(facing.getOppositeFace()).equals(origin))) + return; if (!movedBlocks.contains(block.getLocation())) toCalc.add(block); } } @@ -344,12 +381,4 @@ public class PistonCalculator implements Listener { return false; } } - - private boolean isPiston(Block block) { - BlockData blockData = block.getBlockData(); - if (blockData instanceof Piston) { - return !((Piston) blockData).isExtended(); - } - return false; - } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/PistonCalculatorCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/PistonCalculatorCommand.java index 510c6050..cd8c6ff6 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/PistonCalculatorCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/PistonCalculatorCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util; @@ -22,21 +22,46 @@ package de.steamwar.bausystem.features.util; import de.steamwar.bausystem.BauSystem; import de.steamwar.command.SWCommand; import de.steamwar.linkage.Linked; +import de.steamwar.linkage.LinkedInstance; import de.steamwar.linkage.MinVersion; import org.bukkit.entity.Player; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + @Linked @MinVersion(20) public class PistonCalculatorCommand extends SWCommand { + @LinkedInstance + public PistonCalculator pistonCalculator; + + private final Set helpMessageShowed = new HashSet<>(); + public PistonCalculatorCommand() { super("piston", "pistoncalculator", "pistoncalc"); } @Register - public void help(@Validator Player player) { - BauSystem.MESSAGE.send("PISTON_HELP_1", player); - BauSystem.MESSAGE.send("PISTON_HELP_2", player); - BauSystem.MESSAGE.send("PISTON_HELP_3", player); + public void genericCommand(@Validator Player player) { + if (pistonCalculator.disablePistonCalculator.contains(player)) { + pistonCalculator.disablePistonCalculator.remove(player); + if (!helpMessageShowed.contains(player.getUniqueId())) { + BauSystem.MESSAGE.send("PISTON_HELP_1", player); + BauSystem.MESSAGE.send("PISTON_HELP_2", player); + BauSystem.MESSAGE.send("PISTON_HELP_3", player); + helpMessageShowed.add(player.getUniqueId()); + } + BauSystem.MESSAGE.send("PISTON_ENABLED", player); + } else { + pistonCalculator.disablePistonCalculator.add(player); + BauSystem.MESSAGE.send("PISTON_DISABLED", player); + } + } + + @Register("clear") + public void clearCommand(@Validator Player player) { + pistonCalculator.clear(player); } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/RegionSelectionType.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/RegionSelectionType.java new file mode 100644 index 00000000..93d4f089 --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/RegionSelectionType.java @@ -0,0 +1,26 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.features.util; + +public enum RegionSelectionType { + LOCAL, + GLOBAL, + ; +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SelectCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SelectCommand.java index e9c2c09a..c4437aca 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SelectCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SelectCommand.java @@ -1,14 +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 . + */ + package de.steamwar.bausystem.features.util; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.region.Point; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.utils.RegionExtensionType; import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.bausystem.utils.FlatteningWrapper; import de.steamwar.command.SWCommand; -import de.steamwar.command.TypeValidator; import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; @@ -23,19 +40,15 @@ public class SelectCommand extends SWCommand { public void baurahmenCommand(@Validator Player p, RegionType regionType, @OptionalValue("NORMAL") RegionExtensionType regionExtensionType) { Region region = Region.getRegion(p.getLocation()); - if (region.isGlobal()) { + if (region.getType().isGlobal()) { BauSystem.MESSAGE.send("SELECT_GLOBAL_REGION", p); return; } - if (!region.hasType(regionType)) { + if (!regionType.getHasType().test(region)) { BauSystem.MESSAGE.send("SELECT_NO_TYPE", p, BauSystem.MESSAGE.parse(regionType.getChatValue(), p)); return; } - if (regionExtensionType == RegionExtensionType.EXTENSION && !region.hasExtensionType(regionType)) { - BauSystem.MESSAGE.send("SELECT_NO_EXTENSION", p); - return; - } setSelection(regionType, regionExtensionType, region, p); } @@ -46,8 +59,8 @@ public class SelectCommand extends SWCommand { } private void setSelection(RegionType regionType, RegionExtensionType regionExtensionType, Region region, Player p) { - Point minPoint = region.getMinPoint(regionType, regionExtensionType); - Point maxPoint = region.getMaxPoint(regionType, regionExtensionType); + Point minPoint = regionType.getToMinPoint().apply(region, regionExtensionType.isExtension()); + Point maxPoint = regionType.getToMaxPoint().apply(region, regionExtensionType.isExtension()); FlatteningWrapper.impl.setSelection(p, minPoint, maxPoint); BauSystem.MESSAGE.send("SELECT_MESSAGE", p, minPoint.getX(), minPoint.getY(), minPoint.getZ(), maxPoint.getX(), maxPoint.getY(), maxPoint.getZ()); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SkullCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SkullCommand.java index e7da48d1..49686d87 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SkullCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SkullCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SlotCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SlotCommand.java index 37ff3b89..13799bcf 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SlotCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SlotCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java index c8a6d2de..f756197a 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/StructureVoidCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/StructureVoidCommand.java index 44bae130..ffa9a90a 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/StructureVoidCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/StructureVoidCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/TNTClickListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/TNTClickListener.java index f412b8ad..801646d2 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/TNTClickListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/TNTClickListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/TeleportCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/TeleportCommand.java index e778ba78..7d78cae6 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/TeleportCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/TeleportCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/TimeCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/TimeCommand.java index 249f4072..94c25a92 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/TimeCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/TimeCommand.java @@ -1,27 +1,28 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.Permission; -import de.steamwar.command.*; +import de.steamwar.command.SWCommand; +import de.steamwar.command.SWCommandUtils; +import de.steamwar.command.TypeMapper; import de.steamwar.linkage.Linked; import org.bukkit.Bukkit; import org.bukkit.entity.Player; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/ClearBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/ClearBauGuiItem.java index 607b7398..df863b57 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/ClearBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/ClearBauGuiItem.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; import org.bukkit.Material; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DebugstickBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DebugstickBauGuiItem.java index c6341818..1d8d6d82 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DebugstickBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DebugstickBauGuiItem.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; import org.bukkit.Material; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DeclutterBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DeclutterBauGuiItem.java index 55bd6a02..52b0c19b 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DeclutterBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DeclutterBauGuiItem.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util.items; @@ -22,7 +22,7 @@ package de.steamwar.bausystem.features.util.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.features.util.DeclutterCommand; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; import de.steamwar.linkage.LinkedInstance; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/GamemodeBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/GamemodeBauGuiItem.java index 42900af8..bc5828cd 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/GamemodeBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/GamemodeBauGuiItem.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; import org.bukkit.GameMode; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/KillAllBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/KillAllBauGuiItem.java index a5f76346..72e72713 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/KillAllBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/KillAllBauGuiItem.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util.items; @@ -22,8 +22,8 @@ package de.steamwar.bausystem.features.util.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.features.util.KillAllCommand; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; -import de.steamwar.bausystem.region.utils.RegionSelectionType; +import de.steamwar.bausystem.linkage.BauGuiItem; +import de.steamwar.bausystem.features.util.RegionSelectionType; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; import de.steamwar.linkage.LinkedInstance; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NavWandBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NavWandBauGuiItem.java index 6b9b6775..e81de542 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NavWandBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NavWandBauGuiItem.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; import org.bukkit.Material; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NightVisionBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NightVisionBauGuiItem.java index 03ebb495..296c028f 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NightVisionBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NightVisionBauGuiItem.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util.items; @@ -22,13 +22,12 @@ package de.steamwar.bausystem.features.util.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.SWUtils; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.event.inventory.ClickType; -import org.bukkit.inventory.ItemFlag; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.PotionMeta; import org.bukkit.potion.PotionEffectType; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SchemBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SchemBauGuiItem.java index 027d6c9c..84b4537e 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SchemBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SchemBauGuiItem.java @@ -1,8 +1,27 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.features.util.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; import org.bukkit.Material; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java index b0feb305..78669a8d 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.bausystem.region.utils.RegionExtensionType; import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.inventory.SWInventory; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SkullBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SkullBauGuiItem.java index c7e500db..977c1003 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SkullBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SkullBauGuiItem.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.inventory.SWAnvilInv; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SpeedBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SpeedBauGuiItem.java index d24eedf6..9f563361 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SpeedBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SpeedBauGuiItem.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.inventory.SWAnvilInv; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/TeleportBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/TeleportBauGuiItem.java index 4569ae47..7a8cf38f 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/TeleportBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/TeleportBauGuiItem.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.inventory.SWItem; import de.steamwar.inventory.SWListInv; import de.steamwar.linkage.Linked; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/WorldEditBauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/WorldEditBauGuiItem.java index 9ef2400f..ac2e73b6 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/WorldEditBauGuiItem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/WorldEditBauGuiItem.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.util.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.inventory.SWItem; import de.steamwar.linkage.Linked; import org.bukkit.Material; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/warp/Warp.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/warp/Warp.java index a1392917..696dac81 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/warp/Warp.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/warp/Warp.java @@ -1,26 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.warp; +import de.steamwar.bausystem.region.RegionSystem; import de.steamwar.bausystem.worlddata.WorldData; -import de.steamwar.core.Core; import lombok.Getter; import org.bukkit.*; import org.bukkit.entity.Player; @@ -36,7 +36,7 @@ public class Warp { public static void enable() { Warp worldSpawn = new Warp("WorldSpawn"); - worldSpawn.setLocation(Bukkit.getWorlds().get(0).getSpawnLocation().clone().add(0.5, Core.getVersion() >= 20 ? 124 : 1, 0.5)); + worldSpawn.setLocation(RegionSystem.INSTANCE.getWorldSpawn()); worldSpawn.setMat(Material.NETHER_STAR); warpMap.put("WorldSpawn", worldSpawn); } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpCommand.java index aad07fcb..e20a70b7 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpCommand.java @@ -1,32 +1,30 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.warp; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.utils.ListChatView; import de.steamwar.bausystem.worlddata.WorldData; import de.steamwar.command.SWCommand; import de.steamwar.command.SWCommandUtils; import de.steamwar.command.TypeMapper; -import de.steamwar.command.TypeValidator; import de.steamwar.linkage.Linked; import de.steamwar.linkage.api.Disable; import de.steamwar.linkage.api.Enable; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpGui.java index 30fd21e3..c57cc16c 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpGui.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.warp; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpListener.java index 8940b1ee..60121c90 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.warp; @@ -91,11 +91,11 @@ public class WarpListener implements Listener { locations.put(warp.getName(), warp.getLocation()); }); Region region = Region.getRegion(p.getLocation()); - if (region.getCopyPoint() != null) { - locations.put("Copy", region.getCopyPoint().toLocation(p).add(0.5, 0, 0.5)); + if (!region.getBuildArea().isEmpty()) { + locations.put("Copy", region.getBuildArea().getCopyPoint().toLocation(p).add(0.5, 0, 0.5)); } - if (region.getTestBlockPoint() != null) { - locations.put("TestBlock", region.getTestBlockPoint().toLocation(p).add(0.5, 0, 0.5)); + if (!region.getTestblockArea().isEmpty()) { + locations.put("TestBlock", region.getTestblockArea().getCopyPoint().toLocation(p).add(0.5, 0, 0.5)); } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AFKStopperListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AFKStopperListener.java index 60a9651b..9af6e1a8 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AFKStopperListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AFKStopperListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.world; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AntiBauAddMemberFix.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AntiBauAddMemberFix.java index 32888912..c8c40cba 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AntiBauAddMemberFix.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AntiBauAddMemberFix.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AntiCursorReCentering.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AntiCursorReCentering.java index 46206a6c..c526d089 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AntiCursorReCentering.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AntiCursorReCentering.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/ArceonCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/ArceonCommand.java index ddddaaa2..9c470cf4 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/ArceonCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/ArceonCommand.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AxiomPermissionCheck.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AxiomPermissionCheck.java index 587c8d59..92c496bc 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AxiomPermissionCheck.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AxiomPermissionCheck.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauLockStateScoreboard.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauLockStateScoreboard.java index 3e159311..147c3c85 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauLockStateScoreboard.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauLockStateScoreboard.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -23,15 +23,40 @@ import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.config.BauServer; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.utils.ScoreboardElement; +import de.steamwar.core.CRIUWakeupEvent; +import de.steamwar.data.BauLockState; import de.steamwar.linkage.Linked; +import de.steamwar.network.packets.PacketHandler; +import de.steamwar.network.packets.server.BaulockUpdatePacket; import de.steamwar.sql.UserConfig; +import lombok.Getter; import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; @Linked -public class BauLockStateScoreboard implements ScoreboardElement { +public class BauLockStateScoreboard extends PacketHandler implements ScoreboardElement, Listener { private static final String BAU_LOCK_CONFIG_NAME = "baulockstate"; + @Getter + private BauLockState lockState = loadLockState(); + + private BauLockState loadLockState() { + String state = UserConfig.getConfig(BauServer.getInstance().getOwner(), BAU_LOCK_CONFIG_NAME); + return state == null ? BauLockState.OPEN : BauLockState.valueOf(state); + } + + @Handler + public void handleBaulockUpdatePacket(BaulockUpdatePacket packet) { + lockState = loadLockState(); + } + + @EventHandler + public void onCRIUWakeup(CRIUWakeupEvent event) { + lockState = loadLockState(); + } + @Override public ScoreboardGroup getGroup() { return ScoreboardGroup.FOOTER; @@ -47,23 +72,11 @@ public class BauLockStateScoreboard implements ScoreboardElement { if (!BauServer.getInstance().getOwner().equals(p.getUniqueId())) { return null; } - String state = UserConfig.getConfig(p.getUniqueId(), BAU_LOCK_CONFIG_NAME); - switch (state == null ? BauLockState.OPEN : BauLockState.valueOf(state)) { + switch (lockState) { case OPEN: return null; default: - return "§e" + BauSystem.MESSAGE.parse("SCOREBOARD_LOCK_" + state.toUpperCase(), p); + return "§e" + BauSystem.MESSAGE.parse("SCOREBOARD_LOCK_" + lockState.name(), p); } } - - public enum BauLockState { - - NOBODY, - SUPERVISOR, - SERVERTEAM, - TEAM_AND_SERVERTEAM, - TEAM, - OPEN - } - } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauMemberUpdate.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauMemberUpdate.java index d5aa97d5..a60e2958 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauMemberUpdate.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauMemberUpdate.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -21,7 +21,7 @@ package de.steamwar.bausystem.features.world; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.region.GlobalRegion; +import de.steamwar.bausystem.region.RegionSystem; import de.steamwar.bausystem.utils.BauMemberUpdateEvent; import de.steamwar.bausystem.utils.bossbar.BauSystemBossbar; import de.steamwar.bausystem.utils.bossbar.BossBarService; @@ -75,7 +75,7 @@ public class BauMemberUpdate extends PacketHandler implements Listener { SPECTATORS.remove(player); newBuilder.add(player); player.removePotionEffect(PotionEffectType.GLOWING); - BossBarService.instance.remove(player, GlobalRegion.getInstance(), "spectator"); + BossBarService.instance.remove(player, RegionSystem.INSTANCE.getGlobalRegion(), "spectator"); } } }); @@ -94,7 +94,7 @@ public class BauMemberUpdate extends PacketHandler implements Listener { } private static void showSpectatorNotice(Player player) { - BauSystemBossbar bossbar = BossBarService.instance.get(player, GlobalRegion.getInstance(), "spectator"); + BauSystemBossbar bossbar = BossBarService.instance.get(player, RegionSystem.INSTANCE.getGlobalRegion(), "spectator"); bossbar.setTitle(BauSystem.MESSAGE.parse("SPECTATOR", player)); bossbar.setColor(BarColor.WHITE); bossbar.setStyle(BarStyle.SOLID); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauScoreboard.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauScoreboard.java index 5bd1e06d..2993536b 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauScoreboard.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauScoreboard.java @@ -1,8 +1,26 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.features.world; -import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.region.GlobalRegion; import de.steamwar.bausystem.region.Region; +import de.steamwar.bausystem.region.flags.ColorMode; import de.steamwar.bausystem.region.flags.Flag; import de.steamwar.bausystem.utils.ScoreboardElement; import de.steamwar.linkage.Linked; @@ -101,8 +119,11 @@ public class BauScoreboard implements Listener { @Override public String getTitle() { Region region = Region.getRegion(player.getLocation()); - if (GlobalRegion.getInstance() == region) return "§eSteam§8War"; - String colorCode = BauSystem.MESSAGE.parse(region.get(Flag.COLOR).getChatValue(), player).substring(0, 2); + if (region.getType().isGlobal()) return "§eSteam§8War"; + String colorCode = "§e"; + if (region.getFlags().has(Flag.COLOR).isReadable()) { + colorCode = "§" + region.getFlags().get(Flag.COLOR).orElse(ColorMode.PINK).getColorCode(); + } return colorCode + "■ §eSteam§8War " + colorCode + "■"; // ■ } }); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/ClipboardListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/ClipboardListener.java index 2cb2cc7b..d3647e4e 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/ClipboardListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/ClipboardListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.world; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/InventoryListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/InventoryListener.java index 6970eed7..edc9f9c2 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/InventoryListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/InventoryListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.world; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/ItemFrameListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/ItemFrameListener.java index 535551ab..2f764dd2 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/ItemFrameListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/ItemFrameListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.world; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/KickallCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/KickallCommand.java index d4e5d3f7..e9f21df5 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/KickallCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/KickallCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.world; @@ -22,7 +22,6 @@ package de.steamwar.bausystem.features.world; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.config.BauServer; import de.steamwar.command.SWCommand; -import de.steamwar.command.TypeValidator; import de.steamwar.linkage.Linked; import de.steamwar.linkage.LinkedInstance; import org.bukkit.Bukkit; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/NoCreativeKnockback.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/NoCreativeKnockback.java index be950c60..602903eb 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/NoCreativeKnockback.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/NoCreativeKnockback.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.world; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/OtherTNTListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/OtherTNTListener.java index 7cf94fc1..4deb1e5d 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/OtherTNTListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/OtherTNTListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.world; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/ReducedDebugInfo.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/ReducedDebugInfo.java index c3def14b..0827a485 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/ReducedDebugInfo.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/ReducedDebugInfo.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.world; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/RestartCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/RestartCommand.java index cf868a9d..f1a9a395 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/RestartCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/RestartCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.world; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SignEditFrom20.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SignEditFrom20.java index df4164aa..6adb98f5 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SignEditFrom20.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SignEditFrom20.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SignEditUntil19.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SignEditUntil19.java index 94b78f84..96ca0df8 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SignEditUntil19.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SignEditUntil19.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.world; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SignListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SignListener.java index 40ad9a66..3a625870 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SignListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SignListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.world; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SpectatorListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SpectatorListener.java index f1aed39f..9874c1fd 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SpectatorListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SpectatorListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/StopCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/StopCommand.java index 68f618db..76a4253d 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/StopCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/StopCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.world; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/WorldEditListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/WorldEditListener.java index a377db87..26943331 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/WorldEditListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/WorldEditListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.world; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/WorldEditSelectionSaver.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/WorldEditSelectionSaver.java index 1d989226..e9da8ef6 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/WorldEditSelectionSaver.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/WorldEditSelectionSaver.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -32,7 +32,6 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; -import org.checkerframework.checker.units.qual.min; import java.io.*; import java.util.List; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/ColorReplaceCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/ColorReplaceCommand.java index 6b6659ba..c338f984 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/ColorReplaceCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/ColorReplaceCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.worldedit; @@ -28,7 +28,7 @@ import com.sk89q.worldedit.util.formatting.text.TextComponent; import com.sk89q.worldedit.util.formatting.text.TranslatableComponent; import de.steamwar.bausystem.features.world.WorldEditListener; import de.steamwar.bausystem.features.worldedit.utils.SpecialReplace; -import de.steamwar.bausystem.region.Color; +import de.steamwar.bausystem.region.flags.ColorMode; import de.steamwar.bausystem.shared.Pair; import de.steamwar.bausystem.utils.WorldEditUtils; import de.steamwar.command.PreviousArguments; @@ -63,7 +63,7 @@ public class ColorReplaceCommand extends SWCommand { @Register(description = "COLORREPLACE_HELP") @SneakyThrows - public void genericCommand(@Validator Player player, Pair from, Color to) { + public void genericCommand(@Validator Player player, Pair from, ColorMode to) { if (from.getValue() == to) { BukkitAdapter.adapt(player).printInfo(TranslatableComponent.of("worldedit.replace.replaced", new Component[]{TextComponent.of(0)})); return; @@ -89,23 +89,23 @@ public class ColorReplaceCommand extends SWCommand { } @ClassMapper(value = Pair.class, local = true) - public TypeMapper> typeMapper() { - return new TypeMapper>() { + public TypeMapper> typeMapper() { + return new TypeMapper>() { @Override - public Pair map(CommandSender commandSender, PreviousArguments previousArguments, String s) { + public Pair map(CommandSender commandSender, PreviousArguments previousArguments, String s) { if (s.contains("%")) { String[] split = s.split("%"); if (split.length != 2) { return null; } - Color color = Color.valueOf(split[1].toUpperCase()); + ColorMode color = ColorMode.valueOf(split[1].toUpperCase()); try { return new Pair<>(Integer.parseInt(split[0]), color); } catch (NumberFormatException e) { return null; } } - return new Pair<>(100, Color.valueOf(s.toUpperCase())); + return new Pair<>(100, ColorMode.valueOf(s.toUpperCase())); } @Override @@ -113,12 +113,12 @@ public class ColorReplaceCommand extends SWCommand { if (s.matches("[0-9].*")) { if (s.contains("%")) { String sub = s.substring(0, s.indexOf("%") + 1); - return Arrays.stream(Color.values()).map(Color::name).map(t -> sub + t.toLowerCase()).collect(Collectors.toSet()); + return Arrays.stream(ColorMode.values()).map(ColorMode::name).map(t -> sub + t.toLowerCase()).collect(Collectors.toSet()); } else { return Arrays.asList(s); } } else { - return Arrays.stream(Color.values()).map(Color::name).map(String::toLowerCase).collect(Collectors.toSet()); + return Arrays.stream(ColorMode.values()).map(ColorMode::name).map(String::toLowerCase).collect(Collectors.toSet()); } } }; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/SelectAdjacent.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/SelectAdjacent.java index 9afcd59e..518ca00c 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/SelectAdjacent.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/SelectAdjacent.java @@ -1,26 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.worldedit; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.region.Point; +import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.utils.FlatteningWrapper; import de.steamwar.core.WorldEditRenderer; import de.steamwar.linkage.Linked; @@ -76,10 +77,10 @@ public class SelectAdjacent implements Listener { public void onPlayerInteract(PlayerInteractEvent event) { if (!event.hasItem()) return; if (event.getItem().getType() != Material.WOODEN_AXE) return; - if (!event.getPlayer().isSneaking()) return; - if (event.getAction() != Action.LEFT_CLICK_BLOCK) return; Selector selector = selectors.get(event.getPlayer()); if (selector != null) selector.cancel(); + if (!event.getPlayer().isSneaking()) return; + if (event.getAction() != Action.LEFT_CLICK_BLOCK) return; Material material = event.getPlayer().getInventory().getItemInOffHand().getType(); if (material.isAir()) { selector = new Selector(event.getClickedBlock(), event.getPlayer(), __ -> true); @@ -97,7 +98,7 @@ public class SelectAdjacent implements Listener { private class Selector { - private static final int MAX_BLOCKS = 1_000_000; + private static final int MAX_BLOCKS = 500_000; private int minX; private int minY; @@ -111,6 +112,8 @@ public class SelectAdjacent implements Listener { private Set seen = new HashSet<>(); private Set toCalc = new HashSet<>(); + private Region.Area area; + public Selector(Block block, Player player, Predicate predicate) { this.predicate = predicate; toCalc.add(block.getLocation()); @@ -121,6 +124,16 @@ public class SelectAdjacent implements Listener { maxY = block.getY(); maxZ = block.getZ(); + Region region = Region.getRegion(block.getLocation()); + area = Region.Area.EMPTY; + if (region.getBuildArea().inRegion(block.getLocation(), true)) { + area = region.getBuildArea(); + } else if (region.getTestblockArea().inRegion(block.getLocation(), true)) { + area = region.getTestblockArea(); + } else if (region.getArea().inRegion(block.getLocation(), true)) { + area = region.getArea(); + } + bukkitTask = Bukkit.getScheduler().runTaskTimer(BauSystem.getInstance(), () -> { run(); @@ -158,6 +171,7 @@ public class SelectAdjacent implements Listener { if (block.isEmpty() || block.isLiquid()) continue; if (!predicate.test(block.getType())) continue; seen.add(location); + if (!area.inRegion(block.getLocation(), true)) continue; minX = Math.min(minX, location.getBlockX()); maxX = Math.max(maxX, location.getBlockX()); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/TypeReplaceCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/TypeReplaceCommand.java index 8013c92b..ec8f4d5f 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/TypeReplaceCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/TypeReplaceCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.worldedit; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/above/AboveMask.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/above/AboveMask.java index 34a5a4c1..8ab2802e 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/above/AboveMask.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/above/AboveMask.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.worldedit.mask.above; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/above/FAWEAboveMaskParser.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/above/FAWEAboveMaskParser.java index 58130f47..f55afce8 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/above/FAWEAboveMaskParser.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/above/FAWEAboveMaskParser.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.worldedit.mask.above; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/below/BelowMask.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/below/BelowMask.java index 7407b51a..c5f699d4 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/below/BelowMask.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/below/BelowMask.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.worldedit.mask.below; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/below/FAWEBelowMaskParser.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/below/FAWEBelowMaskParser.java index 449db3bf..613e3e61 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/below/FAWEBelowMaskParser.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/below/FAWEBelowMaskParser.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.worldedit.mask.below; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/Checkerboard3DMask.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/Checkerboard3DMask.java index cc52b9cc..9846d448 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/Checkerboard3DMask.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/Checkerboard3DMask.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.worldedit.mask.checkerboard3d; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/FAWECheckerboard3DMaskParser.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/FAWECheckerboard3DMaskParser.java index 84cd46c6..6ae6958b 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/FAWECheckerboard3DMaskParser.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/FAWECheckerboard3DMaskParser.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.worldedit.mask.checkerboard3d; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/FAWECheckerboardMaskParser.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/FAWECheckerboardMaskParser.java index 3036ba8e..4b97b918 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/FAWECheckerboardMaskParser.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/FAWECheckerboardMaskParser.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.worldedit.mask.checkerboard3d; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/grid/FAWEGridMaskParser.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/grid/FAWEGridMaskParser.java index 85a01162..773dc5ab 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/grid/FAWEGridMaskParser.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/grid/FAWEGridMaskParser.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.worldedit.mask.grid; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/grid/GridMask.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/grid/GridMask.java index 4e6570ec..f172eecf 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/grid/GridMask.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/grid/GridMask.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.worldedit.mask.grid; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/pattern/gradient/FAWEGradientPatternParser.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/pattern/gradient/FAWEGradientPatternParser.java index d8065658..7794a2de 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/pattern/gradient/FAWEGradientPatternParser.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/pattern/gradient/FAWEGradientPatternParser.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.worldedit.pattern.gradient; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/pattern/gradient/GradientPattern.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/pattern/gradient/GradientPattern.java index c712cf38..553cd155 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/pattern/gradient/GradientPattern.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/pattern/gradient/GradientPattern.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.worldedit.pattern.gradient; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/FAWEMaskParser.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/FAWEMaskParser.java index 1a2f54ee..f6bf70c7 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/FAWEMaskParser.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/FAWEMaskParser.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.worldedit.utils; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/FAWEPatternParser.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/FAWEPatternParser.java index 9894933c..7851ceaa 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/FAWEPatternParser.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/FAWEPatternParser.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.worldedit.utils; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/SpecialReplace.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/SpecialReplace.java index e665d1af..489ccbfe 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/SpecialReplace.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/SpecialReplace.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.worldedit.utils; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/xray/XrayCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/xray/XrayCommand.java index cad5b633..babd0d88 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/xray/XrayCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/xray/XrayCommand.java @@ -1,26 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.features.xray; -import de.steamwar.Reflection; import com.comphenix.tinyprotocol.TinyProtocol; +import de.steamwar.Reflection; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.features.techhider.TechHiderCommand; import de.steamwar.bausystem.region.Region; @@ -34,8 +34,6 @@ import de.steamwar.techhider.TechHider; import net.md_5.bungee.api.ChatMessageType; import org.bukkit.Bukkit; import org.bukkit.Material; -import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; @@ -43,7 +41,6 @@ import org.bukkit.event.block.Action; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerQuitEvent; -import java.io.File; import java.util.*; import java.util.function.BiFunction; @@ -64,30 +61,20 @@ public class XrayCommand extends SWCommand implements Listener, ScoreboardElemen @Register(description = "XRAY_HELP") public void toggleHider(@Validator Player player) { Region region = Region.getRegion(player.getLocation()); - if (region.isGlobal()) { + if (region.getType().isGlobal()) { BauSystem.MESSAGE.send("XRAY_GLOBAL", player); return; } Optional techHider = techHiders.computeIfAbsent(region, rg -> { - File file = rg.gameModeConfig(); - if (file == null) { + if (!region.getGameModeConfig().Techhider.Active) { return Optional.empty(); } - FileConfiguration config = YamlConfiguration.loadConfiguration(file); - if (!config.getBoolean("Techhider.Active", false)) { - Set blocks = new HashSet<>(Arrays.asList(Material.END_STONE, Material.IRON_BLOCK)); - xrayedBlocks.put(region, blocks); - return Optional.of(createXray(rg, blocks)); - } - hidden.put(rg, new HashSet<>()); - String obfuscateWith = config.getString("Techhider.ObfuscateWith", "end_stone"); - - Set blocks = new HashSet<>(Arrays.asList(Material.getMaterial(obfuscateWith.toUpperCase()))); - if (obfuscateWith.equals("end_stone")) blocks.add(Material.END_STONE_BRICKS); + Set blocks = new HashSet<>(Arrays.asList(region.getGameModeConfig().Techhider.ObfuscateWith)); + if (blocks.contains(Material.END_STONE)) blocks.add(Material.END_STONE_BRICKS); xrayedBlocks.put(region, blocks); return Optional.of(createXray(rg, blocks)); }); @@ -103,7 +90,7 @@ public class XrayCommand extends SWCommand implements Listener, ScoreboardElemen hidden.get(region).add(player); BauSystem.MESSAGE.sendPrefixless("XRAY_ON", player, ChatMessageType.ACTION_BAR); } - region.forEachChunk((x, z) -> { + region.getBuildArea().forEachChunk((x, z) -> { CraftbukkitWrapper.impl.sendChunk(player, x, z); }); } @@ -149,7 +136,7 @@ public class XrayCommand extends SWCommand implements Listener, ScoreboardElemen private TechHider createXray(Region rg, Set obfuscate) { TechHider current = new TechHider((TechHider.LocationEvaluator) (p, cX, cY) -> { - if (rg.buildChunkOutside(cX, cY)) return true; + if (rg.getBuildArea().isChunkOutside(cX, cY)) return true; return !hidden.get(rg).contains(p); }, Material.STRUCTURE_VOID, obfuscate, new HashSet<>()); current.enable(); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/linkage/BauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/linkage/BauGuiItem.java new file mode 100644 index 00000000..6038f20e --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/linkage/BauGuiItem.java @@ -0,0 +1,38 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.linkage; + +import de.steamwar.bausystem.Permission; +import de.steamwar.bausystem.features.gui.BauGUI; +import lombok.AllArgsConstructor; +import lombok.Getter; + +@AllArgsConstructor +public abstract class BauGuiItem extends GuiItem { + + @Getter + private final int id; + + public void update() { + BauGUI.update(); + } + + public abstract Permission permission(); +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/linkage/GuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/linkage/GuiItem.java new file mode 100644 index 00000000..7bf38f3f --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/linkage/GuiItem.java @@ -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 . + */ + +package de.steamwar.bausystem.linkage; + +import org.bukkit.entity.Player; +import org.bukkit.event.inventory.ClickType; +import org.bukkit.inventory.ItemStack; + +public abstract class GuiItem { + + public abstract ItemStack getItem(Player player); + + public abstract boolean click(ClickType click, Player p); +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/linkage/specific/BauGuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/linkage/specific/BauGuiItem.java deleted file mode 100644 index b14327b7..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/linkage/specific/BauGuiItem.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2021 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 . - */ - -package de.steamwar.bausystem.linkage.specific; - -import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.features.gui.BauGUI; -import lombok.AllArgsConstructor; -import lombok.Getter; - -@AllArgsConstructor -public abstract class BauGuiItem extends GuiItem { - - @Getter - private final int id; - - public void update() { - BauGUI.update(); - } - - public abstract Permission permission(); -} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/linkage/specific/GuiItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/linkage/specific/GuiItem.java deleted file mode 100644 index 804db252..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/linkage/specific/GuiItem.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2021 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 . - */ - -package de.steamwar.bausystem.linkage.specific; - -import org.bukkit.entity.Player; -import org.bukkit.event.inventory.ClickType; -import org.bukkit.inventory.ItemStack; - -public abstract class GuiItem { - - public abstract ItemStack getItem(Player player); - - public abstract boolean click(ClickType click, Player p); -} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/linkage/specific/ScoreboardItem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/linkage/specific/ScoreboardItem.java deleted file mode 100644 index 6a5dad27..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/linkage/specific/ScoreboardItem.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2021 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 . - */ - -package de.steamwar.bausystem.linkage.specific; - -import de.steamwar.bausystem.region.Region; -import org.bukkit.entity.Player; - -public interface ScoreboardItem { - - /** - * Returns one Scoreboard line. If {@code null} result will be ignored. - * If return value contains {@code '?'} it will be replaced to the color - * code of the current {@link Region}. - * - * @param player the player to create the scoreboard line for - * @param region the region the player is in - * @return the String to send, can be {@code null} - */ - String getString(Player player, Region region); -} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/BackupScheduler.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/BackupScheduler.java index 44b57332..00b666e1 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/BackupScheduler.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/BackupScheduler.java @@ -1,32 +1,33 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.region; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.region.tags.Tag; +import de.steamwar.bausystem.region.flags.ChangedMode; +import de.steamwar.bausystem.region.flags.Flag; import de.steamwar.linkage.Linked; import de.steamwar.linkage.api.Enable; import org.bukkit.scheduler.BukkitRunnable; import java.util.Iterator; - +import java.util.Optional; @Linked public class BackupScheduler implements Enable { @@ -39,26 +40,32 @@ public class BackupScheduler implements Enable { new BukkitRunnable() { @Override public void run() { - final Iterator regions = Region.getREGION_MAP().values().stream().filter(region -> region.get(Tag.CHANGED)).iterator(); - BackupScheduler.this.doBackup(regions); + Iterator regionsToBackup = RegionSystem.INSTANCE.getRegions() + .filter(region -> region.getFlags().has(Flag.CHANGED).isReadable()) + .filter(region -> region.getFlags().get(Flag.CHANGED).getWithDefault() == ChangedMode.HAS_CHANGE) + .iterator(); + if (!regionsToBackup.hasNext()) return; + doBackup(regionsToBackup); } }.runTaskTimer(BauSystem.getInstance(), INITIAL, PERIOD); } - public void doBackup(final Iterator regionIterator) { + private void doBackup(Iterator regionsToBackup) { new BukkitRunnable() { @Override public void run() { - if (!regionIterator.hasNext()) { + if (!regionsToBackup.hasNext()) { this.cancel(); return; } - final Region region = regionIterator.next(); - if (region.backup()) { - region.remove(Tag.CHANGED); + Region region = regionsToBackup.next(); + Optional backup = region.getBackups() + .create(RegionBackups.BackupType.AUTOMATIC); + if (backup.isPresent()) { + region.getFlags().set(Flag.CHANGED, ChangedMode.NO_CHANGE); } } }.runTaskTimer(BauSystem.getInstance(), 0, 20 * 60); } -} \ No newline at end of file +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/Color.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/Color.java deleted file mode 100644 index a50c7cb0..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/Color.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2021 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 . - */ - -package de.steamwar.bausystem.region; - -public enum Color { - WHITE, - ORANGE, - MAGENTA, - LIGHT_BLUE, - YELLOW, - LIME, - PINK, - GRAY, - LIGHT_GRAY, - CYAN, - PURPLE, - BLUE, - BROWN, - GREEN, - RED, - BLACK; -} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/FlagOptional.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/FlagOptional.java new file mode 100644 index 00000000..9b91066d --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/FlagOptional.java @@ -0,0 +1,105 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region; + +import de.steamwar.bausystem.region.flags.Flag; +import lombok.AccessLevel; +import lombok.AllArgsConstructor; + +import java.util.NoSuchElementException; +import java.util.Optional; + +@AllArgsConstructor(access = AccessLevel.PRIVATE) +public class FlagOptional & Flag.Value> { + + private final Flag flag; + private final T value; + + public static & Flag.Value> FlagOptional of(Flag flag) { + return new FlagOptional<>(flag, null); + } + + public static & Flag.Value> FlagOptional of(Flag flag, T value) { + return new FlagOptional<>(flag, value); + } + + public boolean isPresent() { + return value != null; + } + + public boolean isEmpty() { + return value == null; + } + + public boolean is(T value) { + if (isEmpty()) return false; + return this.value.equals(value); + } + + public boolean isNot(T value) { + return !is(value); + } + + public boolean isWithDefault(T value) { + if (isEmpty()) { + return flag.getDefaultValue().equals(value); + } else { + return this.value.equals(value); + } + } + + public boolean isNotWithDefault(T value) { + return !isWithDefault(value); + } + + public T get() { + if (isEmpty()) { + throw new NoSuchElementException("No value present"); + } + return value; + } + + public T getWithDefault() { + if (isEmpty()) { + return flag.getDefaultValue(); + } else { + return value; + } + } + + public T orElse(T defaultValue) { + if (isEmpty()) { + return defaultValue; + } else { + return value; + } + } + + public Optional name() { + if (isEmpty()) { + return Optional.empty(); + } + return Optional.of(value.name()); + } + + public String nameWithDefault() { + return getWithDefault().name(); + } +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/FlagStorage.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/FlagStorage.java index e0ee43a5..5a706392 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/FlagStorage.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/FlagStorage.java @@ -1,107 +1,43 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.region; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.tags.Tag; -import yapion.hierarchy.types.YAPIONObject; +import lombok.NonNull; -import java.util.EnumMap; -import java.util.HashSet; import java.util.Map; -import java.util.Set; -/** - * Tags and Flags are not allowed to have overlaping names. - */ -public class FlagStorage { +public interface FlagStorage { - public static FlagStorage createStorage(YAPIONObject yapionObject) { - FlagStorage flagStorage = new FlagStorage(); - for (final Flag flag : Flag.getFlags()) { - try { - String s = yapionObject.getPlainValue(flag.name()); - flagStorage.set(flag, flag.getFlagValueOf(s)); - } catch (Exception e) { - flagStorage.set(flag, flag.getDefaultValue()); - } - } - for (final Tag tag : Tag.values()) { - if (yapionObject.containsKey(tag.name())) { - flagStorage.set(tag); - } - } - return flagStorage; - } + @NonNull + & Flag.Value> RegionFlagPolicy has(@NonNull Flag flag); - public static YAPIONObject toYAPION(FlagStorage flagStorage) { - YAPIONObject yapionObject = new YAPIONObject(); - for (final Flag flag : Flag.getFlags()) { - if (flag.getDefaultValue() == flagStorage.flags.getOrDefault(flag, flag.getDefaultValue())) { - yapionObject.remove(flag.name()); - } else { - yapionObject.add(flag.name(), flagStorage.get(flag).getValue().name()); - } - } - for (Tag tag : Tag.values()) { - if (flagStorage.tagSet.contains(tag)) { - yapionObject.add(tag.name(), ""); - } else { - yapionObject.remove(tag.name()); - } - } - return yapionObject; - } + /** + * Returns true if the flag was changed and did not already contain the provided value + */ + & Flag.Value> boolean set(@NonNull Flag flag, @NonNull T value); - protected Map> flags; - protected Set tagSet; + @NonNull + & Flag.Value> FlagOptional get(@NonNull Flag flag); - public FlagStorage() { - flags = new EnumMap<>(Flag.class); - tagSet = new HashSet<>(); - readKeys(); - } + void clear(); - public boolean set(final Flag flagType, final Flag.Value value) { - return flags.put(flagType, value) != value; - } - - public Flag.Value get(final Flag flagType) { - return flags.getOrDefault(flagType, flagType.getDefaultValue()); - } - - public boolean set(final Tag tag) { - return tagSet.add(tag); - } - - public boolean remove(final Tag tag) { - return tagSet.remove(tag); - } - - public boolean is(final Tag tag) { - return tagSet.contains(tag); - } - - private void readKeys() { - for (final Flag flag : Flag.getFlags()) { - flags.put(flag, flag.getDefaultValue()); - } - } -} \ No newline at end of file + Map, Flag.Value> getBackedMap(); +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/GlobalRegion.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/GlobalRegion.java deleted file mode 100644 index 83623989..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/GlobalRegion.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2021 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 . - */ - -package de.steamwar.bausystem.region; - -import de.steamwar.bausystem.region.utils.RegionExtensionType; -import de.steamwar.bausystem.region.utils.RegionType; -import lombok.Getter; -import org.bukkit.Location; -import yapion.hierarchy.types.YAPIONObject; - -public class GlobalRegion extends Region { - - @Getter - static GlobalRegion instance; - - public GlobalRegion(FlagStorage flagStorage, YAPIONObject regionData) { - super("global", null, new YAPIONObject(), flagStorage, regionData); - instance = this; - } - - @Override - public boolean inRegion(Location location, RegionType regionType, RegionExtensionType regionExtensionType) { - return true; - } -} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/Point.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/Point.java index 6f8c5929..8d8bb212 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/Point.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/Point.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.region; @@ -34,6 +34,8 @@ import org.bukkit.entity.Player; @AllArgsConstructor public class Point { + public static final Point ZERO = new Point(0, 0, 0); + private final int x; private final int y; private final int z; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java index c6f8b5c7..0a022cfe 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java @@ -1,584 +1,182 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.region; -import com.sk89q.worldedit.EditSession; -import com.sk89q.worldedit.WorldEdit; -import com.sk89q.worldedit.bukkit.BukkitWorld; -import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.TNTMode; -import de.steamwar.bausystem.region.tags.Tag; -import de.steamwar.bausystem.region.utils.RegionExtensionType; -import de.steamwar.bausystem.region.utils.RegionType; -import de.steamwar.bausystem.shared.SizedStack; +import com.sk89q.worldedit.extent.clipboard.Clipboard; import de.steamwar.bausystem.utils.FlatteningWrapper; import de.steamwar.bausystem.utils.PasteBuilder; -import de.steamwar.core.Core; +import de.steamwar.sql.GameModeConfig; import de.steamwar.sql.SchematicType; -import lombok.AccessLevel; -import lombok.Getter; import lombok.NonNull; -import org.bukkit.Bukkit; import org.bukkit.Location; -import yapion.hierarchy.types.YAPIONObject; -import yapion.hierarchy.types.YAPIONType; -import yapion.hierarchy.types.YAPIONValue; +import org.bukkit.Material; +import javax.annotation.Nullable; import java.io.File; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.util.*; -import java.util.function.ObjIntConsumer; -import java.util.function.Predicate; -import java.util.stream.Collectors; +import java.util.UUID; +import java.util.function.BiConsumer; +import java.util.stream.Stream; -@Getter -public class Region { +public interface Region { - @Getter - private static final Map REGION_MAP = new HashMap<>(); - private static final File backupFolder = new File(Bukkit.getWorlds().get(0).getWorldFolder(), "backup"); - private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy.MM.dd' 'HH:mm:ss"); - - public static Region getRegion(Location location) { - return REGION_MAP.values().stream() - .filter(r -> r.inRegion(location, r.minPoint, r.maxPoint)) - .findFirst() - .orElse(GlobalRegion.instance); + static Stream getRegions() { + return RegionSystem.INSTANCE.getRegions(); } - public static Set getRegion(Prototype prototype) { - return REGION_MAP.values().stream() - .filter(r -> r.getPrototype() == prototype) - .collect(Collectors.toSet()); + static Region getRegion(Location location) { + return RegionSystem.INSTANCE.get(location); } - public static void setGlobal(Flag flagType, Flag.Value value) { - REGION_MAP.values().forEach(region -> region.set(flagType, value)); + static Region getGlobalRegion() { + return RegionSystem.INSTANCE.getGlobalRegion(); } - YAPIONObject regionData; + @NonNull + UUID getID(); - private String name; - private Prototype prototype; - private Set prototypes; - private String skin; + @NonNull + RegionType getType(); - private Point minPoint; - private Point maxPoint; + @NonNull + FlagStorage getFlags(); - private Point minPointTestblock; - private Point maxPointTestblock; + @NonNull + Area getArea(); - private Point minPointTestblockExtension; - private Point maxPointTestblockExtension; + @NonNull + Area getBuildArea(); - private Point minPointBuild; - private Point maxPointBuild; + @NonNull + Area getTestblockArea(); - private Point minPointBuildExtension; - private Point maxPointBuildExtension; + @NonNull + GameModeConfig getGameModeConfig(); - private int floorLevel; - private int waterLevel; + @NonNull + RegionHistory getHistory(); - private Point copyPoint; // Nullable - private Point testBlockPoint; // Nullable + @NonNull + RegionBackups getBackups(); - private String linkedRegionName = null; // Nullable - private Region linkedRegion = null; // Nullable + @NonNull + RegionData getRegionData(); - private FlagStorage flagStorage; + interface Area { - @Getter(AccessLevel.PRIVATE) - private SizedStack undoSessions; - - @Getter(AccessLevel.PRIVATE) - private SizedStack redoSessions; - - public Region(String name, Prototype prototype, YAPIONObject regionConfig, FlagStorage flagStorage, YAPIONObject regionData) { - this.name = name; - this.regionData = regionData; - if (prototype != null) { - REGION_MAP.put(name, this); - } - - linkedRegionName = regionConfig.getPlainValueOrDefault("optionsLinkedWith", null); - - prototypes = new HashSet<>(); - if (regionConfig.containsKey("prototypes", YAPIONType.ARRAY)) { - regionConfig.getArray("prototypes").forEach(yapionAnyType -> { - if (yapionAnyType instanceof YAPIONValue) { - prototypes.add(((YAPIONValue) yapionAnyType).get()); - } - }); - } - if (regionConfig.containsKey("prototype")) { - prototypes.add(regionConfig.getPlainValue("prototype")); - } - - this.flagStorage = flagStorage; - Point point = null; - if (regionConfig.containsKey("minX", Integer.class) && regionConfig.containsKey("minY", Integer.class) && regionConfig.containsKey("minZ", Integer.class)) { - point = new Point(regionConfig.getPlainValue("minX"), regionConfig.getPlainValue("minY"), regionConfig.getPlainValue("minZ")); - } - if (prototype != null && prototypes.contains(prototype.getName())) { - generatePrototypeData(prototype, point); - } else if (regionConfig.containsKey("prototype")) { - generatePrototypeData(Prototype.getByName(regionConfig.getPlainValue("prototype")), point); - } - if (prototype != null) { - skin = regionData.getPlainValueOrDefault("skin", prototype.getDefaultSkin()); - if (!prototype.getSkinMap().containsKey(skin)) { - skin = prototype.getDefaultSkin(); - } - } - regionData.add("skin", skin); - - if (!hasType(RegionType.BUILD) || !hasType(RegionType.TESTBLOCK)) { - flagStorage.set(Flag.TNT, TNTMode.DENY); - } - } - - private void generatePrototypeData(Prototype prototype, Point point) { - if (prototype == null) { - return; - } - - this.prototype = prototype; - this.skin = prototype.getDefaultSkin(); - - this.minPoint = point; - this.maxPoint = point.add(prototype.getSizeX() - 1, prototype.getSizeY() - 1, prototype.getSizeZ() - 1); - - if (prototype.getTestblock() != null) { - this.minPointTestblock = point.add(prototype.getTestblock().getOffsetX(), prototype.getTestblock().getOffsetY(), prototype.getTestblock().getOffsetZ()); - this.maxPointTestblock = this.minPointTestblock.add(prototype.getTestblock().getSizeX() - 1, prototype.getTestblock().getSizeY() - 1, prototype.getTestblock().getSizeZ() - 1); - - this.minPointTestblockExtension = this.minPointTestblock.subtract(prototype.getTestblock().getExtensionNegativeX(), prototype.getTestblock().getExtensionNegativeY(), prototype.getTestblock().getExtensionNegativeZ()); - this.maxPointTestblockExtension = this.maxPointTestblock.add(prototype.getTestblock().getExtensionPositiveX(), prototype.getTestblock().getExtensionPositiveY(), prototype.getTestblock().getExtensionPositiveZ()); - - if (prototype.getTestblock().getCopyOffsetX() != 0 || prototype.getTestblock().getCopyOffsetY() != 0 || prototype.getTestblock().getCopyOffsetZ() != 0) { - this.testBlockPoint = this.minPointTestblock.add(prototype.getTestblock().getCopyOffsetX(), prototype.getTestblock().getCopyOffsetY(), prototype.getTestblock().getCopyOffsetZ()); - } else { - this.testBlockPoint = this.minPointTestblock.add(prototype.getTestblock().getSizeX() / 2, 0, -1); - } - } - - if (prototype.getBuild() != null) { - this.minPointBuild = point.add(prototype.getBuild().getOffsetX(), prototype.getBuild().getOffsetY(), prototype.getBuild().getOffsetZ()); - this.maxPointBuild = this.minPointBuild.add(prototype.getBuild().getSizeX() - 1, prototype.getBuild().getSizeY() - 1, prototype.getBuild().getSizeZ() - 1); - - this.minPointBuildExtension = this.minPointBuild.subtract(prototype.getBuild().getExtensionNegativeX(), prototype.getBuild().getExtensionNegativeY(), prototype.getBuild().getExtensionNegativeZ()); - this.maxPointBuildExtension = this.maxPointBuild.add(prototype.getBuild().getExtensionPositiveX(), prototype.getBuild().getExtensionPositiveY(), prototype.getBuild().getExtensionPositiveZ()); - - if (!prototype.getBuild().isHasCopyPoint() && (prototype.getCopyPointOffsetX() != 0 || prototype.getCopyPointOffsetY() != 0 || prototype.getCopyPointOffsetZ() != 0)) { - this.copyPoint = minPoint.add(prototype.getCopyPointOffsetX(), prototype.getCopyPointOffsetY(), prototype.getCopyPointOffsetZ()); - } else if (prototype.getBuild().getCopyOffsetX() != 0 || prototype.getBuild().getCopyOffsetY() != 0 || prototype.getBuild().getCopyOffsetZ() != 0) { - this.copyPoint = this.minPointBuild.add(prototype.getBuild().getCopyOffsetX(), prototype.getBuild().getCopyOffsetY(), prototype.getBuild().getCopyOffsetZ()); - } else { - this.copyPoint = this.minPointBuild.add(prototype.getBuild().getSizeX() / 2, 0, prototype.getBuild().getSizeZ()); - } - } else if (prototype.getCopyPointOffsetX() != 0 || prototype.getCopyPointOffsetY() != 0 || prototype.getCopyPointOffsetZ() != 0) { - this.copyPoint = minPoint.add(prototype.getCopyPointOffsetX(), prototype.getCopyPointOffsetY(), prototype.getCopyPointOffsetZ()); - } - - if (prototype.getFloorOffset() != 0) { - floorLevel = minPoint.getY() + prototype.getFloorOffset(); - } else { - floorLevel = 0; - } - - if (prototype.getWaterOffset() != 0) { - waterLevel = minPoint.getY() + prototype.getWaterOffset(); - } else { - waterLevel = 0; - } - } - - public boolean inRegion(Location location, RegionType regionType, RegionExtensionType regionExtensionType) { - if (!hasType(regionType)) { - return false; - } - switch (regionType) { - case BUILD: - Point minBPoint = regionExtensionType == RegionExtensionType.EXTENSION ? minPointBuildExtension : minPointBuild; - Point maxBPoint = regionExtensionType == RegionExtensionType.EXTENSION ? maxPointBuildExtension : maxPointBuild; - return inRegion(location, minBPoint, maxBPoint); - case TESTBLOCK: - Point minTBPoint = regionExtensionType == RegionExtensionType.EXTENSION ? minPointTestblockExtension : minPointTestblock; - Point maxTBPoint = regionExtensionType == RegionExtensionType.EXTENSION ? maxPointTestblockExtension : maxPointTestblock; - return inRegion(location, minTBPoint, maxTBPoint); - default: - case NORMAL: - return inRegion(location, minPoint, maxPoint); - } - } - - private boolean inRegion(Location location, Point minPoint, Point maxPoint) { - int blockX = location.getBlockX(); - int blockY = location.getBlockY(); - int blockZ = location.getBlockZ(); - return blockX >= minPoint.getX() && blockX <= maxPoint.getX() && - blockY >= minPoint.getY() && blockY <= maxPoint.getY() && - blockZ >= minPoint.getZ() && blockZ <= maxPoint.getZ(); - } - - public boolean hasType(RegionType regionType) { - if (prototype == null) { - return false; - } - if (regionType == null) { - return false; - } - switch (regionType) { - case BUILD: - return prototype.getBuild() != null; - case TESTBLOCK: - return prototype.getTestblock() != null; - default: - case NORMAL: + Area EMPTY = new Area() { + @Override + public boolean isEmpty() { return true; - } - } + } - public boolean hasExtensionType(RegionType regionType) { - if (!hasType(regionType)) { - return false; - } - switch (regionType) { - case BUILD: - return prototype.getBuild().isExtensionRegistered(); - case TESTBLOCK: - return prototype.getTestblock().isExtensionRegistered(); - default: - case NORMAL: + @Override + public Point getMinPoint(boolean extension) { + return Point.ZERO; + } + + @Override + public Point getMaxPoint(boolean extension) { + return Point.ZERO; + } + + @Override + public Point getCopyPoint() { + return Point.ZERO; + } + + @Override + public boolean inRegion(Location location, boolean extension) { return false; - } - } - - public String getDisplayName() { - return prototype != null ? prototype.getSkinMap().get(skin).getName() : ""; - } - - private void setLinkedRegion(Predicate regionConsumer) { - if (linkedRegionName == null) { - return; - } - if (linkedRegion != null) { - if (regionConsumer.test(linkedRegion)) { - RegionUtils.save(linkedRegion); } - return; - } - for (Region region : REGION_MAP.values()) { - if (region.name.equals(linkedRegionName)) { - linkedRegion = region; - if (regionConsumer.test(linkedRegion)) { - RegionUtils.save(linkedRegion); - } - return; + + @Override + public Clipboard copy(boolean extension) { + return null; } - } - } - public Region getLinkedRegion() { - if (linkedRegion == null && linkedRegionName != null) { - setLinkedRegion(region -> false); - } - return linkedRegion; - } + @Override + public File getResetFile() { + return null; + } - public boolean setPrototype(@NonNull Prototype prototype) { - if (!prototypes.contains(prototype.getName())) { + @Override + public void reset(PasteBuilder pasteBuilder, boolean extension) { + } + + @Override + public void forEachChunk(BiConsumer executor) { + } + + @Override + public boolean isChunkOutside(int chunkX, int chunkZ) { + return false; + } + }; + + default boolean isEmpty() { return false; } - return _setPrototype(prototype); - } - boolean _setPrototype(@NonNull Prototype prototype) { - generatePrototypeData(prototype, minPoint); - RegionUtils.save(this); - return true; - } + @NonNull + Point getMinPoint(boolean extension); - public boolean setSkin(@NonNull String skinName) { - if (!prototype.getSkinMap().containsKey(skinName)) { - return false; - } - this.skin = skinName; - setLinkedRegion(region -> { - region.skin = skinName; + @NonNull + Point getMaxPoint(boolean extension); + + @NonNull + Point getCopyPoint(); + + default boolean inRegion(Location location, boolean extension) { + Point minPoint = getMinPoint(extension); + Point maxPoint = getMaxPoint(extension); + if (location.getBlockX() < minPoint.getX() || location.getBlockX() > maxPoint.getX()) return false; + if (location.getBlockY() < minPoint.getY() || location.getBlockY() > maxPoint.getY()) return false; + if (location.getBlockZ() < minPoint.getZ() || location.getBlockZ() > maxPoint.getZ()) return false; return true; - }); - regionData.add("skin", skin); - return true; - } - - public void set(Flag flagType, Flag.Value value) { - if (flagStorage.set(flagType, value)) { - RegionUtils.save(this); - } - setLinkedRegion(region -> region.flagStorage.set(flagType, value)); - } - - public void set(Tag tag) { - if (flagStorage.set(tag)) { - RegionUtils.save(this); - } - setLinkedRegion(region -> region.flagStorage.set(tag)); - } - - public void remove(Tag tag) { - if (flagStorage.remove(tag)) { - RegionUtils.save(this); - } - } - - public Flag.Value get(Flag flagType) { - return flagStorage.get(flagType); - } - - public boolean get(Tag tagType) { - return flagStorage.is(tagType); - } - - public & Flag.Value> T getPlain(Flag flagType) { - return (T) flagStorage.get(flagType).getValue(); - } - - public & Flag.Value> T getPlain(Flag flagType, Class type) { - return (T) flagStorage.get(flagType).getValue(); - } - - public Point getMinPoint(RegionType regionType, RegionExtensionType regionExtensionType) { - switch (regionType) { - case TESTBLOCK: - return (regionExtensionType == null || regionExtensionType == RegionExtensionType.NORMAL) ? minPointTestblock : minPointTestblockExtension; - case BUILD: - return (regionExtensionType == null || regionExtensionType == RegionExtensionType.NORMAL) ? minPointBuild : minPointBuildExtension; - default: - case NORMAL: - return minPoint; - } - } - - public Point getMaxPoint(RegionType regionType, RegionExtensionType regionExtensionType) { - switch (regionType) { - case TESTBLOCK: - return (regionExtensionType == null || regionExtensionType == RegionExtensionType.NORMAL) ? maxPointTestblock : maxPointTestblockExtension; - case BUILD: - return (regionExtensionType == null || regionExtensionType == RegionExtensionType.NORMAL) ? maxPointBuild : maxPointBuildExtension; - default: - case NORMAL: - return maxPoint; - } - } - - boolean hasReset(RegionType regionType) { - if (!hasType(regionType)) { - return false; - } - switch (regionType) { - case TESTBLOCK: - return prototype.getSkinMap().get(skin).getTestblockSchematicFile() != null; - case BUILD: - return prototype.getSkinMap().get(skin).getBuildSchematicFile() != null; - default: - case NORMAL: - return prototype.getSkinMap().get(skin).getSchematicFile() != null; - } - } - - public File getResetFile(RegionType regionType) { - if (!hasReset(regionType)) { - return null; - } - switch (regionType) { - case TESTBLOCK: - return prototype.getSkinMap().get(skin).getTestblockSchematicFile(); - case BUILD: - return prototype.getSkinMap().get(skin).getBuildSchematicFile(); - default: - case NORMAL: - return prototype.getSkinMap().get(skin).getSchematicFile(); - } - } - - public void reset(PasteBuilder pasteBuilder, RegionType regionType, RegionExtensionType regionExtensionType) { - if (!hasReset(regionType)) { - return; - } - if (regionExtensionType == RegionExtensionType.EXTENSION && !hasExtensionType(regionType)) { - regionExtensionType = RegionExtensionType.NORMAL; } - pasteBuilder.reset(regionExtensionType == RegionExtensionType.EXTENSION) - .minPoint(getMinPoint(regionType, regionExtensionType)) - .maxPoint(getMaxPoint(regionType, regionExtensionType)) - .waterLevel(waterLevel); - if (pasteBuilder.getClipboardProvider().is(PasteBuilder.SchematicProvider.class)) { - SchematicType schematicType = pasteBuilder.getClipboardProvider().as(PasteBuilder.SchematicProvider.class).getSchematic().getSchemtype(); - pasteBuilder.rotate(schematicType.fightType() || schematicType.check()); + @Nullable + default Clipboard copy(boolean extension) { + return FlatteningWrapper.impl.copy(getMinPoint(extension), getMaxPoint(extension), getCopyPoint()); } - switch (regionType) { - case BUILD: - pasteBuilder.pastePoint(minPointBuild.add(prototype.getBuild().getSizeX() / 2, 0, prototype.getBuild().getSizeZ() / 2)); - break; - case TESTBLOCK: - Point pastePoint = minPointTestblock.add(prototype.getTestblock().getSizeX() / 2, 0, prototype.getTestblock().getSizeZ() / 2); - if (pasteBuilder.getClipboardProvider().is(PasteBuilder.SchematicProvider.class)) { - SchematicType schematicType = pasteBuilder.getClipboardProvider().as(PasteBuilder.SchematicProvider.class).getSchematic().getSchemtype(); - if (schematicType.getKuerzel().equalsIgnoreCase("wg")) { - pastePoint = pastePoint.add(0, 0, 1); - } - if (schematicType.getKuerzel().equalsIgnoreCase("ws")) { - pastePoint = pastePoint.add(-1, 0, 1); - } - if (schematicType.getKuerzel().equalsIgnoreCase("as")) { - pastePoint = pastePoint.add(-1, 0, 1); - } + @Nullable + File getResetFile(); + + void reset(PasteBuilder pasteBuilder, boolean extension); + + default void forEachChunk(BiConsumer executor) { + Point minPoint = getMinPoint(false); + Point maxPoint = getMaxPoint(false); + for (int x = (int) Math.floor(minPoint.getX() / 16.0); x <= (int) Math.ceil(maxPoint.getX() / 16.0); x++) { + for (int z = (int) Math.floor(minPoint.getZ() / 16.0); z <= (int) Math.ceil(maxPoint.getZ() / 16.0); z++) { + executor.accept(x, z); } - pasteBuilder.pastePoint(pastePoint); - break; - default: - case NORMAL: - pasteBuilder.pastePoint(minPoint.add(prototype.getSizeX() / 2, 0, prototype.getSizeZ() / 2)); - break; - } - - initSessions(); - undoSessions.push(pasteBuilder.run()); - } - - public void remember(EditSession editSession) { - initSessions(); - undoSessions.push(editSession); - } - - public boolean isGlobal() { - return this == GlobalRegion.getInstance(); - } - - private void initSessions() { - if (undoSessions == null) { - undoSessions = new SizedStack<>(20); - redoSessions = new SizedStack<>(20); - } - } - - public boolean undo() { - initSessions(); - EditSession session = undoSessions.pop(); - if (session == null) - return false; - - try (EditSession e = WorldEdit.getInstance().getEditSessionFactory().getEditSession(new BukkitWorld(Bukkit.getWorlds().get(0)), -1)) { - session.undo(e); - redoSessions.push(e); - } - return true; - } - - public boolean redo() { - initSessions(); - EditSession session = redoSessions.pop(); - if (session == null) - return false; - - try (EditSession e = WorldEdit.getInstance().getEditSessionFactory().getEditSession(new BukkitWorld(Bukkit.getWorlds().get(0)), -1)) { - session.redo(e); - undoSessions.push(e); - } - return true; - } - - public boolean backup() { - final File definedBackupFolder = new File(new File(backupFolder, prototype.getName()), name); - //noinspection ResultOfMethodCallIgnored - definedBackupFolder.mkdirs(); - - File[] currentBackups = definedBackupFolder.listFiles(); - if (currentBackups != null && currentBackups.length >= 20) { - List files = new ArrayList<>(Arrays.asList(currentBackups)); - files.sort(Comparator.comparingLong(File::lastModified)); - while (files.size() >= 20) files.remove(0).delete(); - } - - final File backupFile = new File(definedBackupFolder, LocalDateTime.now().format(formatter) + ".schem"); - return FlatteningWrapper.impl.backup(minPoint, maxPoint, backupFile); - } - - public static boolean copy(Point minPoint, Point maxPoint, File file) { - return FlatteningWrapper.impl.backup(minPoint, maxPoint, file); - } - - public List listBackup() { - final File definedBackupFolder = new File(new File(backupFolder, prototype.getName()), name); - //noinspection ResultOfMethodCallIgnored - definedBackupFolder.mkdirs(); - - File[] currentBackups = definedBackupFolder.listFiles(); - List files = new ArrayList<>(Arrays.asList(currentBackups)); - files.sort(Comparator.comparingLong(File::lastModified)); - return files.stream().map(File::getName).collect(Collectors.toList()); - } - - public File getBackupFile(String backupName) { - final File definedBackupFolder = new File(new File(backupFolder, prototype.getName()), name); - //noinspection ResultOfMethodCallIgnored - definedBackupFolder.mkdirs(); - File[] files = definedBackupFolder.listFiles((dir, name) -> name.equals(backupName + ".schem")); - if (files == null || files.length == 0) return null; - return files[0]; - } - - public void forEachChunk(ObjIntConsumer executor) { - for (int x = (int) Math.floor(minPoint.getX() / 16.0); x <= (int) Math.ceil(maxPoint.getX() / 16.0); x++) { - for (int z = (int) Math.floor(minPoint.getZ() / 16.0); z <= (int) Math.ceil(maxPoint.getZ() / 16.0); z++) { - executor.accept(x, z); } } - } - public boolean buildChunkOutside(int chunkX, int chunkY) { - if (!hasType(RegionType.BUILD)) { + default boolean isChunkOutside(int chunkX, int chunkZ) { + Point minPoint = getMinPoint(true); + Point maxPoint = getMaxPoint(true); return Math.floor(minPoint.getX() / 16.0) > chunkX || chunkX >= Math.ceil(maxPoint.getX() / 16.0) || - Math.floor(minPoint.getZ() / 16.0) > chunkY || chunkY >= Math.ceil(maxPoint.getZ() / 16.0); + Math.floor(minPoint.getZ() / 16.0) > chunkZ || chunkZ >= Math.ceil(maxPoint.getZ() / 16.0); } - if (!hasExtensionType(RegionType.BUILD)) { - return Math.floor(minPointBuild.getX() / 16.0) > chunkX || chunkX >= Math.ceil(maxPointBuild.getX() / 16.0) || - Math.floor(minPointBuild.getZ() / 16.0) > chunkY || chunkY >= Math.ceil(maxPointBuild.getZ() / 16.0); - } - return Math.floor(minPointBuildExtension.getX() / 16.0) > chunkX || chunkX >= Math.ceil(maxPointBuildExtension.getX() / 16.0) || - Math.floor(minPointBuildExtension.getZ() / 16.0) > chunkY || chunkY >= Math.ceil(maxPointBuildExtension.getZ() / 16.0); } - - public File gameModeConfig() { - File baseFile = new File(BauSystem.getInstance().getDataFolder().getParentFile(), "FightSystem"); - for (int version = Core.getVersion(); version >= 15; version--) { - File specific = new File(baseFile, prototype.getDisplayName() + version + ".yml"); - if (specific.exists()) return specific; - } - return null; - } -} \ No newline at end of file +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionBackups.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionBackups.java new file mode 100644 index 00000000..14c3e4a3 --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionBackups.java @@ -0,0 +1,86 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region; + +import lombok.Getter; +import lombok.NonNull; +import lombok.RequiredArgsConstructor; + +import javax.annotation.CheckReturnValue; +import javax.annotation.Nullable; +import java.util.List; +import java.util.Optional; + +public interface RegionBackups { + + @RequiredArgsConstructor + enum BackupType { + MANUAL(5), + AUTOMATIC(20), + ; + + public final int maxBackups; + } + + @RequiredArgsConstructor + @Getter + abstract class Backup { + @NonNull + private final BackupType type; + + @NonNull + private final String name; + + @NonNull + private final FlagStorage flags; + + @CheckReturnValue + public abstract boolean load(); + + public abstract void delete(); + } + + @CheckReturnValue + Optional create(BackupType backupType); + + @NonNull + List list(); + + @Nullable + Backup get(String name); + + RegionBackups EMPTY = new RegionBackups() { + @Override + public Optional create(BackupType backupType) { + return Optional.empty(); + } + + @Override + public @NonNull List list() { + return List.of(); + } + + @Nullable + @Override + public Backup get(String name) { + return null; + } + }; +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionData.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionData.java new file mode 100644 index 00000000..e2f9d1a1 --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionData.java @@ -0,0 +1,93 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region; + +import de.steamwar.sql.SchematicNode; +import yapion.hierarchy.types.YAPIONObject; + +import java.util.Objects; + +public interface RegionData { + + void clear(); + + SchematicNode getTestblockSchematic(); + + void setTestblockSchematic(SchematicNode schematic); + + RegionData EMPTY = new RegionData() { + + @Override + public void clear() { + } + + @Override + public SchematicNode getTestblockSchematic() { + return null; + } + + @Override + public void setTestblockSchematic(SchematicNode schematic) { + } + }; + + class RegionDataImpl implements RegionData { + + private final YAPIONObject yapionObject; + private final Runnable onChange; + + public RegionDataImpl(YAPIONObject yapionObject, Runnable onChange) { + this.yapionObject = yapionObject; + this.onChange = onChange; + + if (yapionObject.containsKey("testblockSchematic")) { + testblockSchematic = SchematicNode.getSchematicNode(yapionObject.getInt("testblockSchematic")); + } + } + + @Override + public void clear() { + testblockSchematic = null; + yapionObject.remove("testblockSchematic"); + onChange.run(); + } + + private SchematicNode testblockSchematic = null; + + @Override + public SchematicNode getTestblockSchematic() { + return testblockSchematic; + } + + @Override + public void setTestblockSchematic(SchematicNode schematic) { + if (Objects.equals(this.testblockSchematic, schematic)) { + return; + } + this.testblockSchematic = schematic; + if (schematic == null) { + yapionObject.remove("testblockSchematic"); + } else { + yapionObject.put("testblockSchematic", testblockSchematic.getId()); + } + onChange.run(); + } + } +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionFlagPolicy.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionFlagPolicy.java new file mode 100644 index 00000000..3c48505c --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionFlagPolicy.java @@ -0,0 +1,38 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor +@Getter +public enum RegionFlagPolicy { + NOT_APPLICABLE(false, false), + READ_ONLY(true, false), + WRITABLE(true, true); + + private final boolean readable; + private final boolean writable; + + public boolean isApplicable() { + return readable || writable; + } +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionHistory.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionHistory.java new file mode 100644 index 00000000..839c0a4f --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionHistory.java @@ -0,0 +1,92 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region; + +import com.sk89q.worldedit.EditSession; +import com.sk89q.worldedit.WorldEdit; +import com.sk89q.worldedit.bukkit.BukkitWorld; +import de.steamwar.bausystem.shared.SizedStack; +import lombok.NonNull; +import org.bukkit.Bukkit; + +public interface RegionHistory { + + void remember(@NonNull EditSession editSession); + + boolean undo(); + + boolean redo(); + + RegionHistory EMPTY = new RegionHistory() { + @Override + public void remember(@NonNull EditSession editSession) { + } + + @Override + public boolean undo() { + return false; + } + + @Override + public boolean redo() { + return false; + } + }; + + class Impl implements RegionHistory { + + private SizedStack undoSessions; + private SizedStack redoSessions; + + public Impl(int size) { + this.undoSessions = new SizedStack<>(size); + this.redoSessions = new SizedStack<>(size); + } + + @Override + public void remember(@NonNull EditSession editSession) { + undoSessions.push(editSession); + if (redoSessions.empty()) return; + redoSessions.clear(); + } + + @Override + public boolean undo() { + EditSession session = undoSessions.pop(); + if (session == null) return false; + try (EditSession e = WorldEdit.getInstance().getEditSessionFactory().getEditSession(new BukkitWorld(Bukkit.getWorlds().get(0)), -1)) { + session.undo(e); + redoSessions.push(e); + } + return true; + } + + @Override + public boolean redo() { + EditSession session = redoSessions.pop(); + if (session == null) return false; + try (EditSession e = WorldEdit.getInstance().getEditSessionFactory().getEditSession(new BukkitWorld(Bukkit.getWorlds().get(0)), -1)) { + session.redo(e); + undoSessions.push(e); + } + return true; + } + } +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionSystem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionSystem.java new file mode 100644 index 00000000..0a657a84 --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionSystem.java @@ -0,0 +1,120 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region; + +import lombok.NonNull; +import org.bukkit.Location; + +import javax.annotation.CheckReturnValue; +import java.lang.reflect.InvocationTargetException; +import java.util.Optional; +import java.util.UUID; +import java.util.stream.Stream; + +public interface RegionSystem { + + RegionSystem INSTANCE = init(); + + /** + * Loads and initializes the Regions and anything that should be loaded on startup. + */ + void load(); + + /** + * Saves anything that should be written to file on either CRIUSleepEvent or plugin disable. + */ + void save(); + + /** + * Returns the Location to teleport players to when they first join or Warp to "WorldSpawn" + */ + @NonNull + Location getWorldSpawn(); + + /** + * Returns the GlobalRegion. This Region should have their {@link Region#getID()} return the + * '00000000-0000-0000-0000-000000000000' UUID for easier retrieval with {@link #getRegion(UUID)}. + */ + @NonNull + Region getGlobalRegion(); + + /** + * Should return a Region that is present at the specific Location or the {@link #getGlobalRegion()} + * if none are present. + */ + @NonNull + Region get(@NonNull Location location); + + /** + * Should return the Region by their UUID. + */ + @CheckReturnValue + Optional getRegion(@NonNull UUID id); + + /** + * Does and should not contain the GlobalRegion returned by {@link #getGlobalRegion()}. + */ + @NonNull + Stream getRegions(); + + private static RegionSystem init() { + try { + return (RegionSystem) Class.forName("de.steamwar.bausystem.region.FixedRegionSystem").getConstructor().newInstance(); + } catch (ClassNotFoundException | NoSuchMethodException | InstantiationException | IllegalAccessException | + InvocationTargetException e) { + return new RegionSystem() { + @Override + public void load() { + throw new UnsupportedOperationException(); + } + + @Override + public void save() { + throw new UnsupportedOperationException(); + } + + @Override + public @NonNull Location getWorldSpawn() { + throw new UnsupportedOperationException(); + } + + @Override + public Region getGlobalRegion() { + throw new UnsupportedOperationException(); + } + + @Override + public Region get(Location location) { + throw new UnsupportedOperationException(); + } + + @Override + public Optional getRegion(UUID id) { + throw new UnsupportedOperationException(); + } + + @Override + public Stream getRegions() { + throw new UnsupportedOperationException(); + } + }; + } + } +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionType.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionType.java new file mode 100644 index 00000000..fd16e54d --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionType.java @@ -0,0 +1,34 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor +@Getter +public enum RegionType { + + GLOBAL(true), + NORMAL(false), + ; + + private final boolean global; +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionUtils.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionUtils.java index e30c3ed9..55203dc8 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionUtils.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/RegionUtils.java @@ -1,92 +1,67 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.region; -import com.sk89q.worldedit.EditSession; -import com.sk89q.worldedit.extent.clipboard.Clipboard; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.region.utils.RegionExtensionType; -import de.steamwar.bausystem.region.utils.RegionType; -import de.steamwar.bausystem.utils.FlatteningWrapper; -import de.steamwar.bausystem.worlddata.WorldData; import lombok.experimental.UtilityClass; import net.md_5.bungee.api.ChatMessageType; import net.md_5.bungee.api.chat.TextComponent; import org.bukkit.Bukkit; import org.bukkit.entity.Player; -import java.io.File; import java.util.function.Consumer; import java.util.function.Function; - @UtilityClass public class RegionUtils { public void actionBar(Region region, String s, Object... objects) { + forEachInRegion(region, player -> { + player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(BauSystem.MESSAGE.parse(s, player, objects))); + }); + } + + public void message(Region region, String s, Object... objects) { + forEachInRegion(region, player -> BauSystem.MESSAGE.send(s, player, objects)); + } + + public void message(Region region, Function function) { + forEachInRegion(region, player -> { + String message = function.apply(player); + if (message == null) { + return; + } + + player.sendMessage(message); + }); + } + + public void message(Region region, Consumer consumer) { + forEachInRegion(region, consumer); + } + + public void forEachInRegion(Region region, Consumer consumer) { Bukkit.getOnlinePlayers() .stream() - .filter(player -> region.inRegion(player.getLocation(), RegionType.NORMAL, RegionExtensionType.NORMAL)) - .filter(player -> !region.isGlobal() || Region.getRegion(player.getLocation()).isGlobal()) - .forEach(player -> player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(BauSystem.MESSAGE.parse(s, player, objects)))); + .filter(player -> region.getArea().inRegion(player.getLocation(), false)) + .filter(player -> !region.getType().isGlobal() || Region.getRegion(player.getLocation()).getType().isGlobal()) + .forEach(consumer); } - - public static void message(Region region, String message, Object... objects) { - Bukkit.getOnlinePlayers() - .stream() - .filter(player -> region.inRegion(player.getLocation(), RegionType.NORMAL, RegionExtensionType.NORMAL)) - .filter(player -> !region.isGlobal() || Region.getRegion(player.getLocation()).isGlobal()) - .forEach(player -> BauSystem.MESSAGE.send(message, player, objects)); - } - - public static void message(Region region, Function function) { - Bukkit.getOnlinePlayers() - .stream() - .filter(player -> region.inRegion(player.getLocation(), RegionType.NORMAL, RegionExtensionType.NORMAL)) - .filter(player -> !region.isGlobal() || Region.getRegion(player.getLocation()).isGlobal()) - .forEach(player -> { - String message = function.apply(player); - if (message == null) { - return; - } - - player.sendMessage(message); - }); - } - - public static void message(Region region, Consumer function) { - Bukkit.getOnlinePlayers() - .stream() - .filter(player -> region.inRegion(player.getLocation(), RegionType.NORMAL, RegionExtensionType.NORMAL)) - .filter(player -> !region.isGlobal() || Region.getRegion(player.getLocation()).isGlobal()) - .forEach(player -> { - function.accept(player); - }); - } - - static void save(Region region) { - if (region.getPrototype() != null) { - region.regionData.add("prototype", region.getPrototype().getName()); - } - region.regionData.add("flagStorage", FlagStorage.toYAPION(region.getFlagStorage())); - WorldData.write(); - } - } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/ChangedMode.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/ChangedMode.java new file mode 100644 index 00000000..4aa63c6e --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/ChangedMode.java @@ -0,0 +1,60 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region.flags; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * ChangedMode defines that a Region has changed or not + */ +@Getter +@AllArgsConstructor +public enum ChangedMode implements Flag.Value { + + NO_CHANGE("FLAG_CHANGED_NO_CHANGE", false), + HAS_CHANGE("FLAG_CHANGED_HAS_CHANGE", true); + + private static ChangedMode[] values; + private final String chatValue; + private final Boolean changed; + + @Override + public ChangedMode[] getValues() { + if (ChangedMode.values == null) { + ChangedMode.values = ChangedMode.values(); + } + return ChangedMode.values; + } + + @Override + public ChangedMode getValue() { + return this; + } + + @Override + public ChangedMode getValueOf(final String name) { + try { + return ChangedMode.valueOf(name.toUpperCase()); + } catch (IllegalArgumentException e) { + return NO_CHANGE; + } + } +} \ No newline at end of file diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/ColorMode.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/ColorMode.java new file mode 100644 index 00000000..461cee0c --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/ColorMode.java @@ -0,0 +1,73 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region.flags; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * ColorMode defines the colors a Region can have + */ +@Getter +@AllArgsConstructor +public enum ColorMode implements Flag.Value { + WHITE("FLAG_COLOR_WHITE", 'f'), + ORANGE("FLAG_COLOR_ORANGE", '6'), + MAGENTA("FLAG_COLOR_MAGENTA", '5'), + LIGHT_BLUE("FLAG_COLOR_LIGHT_BLUE", 'b'), + YELLOW("FLAG_COLOR_YELLOW", 'e'), + LIME("FLAG_COLOR_LIME", 'a'), + PINK("FLAG_COLOR_PINK", 'd'), + GRAY("FLAG_COLOR_GRAY", '8'), + LIGHT_GRAY("FLAG_COLOR_LIGHT_GRAY", '7'), + CYAN("FLAG_COLOR_CYAN", '3'), + PURPLE("FLAG_COLOR_PURPLE", '5'), + BLUE("FLAG_COLOR_BLUE", '9'), + BROWN("FLAG_COLOR_BROWN", 'e'), + GREEN("FLAG_COLOR_GREEN", '2'), + RED("FLAG_COLOR_RED", 'c'), + BLACK("FLAG_COLOR_BLACK", '1'); + + private static ColorMode[] values; + private final String chatValue; + private final char colorCode; + + @Override + public ColorMode[] getValues() { + if (ColorMode.values == null) { + ColorMode.values = ColorMode.values(); + } + return ColorMode.values; + } + + @Override + public ColorMode getValue() { + return this; + } + + @Override + public ColorMode getValueOf(final String name) { + try { + return ColorMode.valueOf(name.toUpperCase()); + } catch (IllegalArgumentException e) { + return ColorMode.YELLOW; + } + } +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/FireMode.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/FireMode.java new file mode 100644 index 00000000..5baab3ef --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/FireMode.java @@ -0,0 +1,62 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region.flags; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * FireMode defines if fire should be enabled or disabled in a Region + */ +@Getter +@AllArgsConstructor +public enum FireMode implements Flag.Value { + + ALLOW("FLAG_FIRE_ALLOW"), + DENY("FLAG_FIRE_DENY"); + + private static FireMode[] values; + private final String chatValue; + + @Override + public FireMode[] getValues() { + if (FireMode.values == null) { + FireMode.values = FireMode.values(); + } + return FireMode.values; + } + + @Override + public FireMode getValue() { + return this; + } + + @Override + public FireMode getValueOf(final String name) { + try { + return FireMode.valueOf(name.toUpperCase()); + } catch (IllegalArgumentException e) { + if (name.equalsIgnoreCase("false")) { + return FireMode.DENY; + } + return FireMode.ALLOW; + } + } +} \ No newline at end of file diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/Flag.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/Flag.java index 3c9f3173..f2213470 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/Flag.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/Flag.java @@ -1,85 +1,130 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.region.flags; -import de.steamwar.bausystem.region.flags.flagvalues.*; import de.steamwar.bausystem.shared.EnumDisplay; -import lombok.AllArgsConstructor; import lombok.Getter; +import lombok.NonNull; -import java.util.EnumSet; +import java.util.HashSet; import java.util.Set; -import java.util.stream.Collectors; +import java.util.concurrent.atomic.AtomicInteger; -@Getter -@AllArgsConstructor -public enum Flag implements EnumDisplay { +public final class Flag & Flag.Value> implements EnumDisplay { - COLOR("FLAG_COLOR", ColorMode.class, ColorMode.YELLOW, false), - TNT("FLAG_TNT", TNTMode.class, TNTMode.ONLY_TB, true), - FIRE("FLAG_FIRE", FireMode.class, FireMode.ALLOW, true), - FREEZE("FLAG_FREEZE", FreezeMode.class, FreezeMode.INACTIVE, true), - PROTECT("FLAG_PROTECT", ProtectMode.class, ProtectMode.ACTIVE, true), - ITEMS("FLAG_ITEMS", ItemMode.class, ItemMode.INACTIVE, true), - NO_GRAVITY("FLAG_NO_GRAVITY", NoGravityMode.class, NoGravityMode.INACTIVE, true), - ; + @Getter + private static final Set flags = new HashSet<>(); - @Getter - private static final Set flags; - @Getter - private static final Set resetFlags; + private static AtomicInteger counter = new AtomicInteger(0); - static { - flags = EnumSet.allOf(Flag.class); - resetFlags = flags.stream().filter(flag -> flag.reset).collect(Collectors.toUnmodifiableSet()); - } + public static final Flag COLOR = new Flag<>("COLOR", "FLAG_COLOR", ColorMode.class, ColorMode.YELLOW); + public static final Flag TNT = new Flag<>("TNT", "FLAG_TNT", TNTMode.class, TNTMode.ONLY_TB); + public static final Flag FIRE = new Flag<>("FIRE", "FLAG_FIRE", FireMode.class, FireMode.DENY); + public static final Flag FREEZE = new Flag<>("FREEZE", "FLAG_FREEZE", FreezeMode.class, FreezeMode.INACTIVE); + public static final Flag PROTECT = new Flag<>("PROTECT", "FLAG_PROTECT", ProtectMode.class, ProtectMode.ACTIVE); + public static final Flag ITEMS = new Flag<>("ITEMS", "FLAG_ITEMS", ItemMode.class, ItemMode.INACTIVE); + public static final Flag NO_GRAVITY = new Flag<>("NO_GRAVITY", "FLAG_NO_GRAVITY", NoGravityMode.class, NoGravityMode.INACTIVE); + public static final Flag TESTBLOCK = new Flag<>("TESTBLOCK", "FLAG_TESTBLOCK", TestblockMode.class, TestblockMode.NO_VALUE); + public static final Flag CHANGED = new Flag<>("CHANGED", "FLAG_CHANGED", ChangedMode.class, ChangedMode.NO_CHANGE); - private final String chatValue; - private final Class> valueType; - private final Flag.Value defaultValue; - private final boolean reset; + private String name; + private int ordinal; - public Value getFlagValueOf(final String name) { - return this.defaultValue.getValueOf(name); - } + @Getter + private String chatValue; - @Override - public String toString() { - return this.name().toLowerCase(); - } + @Getter + private final Class> valueType; - @Override - public String getChatValue() { - return chatValue; - } + @Getter + private final T defaultValue; - public interface Value & Value> extends EnumDisplay { + @Getter + private final Flag.Value[] values; - T getValue(); + private Flag(String name, String chatValue, Class> valueType, T defaultValue) { + flags.add(this); - T getValueOf(final String name); + this.name = name; + this.ordinal = counter.getAndIncrement(); + this.chatValue = chatValue; - T[] getValues(); + this.valueType = valueType; + this.defaultValue = defaultValue; + this.values = defaultValue.getValues(); + } - default String getName() { - return this.getValue().name().toLowerCase(); - } - } -} \ No newline at end of file + public static Flag valueOf(@NonNull String name) { + for (Flag flag : flags) { + if (flag.name.equalsIgnoreCase(name)) { + return flag; + } + } + throw new IllegalArgumentException("No enum constant Flag." + name); + } + + public Flag.Value valueOfValue(@NonNull String name) { + for (Flag.Value value : values) { + if (value.name().equalsIgnoreCase(name)) { + return value; + } + } + throw new IllegalArgumentException("No enum constant Flag." + this.name + "." + name); + } + + public String name() { + return name; + } + + public int ordinal() { + return ordinal; + } + + public boolean oneOf(Flag... flags) { + for (Flag flag : flags) { + if (flag == this) { + return true; + } + } + return false; + } + + @Override + public String toString() { + return name; + } + + public interface Value & Value> extends EnumDisplay { + + String name(); + + int ordinal(); + + T getValue(); + + T getValueOf(final String name); + + T[] getValues(); + + default String getName() { + return this.getValue().name().toLowerCase(); + } + } +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/FreezeMode.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/FreezeMode.java new file mode 100644 index 00000000..65a9e661 --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/FreezeMode.java @@ -0,0 +1,63 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region.flags; + + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * FreezeMode defines if freeze should be enabled or disabled in a Region + */ +@Getter +@AllArgsConstructor +public enum FreezeMode implements Flag.Value { + + ACTIVE("FLAG_FREEZE_ACTIVE"), + INACTIVE("FLAG_FREEZE_INACTIVE"); + + private static FreezeMode[] values; + private final String chatValue; + + @Override + public FreezeMode[] getValues() { + if (FreezeMode.values == null) { + FreezeMode.values = FreezeMode.values(); + } + return FreezeMode.values; + } + + @Override + public FreezeMode getValue() { + return this; + } + + @Override + public FreezeMode getValueOf(final String name) { + try { + return FreezeMode.valueOf(name.toUpperCase()); + } catch (IllegalArgumentException e) { + if (name.equalsIgnoreCase("false")) { + return FreezeMode.INACTIVE; + } + return FreezeMode.INACTIVE; + } + } +} \ No newline at end of file diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/ItemMode.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/ItemMode.java new file mode 100644 index 00000000..d80492f2 --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/ItemMode.java @@ -0,0 +1,62 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region.flags; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * ItemMode defines if items should be droppable or deleted in a Region + */ +@Getter +@AllArgsConstructor +public enum ItemMode implements Flag.Value { + + ACTIVE("FLAG_ITEMS_ACTIVE"), + INACTIVE("FLAG_ITEMS_INACTIVE"); + + private static ItemMode[] values; + private final String chatValue; + + @Override + public ItemMode[] getValues() { + if (ItemMode.values == null) { + ItemMode.values = ItemMode.values(); + } + return ItemMode.values; + } + + @Override + public ItemMode getValue() { + return this; + } + + @Override + public ItemMode getValueOf(final String name) { + try { + return ItemMode.valueOf(name.toUpperCase()); + } catch (IllegalArgumentException e) { + if (name.equalsIgnoreCase("false")) { + return ItemMode.INACTIVE; + } + return ItemMode.ACTIVE; + } + } +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/NoGravityMode.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/NoGravityMode.java new file mode 100644 index 00000000..f000ab12 --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/NoGravityMode.java @@ -0,0 +1,62 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region.flags; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * NoGravityMode defines if entities and items should have gravity or not in a Region + */ +@Getter +@AllArgsConstructor +public enum NoGravityMode implements Flag.Value { + + ACTIVE("FLAG_NO_GRAVITY_ACTIVE"), + INACTIVE("FLAG_NO_GRAVITY_INACTIVE"); + + private static NoGravityMode[] values; + private final String chatValue; + + @Override + public NoGravityMode[] getValues() { + if (NoGravityMode.values == null) { + NoGravityMode.values = NoGravityMode.values(); + } + return NoGravityMode.values; + } + + @Override + public NoGravityMode getValue() { + return this; + } + + @Override + public NoGravityMode getValueOf(final String name) { + try { + return NoGravityMode.valueOf(name.toUpperCase()); + } catch (IllegalArgumentException e) { + if (name.equalsIgnoreCase("false")) { + return NoGravityMode.INACTIVE; + } + return NoGravityMode.ACTIVE; + } + } +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/ProtectMode.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/ProtectMode.java new file mode 100644 index 00000000..422a6b43 --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/ProtectMode.java @@ -0,0 +1,62 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region.flags; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * ProtectMode defines if the floor should be protected inside a Region + */ +@Getter +@AllArgsConstructor +public enum ProtectMode implements Flag.Value { + + ACTIVE("FLAG_PROTECT_ACTIVE"), + INACTIVE("FLAG_PROTECT_INACTIVE"); + + private static ProtectMode[] values; + private final String chatValue; + + @Override + public ProtectMode[] getValues() { + if (ProtectMode.values == null) { + ProtectMode.values = ProtectMode.values(); + } + return ProtectMode.values; + } + + @Override + public ProtectMode getValue() { + return this; + } + + @Override + public ProtectMode getValueOf(final String name) { + try { + return ProtectMode.valueOf(name.toUpperCase()); + } catch (IllegalArgumentException e) { + if (name.equalsIgnoreCase("false")) { + return ProtectMode.INACTIVE; + } + return ProtectMode.ACTIVE; + } + } +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/TNTMode.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/TNTMode.java new file mode 100644 index 00000000..a934f3d9 --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/TNTMode.java @@ -0,0 +1,60 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region.flags; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * TNTMode defines what TNT Explosions should destroy in a Region + */ +@Getter +@AllArgsConstructor +public enum TNTMode implements Flag.Value { + + ALLOW("FLAG_TNT_ALLOW"), + DENY("FLAG_TNT_DENY"), + ONLY_TB("FLAG_TNT_ONLY_TB"); + + private static TNTMode[] values; + private final String chatValue; + + @Override + public TNTMode[] getValues() { + if (TNTMode.values == null) { + TNTMode.values = TNTMode.values(); + } + return TNTMode.values; + } + + @Override + public TNTMode getValue() { + return this; + } + + @Override + public TNTMode getValueOf(final String name) { + try { + return TNTMode.valueOf(name.toUpperCase()); + } catch (IllegalArgumentException e) { + return TNTMode.ALLOW; + } + } +} \ No newline at end of file diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/TestblockMode.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/TestblockMode.java new file mode 100644 index 00000000..3f3a953e --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/TestblockMode.java @@ -0,0 +1,61 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region.flags; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * TestblockMode defines where the Testblock should be inside a Region + */ +@Getter +@AllArgsConstructor +public enum TestblockMode implements Flag.Value { + + NO_VALUE("FLAG_TESTBLOCK_NO_VALUE", false), + NORTH("FLAG_TESTBLOCK_NORTH", true), + SOUTH("FLAG_TESTBLOCK_SOUTH", false); + + private static TestblockMode[] values; + private final String chatValue; + private final boolean north; + + @Override + public TestblockMode[] getValues() { + if (TestblockMode.values == null) { + TestblockMode.values = TestblockMode.values(); + } + return TestblockMode.values; + } + + @Override + public TestblockMode getValue() { + return this; + } + + @Override + public TestblockMode getValueOf(final String name) { + try { + return TestblockMode.valueOf(name.toUpperCase()); + } catch (IllegalArgumentException e) { + return NO_VALUE; + } + } +} \ No newline at end of file diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ColorMode.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ColorMode.java deleted file mode 100644 index 6902a2fb..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ColorMode.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2021 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 . - */ - -package de.steamwar.bausystem.region.flags.flagvalues; - -import de.steamwar.bausystem.region.Color; -import de.steamwar.bausystem.region.flags.Flag; -import lombok.AllArgsConstructor; -import lombok.Getter; - -@Getter -@AllArgsConstructor -public enum ColorMode implements Flag.Value { - WHITE("FLAG_COLOR_WHITE", Color.WHITE), - ORANGE("FLAG_COLOR_ORANGE", Color.ORANGE), - MAGENTA("FLAG_COLOR_MAGENTA", Color.MAGENTA), - LIGHT_BLUE("FLAG_COLOR_LIGHT_BLUE", Color.LIGHT_BLUE), - YELLOW("FLAG_COLOR_YELLOW", Color.YELLOW), - LIME("FLAG_COLOR_LIME", Color.LIME), - PINK("FLAG_COLOR_PINK", Color.PINK), - GRAY("FLAG_COLOR_GRAY", Color.GRAY), - LIGHT_GRAY("FLAG_COLOR_LIGHT_GRAY", Color.LIGHT_GRAY), - CYAN("FLAG_COLOR_CYAN", Color.CYAN), - PURPLE("FLAG_COLOR_PURPLE", Color.PURPLE), - BLUE("FLAG_COLOR_BLUE", Color.BLUE), - BROWN("FLAG_COLOR_BROWN", Color.BROWN), - GREEN("FLAG_COLOR_GREEN", Color.GREEN), - RED("FLAG_COLOR_RED", Color.RED), - BLACK("FLAG_COLOR_BLACK", Color.BLACK); - - private static ColorMode[] values; - private final String chatValue; - private final Color color; - - @Override - public ColorMode[] getValues() { - if (ColorMode.values == null) { - ColorMode.values = ColorMode.values(); //NOSONAR - } - return ColorMode.values; - } - - @Override - public ColorMode getValue() { - return this; - } - - @Override - public ColorMode getValueOf(final String name) { - try { - return ColorMode.valueOf(name.toUpperCase()); - } catch (IllegalArgumentException e) { - return ColorMode.YELLOW; - } - } -} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/FireMode.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/FireMode.java deleted file mode 100644 index cf0fab31..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/FireMode.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2021 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 . - */ - -package de.steamwar.bausystem.region.flags.flagvalues; - -import de.steamwar.bausystem.region.flags.Flag; -import lombok.AllArgsConstructor; -import lombok.Getter; - -@Getter -@AllArgsConstructor -public enum FireMode implements Flag.Value { - - ALLOW("FLAG_FIRE_ALLOW"), - DENY("FLAG_FIRE_DENY"); - - private static FireMode[] values; - private final String chatValue; - - @Override - public FireMode[] getValues() { - if (FireMode.values == null) { - FireMode.values = FireMode.values(); //NOSONAR - } - return FireMode.values; - } - - @Override - public FireMode getValue() { - return this; - } - - @Override - public FireMode getValueOf(final String name) { - try { - return FireMode.valueOf(name.toUpperCase()); - } catch (IllegalArgumentException e) { - if (name.equalsIgnoreCase("false")) { - return FireMode.DENY; - } - return FireMode.ALLOW; - } - } -} \ No newline at end of file diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/FreezeMode.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/FreezeMode.java deleted file mode 100644 index 1b1774c7..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/FreezeMode.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2021 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 . - */ - -package de.steamwar.bausystem.region.flags.flagvalues; - - -import de.steamwar.bausystem.region.flags.Flag; -import lombok.AllArgsConstructor; -import lombok.Getter; - -@Getter -@AllArgsConstructor -public enum FreezeMode implements Flag.Value { - - ACTIVE("FLAG_FREEZE_ACTIVE"), - INACTIVE("FLAG_FREEZE_INACTIVE"); - - private static FreezeMode[] values; - private final String chatValue; - - @Override - public FreezeMode[] getValues() { - if (FreezeMode.values == null) { - FreezeMode.values = FreezeMode.values(); //NOSONAR - } - return FreezeMode.values; - } - - @Override - public FreezeMode getValue() { - return this; - } - - @Override - public FreezeMode getValueOf(final String name) { - try { - return FreezeMode.valueOf(name.toUpperCase()); - } catch (IllegalArgumentException e) { - if (name.equalsIgnoreCase("false")) { - return FreezeMode.INACTIVE; - } - return FreezeMode.INACTIVE; - } - } -} \ No newline at end of file diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ItemMode.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ItemMode.java deleted file mode 100644 index c0cefa38..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ItemMode.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2021 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 . - */ - -package de.steamwar.bausystem.region.flags.flagvalues; - -import de.steamwar.bausystem.region.flags.Flag; -import lombok.AllArgsConstructor; -import lombok.Getter; - -@Getter -@AllArgsConstructor -public enum ItemMode implements Flag.Value { - - ACTIVE("FLAG_ITEMS_ACTIVE"), - INACTIVE("FLAG_ITEMS_INACTIVE"); - - private static ItemMode[] values; - private final String chatValue; - - @Override - public ItemMode[] getValues() { - if (ItemMode.values == null) { - ItemMode.values = ItemMode.values(); //NOSONAR - } - return ItemMode.values; - } - - @Override - public ItemMode getValue() { - return this; - } - - @Override - public ItemMode getValueOf(final String name) { - try { - return ItemMode.valueOf(name.toUpperCase()); - } catch (IllegalArgumentException e) { - if (name.equalsIgnoreCase("false")) { - return ItemMode.INACTIVE; - } - return ItemMode.ACTIVE; - } - } -} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/NoGravityMode.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/NoGravityMode.java deleted file mode 100644 index 33368a35..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/NoGravityMode.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2021 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 . - */ - -package de.steamwar.bausystem.region.flags.flagvalues; - -import de.steamwar.bausystem.region.flags.Flag; -import lombok.AllArgsConstructor; -import lombok.Getter; - -@Getter -@AllArgsConstructor -public enum NoGravityMode implements Flag.Value { - - ACTIVE("FLAG_NO_GRAVITY_ACTIVE"), - INACTIVE("FLAG_NO_GRAVITY_INACTIVE"); - - private static NoGravityMode[] values; - private final String chatValue; - - @Override - public NoGravityMode[] getValues() { - if (NoGravityMode.values == null) { - NoGravityMode.values = NoGravityMode.values(); //NOSONAR - } - return NoGravityMode.values; - } - - @Override - public NoGravityMode getValue() { - return this; - } - - @Override - public NoGravityMode getValueOf(final String name) { - try { - return NoGravityMode.valueOf(name.toUpperCase()); - } catch (IllegalArgumentException e) { - if (name.equalsIgnoreCase("false")) { - return NoGravityMode.INACTIVE; - } - return NoGravityMode.ACTIVE; - } - } -} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ProtectMode.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ProtectMode.java deleted file mode 100644 index 18ea897b..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ProtectMode.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2021 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 . - */ - -package de.steamwar.bausystem.region.flags.flagvalues; - -import de.steamwar.bausystem.region.flags.Flag; -import lombok.AllArgsConstructor; -import lombok.Getter; - -@Getter -@AllArgsConstructor -public enum ProtectMode implements Flag.Value { - - ACTIVE("FLAG_PROTECT_ACTIVE"), - INACTIVE("FLAG_PROTECT_INACTIVE"); - - private static ProtectMode[] values; - private final String chatValue; - - @Override - public ProtectMode[] getValues() { - if (ProtectMode.values == null) { - ProtectMode.values = ProtectMode.values(); //NOSONAR - } - return ProtectMode.values; - } - - @Override - public ProtectMode getValue() { - return this; - } - - @Override - public ProtectMode getValueOf(final String name) { - try { - return ProtectMode.valueOf(name.toUpperCase()); - } catch (IllegalArgumentException e) { - if (name.equalsIgnoreCase("false")) { - return ProtectMode.INACTIVE; - } - return ProtectMode.ACTIVE; - } - } -} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/TNTMode.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/TNTMode.java deleted file mode 100644 index 9b05d6b5..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/TNTMode.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2021 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 . - */ - -package de.steamwar.bausystem.region.flags.flagvalues; - -import de.steamwar.bausystem.region.flags.Flag; -import lombok.AllArgsConstructor; -import lombok.Getter; - -@Getter -@AllArgsConstructor -public enum TNTMode implements Flag.Value { - - ALLOW("FLAG_TNT_ALLOW"), - DENY("FLAG_TNT_DENY"), - ONLY_TB("FLAG_TNT_ONLY_TB"), - ONLY_BUILD("FLAG_TNT_ONLY_BUILD"); - - private static TNTMode[] values; - private final String chatValue; - - @Override - public TNTMode[] getValues() { - if (TNTMode.values == null) { - TNTMode.values = TNTMode.values(); //NOSONAR - } - return TNTMode.values; - } - - @Override - public TNTMode getValue() { - return this; - } - - @Override - public TNTMode getValueOf(final String name) { - try { - return TNTMode.valueOf(name.toUpperCase()); - } catch (IllegalArgumentException e) { - return TNTMode.ALLOW; - } - } -} \ No newline at end of file diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/loader/Updater.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/loader/Updater.java deleted file mode 100644 index 5e33350a..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/loader/Updater.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2021 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 . - */ - -package de.steamwar.bausystem.region.loader; - -import de.steamwar.bausystem.BauSystem; -import org.bukkit.Bukkit; - -import java.io.File; -import java.util.logging.Level; - -public class Updater { - - private long lastUpdate; - - public Updater(File file, Runnable updaterCode) { - this.lastUpdate = file.lastModified(); - Bukkit.getScheduler().runTaskTimer(BauSystem.getInstance(), () -> { - if (file.lastModified() > lastUpdate + 10) { - try { - updaterCode.run(); - Bukkit.getLogger().log(Level.INFO, "Update complete of " + file.getAbsolutePath()); - } catch (Exception e) { - Bukkit.getLogger().log(Level.INFO, "Error while loading file " + file.getAbsolutePath() + " for config: " + e.getMessage(), e); - } - lastUpdate = file.lastModified(); - } - }, 20, 20); - } - -} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/tags/Tag.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/tags/Tag.java deleted file mode 100644 index e37751d9..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/tags/Tag.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2021 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 . - */ - -package de.steamwar.bausystem.region.tags; - -public enum Tag { - CHANGED, -} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/utils/RegionExtensionType.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/utils/RegionExtensionType.java index 446e0d97..29b6a140 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/utils/RegionExtensionType.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/utils/RegionExtensionType.java @@ -1,25 +1,33 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.region.utils; +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor +@Getter public enum RegionExtensionType { - NORMAL, - EXTENSION + NORMAL(false), + EXTENSION(true), + ; + + private final boolean extension; } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/utils/RegionSelectionType.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/utils/RegionSelectionType.java deleted file mode 100644 index aeac38eb..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/utils/RegionSelectionType.java +++ /dev/null @@ -1,6 +0,0 @@ -package de.steamwar.bausystem.region.utils; - -public enum RegionSelectionType { - LOCAL, - GLOBAL -} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/utils/RegionType.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/utils/RegionType.java index a618c644..e2dcd0e9 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/utils/RegionType.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/utils/RegionType.java @@ -1,34 +1,58 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.region.utils; +import de.steamwar.bausystem.region.Point; +import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.shared.EnumDisplay; import lombok.AllArgsConstructor; import lombok.Getter; -@AllArgsConstructor -public enum RegionType implements EnumDisplay { - NORMAL("REGION_TYPE_NORMAL"), - BUILD("REGION_TYPE_BUILD"), - TESTBLOCK("REGION_TYPE_ONLY_TB"); +import java.util.function.BiFunction; +import java.util.function.Function; +import java.util.function.Predicate; + +@AllArgsConstructor +@Getter +public enum RegionType implements EnumDisplay { + NORMAL("REGION_TYPE_NORMAL", + region -> true, + Region::getArea, + (region, extension) -> region.getArea().getMinPoint(false), + (region, extension) -> region.getArea().getMaxPoint(false)), + BUILD("REGION_TYPE_BUILD", + region -> !region.getBuildArea().isEmpty(), + Region::getBuildArea, + (region, extension) -> region.getBuildArea().getMinPoint(extension), + (region, extension) -> region.getBuildArea().getMaxPoint(extension)), + TESTBLOCK("REGION_TYPE_ONLY_TB", + region -> !region.getTestblockArea().isEmpty(), + Region::getTestblockArea, + (region, extension) -> region.getTestblockArea().getMinPoint(extension), + (region, extension) -> region.getTestblockArea().getMaxPoint(extension)), + ; - @Getter private String chatValue; + + private Predicate hasType; + private Function toInner; + private BiFunction toMinPoint; + private BiFunction toMaxPoint; } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/EnumDisplay.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/EnumDisplay.java index b9cf839c..c1e3c2b8 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/EnumDisplay.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/EnumDisplay.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.shared; public interface EnumDisplay { diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/Pair.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/Pair.java index 9d808fbb..cffb9683 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/Pair.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/Pair.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.shared; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/Position.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/Position.java index a0ae2560..ea653830 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/Position.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/Position.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.shared; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/ReferenceCounter.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/ReferenceCounter.java index 0ccbe672..55237743 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/ReferenceCounter.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/ReferenceCounter.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.shared; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/RoundedPosition.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/RoundedPosition.java index 23aed77f..2a017271 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/RoundedPosition.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/RoundedPosition.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.shared; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/ShowMode.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/ShowMode.java index a37daa40..449764f8 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/ShowMode.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/ShowMode.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.shared; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/SizedStack.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/SizedStack.java index 7d503b2e..751adec3 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/SizedStack.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/shared/SizedStack.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.shared; @@ -130,6 +130,12 @@ public class SizedStack { return size; } + public void clear() { + this.data = (T[]) new Object[this.maxSize]; + this.head = 0; + this.size = 0; + } + @Override public String toString() { final StringBuilder result = new StringBuilder("["); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/BauMemberUpdateEvent.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/BauMemberUpdateEvent.java index 77f2ba3e..833d88ab 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/BauMemberUpdateEvent.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/BauMemberUpdateEvent.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/FlatteningWrapper.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/FlatteningWrapper.java index 3cd96295..412e505c 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/FlatteningWrapper.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/FlatteningWrapper.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/ItemUtils.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/ItemUtils.java index 9c71993c..64bd9197 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/ItemUtils.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/ItemUtils.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/ListChatView.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/ListChatView.java index 09791378..bfc1101f 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/ListChatView.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/ListChatView.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/NMSWrapper.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/NMSWrapper.java index 2c6424c5..2e69eb49 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/NMSWrapper.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/NMSWrapper.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/PasteBuilder.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/PasteBuilder.java index a4a74e17..f6b05414 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/PasteBuilder.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/PasteBuilder.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -26,8 +26,8 @@ import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.block.BlockTypes; -import de.steamwar.bausystem.region.Color; import de.steamwar.bausystem.region.Point; +import de.steamwar.bausystem.region.flags.ColorMode; import de.steamwar.sql.SchematicData; import de.steamwar.sql.SchematicNode; import lombok.Getter; @@ -102,8 +102,8 @@ public class PasteBuilder { return this; } - public PasteBuilder color(Color color) { - if (color == Color.PINK) return this; + public PasteBuilder color(ColorMode color) { + if (color == ColorMode.PINK) return this; Map blockCache = new HashMap<>(); return map((clipboard, blockVector3) -> { @@ -122,7 +122,7 @@ public class PasteBuilder { } /** - * Can only be used before {@link #color(Color)}. + * Can only be used before {@link #color(ColorMode)}. */ public PasteBuilder onlyColors(boolean onlyColors) { if (!onlyColors) return this; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/PlaceItemUtils.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/PlaceItemUtils.java index 3202c88e..4e7c8f12 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/PlaceItemUtils.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/PlaceItemUtils.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -27,7 +27,6 @@ import org.bukkit.*; import org.bukkit.block.*; import org.bukkit.block.data.*; import org.bukkit.block.data.type.Hopper; -import org.bukkit.block.data.type.Observer; import org.bukkit.block.data.type.*; import org.bukkit.entity.Player; import org.bukkit.event.block.BlockCanBuildEvent; @@ -38,7 +37,9 @@ import org.bukkit.inventory.meta.*; import org.bukkit.util.RayTraceResult; import org.bukkit.util.Vector; -import java.util.*; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/PlaceItemWrapper.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/PlaceItemWrapper.java index d518adbc..a913cd15 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/PlaceItemWrapper.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/PlaceItemWrapper.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/PlayerMovementWrapper.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/PlayerMovementWrapper.java index b0cebfdd..79c52f0c 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/PlayerMovementWrapper.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/PlayerMovementWrapper.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/RayTraceUtils.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/RayTraceUtils.java index 013aff47..72ae2750 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/RayTraceUtils.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/RayTraceUtils.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/ScoreboardElement.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/ScoreboardElement.java index 5f573322..6867bc92 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/ScoreboardElement.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/ScoreboardElement.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/TickEndEvent.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/TickEndEvent.java index 11b90f80..ad145dbe 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/TickEndEvent.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/TickEndEvent.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/TickListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/TickListener.java index 029a2e5c..a300b0ca 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/TickListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/TickListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/TickStartEvent.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/TickStartEvent.java index 1134a832..fbb02f22 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/TickStartEvent.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/TickStartEvent.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/TimeScoreboardElement.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/TimeScoreboardElement.java index d3ca0fea..f1f7cbdf 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/TimeScoreboardElement.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/TimeScoreboardElement.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/WorldEditUtils.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/WorldEditUtils.java index 3fef4e48..078a32fd 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/WorldEditUtils.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/WorldEditUtils.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/bossbar/BauSystemBossbar.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/bossbar/BauSystemBossbar.java index e72e0b53..35b5bbf8 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/bossbar/BauSystemBossbar.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/bossbar/BauSystemBossbar.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils.bossbar; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/bossbar/BossBarService.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/bossbar/BossBarService.java index e6ea2c16..1b610ecf 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/bossbar/BossBarService.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/bossbar/BossBarService.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils.bossbar; @@ -51,7 +51,7 @@ public class BossBarService implements Listener { .computeIfAbsent(key, k -> { BossBar bossBar = Bukkit.createBossBar("", BarColor.WHITE, BarStyle.SOLID); bossBar.addPlayer(player); - if (region.isGlobal()) { + if (region.getType().isGlobal()) { return new GlobalBossbar(bossBar); } else { return new RegionedBossbar(bossBar, region, player); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/bossbar/GlobalBossbar.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/bossbar/GlobalBossbar.java index a5aaf9fe..dee1e030 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/bossbar/GlobalBossbar.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/bossbar/GlobalBossbar.java @@ -1,26 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils.bossbar; -import de.steamwar.bausystem.region.GlobalRegion; import de.steamwar.bausystem.region.Region; +import de.steamwar.bausystem.region.RegionSystem; import org.bukkit.boss.BarColor; import org.bukkit.boss.BarFlag; import org.bukkit.boss.BarStyle; @@ -101,7 +101,7 @@ public class GlobalBossbar implements BauSystemBossbar { @Override public Region getRegion() { - return GlobalRegion.getInstance(); + return RegionSystem.INSTANCE.getGlobalRegion(); } @Override diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/bossbar/RegionedBossbar.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/bossbar/RegionedBossbar.java index 5fb1cc99..fa23de99 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/bossbar/RegionedBossbar.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/utils/bossbar/RegionedBossbar.java @@ -1,28 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.utils.bossbar; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.region.Region; -import de.steamwar.bausystem.region.utils.RegionExtensionType; -import de.steamwar.bausystem.region.utils.RegionType; import org.bukkit.Bukkit; import org.bukkit.boss.BarColor; import org.bukkit.boss.BarFlag; @@ -120,7 +118,7 @@ public class RegionedBossbar implements BauSystemBossbar, Listener { @EventHandler public void onPlayerMove(PlayerMoveEvent event) { if (event.getPlayer() != player) return; - if (region.inRegion(event.getTo(), RegionType.NORMAL, RegionExtensionType.NORMAL)) { + if (region.getArea().inRegion(event.getTo(), false)) { bossBar.addPlayer(player); } else { bossBar.removePlayer(player); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/worlddata/SimulatorData.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/worlddata/SimulatorData.java index 7b3687b8..1b8a4f9b 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/worlddata/SimulatorData.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/worlddata/SimulatorData.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.worlddata; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/worlddata/WorldData.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/worlddata/WorldData.java index 36a5297d..bd661172 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/worlddata/WorldData.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/worlddata/WorldData.java @@ -1,25 +1,24 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.worlddata; -import de.steamwar.sql.SteamwarUser; import lombok.experimental.UtilityClass; import org.bukkit.Bukkit; import yapion.hierarchy.output.FileOutput; @@ -59,25 +58,11 @@ public class WorldData { if (optionsFile.length() != 0) { try (BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream(optionsFile))) { worldData = YAPIONParser.parse(bufferedInputStream, new StreamOptions().charset(InputStreamCharsets.UTF_8)); - if (!worldData.containsKey("regions")) { - YAPIONObject yapionObject = new YAPIONObject(); - yapionObject.add("regions", worldData); - worldData = yapionObject; - write(); - } } catch (IOException e) { // Ignored } - } - - // Conversion from old simulator saving to new one - if (worldData.containsKey("simulators")) { - YAPIONObject yapionObject = worldData.getObject("simulators"); - worldData.remove("simulators"); - yapionObject.forEach((s, yapionAnyType) -> { - SteamwarUser steamwarUser = SteamwarUser.get(Integer.parseInt(s)); - SimulatorData.saveSimulator(steamwarUser, new YAPIONObject().add("", yapionAnyType)); - }); + } else { + write(); } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/linkage/Linked.java b/BauSystem/BauSystem_Main/src/de/steamwar/linkage/Linked.java deleted file mode 100644 index 3b0aa9e0..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/linkage/Linked.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2022 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 . - */ - -package de.steamwar.linkage; - -import org.atteo.classindex.IndexAnnotated; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@IndexAnnotated -@Retention(RetentionPolicy.SOURCE) -@Target({ElementType.TYPE}) -public @interface Linked { -} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/linkage/LinkedInstance.java b/BauSystem/BauSystem_Main/src/de/steamwar/linkage/LinkedInstance.java deleted file mode 100644 index 04e382d1..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/linkage/LinkedInstance.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2022 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 . - */ - -package de.steamwar.linkage; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.FIELD}) -public @interface LinkedInstance { -} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/linkage/MaxVersion.java b/BauSystem/BauSystem_Main/src/de/steamwar/linkage/MaxVersion.java deleted file mode 100644 index 79dbfe94..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/linkage/MaxVersion.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2022 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 . - */ - -package de.steamwar.linkage; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE}) -public @interface MaxVersion { - int value(); -} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/linkage/MinVersion.java b/BauSystem/BauSystem_Main/src/de/steamwar/linkage/MinVersion.java deleted file mode 100644 index 82d9ce3d..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/linkage/MinVersion.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2022 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 . - */ - -package de.steamwar.linkage; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE}) -public @interface MinVersion { - int value(); -} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/linkage/PluginCheck.java b/BauSystem/BauSystem_Main/src/de/steamwar/linkage/PluginCheck.java deleted file mode 100644 index 332e2b4f..00000000 --- a/BauSystem/BauSystem_Main/src/de/steamwar/linkage/PluginCheck.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2022 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 . - */ - -package de.steamwar.linkage; - -import java.lang.annotation.*; - -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE}) -@Repeatable(PluginCheck.PluginChecks.class) -public @interface PluginCheck { - Has has() default Has.THIS; - String value(); - - enum Has { - THIS, - NOT - } - - @Retention(RetentionPolicy.RUNTIME) - @Target({ElementType.TYPE}) - @interface PluginChecks { - @SuppressWarnings("unused") PluginCheck[] value() default {}; - } -} diff --git a/BauSystem/BauSystem_RegionFixed/build.gradle.kts b/BauSystem/BauSystem_RegionFixed/build.gradle.kts new file mode 100644 index 00000000..beb90143 --- /dev/null +++ b/BauSystem/BauSystem_RegionFixed/build.gradle.kts @@ -0,0 +1,47 @@ +/* + * 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 +} + +java { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 +} + +dependencies { + compileOnly(project(":BauSystem:BauSystem_Main", "default")) + compileOnly(project(":SpigotCore", "default")) + + compileOnly(libs.spigotapi) + compileOnly(libs.axiom) + compileOnly(libs.authlib) + compileOnly(libs.viaapi) + + compileOnly(libs.nms20) + compileOnly(libs.fawe18) + + implementation(libs.luaj) + implementation(files("$projectDir/../libs/YAPION-SNAPSHOT.jar")) +} diff --git a/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/FixedRegionSystem.java b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/FixedRegionSystem.java new file mode 100644 index 00000000..7b363d53 --- /dev/null +++ b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/FixedRegionSystem.java @@ -0,0 +1,82 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region; + +import de.steamwar.bausystem.region.fixed.FixedGlobalRegion; +import de.steamwar.bausystem.region.fixed.loader.PrototypeLoader; +import de.steamwar.bausystem.region.fixed.loader.RegionLoader; +import lombok.NonNull; +import org.bukkit.Bukkit; +import org.bukkit.Location; + +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; +import java.util.UUID; +import java.util.stream.Stream; + +public class FixedRegionSystem implements RegionSystem { + + private static final Map REGION_MAP = new HashMap<>(); + + public static void addRegion(Region region) { + REGION_MAP.put(region.getID(), region); + } + + @Override + public void load() { + PrototypeLoader.load(); + RegionLoader.load(); + } + + @Override + public void save() { + } + + @Override + public @NonNull Location getWorldSpawn() { + Location spawnLocation = Bukkit.getWorlds().get(0).getSpawnLocation(); + Location spawnPoint = Bukkit.getWorlds().get(0).getHighestBlockAt(spawnLocation).getLocation(); + return spawnPoint.add(0.5, 1, 0.5); + } + + @Override + public Region getGlobalRegion() { + return FixedGlobalRegion.INSTANCE; + } + + @Override + public Region get(Location location) { + return REGION_MAP.values().stream() + .filter(region -> region.getArea().inRegion(location, false)) + .findFirst() + .orElse(FixedGlobalRegion.INSTANCE); + } + + @Override + public Optional getRegion(@NonNull UUID id) { + return Optional.ofNullable(REGION_MAP.get(id)); + } + + @Override + public Stream getRegions() { + return REGION_MAP.values().stream(); + } +} diff --git a/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedFlagStorage.java b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedFlagStorage.java new file mode 100644 index 00000000..293e0121 --- /dev/null +++ b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedFlagStorage.java @@ -0,0 +1,101 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region.fixed; + +import de.steamwar.bausystem.region.FlagOptional; +import de.steamwar.bausystem.region.FlagStorage; +import de.steamwar.bausystem.region.RegionFlagPolicy; +import de.steamwar.bausystem.region.flags.Flag; +import de.steamwar.bausystem.worlddata.WorldData; +import de.steamwar.core.Core; +import lombok.NonNull; +import yapion.hierarchy.types.YAPIONObject; + +import java.util.HashMap; +import java.util.Map; + +public class FixedFlagStorage implements FlagStorage { + + private Map, Flag.Value> flagMap = new HashMap<>(); + private YAPIONObject data; + + public FixedFlagStorage(YAPIONObject data) { + this.data = data; + for (final Flag flag : Flag.getFlags()) { + if (!has(flag).isWritable()) continue; + try { + String s = data.getPlainValue(flag.name()); + flagMap.put(flag, flag.valueOfValue(s)); + } catch (Exception e) { + flagMap.put(flag, (Flag.Value) flag.getDefaultValue()); + } + } + } + + @Override + public @NonNull & Flag.Value> RegionFlagPolicy has(@NonNull Flag flag) { + if (flag.oneOf(Flag.COLOR, Flag.TNT, Flag.FIRE, Flag.FREEZE, Flag.PROTECT, Flag.NO_GRAVITY, Flag.CHANGED)) { + return RegionFlagPolicy.WRITABLE; + } + if (flag.oneOf(Flag.ITEMS) && Core.getVersion() >= 20) { + return RegionFlagPolicy.WRITABLE; + } + if (flag.oneOf(Flag.TESTBLOCK)) { + return RegionFlagPolicy.READ_ONLY; + } + return RegionFlagPolicy.NOT_APPLICABLE; + } + + @Override + public & Flag.Value> boolean set(@NonNull Flag flag, @NonNull T value) { + if (has(flag).isWritable()) { + boolean hasChanged = flagMap.put(flag, value) != value; + if (hasChanged) { + data.put(flag.name(), value.name()); + WorldData.write(); + } + return hasChanged; + } else { + return false; + } + } + + @Override + public @NonNull & Flag.Value> FlagOptional get(@NonNull Flag flag) { + return FlagOptional.of(flag, (T) flagMap.get(flag)); + } + + @Override + public void clear() { + flagMap.clear(); + } + + @Override + public Map, Flag.Value> getBackedMap() { + return flagMap; + } + + @Override + public String toString() { + return "FixedFlagStorage{" + + "flagMap=" + flagMap + + '}'; + } +} diff --git a/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedGlobalFlagStorage.java b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedGlobalFlagStorage.java new file mode 100644 index 00000000..1fc4be27 --- /dev/null +++ b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedGlobalFlagStorage.java @@ -0,0 +1,108 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region.fixed; + +import de.steamwar.bausystem.region.FlagOptional; +import de.steamwar.bausystem.region.FlagStorage; +import de.steamwar.bausystem.region.RegionFlagPolicy; +import de.steamwar.bausystem.region.flags.ColorMode; +import de.steamwar.bausystem.region.flags.Flag; +import de.steamwar.bausystem.region.flags.ProtectMode; +import de.steamwar.bausystem.region.flags.TNTMode; +import de.steamwar.bausystem.worlddata.WorldData; +import de.steamwar.core.Core; +import lombok.NonNull; +import yapion.hierarchy.types.YAPIONObject; + +import java.util.HashMap; +import java.util.Map; + +public class FixedGlobalFlagStorage implements FlagStorage { + + private Map, Flag.Value> flagMap = new HashMap<>(); + private YAPIONObject data; + + public FixedGlobalFlagStorage(YAPIONObject data) { + flagMap.put(Flag.TNT, TNTMode.DENY); + this.data = data; + for (final Flag flag : Flag.getFlags()) { + if (!has(flag).isWritable()) continue; + try { + String s = data.getPlainValue(flag.name()); + flagMap.put(flag, flag.valueOfValue(s)); + } catch (Exception e) { + flagMap.put(flag, (Flag.Value) flag.getDefaultValue()); + } + } + } + + @Override + public @NonNull & Flag.Value> RegionFlagPolicy has(@NonNull Flag flag) { + if (flag.oneOf(Flag.COLOR)) { + return RegionFlagPolicy.READ_ONLY; + } + if (flag.oneOf(Flag.ITEMS) && Core.getVersion() >= 20) { + return RegionFlagPolicy.WRITABLE; + } + if (flag.oneOf(Flag.TNT, Flag.FIRE, Flag.FREEZE)) { + return RegionFlagPolicy.WRITABLE; + } + return RegionFlagPolicy.NOT_APPLICABLE; + } + + @Override + public & Flag.Value> boolean set(@NonNull Flag flag, @NonNull T value) { + if (has(flag).isWritable()) { + data.put(flag.name(), value.name()); + WorldData.write(); + return flagMap.put(flag, value) != value; + } else { + return false; + } + } + + @Override + public @NonNull & Flag.Value> FlagOptional get(@NonNull Flag flag) { + if (flag.oneOf(Flag.COLOR)) { + return FlagOptional.of((Flag) flag, ColorMode.YELLOW); + } + if (flag.oneOf(Flag.PROTECT)) { + return FlagOptional.of((Flag) flag, ProtectMode.INACTIVE); + } + return FlagOptional.of(flag, (T) flagMap.get(flag)); + } + + @Override + public void clear() { + flagMap.clear(); + } + + @Override + public Map, Flag.Value> getBackedMap() { + return flagMap; + } + + @Override + public String toString() { + return "FixedGlobalFlagStorage{" + + "flagMap=" + flagMap + + '}'; + } +} diff --git a/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedGlobalRegion.java b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedGlobalRegion.java new file mode 100644 index 00000000..b5da64f5 --- /dev/null +++ b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedGlobalRegion.java @@ -0,0 +1,147 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region.fixed; + +import com.sk89q.worldedit.extent.clipboard.Clipboard; +import de.steamwar.bausystem.region.*; +import de.steamwar.bausystem.utils.PasteBuilder; +import de.steamwar.sql.GameModeConfig; +import lombok.NonNull; +import lombok.Setter; +import org.bukkit.Location; +import org.bukkit.Material; + +import javax.annotation.Nullable; +import java.io.File; +import java.util.UUID; +import java.util.function.BiConsumer; + +public final class FixedGlobalRegion implements Region { + + public static final FixedGlobalRegion INSTANCE = new FixedGlobalRegion(); + + private static final Point MIN_POINT = new Point(Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE); + private static final Point MAX_POINT = new Point(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE); + + @Setter + private static FlagStorage FLAG_STORAGE; + + private static final UUID GLOBAL_REGION_ID = new UUID(0, 0); + + private static final Area GLOBAL_AREA = new Area() { + @Override + public @NonNull Point getMinPoint(boolean extension) { + return MIN_POINT; + } + + @Override + public @NonNull Point getMaxPoint(boolean extension) { + return MAX_POINT; + } + + @Override + public @NonNull Point getCopyPoint() { + return Point.ZERO; + } + + @Override + public boolean inRegion(Location location, boolean extension) { + return true; + } + + @Nullable + @Override + public Clipboard copy(boolean extension) { + return null; + } + + @Nullable + @Override + public File getResetFile() { + return null; + } + + @Override + public void reset(PasteBuilder pasteBuilder, boolean extension) { + } + + @Override + public void forEachChunk(BiConsumer executor) { + } + + @Override + public boolean isChunkOutside(int chunkX, int chunkZ) { + return false; + } + }; + + private FixedGlobalRegion() { + } + + @Override + public RegionType getType() { + return RegionType.GLOBAL; + } + + @Override + public @NonNull UUID getID() { + return GLOBAL_REGION_ID; + } + + @Override + public @NonNull FlagStorage getFlags() { + return FLAG_STORAGE; + } + + @Override + public @NonNull Area getArea() { + return GLOBAL_AREA; + } + + @Override + public @NonNull Area getBuildArea() { + return Area.EMPTY; + } + + @Override + public @NonNull Area getTestblockArea() { + return Area.EMPTY; + } + + @Override + public @NonNull GameModeConfig getGameModeConfig() { + return GameModeConfig.getDefaults(); + } + + @Override + public @NonNull RegionHistory getHistory() { + return RegionHistory.EMPTY; + } + + @Override + public @NonNull RegionBackups getBackups() { + return RegionBackups.EMPTY; + } + + @Override + public @NonNull RegionData getRegionData() { + return RegionData.EMPTY; + } +} diff --git a/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedRegion.java b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedRegion.java new file mode 100644 index 00000000..0d8c03f5 --- /dev/null +++ b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedRegion.java @@ -0,0 +1,398 @@ +/* + * 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 . + */ + +package de.steamwar.bausystem.region.fixed; + +import com.sk89q.worldedit.EditSession; +import de.steamwar.bausystem.BauSystem; +import de.steamwar.bausystem.region.*; +import de.steamwar.bausystem.region.flags.Flag; +import de.steamwar.bausystem.region.flags.TestblockMode; +import de.steamwar.bausystem.utils.FlatteningWrapper; +import de.steamwar.bausystem.utils.PasteBuilder; +import de.steamwar.bausystem.worlddata.WorldData; +import de.steamwar.core.Core; +import de.steamwar.sql.GameModeConfig; +import de.steamwar.sql.SchematicType; +import lombok.NonNull; +import org.bukkit.Bukkit; +import org.bukkit.Material; +import yapion.hierarchy.types.YAPIONObject; + +import javax.annotation.Nullable; +import java.io.File; +import java.nio.charset.StandardCharsets; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.*; +import java.util.stream.Collectors; + +public class FixedRegion implements Region { + + private static final File backupFolder = new File(Bukkit.getWorlds().get(0).getWorldFolder(), "backup"); + private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy.MM.dd' 'HH:mm:ss"); + + private final String name; + private final UUID uuid; + private final FixedFlagStorage flagStorage; + private final Prototype prototype; + private final String skin; + + private final Area area; + private final Area build; + private final Area testblock; + private final int floorLevel; + private final int waterLevel; + private final GameModeConfig gameModeConfig; + private final RegionData regionData; + private final RegionHistory regionHistory = new RegionHistory.Impl(20); + + private final RegionBackups regionBackups = new RegionBackups() { + @Override + public Optional create(BackupType backupType) { + final File definedBackupFolder = new File(new File(backupFolder, prototype.getName()), name); + //noinspection ResultOfMethodCallIgnored + definedBackupFolder.mkdirs(); + + File[] currentBackups = definedBackupFolder.listFiles(); + if (currentBackups != null && currentBackups.length >= 20) { + List files = new ArrayList<>(Arrays.asList(currentBackups)); + files.sort(Comparator.comparingLong(File::lastModified)); + while (files.size() >= 20) files.remove(0).delete(); + } + + final File backupFile = new File(definedBackupFolder, LocalDateTime.now().format(formatter) + ".schem"); + Point minPoint = area.getMinPoint(false); + Point maxPoint = area.getMaxPoint(false); + if (!FlatteningWrapper.impl.backup(minPoint, maxPoint, backupFile)) { + return Optional.empty(); + } + return Optional.of(new BackupImpl(backupFile)); + } + + @Override + public @NonNull List list() { + final File definedBackupFolder = new File(new File(backupFolder, prototype.getName()), name); + //noinspection ResultOfMethodCallIgnored + definedBackupFolder.mkdirs(); + + File[] currentBackups = definedBackupFolder.listFiles(); + if (currentBackups == null || currentBackups.length == 0) { + return Collections.emptyList(); + } + List files = new ArrayList<>(Arrays.asList(currentBackups)); + files.sort(Comparator.comparingLong(File::lastModified)); + return files.stream().map(BackupImpl::new).collect(Collectors.toList()); + } + + @Nullable + @Override + public Backup get(String name) { + final File definedBackupFolder = new File(new File(backupFolder, prototype.getName()), FixedRegion.this.name); + //noinspection ResultOfMethodCallIgnored + definedBackupFolder.mkdirs(); + File[] files = definedBackupFolder.listFiles((dir, s) -> s.equals(name.replace('_', ' ') + ".schem")); + if (files == null || files.length == 0) return null; + return new BackupImpl(files[0]); + } + }; + + private class BackupImpl extends RegionBackups.Backup { + + private final File file; + + public BackupImpl(File file) { + super(RegionBackups.BackupType.AUTOMATIC, file.getName().replace(' ', '_').replace(".schem", ""), flagStorage); + this.file = file; + } + + @Override + public boolean load() { + if (!file.exists()) return false; + EditSession editSession = new PasteBuilder(new PasteBuilder.FileProvider(file)) + .pastePoint(area.getMinPoint(false).add(prototype.getSizeX() / 2, 0, prototype.getSizeZ() / 2)) + .minPoint(area.getMinPoint(false)) + .maxPoint(area.getMaxPoint(false)) + .waterLevel(waterLevel) + .run(); + regionHistory.remember(editSession); + return true; + } + + @Override + public void delete() { + file.delete(); + } + } + + public FixedRegion(String name, FixedFlagStorage flagStorage, Prototype prototype, YAPIONObject regionConfig, YAPIONObject regionData) { + this.name = name; + uuid = UUID.nameUUIDFromBytes(name.getBytes(StandardCharsets.UTF_8)); + this.flagStorage = flagStorage; + this.prototype = prototype; + this.skin = prototype.getDefaultSkin(); + + Point minPoint; + if (regionConfig.containsKey("minX", Integer.class) && regionConfig.containsKey("minY", Integer.class) && regionConfig.containsKey("minZ", Integer.class)) { + minPoint = new Point(regionConfig.getInt("minX"), regionConfig.getInt("minY"), regionConfig.getInt("minZ")); + } else { + throw new IllegalArgumentException("minX and minY and minZ are required"); + } + Point maxPoint = minPoint.add(prototype.getSizeX() - 1, prototype.getSizeY() - 1, prototype.getSizeZ() - 1); + + area = new Area() { + @Override + public @NonNull Point getMinPoint(boolean extension) { + return minPoint; + } + + @Override + public @NonNull Point getMaxPoint(boolean extension) { + return maxPoint; + } + + @Override + public @NonNull Point getCopyPoint() { + return minPoint; + } + + @Nullable + @Override + public File getResetFile() { + return prototype.getSkinMap().get(skin).getSchematicFile(); + } + + @Override + public void reset(PasteBuilder pasteBuilder, boolean extension) { + pasteBuilder.reset(extension) + .minPoint(getMinPoint(extension)) + .maxPoint(getMaxPoint(extension)) + .waterLevel(waterLevel); + if (pasteBuilder.getClipboardProvider().is(PasteBuilder.SchematicProvider.class)) { + SchematicType schematicType = pasteBuilder.getClipboardProvider().as(PasteBuilder.SchematicProvider.class).getSchematic().getSchemtype(); + pasteBuilder.rotate(schematicType.fightType() || schematicType.check()); + } + pasteBuilder.pastePoint(minPoint.add(prototype.getSizeX() / 2, 0, prototype.getSizeZ() / 2)); + regionHistory.remember(pasteBuilder.run()); + } + }; + + if (prototype.getBuild() != null) { + Point minPointBuild = minPoint.add(prototype.getBuild().getOffsetX(), prototype.getBuild().getOffsetY(), prototype.getBuild().getOffsetZ()); + Point maxPointBuild = minPointBuild.add(prototype.getBuild().getSizeX() - 1, prototype.getBuild().getSizeY() - 1, prototype.getBuild().getSizeZ() - 1); + + Point minPointBuildExtension = minPointBuild.subtract(prototype.getBuild().getExtensionNegativeX(), prototype.getBuild().getExtensionNegativeY(), prototype.getBuild().getExtensionNegativeZ()); + Point maxPointBuildExtension = maxPointBuild.add(prototype.getBuild().getExtensionPositiveX(), prototype.getBuild().getExtensionPositiveY(), prototype.getBuild().getExtensionPositiveZ()); + + Point copyPoint; + if (!prototype.getBuild().isHasCopyPoint() && (prototype.getCopyPointOffsetX() != 0 || prototype.getCopyPointOffsetY() != 0 || prototype.getCopyPointOffsetZ() != 0)) { + copyPoint = minPoint.add(prototype.getCopyPointOffsetX(), prototype.getCopyPointOffsetY(), prototype.getCopyPointOffsetZ()); + } else if (prototype.getBuild().getCopyOffsetX() != 0 || prototype.getBuild().getCopyOffsetY() != 0 || prototype.getBuild().getCopyOffsetZ() != 0) { + copyPoint = minPointBuild.add(prototype.getBuild().getCopyOffsetX(), prototype.getBuild().getCopyOffsetY(), prototype.getBuild().getCopyOffsetZ()); + } else { + copyPoint = minPointBuild.add(prototype.getBuild().getSizeX() / 2, 0, prototype.getBuild().getSizeZ()); + } + + build = new Area() { + @Override + public @NonNull Point getMinPoint(boolean extension) { + return extension ? minPointBuildExtension : minPointBuild; + } + + @Override + public @NonNull Point getMaxPoint(boolean extension) { + return extension ? maxPointBuildExtension : maxPointBuild; + } + + @Override + public @NonNull Point getCopyPoint() { + return copyPoint; + } + + @Nullable + @Override + public File getResetFile() { + return prototype.getSkinMap().get(skin).getBuildSchematicFile(); + } + + @Override + public void reset(PasteBuilder pasteBuilder, boolean extension) { + pasteBuilder.reset(extension) + .minPoint(getMinPoint(extension)) + .maxPoint(getMaxPoint(extension)) + .waterLevel(waterLevel); + if (pasteBuilder.getClipboardProvider().is(PasteBuilder.SchematicProvider.class)) { + SchematicType schematicType = pasteBuilder.getClipboardProvider().as(PasteBuilder.SchematicProvider.class).getSchematic().getSchemtype(); + pasteBuilder.rotate(schematicType.fightType() || schematicType.check()); + } + pasteBuilder.pastePoint(minPointBuild.add(prototype.getBuild().getSizeX() / 2, 0, prototype.getBuild().getSizeZ() / 2)); + regionHistory.remember(pasteBuilder.run()); + } + }; + } else { + build = Area.EMPTY; + } + + if (prototype.getTestblock() != null) { + Point minPointTestblock = minPoint.add(prototype.getTestblock().getOffsetX(), prototype.getTestblock().getOffsetY(), prototype.getTestblock().getOffsetZ()); + Point maxPointTestblock = minPointTestblock.add(prototype.getTestblock().getSizeX() - 1, prototype.getTestblock().getSizeY() - 1, prototype.getTestblock().getSizeZ() - 1); + + Point minPointTestblockExtension = minPointTestblock.subtract(prototype.getTestblock().getExtensionNegativeX(), prototype.getTestblock().getExtensionNegativeY(), prototype.getTestblock().getExtensionNegativeZ()); + Point maxPointTestblockExtension = maxPointTestblock.add(prototype.getTestblock().getExtensionPositiveX(), prototype.getTestblock().getExtensionPositiveY(), prototype.getTestblock().getExtensionPositiveZ()); + + Point copyPoint; + if (prototype.getTestblock().getCopyOffsetX() != 0 || prototype.getTestblock().getCopyOffsetY() != 0 || prototype.getTestblock().getCopyOffsetZ() != 0) { + copyPoint = minPointTestblock.add(prototype.getTestblock().getCopyOffsetX(), prototype.getTestblock().getCopyOffsetY(), prototype.getTestblock().getCopyOffsetZ()); + } else { + copyPoint = minPointTestblock.add(prototype.getTestblock().getSizeX() / 2, 0, -1); + } + + testblock = new Area() { + @Override + public @NonNull Point getMinPoint(boolean extension) { + return extension ? minPointTestblockExtension : minPointTestblock; + } + + @Override + public @NonNull Point getMaxPoint(boolean extension) { + return extension ? maxPointTestblockExtension : maxPointTestblock; + } + + @Override + public @NonNull Point getCopyPoint() { + return copyPoint; + } + + @Nullable + @Override + public File getResetFile() { + return prototype.getSkinMap().get(skin).getTestblockSchematicFile(); + } + + @Override + public void reset(PasteBuilder pasteBuilder, boolean extension) { + pasteBuilder.reset(extension) + .minPoint(getMinPoint(extension)) + .maxPoint(getMaxPoint(extension)) + .waterLevel(waterLevel); + if (pasteBuilder.getClipboardProvider().is(PasteBuilder.SchematicProvider.class)) { + SchematicType schematicType = pasteBuilder.getClipboardProvider().as(PasteBuilder.SchematicProvider.class).getSchematic().getSchemtype(); + pasteBuilder.rotate(schematicType.fightType() || schematicType.check()); + } + Point pastePoint = minPointTestblock.add(prototype.getTestblock().getSizeX() / 2, 0, prototype.getTestblock().getSizeZ() / 2); + if (pasteBuilder.getClipboardProvider().is(PasteBuilder.SchematicProvider.class)) { + SchematicType schematicType = pasteBuilder.getClipboardProvider().as(PasteBuilder.SchematicProvider.class).getSchematic().getSchemtype(); + if (schematicType.getKuerzel().equalsIgnoreCase("wg")) { + pastePoint = pastePoint.add(0, 0, 1); + } + if (schematicType.getKuerzel().equalsIgnoreCase("ws")) { + pastePoint = pastePoint.add(-1, 0, 1); + } + if (schematicType.getKuerzel().equalsIgnoreCase("as")) { + pastePoint = pastePoint.add(-1, 0, 1); + } + } + pasteBuilder.pastePoint(pastePoint); + regionHistory.remember(pasteBuilder.run()); + } + }; + } else { + testblock = Area.EMPTY; + } + + if (!testblock.isEmpty() && !build.isEmpty()) { + if (testblock.getMinPoint(false).getZ() > build.getMinPoint(false).getZ()) { + flagStorage.getBackedMap().put(Flag.TESTBLOCK, TestblockMode.SOUTH); + } else { + flagStorage.getBackedMap().put(Flag.TESTBLOCK, TestblockMode.NORTH); + } + } else { + flagStorage.getBackedMap().put(Flag.TESTBLOCK, TestblockMode.NO_VALUE); + } + + floorLevel = prototype.getFloorOffset() != 0 ? minPoint.getY() + prototype.getFloorOffset() : 0; + waterLevel = prototype.getWaterOffset() != 0 ? minPoint.getX() + prototype.getWaterOffset() : 0; + + File found = null; + File baseFile = new File(BauSystem.getInstance().getDataFolder().getParentFile(), "FightSystem"); + for (int version = Core.getVersion(); version >= 15; version--) { + File specific = new File(baseFile, prototype.getDisplayName() + version + ".yml"); + if (specific.exists()) { + found = specific; + break; + } + } + if (found == null) { + this.gameModeConfig = GameModeConfig.getDefaults(); + } else { + this.gameModeConfig = GameModeConfig.getByFileName(found); + } + this.regionData = new RegionData.RegionDataImpl(regionData, WorldData::write); + } + + @Override + public @NonNull UUID getID() { + return uuid; + } + + @Override + public @NonNull RegionType getType() { + return RegionType.NORMAL; + } + + @Override + public @NonNull FlagStorage getFlags() { + return flagStorage; + } + + @Override + public @NonNull Area getArea() { + return area; + } + + @Override + public @NonNull Area getBuildArea() { + return build; + } + + @Override + public @NonNull Area getTestblockArea() { + return testblock; + } + + @Override + public @NonNull GameModeConfig getGameModeConfig() { + return gameModeConfig; + } + + @Override + public @NonNull RegionHistory getHistory() { + return regionHistory; + } + + @Override + public @NonNull RegionBackups getBackups() { + return regionBackups; + } + + @Override + public @NonNull RegionData getRegionData() { + return regionData; + } +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/Prototype.java b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/Prototype.java similarity index 85% rename from BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/Prototype.java rename to BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/Prototype.java index f4aefc56..948ab301 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/Prototype.java +++ b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/Prototype.java @@ -1,24 +1,25 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ -package de.steamwar.bausystem.region; +package de.steamwar.bausystem.region.fixed; +import de.steamwar.bausystem.region.FixedRegionSystem; import lombok.AllArgsConstructor; import lombok.Getter; import yapion.hierarchy.types.YAPIONObject; @@ -125,11 +126,11 @@ public class Prototype { skinMap.put(displayName, new Skin(defaultSkin, null, schematicFile, testblockSchematicFile, buildSchematicFile)); } - if (PROTOTYPE_MAP.containsKey(name)) { - Region.getRegion(PROTOTYPE_MAP.remove(name)).forEach(region -> { - region._setPrototype(this); - }); - } + // if (PROTOTYPE_MAP.containsKey(name)) { + // Region.getRegion(PROTOTYPE_MAP.remove(name)).forEach(region -> { + // region._setPrototype(this); + // }); + // } PROTOTYPE_MAP.put(name, this); } @@ -208,19 +209,14 @@ public class Prototype { } } - public static Region generateRegion(String name, YAPIONObject regionConfig, YAPIONObject regionData) { + public static void generateRegion(String name, YAPIONObject regionConfig, YAPIONObject regionData) { Prototype prototype; if (regionData.containsKey("prototype", String.class)) { prototype = PROTOTYPE_MAP.get(regionData.getPlainValue("prototype")); } else { prototype = PROTOTYPE_MAP.get(regionConfig.getPlainValue("prototype")); } - FlagStorage flagStorage; - if (regionData.containsKey("flagStorage", YAPIONType.OBJECT)) { - flagStorage = FlagStorage.createStorage(regionData.getObject("flagStorage")); - } else { - flagStorage = new FlagStorage(); - } - return new Region(name, prototype, regionConfig, flagStorage, regionData); + FixedFlagStorage flagStorage = new FixedFlagStorage(regionData.getObjectOrSetDefault("flagStorage", new YAPIONObject())); + FixedRegionSystem.addRegion(new FixedRegion(name, flagStorage, prototype, regionConfig, regionData)); } } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/loader/PrototypeLoader.java b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/loader/PrototypeLoader.java similarity index 61% rename from BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/loader/PrototypeLoader.java rename to BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/loader/PrototypeLoader.java index 851cdcfd..21d3da17 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/loader/PrototypeLoader.java +++ b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/loader/PrototypeLoader.java @@ -1,25 +1,25 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ -package de.steamwar.bausystem.region.loader; +package de.steamwar.bausystem.region.fixed.loader; -import de.steamwar.bausystem.region.Prototype; +import de.steamwar.bausystem.region.fixed.Prototype; import lombok.experimental.UtilityClass; import org.bukkit.Bukkit; import yapion.hierarchy.diff.DiffDelete; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/loader/RegionLoader.java b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/loader/RegionLoader.java similarity index 64% rename from BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/loader/RegionLoader.java rename to BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/loader/RegionLoader.java index 7a66dbba..98967789 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/loader/RegionLoader.java +++ b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/loader/RegionLoader.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ -package de.steamwar.bausystem.region.loader; +package de.steamwar.bausystem.region.fixed.loader; -import de.steamwar.bausystem.region.FlagStorage; -import de.steamwar.bausystem.region.GlobalRegion; -import de.steamwar.bausystem.region.Prototype; +import de.steamwar.bausystem.region.fixed.FixedGlobalFlagStorage; +import de.steamwar.bausystem.region.fixed.FixedGlobalRegion; +import de.steamwar.bausystem.region.fixed.Prototype; import de.steamwar.bausystem.worlddata.WorldData; import lombok.experimental.UtilityClass; import org.bukkit.Bukkit; @@ -80,12 +80,6 @@ public class RegionLoader { globalOptions = new YAPIONObject(); optionsYapionObject.add("global", globalOptions); } - FlagStorage flagStorage; - if (globalOptions.containsKey("flagStorage", YAPIONType.OBJECT)) { - flagStorage = FlagStorage.createStorage(globalOptions.getObject("flagStorage")); - } else { - flagStorage = new FlagStorage(); - } - new GlobalRegion(flagStorage, globalOptions); + FixedGlobalRegion.setFLAG_STORAGE(new FixedGlobalFlagStorage(globalOptions.getObjectOrSetDefault("flagStorage", new YAPIONObject()))); } } diff --git a/BauSystem/build.gradle.kts b/BauSystem/build.gradle.kts index ebb9422d..aeade561 100644 --- a/BauSystem/build.gradle.kts +++ b/BauSystem/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -27,6 +27,7 @@ tasks.build { } dependencies { + implementation(project(":BauSystem:BauSystem_RegionFixed")) implementation(project(":BauSystem:BauSystem_Main")) implementation(project(":BauSystem:BauSystem_15")) implementation(project(":BauSystem:BauSystem_18")) diff --git a/CommandFramework/build.gradle.kts b/CommandFramework/build.gradle.kts index 7fcb7845..8513c822 100644 --- a/CommandFramework/build.gradle.kts +++ b/CommandFramework/build.gradle.kts @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ plugins { diff --git a/CommandFramework/src/de/steamwar/command/AbstractSWCommand.java b/CommandFramework/src/de/steamwar/command/AbstractSWCommand.java index 65f6643c..22acbe6b 100644 --- a/CommandFramework/src/de/steamwar/command/AbstractSWCommand.java +++ b/CommandFramework/src/de/steamwar/command/AbstractSWCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/src/de/steamwar/command/AbstractTypeMapper.java b/CommandFramework/src/de/steamwar/command/AbstractTypeMapper.java index 040f3031..1753c3a1 100644 --- a/CommandFramework/src/de/steamwar/command/AbstractTypeMapper.java +++ b/CommandFramework/src/de/steamwar/command/AbstractTypeMapper.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/src/de/steamwar/command/AbstractValidator.java b/CommandFramework/src/de/steamwar/command/AbstractValidator.java index 7dc0b72f..a45cef19 100644 --- a/CommandFramework/src/de/steamwar/command/AbstractValidator.java +++ b/CommandFramework/src/de/steamwar/command/AbstractValidator.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/src/de/steamwar/command/CommandFrameworkException.java b/CommandFramework/src/de/steamwar/command/CommandFrameworkException.java index ea3d8356..6d32fd9b 100644 --- a/CommandFramework/src/de/steamwar/command/CommandFrameworkException.java +++ b/CommandFramework/src/de/steamwar/command/CommandFrameworkException.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/src/de/steamwar/command/CommandMetaData.java b/CommandFramework/src/de/steamwar/command/CommandMetaData.java index 33909ac7..914b5e9f 100644 --- a/CommandFramework/src/de/steamwar/command/CommandMetaData.java +++ b/CommandFramework/src/de/steamwar/command/CommandMetaData.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/src/de/steamwar/command/CommandParseException.java b/CommandFramework/src/de/steamwar/command/CommandParseException.java index 3d81ea69..5f60e1f1 100644 --- a/CommandFramework/src/de/steamwar/command/CommandParseException.java +++ b/CommandFramework/src/de/steamwar/command/CommandParseException.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/src/de/steamwar/command/CommandPart.java b/CommandFramework/src/de/steamwar/command/CommandPart.java index 02991b40..3a903bea 100644 --- a/CommandFramework/src/de/steamwar/command/CommandPart.java +++ b/CommandFramework/src/de/steamwar/command/CommandPart.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/src/de/steamwar/command/PreviousArguments.java b/CommandFramework/src/de/steamwar/command/PreviousArguments.java index e9851c07..d3603999 100644 --- a/CommandFramework/src/de/steamwar/command/PreviousArguments.java +++ b/CommandFramework/src/de/steamwar/command/PreviousArguments.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/src/de/steamwar/command/SWCommandUtils.java b/CommandFramework/src/de/steamwar/command/SWCommandUtils.java index ed16eab8..193b7c90 100644 --- a/CommandFramework/src/de/steamwar/command/SWCommandUtils.java +++ b/CommandFramework/src/de/steamwar/command/SWCommandUtils.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/src/de/steamwar/command/SWTypeMapperCreator.java b/CommandFramework/src/de/steamwar/command/SWTypeMapperCreator.java index f21b0a82..352af610 100644 --- a/CommandFramework/src/de/steamwar/command/SWTypeMapperCreator.java +++ b/CommandFramework/src/de/steamwar/command/SWTypeMapperCreator.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/src/de/steamwar/command/SubCommand.java b/CommandFramework/src/de/steamwar/command/SubCommand.java index 368a8178..d3ac8482 100644 --- a/CommandFramework/src/de/steamwar/command/SubCommand.java +++ b/CommandFramework/src/de/steamwar/command/SubCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/src/de/steamwar/command/TabCompletionCache.java b/CommandFramework/src/de/steamwar/command/TabCompletionCache.java index 551ce19f..a9a27bb3 100644 --- a/CommandFramework/src/de/steamwar/command/TabCompletionCache.java +++ b/CommandFramework/src/de/steamwar/command/TabCompletionCache.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/AssertionUtils.java b/CommandFramework/testsrc/de/steamwar/AssertionUtils.java index ed8c8ca0..a815e7b1 100644 --- a/CommandFramework/testsrc/de/steamwar/AssertionUtils.java +++ b/CommandFramework/testsrc/de/steamwar/AssertionUtils.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar; diff --git a/CommandFramework/testsrc/de/steamwar/command/ArgumentCommand.java b/CommandFramework/testsrc/de/steamwar/command/ArgumentCommand.java index 41f59c75..920f0f77 100644 --- a/CommandFramework/testsrc/de/steamwar/command/ArgumentCommand.java +++ b/CommandFramework/testsrc/de/steamwar/command/ArgumentCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/ArgumentCommandTest.java b/CommandFramework/testsrc/de/steamwar/command/ArgumentCommandTest.java index b46c1844..6bae3c72 100644 --- a/CommandFramework/testsrc/de/steamwar/command/ArgumentCommandTest.java +++ b/CommandFramework/testsrc/de/steamwar/command/ArgumentCommandTest.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/BetterExceptionCommand.java b/CommandFramework/testsrc/de/steamwar/command/BetterExceptionCommand.java index feb47fc6..10a0f618 100644 --- a/CommandFramework/testsrc/de/steamwar/command/BetterExceptionCommand.java +++ b/CommandFramework/testsrc/de/steamwar/command/BetterExceptionCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/BetterExceptionCommandTest.java b/CommandFramework/testsrc/de/steamwar/command/BetterExceptionCommandTest.java index 170ad60b..9961d778 100644 --- a/CommandFramework/testsrc/de/steamwar/command/BetterExceptionCommandTest.java +++ b/CommandFramework/testsrc/de/steamwar/command/BetterExceptionCommandTest.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/CacheCommand.java b/CommandFramework/testsrc/de/steamwar/command/CacheCommand.java index 7cfdb726..5d469c87 100644 --- a/CommandFramework/testsrc/de/steamwar/command/CacheCommand.java +++ b/CommandFramework/testsrc/de/steamwar/command/CacheCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/CacheCommandTest.java b/CommandFramework/testsrc/de/steamwar/command/CacheCommandTest.java index 4a6e183f..5791f1f2 100644 --- a/CommandFramework/testsrc/de/steamwar/command/CacheCommandTest.java +++ b/CommandFramework/testsrc/de/steamwar/command/CacheCommandTest.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/NullMapperCommand.java b/CommandFramework/testsrc/de/steamwar/command/NullMapperCommand.java index 30f4061a..8bc92d9b 100644 --- a/CommandFramework/testsrc/de/steamwar/command/NullMapperCommand.java +++ b/CommandFramework/testsrc/de/steamwar/command/NullMapperCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/NullMapperCommandTest.java b/CommandFramework/testsrc/de/steamwar/command/NullMapperCommandTest.java index 1e19d133..abedf780 100644 --- a/CommandFramework/testsrc/de/steamwar/command/NullMapperCommandTest.java +++ b/CommandFramework/testsrc/de/steamwar/command/NullMapperCommandTest.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/NumberValidatorCommand.java b/CommandFramework/testsrc/de/steamwar/command/NumberValidatorCommand.java index 9ba53a64..89a2c660 100644 --- a/CommandFramework/testsrc/de/steamwar/command/NumberValidatorCommand.java +++ b/CommandFramework/testsrc/de/steamwar/command/NumberValidatorCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/NumberValidatorCommandTest.java b/CommandFramework/testsrc/de/steamwar/command/NumberValidatorCommandTest.java index c45b4a86..b54bc06c 100644 --- a/CommandFramework/testsrc/de/steamwar/command/NumberValidatorCommandTest.java +++ b/CommandFramework/testsrc/de/steamwar/command/NumberValidatorCommandTest.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/PartOfCommand.java b/CommandFramework/testsrc/de/steamwar/command/PartOfCommand.java index 9c66a4b6..f5e1b8b4 100644 --- a/CommandFramework/testsrc/de/steamwar/command/PartOfCommand.java +++ b/CommandFramework/testsrc/de/steamwar/command/PartOfCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/PartOfCommandTest.java b/CommandFramework/testsrc/de/steamwar/command/PartOfCommandTest.java index 726384e1..7da73f1b 100644 --- a/CommandFramework/testsrc/de/steamwar/command/PartOfCommandTest.java +++ b/CommandFramework/testsrc/de/steamwar/command/PartOfCommandTest.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/PreviousArgumentCommand.java b/CommandFramework/testsrc/de/steamwar/command/PreviousArgumentCommand.java index 454283c9..ca984851 100644 --- a/CommandFramework/testsrc/de/steamwar/command/PreviousArgumentCommand.java +++ b/CommandFramework/testsrc/de/steamwar/command/PreviousArgumentCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/PreviousArgumentCommandTest.java b/CommandFramework/testsrc/de/steamwar/command/PreviousArgumentCommandTest.java index 941b1c3e..7ef460f9 100644 --- a/CommandFramework/testsrc/de/steamwar/command/PreviousArgumentCommandTest.java +++ b/CommandFramework/testsrc/de/steamwar/command/PreviousArgumentCommandTest.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/SimpleCommand.java b/CommandFramework/testsrc/de/steamwar/command/SimpleCommand.java index 7388633c..3cdb683f 100644 --- a/CommandFramework/testsrc/de/steamwar/command/SimpleCommand.java +++ b/CommandFramework/testsrc/de/steamwar/command/SimpleCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/SimpleCommandTest.java b/CommandFramework/testsrc/de/steamwar/command/SimpleCommandTest.java index aebd904f..7670215a 100644 --- a/CommandFramework/testsrc/de/steamwar/command/SimpleCommandTest.java +++ b/CommandFramework/testsrc/de/steamwar/command/SimpleCommandTest.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/StaticValueCommand.java b/CommandFramework/testsrc/de/steamwar/command/StaticValueCommand.java index 0eca60da..55f96d42 100644 --- a/CommandFramework/testsrc/de/steamwar/command/StaticValueCommand.java +++ b/CommandFramework/testsrc/de/steamwar/command/StaticValueCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/StaticValueCommandTest.java b/CommandFramework/testsrc/de/steamwar/command/StaticValueCommandTest.java index 75a7dfd6..926b9234 100644 --- a/CommandFramework/testsrc/de/steamwar/command/StaticValueCommandTest.java +++ b/CommandFramework/testsrc/de/steamwar/command/StaticValueCommandTest.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/SubCMDSortingCommand.java b/CommandFramework/testsrc/de/steamwar/command/SubCMDSortingCommand.java index 8b287608..de9a85a7 100644 --- a/CommandFramework/testsrc/de/steamwar/command/SubCMDSortingCommand.java +++ b/CommandFramework/testsrc/de/steamwar/command/SubCMDSortingCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/SubCMDSortingCommandTest.java b/CommandFramework/testsrc/de/steamwar/command/SubCMDSortingCommandTest.java index 1f3203c6..8b8f6a87 100644 --- a/CommandFramework/testsrc/de/steamwar/command/SubCMDSortingCommandTest.java +++ b/CommandFramework/testsrc/de/steamwar/command/SubCMDSortingCommandTest.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/TypeMapperCommand.java b/CommandFramework/testsrc/de/steamwar/command/TypeMapperCommand.java index a81500f5..ed76578c 100644 --- a/CommandFramework/testsrc/de/steamwar/command/TypeMapperCommand.java +++ b/CommandFramework/testsrc/de/steamwar/command/TypeMapperCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/TypeMapperCommandTest.java b/CommandFramework/testsrc/de/steamwar/command/TypeMapperCommandTest.java index 32b5b47e..14420f48 100644 --- a/CommandFramework/testsrc/de/steamwar/command/TypeMapperCommandTest.java +++ b/CommandFramework/testsrc/de/steamwar/command/TypeMapperCommandTest.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/ValidatorCommand.java b/CommandFramework/testsrc/de/steamwar/command/ValidatorCommand.java index b0e4a363..67846917 100644 --- a/CommandFramework/testsrc/de/steamwar/command/ValidatorCommand.java +++ b/CommandFramework/testsrc/de/steamwar/command/ValidatorCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/ValidatorCommandTest.java b/CommandFramework/testsrc/de/steamwar/command/ValidatorCommandTest.java index 142d518e..94e4487b 100644 --- a/CommandFramework/testsrc/de/steamwar/command/ValidatorCommandTest.java +++ b/CommandFramework/testsrc/de/steamwar/command/ValidatorCommandTest.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/ValidatorInvertCommand.java b/CommandFramework/testsrc/de/steamwar/command/ValidatorInvertCommand.java index 90076973..d75f26f0 100644 --- a/CommandFramework/testsrc/de/steamwar/command/ValidatorInvertCommand.java +++ b/CommandFramework/testsrc/de/steamwar/command/ValidatorInvertCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/CommandFramework/testsrc/de/steamwar/command/dto/ExecutionIdentifier.java b/CommandFramework/testsrc/de/steamwar/command/dto/ExecutionIdentifier.java index d03b78f7..76c54245 100644 --- a/CommandFramework/testsrc/de/steamwar/command/dto/ExecutionIdentifier.java +++ b/CommandFramework/testsrc/de/steamwar/command/dto/ExecutionIdentifier.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command.dto; diff --git a/CommandFramework/testsrc/de/steamwar/command/dto/TestSWCommand.java b/CommandFramework/testsrc/de/steamwar/command/dto/TestSWCommand.java index e0ac34b0..4a4ec8ed 100644 --- a/CommandFramework/testsrc/de/steamwar/command/dto/TestSWCommand.java +++ b/CommandFramework/testsrc/de/steamwar/command/dto/TestSWCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command.dto; diff --git a/CommandFramework/testsrc/de/steamwar/command/dto/TestTypeMapper.java b/CommandFramework/testsrc/de/steamwar/command/dto/TestTypeMapper.java index 96c4c6c2..ac1219d5 100644 --- a/CommandFramework/testsrc/de/steamwar/command/dto/TestTypeMapper.java +++ b/CommandFramework/testsrc/de/steamwar/command/dto/TestTypeMapper.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command.dto; diff --git a/CommandFramework/testsrc/de/steamwar/command/dto/TestValidator.java b/CommandFramework/testsrc/de/steamwar/command/dto/TestValidator.java index 8cf0495c..c0225e73 100644 --- a/CommandFramework/testsrc/de/steamwar/command/dto/TestValidator.java +++ b/CommandFramework/testsrc/de/steamwar/command/dto/TestValidator.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command.dto; diff --git a/CommonCore/Data/build.gradle.kts b/CommonCore/Data/build.gradle.kts index da326bfe..a8ffa845 100644 --- a/CommonCore/Data/build.gradle.kts +++ b/CommonCore/Data/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/CommonCore/Data/src/de/steamwar/data/BauLockState.java b/CommonCore/Data/src/de/steamwar/data/BauLockState.java new file mode 100644 index 00000000..0c558190 --- /dev/null +++ b/CommonCore/Data/src/de/steamwar/data/BauLockState.java @@ -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 . + */ + +package de.steamwar.data; + +public enum BauLockState { + + NOBODY, // Locks the build server for all users + SUPERVISOR, // Locks the build server for supervisors + SERVERTEAM, // opens the build server only for every added user which is a server team member + TEAM_AND_SERVERTEAM, //opens the build server only for every added user which is in the same team as the buildOwner and every server team member + TEAM, //opens the build server only for every added user which is in the same team as the buildOwner + OPEN //unlocks the build server for all users +} diff --git a/CommonCore/Data/src/de/steamwar/data/CMDs.java b/CommonCore/Data/src/de/steamwar/data/CMDs.java index 996df130..855c764c 100644 --- a/CommonCore/Data/src/de/steamwar/data/CMDs.java +++ b/CommonCore/Data/src/de/steamwar/data/CMDs.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.data; diff --git a/CommonCore/Linkage/build.gradle.kts b/CommonCore/Linkage/build.gradle.kts new file mode 100644 index 00000000..fdc8d762 --- /dev/null +++ b/CommonCore/Linkage/build.gradle.kts @@ -0,0 +1,26 @@ +/* + * 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(libs.classindex) +} diff --git a/CommonCore/Linkage/src/de/steamwar/linkage/AbstractLinker.java b/CommonCore/Linkage/src/de/steamwar/linkage/AbstractLinker.java new file mode 100644 index 00000000..cf88d488 --- /dev/null +++ b/CommonCore/Linkage/src/de/steamwar/linkage/AbstractLinker.java @@ -0,0 +1,168 @@ +/* + * 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 . + */ + +package de.steamwar.linkage; + +import de.steamwar.linkage.api.Disable; +import de.steamwar.linkage.api.Enable; +import lombok.NonNull; +import lombok.experimental.StandardException; + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; + +public abstract class AbstractLinker { + + protected final T plugin; + private Map, Object> instances = new HashMap<>(); + + protected AbstractLinker(@NonNull T plugin) { + this.plugin = plugin; + instances.put(plugin.getClass(), plugin); + } + + @StandardException + public static class LinkException extends Exception { + } + + public final void link() throws LinkException { + List> classes; + try { + classes = new BufferedReader(new InputStreamReader(plugin.getClass().getResourceAsStream("/META-INF/annotations/de.steamwar.linkage.Linked"))) + .lines() + .map(s -> { + try { + return Class.forName(s, false, plugin.getClass().getClassLoader()); + } catch (ClassNotFoundException | NoClassDefFoundError e) { + throw new SecurityException(e.getMessage(), e); + } + }) + .filter(Objects::nonNull) + .collect(Collectors.toList()); + } catch (SecurityException e) { + Throwable cause = e.getCause(); + throw new LinkException(cause.getMessage(), cause); + } + + try { + classes.forEach(clazz -> { + MinVersion minVersion = clazz.getAnnotation(MinVersion.class); + MaxVersion maxVersion = clazz.getAnnotation(MaxVersion.class); + if (!versionCheck(clazz, minVersion, maxVersion)) return; + EventMode eventMode = clazz.getAnnotation(EventMode.class); + if (!eventModeCheck(clazz, eventMode)) return; + PluginCheck[] pluginChecks = clazz.getAnnotationsByType(PluginCheck.class); + for (PluginCheck pluginCheck : pluginChecks) { + if (!pluginCheck(clazz, pluginCheck)) return; + } + + Object any; + try { + any = clazz.newInstance(); + } catch (InstantiationException | IllegalAccessException e) { + throw new SecurityException(e.getMessage(), e); + } + instances.put(clazz, any); + + if (any instanceof Enable) { + ((Enable) any).enable(); + } + linkObject(any); + }); + } catch (SecurityException e) { + Throwable cause = e.getCause(); + throw new LinkException(cause.getMessage(), cause); + } + + try { + instances.forEach((clazz, o) -> { + for (Field field : clazz.getDeclaredFields()) { + if (field.getAnnotation(LinkedInstance.class) != null) { + try { + field.setAccessible(true); + if (Modifier.isStatic(field.getModifiers())) { + field.set(null, instances.get(field.getType())); + } else { + field.set(o, instances.get(field.getType())); + } + } catch (IllegalAccessException e) { + throw new SecurityException(e.getMessage(), e); + } + } + } + }); + } catch (SecurityException e) { + Throwable cause = e.getCause(); + throw new LinkException(cause.getMessage(), cause); + } + } + + public final void unlink() { + instances.forEach((aClass, any) -> { + unlinkObject(any); + if (any instanceof Disable) { + ((Disable) any).disable(); + } + }); + } + + public final void addLinkableInstance(@NonNull Object instance) { + instances.put(instance.getClass(), instance); + } + + /** + * @return {@code true} if the clazz passes the checks {@code false} otherwise + */ + protected boolean versionCheck(@NonNull Class clazz, MinVersion minVersion, MaxVersion maxVersion) { + return true; + } + + /** + * @return {@code true} if the clazz passes the checks {@code false} otherwise + */ + protected boolean pluginCheck(@NonNull Class clazz, PluginCheck pluginCheck) { + return true; + } + + /** + * @return {@code true} if the clazz passes the checks {@code false} otherwise + */ + protected boolean eventModeCheck(@NonNull Class clazz, EventMode eventMode) { + return true; + } + + /** + * There is no need in calling {@link Enable#enable()} by this method. + */ + protected void linkObject(Object any) { + } + + /** + * There is no need in calling {@link Disable#disable()} ()} by this method. + */ + protected void unlinkObject(Object any) { + } +} diff --git a/CommonCore/Linkage/src/de/steamwar/linkage/EventMode.java b/CommonCore/Linkage/src/de/steamwar/linkage/EventMode.java new file mode 100644 index 00000000..02acc961 --- /dev/null +++ b/CommonCore/Linkage/src/de/steamwar/linkage/EventMode.java @@ -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 . + */ + +package de.steamwar.linkage; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE}) +public @interface EventMode { + boolean value(); +} diff --git a/CommonCore/Linkage/src/de/steamwar/linkage/Linked.java b/CommonCore/Linkage/src/de/steamwar/linkage/Linked.java new file mode 100644 index 00000000..465600b1 --- /dev/null +++ b/CommonCore/Linkage/src/de/steamwar/linkage/Linked.java @@ -0,0 +1,33 @@ +/* + * 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 . + */ + +package de.steamwar.linkage; + +import org.atteo.classindex.IndexAnnotated; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@IndexAnnotated +@Retention(RetentionPolicy.SOURCE) +@Target({ElementType.TYPE}) +public @interface Linked { +} diff --git a/CommonCore/Linkage/src/de/steamwar/linkage/LinkedInstance.java b/CommonCore/Linkage/src/de/steamwar/linkage/LinkedInstance.java new file mode 100644 index 00000000..cd80fb21 --- /dev/null +++ b/CommonCore/Linkage/src/de/steamwar/linkage/LinkedInstance.java @@ -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 . + */ + +package de.steamwar.linkage; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.FIELD}) +public @interface LinkedInstance { +} diff --git a/CommonCore/Linkage/src/de/steamwar/linkage/MaxVersion.java b/CommonCore/Linkage/src/de/steamwar/linkage/MaxVersion.java new file mode 100644 index 00000000..eba760d4 --- /dev/null +++ b/CommonCore/Linkage/src/de/steamwar/linkage/MaxVersion.java @@ -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 . + */ + +package de.steamwar.linkage; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE}) +public @interface MaxVersion { + int value(); +} diff --git a/CommonCore/Linkage/src/de/steamwar/linkage/MinVersion.java b/CommonCore/Linkage/src/de/steamwar/linkage/MinVersion.java new file mode 100644 index 00000000..e87bd05b --- /dev/null +++ b/CommonCore/Linkage/src/de/steamwar/linkage/MinVersion.java @@ -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 . + */ + +package de.steamwar.linkage; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE}) +public @interface MinVersion { + int value(); +} diff --git a/CommonCore/Linkage/src/de/steamwar/linkage/PluginCheck.java b/CommonCore/Linkage/src/de/steamwar/linkage/PluginCheck.java new file mode 100644 index 00000000..93a7b542 --- /dev/null +++ b/CommonCore/Linkage/src/de/steamwar/linkage/PluginCheck.java @@ -0,0 +1,41 @@ +/* + * 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 . + */ + +package de.steamwar.linkage; + +import java.lang.annotation.*; + +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE}) +@Repeatable(PluginCheck.PluginChecks.class) +public @interface PluginCheck { + Has has() default Has.THIS; + String value(); + + enum Has { + THIS, + NOT + } + + @Retention(RetentionPolicy.RUNTIME) + @Target({ElementType.TYPE}) + @interface PluginChecks { + @SuppressWarnings("unused") PluginCheck[] value() default {}; + } +} diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/linkage/api/Disable.java b/CommonCore/Linkage/src/de/steamwar/linkage/api/Disable.java similarity index 94% rename from BauSystem/BauSystem_Main/src/de/steamwar/linkage/api/Disable.java rename to CommonCore/Linkage/src/de/steamwar/linkage/api/Disable.java index 2ce273d9..c4314204 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/linkage/api/Disable.java +++ b/CommonCore/Linkage/src/de/steamwar/linkage/api/Disable.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/linkage/api/Enable.java b/CommonCore/Linkage/src/de/steamwar/linkage/api/Enable.java similarity index 94% rename from BauSystem/BauSystem_Main/src/de/steamwar/linkage/api/Enable.java rename to CommonCore/Linkage/src/de/steamwar/linkage/api/Enable.java index df52baca..c82f0799 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/linkage/api/Enable.java +++ b/CommonCore/Linkage/src/de/steamwar/linkage/api/Enable.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/CommonCore/Network/build.gradle.kts b/CommonCore/Network/build.gradle.kts index b633ca63..8513c822 100644 --- a/CommonCore/Network/build.gradle.kts +++ b/CommonCore/Network/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/CommonCore/Network/src/de/steamwar/network/packets/MetaInfos.java b/CommonCore/Network/src/de/steamwar/network/packets/MetaInfos.java index 61632d7c..7522ba1a 100644 --- a/CommonCore/Network/src/de/steamwar/network/packets/MetaInfos.java +++ b/CommonCore/Network/src/de/steamwar/network/packets/MetaInfos.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.packets; diff --git a/CommonCore/Network/src/de/steamwar/network/packets/NetworkPacket.java b/CommonCore/Network/src/de/steamwar/network/packets/NetworkPacket.java index 987e1ef1..e0be6fcc 100644 --- a/CommonCore/Network/src/de/steamwar/network/packets/NetworkPacket.java +++ b/CommonCore/Network/src/de/steamwar/network/packets/NetworkPacket.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.packets; diff --git a/CommonCore/Network/src/de/steamwar/network/packets/PacketHandler.java b/CommonCore/Network/src/de/steamwar/network/packets/PacketHandler.java index 671eb469..4c540940 100644 --- a/CommonCore/Network/src/de/steamwar/network/packets/PacketHandler.java +++ b/CommonCore/Network/src/de/steamwar/network/packets/PacketHandler.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.packets; diff --git a/CommonCore/Network/src/de/steamwar/network/packets/client/ExecuteCommandPacket.java b/CommonCore/Network/src/de/steamwar/network/packets/client/ExecuteCommandPacket.java index 9f7d000f..5cabd91a 100644 --- a/CommonCore/Network/src/de/steamwar/network/packets/client/ExecuteCommandPacket.java +++ b/CommonCore/Network/src/de/steamwar/network/packets/client/ExecuteCommandPacket.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.packets.client; diff --git a/CommonCore/Network/src/de/steamwar/network/packets/client/ImALobbyPacket.java b/CommonCore/Network/src/de/steamwar/network/packets/client/ImALobbyPacket.java index dcd07ddf..c7c6671c 100644 --- a/CommonCore/Network/src/de/steamwar/network/packets/client/ImALobbyPacket.java +++ b/CommonCore/Network/src/de/steamwar/network/packets/client/ImALobbyPacket.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.packets.client; diff --git a/CommonCore/Network/src/de/steamwar/network/packets/client/InventoryCallbackPacket.java b/CommonCore/Network/src/de/steamwar/network/packets/client/InventoryCallbackPacket.java index cfe9fbc6..8f77dca9 100644 --- a/CommonCore/Network/src/de/steamwar/network/packets/client/InventoryCallbackPacket.java +++ b/CommonCore/Network/src/de/steamwar/network/packets/client/InventoryCallbackPacket.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.packets.client; diff --git a/CommonCore/Network/src/de/steamwar/network/packets/client/PrepareSchemPacket.java b/CommonCore/Network/src/de/steamwar/network/packets/client/PrepareSchemPacket.java index 8f607faf..dfe01cba 100644 --- a/CommonCore/Network/src/de/steamwar/network/packets/client/PrepareSchemPacket.java +++ b/CommonCore/Network/src/de/steamwar/network/packets/client/PrepareSchemPacket.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.packets.client; diff --git a/CommonCore/Network/src/de/steamwar/network/packets/client/RequestSchematicSearchPacket.java b/CommonCore/Network/src/de/steamwar/network/packets/client/RequestSchematicSearchPacket.java index ea8420ca..df64bc37 100644 --- a/CommonCore/Network/src/de/steamwar/network/packets/client/RequestSchematicSearchPacket.java +++ b/CommonCore/Network/src/de/steamwar/network/packets/client/RequestSchematicSearchPacket.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.packets.client; diff --git a/CommonCore/Network/src/de/steamwar/network/packets/common/FightEndsPacket.java b/CommonCore/Network/src/de/steamwar/network/packets/common/FightEndsPacket.java index c1d86bb6..835716d0 100644 --- a/CommonCore/Network/src/de/steamwar/network/packets/common/FightEndsPacket.java +++ b/CommonCore/Network/src/de/steamwar/network/packets/common/FightEndsPacket.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.packets.common; diff --git a/CommonCore/Network/src/de/steamwar/network/packets/common/FightInfoPacket.java b/CommonCore/Network/src/de/steamwar/network/packets/common/FightInfoPacket.java index bbca8b09..d50b6184 100644 --- a/CommonCore/Network/src/de/steamwar/network/packets/common/FightInfoPacket.java +++ b/CommonCore/Network/src/de/steamwar/network/packets/common/FightInfoPacket.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.packets.common; diff --git a/CommonCore/Network/src/de/steamwar/network/packets/common/PlayerSkinRequestPacket.java b/CommonCore/Network/src/de/steamwar/network/packets/common/PlayerSkinRequestPacket.java index 4916e0f1..8a779896 100644 --- a/CommonCore/Network/src/de/steamwar/network/packets/common/PlayerSkinRequestPacket.java +++ b/CommonCore/Network/src/de/steamwar/network/packets/common/PlayerSkinRequestPacket.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.packets.common; diff --git a/CommonCore/Network/src/de/steamwar/network/packets/common/PlayerSkinResponsePacket.java b/CommonCore/Network/src/de/steamwar/network/packets/common/PlayerSkinResponsePacket.java index 5c3767ca..9517acb8 100644 --- a/CommonCore/Network/src/de/steamwar/network/packets/common/PlayerSkinResponsePacket.java +++ b/CommonCore/Network/src/de/steamwar/network/packets/common/PlayerSkinResponsePacket.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.packets.common; diff --git a/CommonCore/Network/src/de/steamwar/network/packets/server/BaulockUpdatePacket.java b/CommonCore/Network/src/de/steamwar/network/packets/server/BaulockUpdatePacket.java new file mode 100644 index 00000000..55b23b23 --- /dev/null +++ b/CommonCore/Network/src/de/steamwar/network/packets/server/BaulockUpdatePacket.java @@ -0,0 +1,29 @@ +/* + * 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 . + */ + +package de.steamwar.network.packets.server; + +import de.steamwar.network.packets.NetworkPacket; +import lombok.EqualsAndHashCode; + +@EqualsAndHashCode(callSuper = true) +public class BaulockUpdatePacket extends NetworkPacket { + private static final long serialVersionUID = 6863118892424244051L; + +} diff --git a/CommonCore/Network/src/de/steamwar/network/packets/server/BaumemberUpdatePacket.java b/CommonCore/Network/src/de/steamwar/network/packets/server/BaumemberUpdatePacket.java index 5351473a..59f68f51 100644 --- a/CommonCore/Network/src/de/steamwar/network/packets/server/BaumemberUpdatePacket.java +++ b/CommonCore/Network/src/de/steamwar/network/packets/server/BaumemberUpdatePacket.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.packets.server; diff --git a/CommonCore/Network/src/de/steamwar/network/packets/server/ClientVersionPacket.java b/CommonCore/Network/src/de/steamwar/network/packets/server/ClientVersionPacket.java index c8f43446..e5d43881 100644 --- a/CommonCore/Network/src/de/steamwar/network/packets/server/ClientVersionPacket.java +++ b/CommonCore/Network/src/de/steamwar/network/packets/server/ClientVersionPacket.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.packets.server; diff --git a/CommonCore/Network/src/de/steamwar/network/packets/server/CloseInventoryPacket.java b/CommonCore/Network/src/de/steamwar/network/packets/server/CloseInventoryPacket.java index e30d927f..60e6d1b7 100644 --- a/CommonCore/Network/src/de/steamwar/network/packets/server/CloseInventoryPacket.java +++ b/CommonCore/Network/src/de/steamwar/network/packets/server/CloseInventoryPacket.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.packets.server; diff --git a/CommonCore/Network/src/de/steamwar/network/packets/server/InventoryPacket.java b/CommonCore/Network/src/de/steamwar/network/packets/server/InventoryPacket.java index 8e7f7b37..589c670b 100644 --- a/CommonCore/Network/src/de/steamwar/network/packets/server/InventoryPacket.java +++ b/CommonCore/Network/src/de/steamwar/network/packets/server/InventoryPacket.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.packets.server; diff --git a/CommonCore/Network/src/de/steamwar/network/packets/server/LocaleInvalidationPacket.java b/CommonCore/Network/src/de/steamwar/network/packets/server/LocaleInvalidationPacket.java index 1e24547d..d71fba82 100644 --- a/CommonCore/Network/src/de/steamwar/network/packets/server/LocaleInvalidationPacket.java +++ b/CommonCore/Network/src/de/steamwar/network/packets/server/LocaleInvalidationPacket.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.packets.server; diff --git a/CommonCore/Network/src/de/steamwar/network/packets/server/PingPacket.java b/CommonCore/Network/src/de/steamwar/network/packets/server/PingPacket.java index 88ac32a8..3d6e6c75 100644 --- a/CommonCore/Network/src/de/steamwar/network/packets/server/PingPacket.java +++ b/CommonCore/Network/src/de/steamwar/network/packets/server/PingPacket.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.packets.server; diff --git a/CommonCore/Network/src/de/steamwar/network/packets/server/StartingServerPacket.java b/CommonCore/Network/src/de/steamwar/network/packets/server/StartingServerPacket.java index f536d8fe..1e70ae93 100644 --- a/CommonCore/Network/src/de/steamwar/network/packets/server/StartingServerPacket.java +++ b/CommonCore/Network/src/de/steamwar/network/packets/server/StartingServerPacket.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.packets.server; diff --git a/CommonCore/Network/testsrc/de/steamwar/RandomGenerator.java b/CommonCore/Network/testsrc/de/steamwar/RandomGenerator.java index b9ea1a27..22c534f2 100644 --- a/CommonCore/Network/testsrc/de/steamwar/RandomGenerator.java +++ b/CommonCore/Network/testsrc/de/steamwar/RandomGenerator.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar; diff --git a/CommonCore/Network/testsrc/de/steamwar/network/AllPackets.java b/CommonCore/Network/testsrc/de/steamwar/network/AllPackets.java index f4f566b3..7f87a4fa 100644 --- a/CommonCore/Network/testsrc/de/steamwar/network/AllPackets.java +++ b/CommonCore/Network/testsrc/de/steamwar/network/AllPackets.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network; diff --git a/CommonCore/Network/testsrc/de/steamwar/network/PacketHandlerTest.java b/CommonCore/Network/testsrc/de/steamwar/network/PacketHandlerTest.java index ac2299c0..016639db 100644 --- a/CommonCore/Network/testsrc/de/steamwar/network/PacketHandlerTest.java +++ b/CommonCore/Network/testsrc/de/steamwar/network/PacketHandlerTest.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network; diff --git a/CommonCore/Network/testsrc/de/steamwar/network/PacketTest.java b/CommonCore/Network/testsrc/de/steamwar/network/PacketTest.java index 316ea6ff..5e60351b 100644 --- a/CommonCore/Network/testsrc/de/steamwar/network/PacketTest.java +++ b/CommonCore/Network/testsrc/de/steamwar/network/PacketTest.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network; diff --git a/CommonCore/Network/testsrc/de/steamwar/network/TestPacket.java b/CommonCore/Network/testsrc/de/steamwar/network/TestPacket.java index 7f95f030..e99c55a6 100644 --- a/CommonCore/Network/testsrc/de/steamwar/network/TestPacket.java +++ b/CommonCore/Network/testsrc/de/steamwar/network/TestPacket.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network; diff --git a/CommonCore/Network/testsrc/de/steamwar/network/TestPacketHandler.java b/CommonCore/Network/testsrc/de/steamwar/network/TestPacketHandler.java index 2d525be5..fff5edce 100644 --- a/CommonCore/Network/testsrc/de/steamwar/network/TestPacketHandler.java +++ b/CommonCore/Network/testsrc/de/steamwar/network/TestPacketHandler.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network; diff --git a/CommonCore/SQL/build.gradle.kts b/CommonCore/SQL/build.gradle.kts index 567bd92f..dc171dde 100644 --- a/CommonCore/SQL/build.gradle.kts +++ b/CommonCore/SQL/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -23,4 +23,6 @@ plugins { dependencies { compileOnly(libs.sqlite) + + implementation("org.yaml:snakeyaml:2.2") } \ No newline at end of file diff --git a/CommonCore/SQL/src/de/steamwar/ImplementationProvider.java b/CommonCore/SQL/src/de/steamwar/ImplementationProvider.java index e5b795e4..4b83a168 100644 --- a/CommonCore/SQL/src/de/steamwar/ImplementationProvider.java +++ b/CommonCore/SQL/src/de/steamwar/ImplementationProvider.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar; diff --git a/CommonCore/SQL/src/de/steamwar/sql/AuditLog.java b/CommonCore/SQL/src/de/steamwar/sql/AuditLog.java index ffe093a0..04f87d9d 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/AuditLog.java +++ b/CommonCore/SQL/src/de/steamwar/sql/AuditLog.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/BannedUserIPs.java b/CommonCore/SQL/src/de/steamwar/sql/BannedUserIPs.java index f5828177..f16e0343 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/BannedUserIPs.java +++ b/CommonCore/SQL/src/de/steamwar/sql/BannedUserIPs.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/BauweltMember.java b/CommonCore/SQL/src/de/steamwar/sql/BauweltMember.java index 4efd9c38..71fa3a46 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/BauweltMember.java +++ b/CommonCore/SQL/src/de/steamwar/sql/BauweltMember.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/CheckedSchematic.java b/CommonCore/SQL/src/de/steamwar/sql/CheckedSchematic.java index aa1e0986..5a0e553c 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/CheckedSchematic.java +++ b/CommonCore/SQL/src/de/steamwar/sql/CheckedSchematic.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/Event.java b/CommonCore/SQL/src/de/steamwar/sql/Event.java index 5a4477bf..e65a1533 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/Event.java +++ b/CommonCore/SQL/src/de/steamwar/sql/Event.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/EventFight.java b/CommonCore/SQL/src/de/steamwar/sql/EventFight.java index 4143c596..a1472918 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/EventFight.java +++ b/CommonCore/SQL/src/de/steamwar/sql/EventFight.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.sql; @@ -41,7 +41,7 @@ public class EventFight implements Comparable { private static final SelectStatement byGroupLast = new SelectStatement(table, "SELECT * FROM EventFight WHERE GroupID = ? ORDER BY StartTime DESC LIMIT 1"); private static final SelectStatement allComing = new SelectStatement<>(table, "SELECT * FROM EventFight WHERE StartTime > now() ORDER BY StartTime ASC"); private static final SelectStatement event = new SelectStatement<>(table, "SELECT * FROM EventFight WHERE EventID = ? ORDER BY StartTime ASC"); - private static final SelectStatement activeFights = new SelectStatement<>(table, "SELECT * FROM EventFight WHERE Fight IS NOT NULL AND StartTime < now() AND DATEDIFF(StartTime, now()) < 0"); + private static final SelectStatement activeFights = new SelectStatement<>(table, "SELECT * FROM EventFight WHERE EventID IN (SELECT EventID FROM Event WHERE Start < now() and End > now()) AND Fight IS NULL AND StartTime < now()"); private static final Statement reschedule = table.update(Table.PRIMARY, "StartTime"); private static final Statement setResult = table.update(Table.PRIMARY, "Ergebnis"); private static final Statement setFight = table.update(Table.PRIMARY, "Fight"); diff --git a/CommonCore/SQL/src/de/steamwar/sql/EventRelation.java b/CommonCore/SQL/src/de/steamwar/sql/EventRelation.java index 7d142805..539908de 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/EventRelation.java +++ b/CommonCore/SQL/src/de/steamwar/sql/EventRelation.java @@ -43,14 +43,14 @@ public class EventRelation { private static final SelectStatement get = new SelectStatement<>(table, "SELECT * FROM EventRelation WHERE FromType = ? AND FromId = ?"); private static final SelectStatement byId = new SelectStatement<>(table, "SELECT * FROM EventRelation WHERE id = ?"); - private static final SelectStatement byEvent = new SelectStatement<>(table, "SELECT ER.* FROM EventRelation ER JOIN EventFight EF ON EF.id = ER.fightId WHERE EF.EventID = ?"); - private static final Statement insert = table.insertAll(true); + private static final SelectStatement byEvent = new SelectStatement<>(table, "SELECT ER.* FROM EventRelation ER JOIN EventFight EF ON EF.fightId = ER.fightId WHERE EF.EventID = ?"); + private static final Statement insert = table.insertFields(true, "fightId", "fightTeam", "fromType", "fromId", "fromPlace"); private static final Statement update = table.update(Table.PRIMARY, "fromType", "fromId", "fromPlace"); private static final Statement updateTeam = table.update(Table.PRIMARY, "fightTeam"); private static final Statement delete = table.delete(Table.PRIMARY); public static List get(Event event) { - return byId.listSelect(event.getEventID()); + return byEvent.listSelect(event.getEventID()); } public static EventRelation get(int id) { @@ -125,10 +125,10 @@ public class EventRelation { setFrom(group.getId(), place, FromType.GROUP); } - private void setFrom(int id, int place, FromType type) { - update.update(id, type, id, place); + private void setFrom(int fightId, int place, FromType type) { + update.update(type, fightId, place, id); this.fromType = type; - this.fromId = id; + this.fromId = fightId; this.fromPlace = place; } @@ -162,8 +162,8 @@ public class EventRelation { fight.getStartTime(), fight.getSpielmodus(), fight.getMap(), - team.get(), fight.getTeamBlue(), + team.get(), fight.getSpectatePort() ); } else { @@ -171,8 +171,8 @@ public class EventRelation { fight.getStartTime(), fight.getSpielmodus(), fight.getMap(), - fight.getTeamRed(), team.get(), + fight.getTeamRed(), fight.getSpectatePort() ); } @@ -181,8 +181,8 @@ public class EventRelation { } public static enum FightTeam { - RED, - BLUE + BLUE, + RED } public static enum FromType { diff --git a/CommonCore/SQL/src/de/steamwar/sql/Fight.java b/CommonCore/SQL/src/de/steamwar/sql/Fight.java index ddc0772b..b1f122b2 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/Fight.java +++ b/CommonCore/SQL/src/de/steamwar/sql/Fight.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/FightPlayer.java b/CommonCore/SQL/src/de/steamwar/sql/FightPlayer.java index 57b977c6..c45ec806 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/FightPlayer.java +++ b/CommonCore/SQL/src/de/steamwar/sql/FightPlayer.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/GameModeConfig.java b/CommonCore/SQL/src/de/steamwar/sql/GameModeConfig.java new file mode 100644 index 00000000..c7e9ecf8 --- /dev/null +++ b/CommonCore/SQL/src/de/steamwar/sql/GameModeConfig.java @@ -0,0 +1,945 @@ +/* + * 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 . + */ + +package de.steamwar.sql; + +import lombok.ToString; + +import java.io.File; +import java.lang.reflect.Field; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.Instant; +import java.time.LocalDateTime; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +@ToString +public final class GameModeConfig { + + public static final Function ToString = Function.identity(); + public static final Function ToStaticWarGear = __ -> "WarGear"; + public static final Function ToInternalName = file -> file != null ? file.getName().replace(".yml", "") : "WarGear"; + public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd.MM.yyyy HH:mm"); + private static final Random random = new Random(); + + private static final Map> byFileName; + private static final Map> byGameName; + private static final Map> bySchematicType; + + public static GameModeConfig getByFileName(File file) { + return (GameModeConfig) byFileName.get(file.getName()); + } + + public static GameModeConfig getByGameName(String gameName) { + return (GameModeConfig) byGameName.get(gameName); + } + + public static GameModeConfig getBySchematicType(SchematicType schematicType) { + return (GameModeConfig) bySchematicType.get(schematicType); + } + + private static final GameModeConfig DEFAULTS; + + public static GameModeConfig getDefaults() { + return (GameModeConfig) DEFAULTS; + } + + private static final Field Schematic_TypeField; + + static { + try { + Schematic_TypeField = SchematicConfig.class.getDeclaredField("Type"); + Schematic_TypeField.setAccessible(true); + } catch (NoSuchFieldException e) { + throw new SecurityException(e.getMessage(), e); + } + + byFileName = new HashMap<>(); + byGameName = new HashMap<>(); + bySchematicType = new HashMap<>(); + SchematicType.values(); + DEFAULTS = SQLWrapper.impl.loadGameModeConfig(null); + } + + public final boolean loaded; + public final File configFile; + + /** + * Bundle for server specific configuration values + */ + public final ServerConfig Server; + + /** + * Submission deadline for schematics in 'dd.MM.yyyy HH:mm' format + * + * @implSpec {@code null} by default + */ + public final Date Deadline; + + /** + * The questions that have to be answered to accept the schematic + * + * @implSpec Disables check schem type if missing + */ + public final List CheckQuestions; + + /** + * The allowed checkers to check this schematic type denoted by a list of SteamWar ids. + * The people need the {@link UserPerm#CHECK} to be able to check though. + * + * @implSpec {@code []} by default -> denoting every person with {@link UserPerm#CHECK} can check it + */ + public final List Checkers; + + /** + * Bundle for countdowns during the fight + */ + public final TimesConfig Times; + + /** + * Bundle for arena specific configurations. Primarily used by the FightSystem + */ + public final ArenaConfig Arena; + + /** + * Bundle for schematic configurations + */ + public final SchematicConfig Schematic; + + /** + * The name of the game mode presented to the players + * + * @implSpec {@code YMLWrapper.getDefaultGameName()} by default + */ + public final String GameName; + + /** + * The months this game mode should be active and playable
+ * The empty List means all of them + * + * @implNote 1 is January - 12 is December + */ + public final List ActiveMonths; + + /** + * The prefix used for team chats + * + * @implSpec {@code +} by default + */ + public final String TeamChatPrefix; + + /** + * Bundle for configurations for the Blue team + */ + public final BlueConfig Blue; + + /** + * Bundle for configurations for the Red team + */ + public final RedConfig Red; + + /** + * The list of active win conditions + */ + public final List WinConditions; + + /** + * Bundle for configurations used by the Winconditions in the FightSystem + */ + public final WinConditionParamsConfig WinConditionParams; + + /** + * Bundle for Kit specific configurations + */ + public final KitsConfig Kits; + + /** + * A list of integers containing the waiting time of this enter stage in the fight + */ + public final List EnterStages; + + /** + * Bundle for Techhider configurations + */ + public final TechhiderConfig Techhider; + + public GameModeConfig(File file, Function materialMapper, Function winconditionMapper, Function defaultGameName, boolean cacheInstance) { + YMLWrapper loader = new YMLWrapper<>(file, materialMapper, winconditionMapper); + + configFile = file; + loaded = loader.canLoad(); + Server = new ServerConfig(loader.with("Server")); + + String deadlineString = loader.getString("Deadline", null); + if (deadlineString != null) { + Date Deadline = null; + try { + Deadline = DATE_FORMAT.parse(deadlineString); + } catch (ParseException e) { + Deadline = null; + } + this.Deadline = Deadline; + } else { + Deadline = null; + } + + CheckQuestions = loader.getStringList("CheckQuestions"); + Checkers = loader.getIntList("Checkers"); + Times = new TimesConfig(loader.with("Times")); + // Arena would be here to be in config order but needs Schematic.Size and EnterStages loaded afterwards + Schematic = new SchematicConfig<>(loader.with("Schematic")); + GameName = loader.getString("GameName", defaultGameName.apply(file)); + ActiveMonths = loader.getIntList("ActiveMonths"); + TeamChatPrefix = loader.getString("TeamChatPrefix", "+"); + Blue = new BlueConfig(loader.with("Blue")); + Red = new RedConfig(loader.with("Red")); + WinConditions = Collections.unmodifiableList(loader.getStringList("WinConditions").stream().map(loader.winconditionMapper).collect(Collectors.toList())); + WinConditionParams = new WinConditionParamsConfig<>(loader.with("WinConditionParams")); + Kits = new KitsConfig<>(loader.with("Kits")); + EnterStages = loader.getIntList("EnterStages"); + Techhider = new TechhiderConfig<>(loader.with("Techhider")); + + Arena = new ArenaConfig(loader.with("Arena"), Schematic.Size, EnterStages); + + if (cacheInstance && file != null) { + byFileName.put(configFile.getName(), (GameModeConfig) this); + byGameName.put(GameName, (GameModeConfig) this); + } + + if (Schematic.Type != null) { + if (cacheInstance && file != null) { + bySchematicType.put(Schematic.Type, (GameModeConfig) this); + if (Schematic.Type.checkType() != null) { + bySchematicType.put(Schematic.Type.checkType(), (GameModeConfig) this); + } + } + return; + } + if (!Schematic.loaded) return; + String Schematic_Type = loader.with("Schematic").getString("Type", "Normal"); + if (Schematic_Type.equals("Normal")) return; + String Schematic_Shortcut = Schematic.Shortcut; + + SchematicType checktype = null; + String material = loader.with("Schematic").getString("Material", "STONE_BUTTON"); + + if (!CheckQuestions.isEmpty()) { + checktype = new SchematicType("C" + Schematic_Type, "C" + Schematic_Shortcut, SchematicType.Type.CHECK_TYPE, null, material, true); + } + SchematicType current = new SchematicType(Schematic_Type, Schematic_Shortcut, Server.loaded ? SchematicType.Type.FIGHT_TYPE : SchematicType.Type.NORMAL, checktype, material, Deadline, Schematic.ManualCheck); + try { + Schematic_TypeField.set(Schematic, current); + + if (cacheInstance && file != null) { + bySchematicType.put(Schematic.Type, (GameModeConfig) this); + if (Schematic.Type.checkType() != null) { + bySchematicType.put(Schematic.Type.checkType(), (GameModeConfig) this); + } + } + } catch (IllegalAccessException e) { + throw new SecurityException(e.getMessage(), e); + } + } + + @ToString + public static final class ServerConfig { + + public final boolean loaded; + + /** + * Base server folder + */ + public final String Folder; + + /** + * Server java archive + */ + public final String ServerJar; + + /** + * Available arenas + */ + public final List Maps; + + /** + * Names to address the game mode in the chat interface + */ + public final List ChatNames; + + /** + * If the Server is a Spigot server + * + * @implSpec {@code false} by default + */ + public final boolean Spigot; + + /** + * If the game mode should be marked as a historic game mode + * + * @implSpec {@code false} by default + */ + public final boolean Historic; + + /** + * If ranked matches should be available for the game mode + * + * @implSpec {@code false} by default + */ + public final boolean Ranked; + + private ServerConfig(YMLWrapper loader) { + loaded = loader.canLoad(); + Folder = loader.getString("Folder", null); + ServerJar = loader.getString("ServerJar", null); + Maps = loader.getStringList("Maps"); + ChatNames = loader.getStringList("ChatNames"); + Spigot = loader.getBoolean("Spigot", false); + Historic = loader.getBoolean("Historic", false); + Ranked = loader.getBoolean("Ranked", false); + } + } + + @ToString + public static final class TimesConfig { + public final boolean loaded; + + /** + * Time in seconds the server stops after starting if nobody joins + * + * @implSpec {@code 300} by default + */ + public final int NoPlayersOnlineDuration; + + /** + * Time in seconds the team leaders have to choose their schematic + * + * @implSpec {@code 120} by default + */ + public final int PreSchemPasteDuration; + + /** + * Time in seconds for preparing + * + * @implSpec {@code 300} by default + */ + public final int SetupDuration; + + /** + * Time in seconds the final countdown is long + * + * @implSpec {@code 30} by default + */ + public final int PreFightDuration; + + /** + * Time in seconds to spectate the arena after the fight + * + * @implSpec {@code 30} by default + */ + public final int SpectatorDuration; + + private TimesConfig(YMLWrapper loader) { + loaded = loader.canLoad(); + NoPlayersOnlineDuration = loader.getInt("NoPlayersOnlineDuration", 300); + PreSchemPasteDuration = loader.getInt("PreSchemPasteDuration", 120); + SetupDuration = loader.getInt("SetupDuration", 300); + PreFightDuration = loader.getInt("PreFightDuration", 30); + SpectatorDuration = loader.getInt("SpectatorDuration", 60); + } + } + + @ToString + public static final class ArenaConfig { + + public final boolean loaded; + + /** + * The amount of blocks the schematics should be pasted under the surface + * + * @implSpec {@code 0} by default + */ + public final int WaterDepth; + + /** + * The outer border of the arena, measured in blocks around the schematic areas + */ + public final Schem2BorderConfig Schem2Border; + + /** + * The offset the teams spawn relative to the center of their area + */ + public final SpawnOffsetConfig SpawnOffset; + + /** + * The size of the team areas are expanded around the schematics + * + * @implSpec {@code 12} by default + */ + public final int BorderFromSchematic; + + /** + * If ground walkable, teams can walk below the lower arena border during setup + * + * @implSpec {@code true} by default + */ + public final boolean GroundWalkable; + + /** + * Disable snow and ice melting + * + * @implSpec {@code false} by default + */ + public final boolean DisableSnowMelt; + + /** + * Allow leaving the arena area as spectator + * + * @implSpec {@code false} by default + */ + public final boolean Leaveable; + + /** + * Allow missiles to fly to the enemy and not stop at the schem border. + * + * @implSpec {@code !EnterStages.isEmpty()} by default + */ + public final boolean AllowMissiles; + + /** + * Denotes that there is no floor for this GameMode + * + * @implSpec {@code false} by default + */ + public final boolean NoFloor; + + private ArenaConfig(YMLWrapper loader, SchematicConfig.SizeConfig Size, List EnterStages) { + loaded = loader.canLoad(); + WaterDepth = loader.getInt("WaterDepth", 0); + Schem2Border = new Schem2BorderConfig(loader.with("Schem2Border")); + SpawnOffset = new SpawnOffsetConfig(loader.with("SpawnOffset"), Size); + BorderFromSchematic = loader.getInt("BorderFromSchematic", 21); + GroundWalkable = loader.getBoolean("GroundWalkable", true); + DisableSnowMelt = loader.getBoolean("DisableSnowMelt", false); + Leaveable = loader.getBoolean("Leaveable", false); + AllowMissiles = loader.getBoolean("AllowMissiles", !EnterStages.isEmpty()); + NoFloor = loader.getBoolean("NoFloor", false); + } + + @ToString + public static final class Schem2BorderConfig { + + public final boolean loaded; + + /** + * @implSpec {@code 24} by default + */ + public final int x; + + /** + * @implSpec {@code 24} by default + */ + public final int z; + + private Schem2BorderConfig(YMLWrapper loader) { + loaded = loader.canLoad(); + x = loader.getInt("x", 24); + z = loader.getInt("z", 24); + } + } + + @ToString + public static final class SpawnOffsetConfig { + + public final boolean loaded; + + /** + * @implSpec {@code 0} by default + */ + public final double x; + + /** + * @implSpec {@code Schematic.Size.y} by default + */ + public final double y; + + /** + * @implSpec {@code 0} by default + */ + public final double z; + + private SpawnOffsetConfig(YMLWrapper loader, SchematicConfig.SizeConfig Size) { + loaded = loader.canLoad(); + x = loader.getDouble("x", 0); + y = loader.getDouble("y", Size.y); + z = loader.getDouble("z", 0); + } + } + } + + @ToString + public static final class SchematicConfig { + + public final boolean loaded; + + /** + * The size of the schematics + */ + public final SizeConfig Size; + + /** + * Used for GameModes with a technic area + */ + public final InsetConfig Inset; + + /** + * The schematic type that can be chosen in this arena + * + * @implSpec {@code Normal} by default + */ + public final SchematicType Type; + + /** + * The schematic types that are also allowed to be chosen in this arena + */ + public final List SubTypes; + + /** + * Shortcut of the schematic type + * + * @implSpec {@code ""} by default + */ + public final String Shortcut; + + /** + * Spigot (1.8) material for GUIs + * + * @implSpec {@code STONE_BUTTON} by default + */ + public final M Material; + + /** + * Manual check of schematic necessary + * + * @implSpec {@code true} by default + */ + public final boolean ManualCheck; + + /** + * If the schematics should be rotated during pasting + * + * @implSpec {@code true} by default + */ + public final boolean Rotate; + + /** + * If the schematics should be pasted aligned to the borders instead of centered + * + * @implSpec {@code false} by default + */ + public final boolean PasteAligned; + + /** + * If only public schematics are allowed + * + * @implSpec {@code false} by default + */ + public final boolean OnlyPublicSchematics; + + /** + * If the public only force should be completely disabled + * + * @implSpec {@code false} by default + */ + public final boolean IgnorePublicOnly; + + /** + * If obsidian and bedrock should be replaced during PRE_RUNNING + * + * @implSpec {@code false} by default + */ + public final boolean ReplaceObsidianBedrock; + + /** + * If the replacement should happen with block updates + * + * @implSpec {@code false} by default + */ + public final boolean ReplaceWithBlockupdates; + + /** + * If the schematic perparation arena mode is time limited + * + * @implSpec {@code false} by default + */ + public final boolean UnlimitedPrepare; + + /** + * Maximal amount of blocks allowed in the schematic + * + * @implSpec {@code 0} by default + */ + public final int MaxBlocks; + + /** + * Maximal amount of items per dispenser + * + * @implSpec {@code 128} by default + */ + public final int MaxDispenserItems; + + /** + * Maximal blast resistance for the design blocks + * + * @implSpec {@code Double.MAX_VALUE} by default + */ + public final double MaxDesignBlastResistance; + + /** + * List of limited material (combinations)
+ * List contains tags Amount (integer) and Materials (List of material names in Spigot 1.12 AND Spigot 1.15 format) + */ + public final Map, Integer> Limited; + + private SchematicConfig(YMLWrapper loader) { + loaded = loader.canLoad(); + Size = new SizeConfig(loader.with("Size")); + Inset = new InsetConfig(loader.with("Inset")); + Type = loader.getSchematicType("Type", "Normal"); + SubTypes = loader.getSchematicTypeList("SubTypes"); + Shortcut = loader.getString("Shortcut", ""); + Material = loader.getMaterial("Material", "STONE_BUTTON"); + ManualCheck = loader.getBoolean("ManualCheck", true); + Rotate = loader.getBoolean("Rotate", true); + PasteAligned = loader.getBoolean("PasteAligned", false); + OnlyPublicSchematics = loader.getBoolean("OnlyPublicSchematics", false); + IgnorePublicOnly = loader.getBoolean("IgnorePublicOnly", false); + ReplaceObsidianBedrock = loader.getBoolean("ReplaceObsidianBedrock", false); + ReplaceWithBlockupdates = loader.getBoolean("ReplaceWithBlockupdates", false); + UnlimitedPrepare = loader.getBoolean("UnlimitedPrepare", false); + MaxBlocks = loader.getInt("MaxBlocks", 0); + MaxDispenserItems = loader.getInt("MaxDispenserItems", 128); + MaxDesignBlastResistance = loader.getDouble("MaxDesignBlastResistance", Double.MAX_VALUE); + + Map, Integer> Limited = new HashMap<>(); + for (Map entry : loader.getMapList("Limited")) { + int amount = (Integer) entry.get("Amount"); + Set materials = new HashSet<>((List) entry.get("Materials")); + if (amount == 0) { + materials.forEach(material -> { + Limited.put(Collections.singleton(loader.materialMapper.apply(material.toUpperCase())), 0); + }); + } else { + Limited.put(Collections.unmodifiableSet(materials.stream().map(String::toUpperCase).map(loader.materialMapper).collect(Collectors.toSet())), amount); + } + } + this.Limited = Collections.unmodifiableMap(Limited); + } + + @ToString + public static final class SizeConfig { + + public final boolean loaded; + + /** + * @implSpec {@code 0} by default + */ + public final int x; + + /** + * @implSpec {@code 0} by default + */ + public final int y; + + /** + * @implSpec {@code 0} by default + */ + public final int z; + + private SizeConfig(YMLWrapper loader) { + loaded = loader.canLoad(); + x = loader.getInt("x", 0); + y = loader.getInt("y", 0); + z = loader.getInt("z", 0); + } + } + + @ToString + public static final class InsetConfig { + + public final boolean loaded; + + /** + * @implSpec {@code 0} by default + */ + public final int x; + + /** + * @implSpec {@code 0} by default + */ + public final int z; + + /** + * @implSpec {@code 0} by default + */ + public final int top; + + /** + * @implSpec {@code 0} by default + */ + public final int bottom; + + private InsetConfig(YMLWrapper loader) { + loaded = loader.canLoad(); + x = loader.getInt("x", 0); + z = loader.getInt("z", 0); + top = loader.getInt("top", 0); + bottom = loader.getInt("bottom", 0); + } + } + } + + @ToString + public static final class BlueConfig { + + public final boolean loaded; + + /** + * @implSpec {@code Blau} by default + */ + public final String Name; + + /** + * @implSpec {@code §9} by default + */ + public final String Prefix; + + private BlueConfig(YMLWrapper loader) { + loaded = loader.canLoad(); + Name = loader.getString("Name", "Blau"); + Prefix = loader.getString("Prefix", "§9"); + } + } + + @ToString + public static final class RedConfig { + + public final boolean loaded; + + /** + * @implSpec {@code Rot} by default + */ + public final String Name; + + /** + * @implSpec {@code §c} by default + */ + public final String Prefix; + + private RedConfig(YMLWrapper loader) { + loaded = loader.canLoad(); + Name = loader.getString("Name", "Rot"); + Prefix = loader.getString("Prefix", "§c"); + } + } + + @ToString + public static final class WinConditionParamsConfig { + + public final boolean loaded; + + /** + * The time of any of the timeout win conditions in seconds + * + * @implSpec {@code 1200} by default + */ + public final int TimeoutTime; + + /** + * The percentage when any of the percent win conditions limits or triggers a win + * + * @implSpec {@code 7.0} by default + */ + public final double PercentWin; + + /** + * Does the percentage still change after the start of the enter phase + * + * @implSpec {@code true} by default + */ + public final boolean PercentEntern; + + /** + * Is Blocks a whitelist (true) or blacklist (false) + * + * @implSpec {@code false} by default + */ + public final boolean BlocksWhitelist; + + /** + * Special Blocks (Valid spigot material values) used by the percent win conditions + */ + public final List Blocks; + + /** + * Time for being declared TechKo without a shot given. + * + * @implSpec {@code 90} by default + */ + public final int TechKoTime; + + private WinConditionParamsConfig(YMLWrapper loader) { + loaded = loader.canLoad(); + TimeoutTime = loader.getInt("TimeoutTime", 1200); + PercentWin = loader.getDouble("PercentWin", 7.0); + PercentEntern = loader.getBoolean("PercentEntern", true); + BlocksWhitelist = loader.getBoolean("BlocksWhitelist", false); + Blocks = loader.getMaterialList("Blocks"); + TechKoTime = loader.getInt("TechKoTime", 90); + } + } + + @ToString + public static final class KitsConfig { + + public final boolean loaded; + + /** + * The kit file for this configuration + * + * @implSpec {@code kits.yml} by default + */ + public final String File; + + /** + * The default kit for team members + * + * @implSpec {@code default} by default + */ + public final String MemberDefault; + + /** + * The default kit for team leaders + * + * @implSpec {@code default} by default + */ + public final String LeaderDefault; + + /** + * If the personal kit system is active + * + * @implSpec {@code false} by default + */ + public final boolean PersonalKits; + + /** + * Items (Valid spigot material values) that are not allowed in the personal kit + */ + public final List ForbiddenItems; + + private KitsConfig(YMLWrapper loader) { + loaded = loader.canLoad(); + File = loader.getString("File", "kits.yml"); + MemberDefault = loader.getString("MemberDefault", "default"); + LeaderDefault = loader.getString("LeaderDefault", "default"); + PersonalKits = loader.getBoolean("PersonalKits", false); + ForbiddenItems = loader.getMaterialList("ForbiddenItems"); + } + } + + @ToString + public static final class TechhiderConfig { + + public final boolean loaded; + + /** + * Activates the tech hider + * + * @implSpec {@code false} by default + */ + public final boolean Active; + + /** + * Which block the tech hider replaces to. + * + * @implSpec {@code end_stone} by default + */ + public final M ObfuscateWith; + + /** + * A list of all hidden blocks. "water" results in the hiding of all waterlogged blocks as well. + */ + public final Set HiddenBlocks; + + /** + * The block entity contents that are hidden (here with minecraft:nametag) + */ + public final Set HiddenBlockEntities; + + private TechhiderConfig(YMLWrapper loader) { + loaded = loader.canLoad(); + Active = loader.getBoolean("Active", false); + ObfuscateWith = loader.getMaterial("ObfuscateWith", "end_stone"); + HiddenBlocks = Collections.unmodifiableSet(new HashSet<>(loader.getMaterialList("HiddenBlocks"))); + HiddenBlockEntities = Collections.unmodifiableSet(new HashSet<>(loader.getStringList("HiddenBlockEntities"))); + } + } + + public boolean isAfterDeadline() { + return Deadline != null && Deadline.before(Date.from(Instant.now())); + } + + public String hasMap(String map) { + for (String m : Server.Maps) { + if (m.equalsIgnoreCase(map)) + return m; + } + return null; + } + + public String getRandomMap() { + return Server.Maps.get(random.nextInt(Server.Maps.size())); + } + + public String convertToRealMapName(String map) { + for (String m : Server.Maps) { + if (m.equalsIgnoreCase(map)) + return m; + } + return null; + } + + public String getChatName() { + return Server.ChatNames.get(0); + } + + public boolean isActive() { + if (Server.ChatNames.isEmpty()) return false; + if (ActiveMonths.isEmpty()) return true; + return ActiveMonths.contains(LocalDateTime.now().getMonth().getValue()); + } + + public String getSchemTypeOrInternalName() { + if (Schematic.loaded) { + return Schematic.Type.toDB(); + } + return configFile.getName().replace(".yml", ""); + } +} diff --git a/CommonCore/SQL/src/de/steamwar/sql/IgnoreSystem.java b/CommonCore/SQL/src/de/steamwar/sql/IgnoreSystem.java index d6ce26aa..c0c38cc8 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/IgnoreSystem.java +++ b/CommonCore/SQL/src/de/steamwar/sql/IgnoreSystem.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/Mod.java b/CommonCore/SQL/src/de/steamwar/sql/Mod.java index d6ccc063..4d8fcd9d 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/Mod.java +++ b/CommonCore/SQL/src/de/steamwar/sql/Mod.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/CommonCore/SQL/src/de/steamwar/sql/NoClipboardException.java b/CommonCore/SQL/src/de/steamwar/sql/NoClipboardException.java index 97433485..864eb8b3 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/NoClipboardException.java +++ b/CommonCore/SQL/src/de/steamwar/sql/NoClipboardException.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/NodeData.java b/CommonCore/SQL/src/de/steamwar/sql/NodeData.java index 0332193c..be0bbc95 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/NodeData.java +++ b/CommonCore/SQL/src/de/steamwar/sql/NodeData.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/NodeDownload.java b/CommonCore/SQL/src/de/steamwar/sql/NodeDownload.java index b56a5994..6580b589 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/NodeDownload.java +++ b/CommonCore/SQL/src/de/steamwar/sql/NodeDownload.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2025 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/NodeMember.java b/CommonCore/SQL/src/de/steamwar/sql/NodeMember.java index 64844e94..8b40b8be 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/NodeMember.java +++ b/CommonCore/SQL/src/de/steamwar/sql/NodeMember.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/PollAnswer.java b/CommonCore/SQL/src/de/steamwar/sql/PollAnswer.java index 933f2536..9376ed18 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/PollAnswer.java +++ b/CommonCore/SQL/src/de/steamwar/sql/PollAnswer.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/Punishment.java b/CommonCore/SQL/src/de/steamwar/sql/Punishment.java index 4e0c1665..1cd61078 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/Punishment.java +++ b/CommonCore/SQL/src/de/steamwar/sql/Punishment.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -119,17 +119,17 @@ public class Punishment { @RequiredArgsConstructor @Getter public enum PunishmentType { - Ban(false, "BAN_TEAM", "BAN_PERMA", "BAN_UNTIL", "UNBAN_ERROR", "UNBAN"), - Mute( false, "MUTE_TEAM", "MUTE_PERMA", "MUTE_UNTIL", "UNMUTE_ERROR", "UNMUTE"), - NoSchemReceiving(true, "NOSCHEMRECEIVING_TEAM", "NOSCHEMRECEIVING_PERMA", "NOSCHEMRECEIVING_UNTIL", "UNNOSCHEMRECEIVING_ERROR", "UNNOSCHEMRECEIVING"), - NoSchemSharing(true, "NOSCHEMSHARING_TEAM", "NOSCHEMSHARING_PERMA", "NOSCHEMSHARING_UNTIL", "UNNOSCHEMSHARING_ERROR", "UNNOSCHEMSHARING"), - NoSchemSubmitting(false, "NOSCHEMSUBMITTING_TEAM", "NOSCHEMSUBMITTING_PERMA", "NOSCHEMSUBMITTING_UNTIL", "UNNOSCHEMSUBMITTING_ERROR", "UNNOSCHEMSUBMITTING"), - NoDevServer(true, "NODEVSERVER_TEAM", "NODEVSERVER_PERMA", "NODEVSERVER_UNTIL", "UNNODEVSERVER_ERROR", "UNNODEVSERVER"), - NoFightServer(true, "NOFIGHTSERVER_TEAM", "NOFIGHTSERVER_PERMA", "NOFIGHTSERVER_UNTIL", "UNNOFIGHTSERVER_ERROR", "UNNOFIGHTSERVER"), - NoTeamServer(true, "NOTEAMSERVER_TEAM", "NOTEAMSERVER_PERMA", "NOTEAMSERVER_UNTIL", "UNNOTEAMSERVER_ERROR", "UNNOTEAMSERVER"), - Note(false, "NOTE_TEAM", null, null, null, null, true); + Ban(UserPerm.TEAM, "BAN_TEAM", "BAN_PERMA", "BAN_UNTIL", "UNBAN_ERROR", "UNBAN"), + Mute( UserPerm.TEAM, "MUTE_TEAM", "MUTE_PERMA", "MUTE_UNTIL", "UNMUTE_ERROR", "UNMUTE"), + NoSchemReceiving(UserPerm.MODERATION, "NOSCHEMRECEIVING_TEAM", "NOSCHEMRECEIVING_PERMA", "NOSCHEMRECEIVING_UNTIL", "UNNOSCHEMRECEIVING_ERROR", "UNNOSCHEMRECEIVING"), + NoSchemSharing(UserPerm.MODERATION, "NOSCHEMSHARING_TEAM", "NOSCHEMSHARING_PERMA", "NOSCHEMSHARING_UNTIL", "UNNOSCHEMSHARING_ERROR", "UNNOSCHEMSHARING"), + NoSchemSubmitting(UserPerm.TEAM, "NOSCHEMSUBMITTING_TEAM", "NOSCHEMSUBMITTING_PERMA", "NOSCHEMSUBMITTING_UNTIL", "UNNOSCHEMSUBMITTING_ERROR", "UNNOSCHEMSUBMITTING"), + NoDevServer(UserPerm.PREFIX_DEVELOPER, "NODEVSERVER_TEAM", "NODEVSERVER_PERMA", "NODEVSERVER_UNTIL", "UNNODEVSERVER_ERROR", "UNNODEVSERVER"), + NoFightServer(UserPerm.MODERATION, "NOFIGHTSERVER_TEAM", "NOFIGHTSERVER_PERMA", "NOFIGHTSERVER_UNTIL", "UNNOFIGHTSERVER_ERROR", "UNNOFIGHTSERVER"), + NoTeamServer(UserPerm.MODERATION, "NOTEAMSERVER_TEAM", "NOTEAMSERVER_PERMA", "NOTEAMSERVER_UNTIL", "UNNOTEAMSERVER_ERROR", "UNNOTEAMSERVER"), + Note(UserPerm.TEAM, "NOTE_TEAM", null, null, null, null, true); - private final boolean needsAdmin; + private final UserPerm userPerm; private final String teamMessage; private final String playerMessagePerma; private final String playerMessageUntil; diff --git a/CommonCore/SQL/src/de/steamwar/sql/Referee.java b/CommonCore/SQL/src/de/steamwar/sql/Referee.java index e22faf7e..3f909643 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/Referee.java +++ b/CommonCore/SQL/src/de/steamwar/sql/Referee.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/CommonCore/SQL/src/de/steamwar/sql/SQLWrapper.java b/CommonCore/SQL/src/de/steamwar/sql/SQLWrapper.java index cff7dec9..4fbe2541 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/SQLWrapper.java +++ b/CommonCore/SQL/src/de/steamwar/sql/SQLWrapper.java @@ -1,33 +1,37 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; import de.steamwar.ImplementationProvider; -import java.util.List; -import java.util.Map; +import java.io.File; -public interface SQLWrapper { - SQLWrapper impl = ImplementationProvider.getImpl("de.steamwar.sql.SQLWrapperImpl"); +public interface SQLWrapper { + SQLWrapper impl = ImplementationProvider.getImpl("de.steamwar.sql.SQLWrapperImpl"); - void loadSchemTypes(List tmpTypes, Map tmpFromDB); + File getSchemTypesFolder(); + + GameModeConfig loadGameModeConfig(File file); + + default void processSchematicType(GameModeConfig gameModeConfig) { + } void additionalExceptionMetadata(StringBuilder builder); } diff --git a/CommonCore/SQL/src/de/steamwar/sql/SWException.java b/CommonCore/SQL/src/de/steamwar/sql/SWException.java index 4656804a..945743f7 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/SWException.java +++ b/CommonCore/SQL/src/de/steamwar/sql/SWException.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/SchemElo.java b/CommonCore/SQL/src/de/steamwar/sql/SchemElo.java index 0e92cfd5..0a8641b0 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/SchemElo.java +++ b/CommonCore/SQL/src/de/steamwar/sql/SchemElo.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/SchematicNode.java b/CommonCore/SQL/src/de/steamwar/sql/SchematicNode.java index e355419b..bac7929f 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/SchematicNode.java +++ b/CommonCore/SQL/src/de/steamwar/sql/SchematicNode.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; @@ -83,7 +83,7 @@ public class SchematicNode { private static final SelectStatement byIdAndUser = new SelectStatement<>(table, "SELECT NodeId, NodeOwner, ? AS EffectiveOwner, NodeName, ParentNode, LastUpdate, NodeItem, NodeType, NodeRank, Config FROM SchematicNode WHERE NodeId = ?"); private static final SelectStatement allParentsOfNode = new SelectStatement<>(table, - "WITH RECURSIVE R AS (SELECT NodeId, ParentNode FROM EffectiveSchematicNode WHERE NodeId = ? AND EffectiveOwner = ? UNION SELECT E.NodeId, E.ParentNode FROM R, EffectiveSchematicNode E WHERE R.ParentNode = E.NodeId AND E.EffectiveOwner = ?) SELECT SN.NodeId, SN.NodeOwner, ? AS EffectiveOwner, SN.NodeName, R.ParentNode, SN.LastUpdate, SN.NodeItem, SN.NodeType, SN.NodeRank, SN.ReplaceColor, SN.AllowReplay FROM R INNER JOIN SchematicNode SN ON SN.NodeId = R.NodeId"); + "WITH RECURSIVE R AS (SELECT NodeId, ParentNode FROM EffectiveSchematicNode WHERE NodeId = ? AND EffectiveOwner = ? UNION SELECT E.NodeId, E.ParentNode FROM R, EffectiveSchematicNode E WHERE R.ParentNode = E.NodeId AND E.EffectiveOwner = ?) SELECT SN.NodeId, SN.NodeOwner, ? AS EffectiveOwner, SN.NodeName, R.ParentNode, SN.LastUpdate, SN.NodeItem, SN.NodeType, SN.NodeRank, SN.Config FROM R INNER JOIN SchematicNode SN ON SN.NodeId = R.NodeId"); static { NodeMember.init(); diff --git a/CommonCore/SQL/src/de/steamwar/sql/SchematicType.java b/CommonCore/SQL/src/de/steamwar/sql/SchematicType.java index 62b047c8..6abaffca 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/SchematicType.java +++ b/CommonCore/SQL/src/de/steamwar/sql/SchematicType.java @@ -1,28 +1,30 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.sql; import de.steamwar.sql.internal.SqlTypeMapper; import lombok.Getter; +import java.io.File; import java.util.*; +import java.util.stream.Collectors; public class SchematicType { @@ -38,7 +40,23 @@ public class SchematicType { tmpTypes.add(Normal); tmpFromDB.put(Normal.name().toLowerCase(), Normal); - SQLWrapper.impl.loadSchemTypes(tmpTypes, tmpFromDB); + File folder = SQLWrapper.impl.getSchemTypesFolder(); + if (folder.exists()) { + for (File configFile : Arrays.stream(folder.listFiles((file, name) -> name.endsWith(".yml") && !name.endsWith(".kits.yml"))).sorted().collect(Collectors.toList())) { + GameModeConfig gameModeConfig = SQLWrapper.impl.loadGameModeConfig(configFile); + if (gameModeConfig.Schematic.Type == null) continue; + if (tmpFromDB.containsKey(gameModeConfig.Schematic.Type.toDB())) continue; + SchematicType current = gameModeConfig.Schematic.Type; + if (!gameModeConfig.CheckQuestions.isEmpty()) { + SchematicType checkType = current.checkType; + tmpTypes.add(checkType); + tmpFromDB.put(checkType.toDB(), checkType); + } + tmpTypes.add(current); + tmpFromDB.put(current.toDB(), current); + SQLWrapper.impl.processSchematicType(gameModeConfig); + } + } fromDB = Collections.unmodifiableMap(tmpFromDB); types = Collections.unmodifiableList(tmpTypes); @@ -109,6 +127,7 @@ public class SchematicType { } public static SchematicType fromDB(String input) { + if (fromDB == null) return null; return fromDB.get(input.toLowerCase()); } diff --git a/CommonCore/SQL/src/de/steamwar/sql/Script.java b/CommonCore/SQL/src/de/steamwar/sql/Script.java index 9691c439..1a5ccd25 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/Script.java +++ b/CommonCore/SQL/src/de/steamwar/sql/Script.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/Season.java b/CommonCore/SQL/src/de/steamwar/sql/Season.java index a713fe22..f366cbdb 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/Season.java +++ b/CommonCore/SQL/src/de/steamwar/sql/Season.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/Session.java b/CommonCore/SQL/src/de/steamwar/sql/Session.java index 18ad2c8c..21e2f8f7 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/Session.java +++ b/CommonCore/SQL/src/de/steamwar/sql/Session.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/SteamwarUser.java b/CommonCore/SQL/src/de/steamwar/sql/SteamwarUser.java index 025e501c..719deb68 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/SteamwarUser.java +++ b/CommonCore/SQL/src/de/steamwar/sql/SteamwarUser.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/Team.java b/CommonCore/SQL/src/de/steamwar/sql/Team.java index b1a650ba..71921de6 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/Team.java +++ b/CommonCore/SQL/src/de/steamwar/sql/Team.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/TeamTeilnahme.java b/CommonCore/SQL/src/de/steamwar/sql/TeamTeilnahme.java index f1484dac..499a1a66 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/TeamTeilnahme.java +++ b/CommonCore/SQL/src/de/steamwar/sql/TeamTeilnahme.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/Token.java b/CommonCore/SQL/src/de/steamwar/sql/Token.java index 007a16e2..ca32c0fa 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/Token.java +++ b/CommonCore/SQL/src/de/steamwar/sql/Token.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/CommonCore/SQL/src/de/steamwar/sql/UserConfig.java b/CommonCore/SQL/src/de/steamwar/sql/UserConfig.java index f705dfdd..c2525a57 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/UserConfig.java +++ b/CommonCore/SQL/src/de/steamwar/sql/UserConfig.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/UserElo.java b/CommonCore/SQL/src/de/steamwar/sql/UserElo.java index d9876c4c..a02ba03a 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/UserElo.java +++ b/CommonCore/SQL/src/de/steamwar/sql/UserElo.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; diff --git a/CommonCore/SQL/src/de/steamwar/sql/UserPerm.java b/CommonCore/SQL/src/de/steamwar/sql/UserPerm.java index 75a55854..7a575d82 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/UserPerm.java +++ b/CommonCore/SQL/src/de/steamwar/sql/UserPerm.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/CommonCore/SQL/src/de/steamwar/sql/YMLWrapper.java b/CommonCore/SQL/src/de/steamwar/sql/YMLWrapper.java new file mode 100644 index 00000000..d7afa5e6 --- /dev/null +++ b/CommonCore/SQL/src/de/steamwar/sql/YMLWrapper.java @@ -0,0 +1,163 @@ +/* + * 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 . + */ + +package de.steamwar.sql; + +import org.yaml.snakeyaml.Yaml; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import java.util.stream.Collectors; + +final class YMLWrapper { + + final Function materialMapper; + final Function winconditionMapper; + + private final boolean canLoad; + private final Map document; + + YMLWrapper(File file, Function materialMapper, Function winconditionMapper) { + this.materialMapper = materialMapper; + this.winconditionMapper = winconditionMapper; + + Yaml yaml = new Yaml(); + Map document = Collections.emptyMap(); + boolean canLoad = false; + if (file != null && file.exists() && file.isFile()) { + try { + document = yaml.load(new FileReader(file)); + canLoad = true; + } catch (IOException e) { + // Ignore + } + } + this.document = document; + this.canLoad = canLoad; + } + + private YMLWrapper(boolean canLoad, Map document, Function materialMapper, Function winconditionMapper) { + this.materialMapper = materialMapper; + this.winconditionMapper = winconditionMapper; + this.canLoad = canLoad; + this.document = document; + } + + public boolean canLoad() { + return canLoad; + } + + public YMLWrapper with(String path) { + if (document.containsKey(path)) { + Object value = document.get(path); + if (value instanceof Map) { + return new YMLWrapper<>(true, (Map) value, materialMapper, winconditionMapper); + } + } + return new YMLWrapper<>(false, Collections.emptyMap(), materialMapper, winconditionMapper); + } + + public T get(String path, T defaultValue, Function mapper) { + Object value = this.document.get(path); + if (value == null) return defaultValue; + try { + T mapped = mapper.apply(value); + if (mapped != null) return mapped; + } catch (ClassCastException e) { + // Ignore exception + } + return defaultValue; + } + + public String getString(String path, String defaultValue) { + return get(path, defaultValue, Objects::toString); + } + + public int getInt(String path, int defaultValue) { + return get(path, defaultValue, Integer.class::cast); + } + + public double getDouble(String path, double defaultValue) { + return get(path, defaultValue, Double.class::cast); + } + + public boolean getBoolean(String path, boolean defaultValue) { + return get(path, defaultValue, Boolean.class::cast); + } + + public SchematicType getSchematicType(String path, String defaultValue) { + String schematicType = getString(path, defaultValue); + return SchematicType.fromDB(schematicType); + } + + public M getMaterial(String path, String defaultValue) { + return materialMapper.apply(getString(path, defaultValue).toUpperCase()); + } + + public List get(String path, Function> mapper) { + Object value = this.document.get(path); + if (value == null) return Collections.emptyList(); + try { + return Collections.unmodifiableList(mapper.apply(value)); + } catch (ClassCastException e) { + return Collections.emptyList(); + } + } + + public List getStringList(String path) { + return get(path, o -> (List) o); + } + + public List getIntList(String path) { + return get(path, o -> (List) o); + } + + public List getSchematicTypeList(String path) { + List list = getStringList(path); + if (list.isEmpty()) { + return Collections.emptyList(); + } else { + return Collections.unmodifiableList(list.stream().map(SchematicType::fromDB).collect(Collectors.toList())); + } + } + + public List getMaterialList(String path) { + List list = getStringList(path); + if (list.isEmpty()) { + return Collections.emptyList(); + } else { + return Collections.unmodifiableList(list.stream().map(String::toUpperCase).map(materialMapper).collect(Collectors.toList())); + } + } + + public List> getMapList(String path) { + Object value = this.document.get(path); + if (value instanceof List) { + return Collections.unmodifiableList((List>) value); + } else { + return Collections.emptyList(); + } + } +} diff --git a/CommonCore/SQL/src/de/steamwar/sql/internal/Field.java b/CommonCore/SQL/src/de/steamwar/sql/internal/Field.java index 90bfa1d8..512484d8 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/internal/Field.java +++ b/CommonCore/SQL/src/de/steamwar/sql/internal/Field.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql.internal; diff --git a/CommonCore/SQL/src/de/steamwar/sql/internal/SQLConfig.java b/CommonCore/SQL/src/de/steamwar/sql/internal/SQLConfig.java index 3153ecbf..41e620ff 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/internal/SQLConfig.java +++ b/CommonCore/SQL/src/de/steamwar/sql/internal/SQLConfig.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql.internal; diff --git a/CommonCore/SQL/src/de/steamwar/sql/internal/SelectStatement.java b/CommonCore/SQL/src/de/steamwar/sql/internal/SelectStatement.java index e17dcb71..259989bd 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/internal/SelectStatement.java +++ b/CommonCore/SQL/src/de/steamwar/sql/internal/SelectStatement.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql.internal; diff --git a/CommonCore/SQL/src/de/steamwar/sql/internal/SqlTypeMapper.java b/CommonCore/SQL/src/de/steamwar/sql/internal/SqlTypeMapper.java index 53a2cc29..8ac8ba66 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/internal/SqlTypeMapper.java +++ b/CommonCore/SQL/src/de/steamwar/sql/internal/SqlTypeMapper.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql.internal; diff --git a/CommonCore/SQL/src/de/steamwar/sql/internal/Statement.java b/CommonCore/SQL/src/de/steamwar/sql/internal/Statement.java index 2621da6b..5bcd3fcf 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/internal/Statement.java +++ b/CommonCore/SQL/src/de/steamwar/sql/internal/Statement.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql.internal; diff --git a/CommonCore/SQL/src/de/steamwar/sql/internal/Table.java b/CommonCore/SQL/src/de/steamwar/sql/internal/Table.java index e052bf26..b0f156e4 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/internal/Table.java +++ b/CommonCore/SQL/src/de/steamwar/sql/internal/Table.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql.internal; diff --git a/CommonCore/build.gradle.kts b/CommonCore/build.gradle.kts index 8e2df2bc..b63bd369 100644 --- a/CommonCore/build.gradle.kts +++ b/CommonCore/build.gradle.kts @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ plugins { @@ -25,4 +25,5 @@ dependencies { api(project(":CommonCore:SQL")) api(project(":CommonCore:Network")) api(project(":CommonCore:Data")) + api(project(":CommonCore:Linkage")) } diff --git a/FightSystem/FightSystem_10/build.gradle.kts b/FightSystem/FightSystem_10/build.gradle.kts index d34e28f4..2ab25eda 100644 --- a/FightSystem/FightSystem_10/build.gradle.kts +++ b/FightSystem/FightSystem_10/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_10/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper10.java b/FightSystem/FightSystem_10/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper10.java index 78dd79a5..3b6c94f6 100644 --- a/FightSystem/FightSystem_10/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper10.java +++ b/FightSystem/FightSystem_10/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper10.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; @@ -55,4 +55,7 @@ public class CraftbukkitWrapper10 implements CraftbukkitWrapper { public Stream entityIterator() { return ((CraftWorld) Config.world).getHandle().entityList.stream(); } + + @Override + public void setupGamerule() { } } diff --git a/FightSystem/FightSystem_12/build.gradle.kts b/FightSystem/FightSystem_12/build.gradle.kts index 8ec0f834..0654681f 100644 --- a/FightSystem/FightSystem_12/build.gradle.kts +++ b/FightSystem/FightSystem_12/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_12/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper12.java b/FightSystem/FightSystem_12/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper12.java index f8e843bc..cc6a1c50 100644 --- a/FightSystem/FightSystem_12/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper12.java +++ b/FightSystem/FightSystem_12/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper12.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; @@ -55,4 +55,7 @@ public class CraftbukkitWrapper12 implements CraftbukkitWrapper { public Stream entityIterator() { return ((CraftWorld) Config.world).getHandle().entityList.stream(); } + + @Override + public void setupGamerule() { } } diff --git a/FightSystem/FightSystem_12/src/de/steamwar/fightsystem/utils/WorldOfColorWrapper12.java b/FightSystem/FightSystem_12/src/de/steamwar/fightsystem/utils/WorldOfColorWrapper12.java index b4be805b..0c9614b3 100644 --- a/FightSystem/FightSystem_12/src/de/steamwar/fightsystem/utils/WorldOfColorWrapper12.java +++ b/FightSystem/FightSystem_12/src/de/steamwar/fightsystem/utils/WorldOfColorWrapper12.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_12/src/de/steamwar/fightsystem/utils/WorldeditWrapper12.java b/FightSystem/FightSystem_12/src/de/steamwar/fightsystem/utils/WorldeditWrapper12.java index 7dd977b5..d5869543 100644 --- a/FightSystem/FightSystem_12/src/de/steamwar/fightsystem/utils/WorldeditWrapper12.java +++ b/FightSystem/FightSystem_12/src/de/steamwar/fightsystem/utils/WorldeditWrapper12.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_14/build.gradle.kts b/FightSystem/FightSystem_14/build.gradle.kts index 4fc15121..dfa4eb5f 100644 --- a/FightSystem/FightSystem_14/build.gradle.kts +++ b/FightSystem/FightSystem_14/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/BlockIdWrapper14.java b/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/BlockIdWrapper14.java index 93b4a811..665fab12 100644 --- a/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/BlockIdWrapper14.java +++ b/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/BlockIdWrapper14.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper14.java b/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper14.java index 07c525d4..8945ca9d 100644 --- a/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper14.java +++ b/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper14.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; @@ -56,4 +56,7 @@ public class CraftbukkitWrapper14 implements CraftbukkitWrapper { public Stream entityIterator() { return ((CraftWorld) Config.world).getHandle().entitiesById.values().stream(); } + + @Override + public void setupGamerule() { } } diff --git a/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/FlatteningWrapper14.java b/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/FlatteningWrapper14.java index 2cce880d..c2e70dc9 100644 --- a/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/FlatteningWrapper14.java +++ b/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/FlatteningWrapper14.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/SWSound14.java b/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/SWSound14.java index 77fde1dc..dcf5fd71 100644 --- a/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/SWSound14.java +++ b/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/SWSound14.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/WorldeditWrapper14.java b/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/WorldeditWrapper14.java index 072afaff..c3206f86 100644 --- a/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/WorldeditWrapper14.java +++ b/FightSystem/FightSystem_14/src/de/steamwar/fightsystem/utils/WorldeditWrapper14.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_15/build.gradle.kts b/FightSystem/FightSystem_15/build.gradle.kts index 4b16dc73..a90121b6 100644 --- a/FightSystem/FightSystem_15/build.gradle.kts +++ b/FightSystem/FightSystem_15/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_15/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper15.java b/FightSystem/FightSystem_15/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper15.java index 70d9e8c5..617c8680 100644 --- a/FightSystem/FightSystem_15/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper15.java +++ b/FightSystem/FightSystem_15/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper15.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; @@ -56,4 +56,7 @@ public class CraftbukkitWrapper15 implements CraftbukkitWrapper { public Stream entityIterator() { return ((CraftWorld) Config.world).getHandle().entitiesById.values().stream(); } + + @Override + public void setupGamerule() { } } diff --git a/FightSystem/FightSystem_18/build.gradle.kts b/FightSystem/FightSystem_18/build.gradle.kts index b5d694ed..363d7a4e 100644 --- a/FightSystem/FightSystem_18/build.gradle.kts +++ b/FightSystem/FightSystem_18/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_18/src/de/steamwar/fightsystem/utils/BlockIdWrapper18.java b/FightSystem/FightSystem_18/src/de/steamwar/fightsystem/utils/BlockIdWrapper18.java index 992dd451..b70a9d52 100644 --- a/FightSystem/FightSystem_18/src/de/steamwar/fightsystem/utils/BlockIdWrapper18.java +++ b/FightSystem/FightSystem_18/src/de/steamwar/fightsystem/utils/BlockIdWrapper18.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_18/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper18.java b/FightSystem/FightSystem_18/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper18.java index 8fa8e7de..762e909e 100644 --- a/FightSystem/FightSystem_18/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper18.java +++ b/FightSystem/FightSystem_18/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper18.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; @@ -62,4 +62,7 @@ public class CraftbukkitWrapper18 implements CraftbukkitWrapper { public Stream entityIterator() { return StreamSupport.stream(((Iterable) getIterable.invoke(getWorldEntities.invoke(getWorld.invoke(Config.world)))).spliterator(), false); } + + @Override + public void setupGamerule() { } } diff --git a/FightSystem/FightSystem_18/src/de/steamwar/fightsystem/utils/HullHiderWrapper18.java b/FightSystem/FightSystem_18/src/de/steamwar/fightsystem/utils/HullHiderWrapper18.java index 9cee390f..ddc01fa9 100644 --- a/FightSystem/FightSystem_18/src/de/steamwar/fightsystem/utils/HullHiderWrapper18.java +++ b/FightSystem/FightSystem_18/src/de/steamwar/fightsystem/utils/HullHiderWrapper18.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_19/build.gradle.kts b/FightSystem/FightSystem_19/build.gradle.kts index 6ccb56c9..a8811e9d 100644 --- a/FightSystem/FightSystem_19/build.gradle.kts +++ b/FightSystem/FightSystem_19/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_19/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper19.java b/FightSystem/FightSystem_19/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper19.java index 1a18a2a7..e00428a3 100644 --- a/FightSystem/FightSystem_19/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper19.java +++ b/FightSystem/FightSystem_19/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper19.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_20/build.gradle.kts b/FightSystem/FightSystem_20/build.gradle.kts index 13eb77cf..71c024b1 100644 --- a/FightSystem/FightSystem_20/build.gradle.kts +++ b/FightSystem/FightSystem_20/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_20/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper20.java b/FightSystem/FightSystem_20/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper20.java index e0dabe46..0bad44a2 100644 --- a/FightSystem/FightSystem_20/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper20.java +++ b/FightSystem/FightSystem_20/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper20.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_20/src/de/steamwar/fightsystem/utils/HullHiderWrapper20.java b/FightSystem/FightSystem_20/src/de/steamwar/fightsystem/utils/HullHiderWrapper20.java index 48bf0ad5..56262ab0 100644 --- a/FightSystem/FightSystem_20/src/de/steamwar/fightsystem/utils/HullHiderWrapper20.java +++ b/FightSystem/FightSystem_20/src/de/steamwar/fightsystem/utils/HullHiderWrapper20.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_21/build.gradle.kts b/FightSystem/FightSystem_21/build.gradle.kts index a05590d1..a8c67f6f 100644 --- a/FightSystem/FightSystem_21/build.gradle.kts +++ b/FightSystem/FightSystem_21/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -24,6 +24,7 @@ plugins { dependencies { compileOnly(project(":FightSystem:FightSystem_Core", "default")) compileOnly(project(":FightSystem:FightSystem_18", "default")) + compileOnly(project(":SpigotCore", "default")) compileOnly(libs.paperapi21) { attributes { @@ -40,4 +41,5 @@ dependencies { } compileOnly(libs.fastutil) + compileOnly(libs.authlib) } diff --git a/FightSystem/FightSystem_21/src/de/steamwar/fightsystem/utils/BlockIdWrapper21.java b/FightSystem/FightSystem_21/src/de/steamwar/fightsystem/utils/BlockIdWrapper21.java new file mode 100644 index 00000000..105bbe36 --- /dev/null +++ b/FightSystem/FightSystem_21/src/de/steamwar/fightsystem/utils/BlockIdWrapper21.java @@ -0,0 +1,77 @@ +/* + * 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 . + */ + +package de.steamwar.fightsystem.utils; + +import com.comphenix.tinyprotocol.TinyProtocol; +import com.mojang.authlib.GameProfile; +import de.steamwar.core.ProtocolWrapper; +import de.steamwar.fightsystem.FightSystem; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.level.block.state.BlockState; +import org.bukkit.GameMode; +import org.bukkit.Material; +import org.bukkit.World; +import org.bukkit.block.Block; +import org.bukkit.craftbukkit.CraftWorld; +import org.bukkit.craftbukkit.block.CraftBlockState; +import org.bukkit.craftbukkit.util.CraftMagicNumbers; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; + +public class BlockIdWrapper21 implements BlockIdWrapper { + + @Override + public Material idToMaterial(int blockState) { + return CraftMagicNumbers.getMaterial(net.minecraft.world.level.block.Block.stateById(blockState)).getItemType(); + } + + @Override + public int blockToId(Block block) { + return net.minecraft.world.level.block.Block.getId(((CraftBlockState) block.getState()).getHandle()); + } + + @Override + public void setBlock(World world, int x, int y, int z, int blockState) { + BlockState blockData = net.minecraft.world.level.block.Block.stateById(blockState); + ServerLevel level = ((CraftWorld) world).getHandle(); + BlockPos pos = new BlockPos(x, y, z); + + level.removeBlockEntity(pos); + level.setBlock(pos, blockData, blockState); + level.getChunkSource().blockChanged(pos); + } + + @Override + public void trackEntity(Player player, Entity entity) { + if(entity instanceof Player) + TinyProtocol.instance.sendPacket(player, ProtocolWrapper.impl.playerInfoPacketConstructor(ProtocolWrapper.PlayerInfoAction.REMOVE, new GameProfile(entity.getUniqueId(), entity.getName()), GameMode.CREATIVE)); + + player.showEntity(FightSystem.getPlugin(), entity); + } + + @Override + public void untrackEntity(Player player, Entity entity) { + player.hideEntity(FightSystem.getPlugin(), entity); + + if(entity instanceof Player) + TinyProtocol.instance.sendPacket(player, ProtocolWrapper.impl.playerInfoPacketConstructor(ProtocolWrapper.PlayerInfoAction.ADD, new GameProfile(entity.getUniqueId(), entity.getName()), GameMode.CREATIVE)); + } +} diff --git a/FightSystem/FightSystem_21/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper21.java b/FightSystem/FightSystem_21/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper21.java index b5c920a7..113f28c0 100644 --- a/FightSystem/FightSystem_21/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper21.java +++ b/FightSystem/FightSystem_21/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper21.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -19,12 +19,43 @@ package de.steamwar.fightsystem.utils; +import de.steamwar.fightsystem.Config; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.chunk.LevelChunk; +import net.minecraft.world.level.chunk.LevelChunkSection; +import org.bukkit.GameRule; +import org.bukkit.World; +import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.entity.Entity; +import java.util.HashSet; +import java.util.Set; + public class CraftbukkitWrapper21 extends CraftbukkitWrapper18 { @Override public float headRotation(Entity e) { return getEntity(e).getYHeadRot(); } + + @Override + public void setupGamerule() { + Config.world.setGameRule(GameRule.LOCATOR_BAR, false); + } + + private LevelChunk getChunk(World world, int x, int z) { + return ((CraftWorld) world).getHandle().getChunk(x, z); + } + + @Override + public void resetChunk(World world, World backup, int x, int z) { + LevelChunk worldChunk = getChunk(world, x, z); + LevelChunk backupChunk = getChunk(backup, x, z); + LevelChunkSection[] sections = worldChunk.getSections(); + System.arraycopy(backupChunk.getSections(), 0, sections, 0, sections.length); + Set blocks = new HashSet<>(worldChunk.blockEntities.keySet()); + blocks.stream().filter(key -> !backupChunk.blockEntities.containsKey(key)).forEach(worldChunk::removeBlockEntity); + worldChunk.heightmaps.clear(); + worldChunk.heightmaps.putAll(backupChunk.heightmaps); + } } diff --git a/FightSystem/FightSystem_21/src/de/steamwar/fightsystem/utils/ReflectionWrapper21.java b/FightSystem/FightSystem_21/src/de/steamwar/fightsystem/utils/ReflectionWrapper21.java new file mode 100644 index 00000000..118bfba1 --- /dev/null +++ b/FightSystem/FightSystem_21/src/de/steamwar/fightsystem/utils/ReflectionWrapper21.java @@ -0,0 +1,36 @@ +/* + * 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 . + */ + +package de.steamwar.fightsystem.utils; + +import io.papermc.paper.datacomponent.DataComponentTypes; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; + +public class ReflectionWrapper21 implements ReflectionWrapper { + @Override + public Object explosionHider(Player player, Object packet, PacketHiderFunction packetHiderFunction) { + return packet; + } + + @Override + public boolean hasItems(ItemStack stack) { + return stack.getDataTypes().stream().anyMatch(dataComponentType -> dataComponentType != DataComponentTypes.ENCHANTMENTS || dataComponentType != DataComponentTypes.DAMAGE); + } +} diff --git a/FightSystem/FightSystem_8/build.gradle.kts b/FightSystem/FightSystem_8/build.gradle.kts index 7fb2f827..ff60010d 100644 --- a/FightSystem/FightSystem_8/build.gradle.kts +++ b/FightSystem/FightSystem_8/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/BlockIdWrapper8.java b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/BlockIdWrapper8.java index 5d06a7be..9f0687e7 100644 --- a/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/BlockIdWrapper8.java +++ b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/BlockIdWrapper8.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/BountifulWrapper8.java b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/BountifulWrapper8.java index 3d124ff9..b4fa5886 100644 --- a/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/BountifulWrapper8.java +++ b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/BountifulWrapper8.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper8.java b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper8.java index 8d743ae7..f431d71d 100644 --- a/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper8.java +++ b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper8.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; @@ -52,4 +52,7 @@ public class CraftbukkitWrapper8 implements CraftbukkitWrapper { public Stream entityIterator() { return ((CraftWorld) Config.world).getHandle().entityList.stream(); } + + @Override + public void setupGamerule() { } } diff --git a/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/FlatteningWrapper8.java b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/FlatteningWrapper8.java index c788f060..0c6c7c9f 100644 --- a/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/FlatteningWrapper8.java +++ b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/FlatteningWrapper8.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/HullHiderWrapper8.java b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/HullHiderWrapper8.java index 03647c5e..0c2716f3 100644 --- a/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/HullHiderWrapper8.java +++ b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/HullHiderWrapper8.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/ReflectionWrapper8.java b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/ReflectionWrapper8.java new file mode 100644 index 00000000..6da5308a --- /dev/null +++ b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/ReflectionWrapper8.java @@ -0,0 +1,59 @@ +/* + * 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 . + */ + +package de.steamwar.fightsystem.utils; + +import de.steamwar.Reflection; +import org.bukkit.Location; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.function.Function; + +public class ReflectionWrapper8 implements ReflectionWrapper { + + private static final Class packetPlayOutExplosion = Reflection.getClass("net.minecraft.network.protocol.game.ClientboundExplodePacket"); + private static final Reflection.Field explosionBlocks = Reflection.getField(packetPlayOutExplosion, List.class, 0); + private static final Function explosionLocation = HullHider.posPacketToLocation(packetPlayOutExplosion, double.class, 1.0); + + @Override + public Object explosionHider(Player player, Object packet, PacketHiderFunction packetHiderFunction) { + if(explosionBlocks.get(packet).isEmpty()) + return packetHiderFunction.hide(player, packet, explosionLocation.apply(packet)); + + return packet; + } + + + private static final Class itemStack = Reflection.getClass("net.minecraft.world.item.ItemStack"); + private static final Reflection.Method asNMSCopy = Reflection.getTypedMethod(Reflection.getClass("org.bukkit.craftbukkit.inventory.CraftItemStack"), "asNMSCopy", itemStack, ItemStack.class); + private static final Class nbtTagCompound = Reflection.getClass("net.minecraft.nbt.CompoundTag"); + private static final Reflection.Method getTag = Reflection.getTypedMethod(itemStack, null, nbtTagCompound); + private static final Reflection.Method getKeys = Reflection.getTypedMethod(nbtTagCompound, null, Set.class); + @Override + public boolean hasItems(ItemStack stack) { + Set keys = new HashSet<>((Set) getKeys.invoke(getTag.invoke(asNMSCopy.invoke(null, stack)))); + keys.remove("Enchantments"); + keys.remove("Damage"); + return !keys.isEmpty(); + } +} diff --git a/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/SWSound8.java b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/SWSound8.java index d4a6e210..00fb6956 100644 --- a/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/SWSound8.java +++ b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/SWSound8.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/WorldOfColorWrapper8.java b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/WorldOfColorWrapper8.java index 4ddc6844..549f5492 100644 --- a/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/WorldOfColorWrapper8.java +++ b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/WorldOfColorWrapper8.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/WorldeditWrapper8.java b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/WorldeditWrapper8.java index 1fdd34b7..6581566c 100644 --- a/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/WorldeditWrapper8.java +++ b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/utils/WorldeditWrapper8.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_9/build.gradle.kts b/FightSystem/FightSystem_9/build.gradle.kts index 5edfa1e3..ec63f4ae 100644 --- a/FightSystem/FightSystem_9/build.gradle.kts +++ b/FightSystem/FightSystem_9/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_9/src/de/steamwar/fightsystem/utils/BountifulWrapper9.java b/FightSystem/FightSystem_9/src/de/steamwar/fightsystem/utils/BountifulWrapper9.java index 48017755..8d89a718 100644 --- a/FightSystem/FightSystem_9/src/de/steamwar/fightsystem/utils/BountifulWrapper9.java +++ b/FightSystem/FightSystem_9/src/de/steamwar/fightsystem/utils/BountifulWrapper9.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_9/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper9.java b/FightSystem/FightSystem_9/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper9.java index 54281ed3..305f21ab 100644 --- a/FightSystem/FightSystem_9/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper9.java +++ b/FightSystem/FightSystem_9/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper9.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; @@ -55,4 +55,7 @@ public class CraftbukkitWrapper9 implements CraftbukkitWrapper { public Stream entityIterator() { return ((CraftWorld) Config.world).getHandle().entityList.stream(); } + + @Override + public void setupGamerule() { } } diff --git a/FightSystem/FightSystem_9/src/de/steamwar/fightsystem/utils/SWSound9.java b/FightSystem/FightSystem_9/src/de/steamwar/fightsystem/utils/SWSound9.java index 3589c09d..d1f7692d 100644 --- a/FightSystem/FightSystem_9/src/de/steamwar/fightsystem/utils/SWSound9.java +++ b/FightSystem/FightSystem_9/src/de/steamwar/fightsystem/utils/SWSound9.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_Core/build.gradle.kts b/FightSystem/FightSystem_Core/build.gradle.kts index 93dd59c4..caa83e0d 100644 --- a/FightSystem/FightSystem_Core/build.gradle.kts +++ b/FightSystem/FightSystem_Core/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -22,6 +22,8 @@ plugins { } dependencies { + compileOnly(libs.classindex) + annotationProcessor(libs.classindex) compileOnly(project(":SpigotCore", "default")) compileOnly(libs.spigotapi) diff --git a/FightSystem/FightSystem_Core/src/config.yml b/FightSystem/FightSystem_Core/src/config.yml index ca3645d6..3356e254 100644 --- a/FightSystem/FightSystem_Core/src/config.yml +++ b/FightSystem/FightSystem_Core/src/config.yml @@ -12,11 +12,11 @@ Server: # If ranked matches should be available for the game mode Ranked: false # defaults to false if missing -# The questions that have to be answered to accept the schematic -CheckQuestions: [] # Disables check schem type if missing +# Submission deadline for schematics in 'dd.MM.yyyy HH:mm' format +Deadline: null # defaults to null if missing -# The available schematic ranks -Ranks: [] # Disables ranks for this schematic type if missing +# The questions that have to be answered to accept the schematic +CheckQuestions: [] # Disables check schem type if missing Times: # Time in seconds the server stops after starting if nobody joins @@ -52,6 +52,8 @@ Arena: Leaveable: false # defaults to false if missing # Allow missiles to fly to the enemy and not stop at the schem border. AllowMissiles: false # defaults to true if EnterStages are present otherwise 'false' + # Denotes that there is no floor for this GameMode + NoFloor: false # defaults to false if missing Schematic: # The size of the schematics @@ -59,6 +61,12 @@ Schematic: x: 0 y: 0 z: 0 + # Used for GameModes with a technic area + Inset: + x: 0 + z: 0 + top: 0 + bottom: 0 # The schematic type that can be chosen in this arena Type: Normal # defaults to Normal if missing # The schematic types that are also allowed to be chosen in this arena @@ -87,6 +95,8 @@ Schematic: MaxBlocks: 0 # defaults to 0 (ignored) if missing # Maximal amount of items per dispenser MaxDispenserItems: 128 # defaults to 128 if missing + # Maximal blast resistance for the design blocks + MaxDesignBlastResistance: 100000000 # defaults to Double.MAX_VALUE if missing # List of limited material (combinations) # List contains tags Amount (integer) and Materials (List of material names in Spigot 1.12 AND Spigot 1.15 format) Limited: @@ -95,6 +105,9 @@ Schematic: # The name of the game mode presented to the players GameName: WarGear # defaults to WarGear if missing +# The months this game mode should be active and playable +# The empty List means all of them +ActiveMonths: [] # defaults to none if missing # The prefix used for team chats TeamChatPrefix: + # defaults to + if missing Blue: @@ -137,6 +150,8 @@ WinConditionParams: BlocksWhitelist: false # defaults to false if missing # Special Blocks (Valid spigot material values) used by the percent win conditions Blocks: [] # defaults to none if missing + # Time for being declared TechKo without a shot given. + TechKoTime: 90 # defaults to 90 if missing Kits: # The kit file for this configuration diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/ArenaMode.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/ArenaMode.java index e96e0204..e65ce94c 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/ArenaMode.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/ArenaMode.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/Config.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/Config.java index d7ce5f9e..a5c89bca 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/Config.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/Config.java @@ -1,24 +1,26 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem; +import de.steamwar.sql.GameModeConfig; +import de.steamwar.data.GameModeConfigUtils; import de.steamwar.fightsystem.utils.Region; import de.steamwar.fightsystem.winconditions.Winconditions; import de.steamwar.sql.*; @@ -32,9 +34,10 @@ import org.bukkit.entity.Player; import org.bukkit.util.Vector; import java.io.File; -import java.util.*; +import java.util.Collections; +import java.util.Set; +import java.util.UUID; import java.util.logging.Level; -import java.util.stream.Collectors; public class Config { @@ -42,15 +45,7 @@ public class Config { public static final World world = Bukkit.getWorlds().get(0); - //Fight sequence - public static final int NoPlayerOnlineDuration; - public static final int PreSchemPasteDuration; - public static final int SetupDuration; - public static final int PreFightDuration; - public static final int SpectatorDuration; - - // entern parameter - public static final List EnterStages; + public static final GameModeConfig GameModeConfig; //arena parameter public static final Region BluePasteRegion; @@ -69,60 +64,20 @@ public class Config { private static final int BlueToRedY; public static final int BlueToRedZ; - public static final int PreperationArea; - public static final int WaterDepth; - public static final boolean GroundWalkable; - public static final boolean DisableSnowMelt; - public static final boolean ArenaLeaveable; - public static final boolean AllowMissiles; - //schematic parameter - public static final boolean RanksEnabled; public static final boolean OnlyPublicSchematics; - public static final boolean IgnorePublicOnly; - public static final de.steamwar.sql.SchematicType SchematicType; - public static final List SubTypes; + public static final boolean RedRotate; public static final boolean BlueRotate; - public static final boolean PasteAligned; - public static final boolean ReplaceObsidianBedrock; - public static final boolean ReplaceWithBlockupdates; - public static final boolean UnlimitedPrepare; //team parameter public static final String TeamRedName; public static final String TeamBlueName; public static final String TeamRedColor; public static final String TeamBlueColor; - public static final String GameName; - public static final String TeamChatDetection; public static final UUID BlueLeader; public static final UUID RedLeader; - //Active win conditions - public static final Set ActiveWinconditions; - - //win condition parameters - public static final int TimeoutTime; - public static final double PercentWin; - public static final boolean PercentEntern; - public static final boolean PercentBlocksWhitelist; - public static final Set PercentBlocks; - public static final int TechKoTime; - - //default kits - public static final String MemberDefault; - public static final String LeaderDefault; - public static final boolean PersonalKits; - public static final Set ForbiddenItems; - public static final String KitFile; - - //tech hider parameter - public static final boolean TechhiderActive; - public static final Set HiddenBlocks; - public static final Set HiddenBlockEntities; - public static final Material ObfuscateWith; - //event parameter public static final EventFight EventKampf; private static final Set Referees; @@ -154,7 +109,7 @@ public class Config { Bukkit.getLogger().log(Level.SEVERE, "Arenaconfig fehlt!"); Bukkit.shutdown(); } - FileConfiguration config = YamlConfiguration.loadConfiguration(new File(FightSystem.getPlugin().getDataFolder(), configFile)); + GameModeConfig = new GameModeConfig<>(new File(FightSystem.getPlugin().getDataFolder(), configFile), GameModeConfigUtils.ToMaterial, Winconditions::valueOf, de.steamwar.sql.GameModeConfig.ToStaticWarGear, false); File worldConfigFile = new File(world.getWorldFolder(), "config.yml"); if(!worldConfigFile.exists()) { @@ -163,111 +118,37 @@ public class Config { } FileConfiguration worldconfig = YamlConfiguration.loadConfiguration(worldConfigFile); - NoPlayerOnlineDuration = config.getInt("Times.NoPlayersOnlineDuration", 300); - PreSchemPasteDuration = config.getInt("Times.PreSchemPasteDuration", 120); - SetupDuration = config.getInt("Times.SetupDuration", 300); - PreFightDuration = config.getInt("Times.PreFightDuration", 30); - SpectatorDuration = config.getInt("Times.SpectatorDuration", 30); - int blueCornerX = worldconfig.getInt("BlueCorner.x"); int blueCornerY = worldconfig.getInt("BlueCorner.y"); int blueCornerZ = worldconfig.getInt("BlueCorner.z"); int underBorder = worldconfig.getInt("UnderBorder", blueCornerY); - WaterDepth = config.getInt("Arena.WaterDepth", 0); - int schem2BorderX = config.getInt("Arena.Schem2Border.x", 24); - int schem2BorderZ = config.getInt("Arena.Schem2Border.z", 24); - PreperationArea = config.getInt("Arena.BorderFromSchematic", 12); - GroundWalkable = config.getBoolean("Arena.GroundWalkable", true); - DisableSnowMelt = config.getBoolean("Arena.DisableSnowMelt", false); - ArenaLeaveable = config.getBoolean("Arena.Leaveable", false); - - int schemsizeX = config.getInt("Schematic.Size.x"); - int schemsizeY = config.getInt("Schematic.Size.y"); - int schemsizeZ = config.getInt("Schematic.Size.z"); - RanksEnabled = !config.getStringList("Ranks").isEmpty(); - SchematicType = de.steamwar.sql.SchematicType.fromDB(Objects.requireNonNull(config.getString("Schematic.Type", "normal"))); - SubTypes = config.getStringList("Schematic.SubTypes").stream().map(de.steamwar.sql.SchematicType::fromDB).collect(Collectors.toList()); - IgnorePublicOnly = config.getBoolean("Schematic.IgnorePublicOnly", false); - boolean rotate = config.getBoolean("Schematic.Rotate", true); - PasteAligned = config.getBoolean("Schematic.PasteAligned", false); - ReplaceObsidianBedrock = config.getBoolean("Schematic.ReplaceObsidianBedrock", false); - ReplaceWithBlockupdates = config.getBoolean("Schematic.ReplaceWithBlockupdates", false); - UnlimitedPrepare = config.getBoolean("Schematic.UnlimitedPrepare", false); - - int schemInsetX = config.getInt("Schematic.Inset.x", 0); - int schemInsetZ = config.getInt("Schematic.Inset.z", 0); - int schemInsetBottom = config.getInt("Schematic.Inset.bottom", 0); - int schemInsetTop = config.getInt("Schematic.Inset.top", 0); - - GameName = config.getString("GameName", "WarGear"); - TeamChatDetection = config.getString("TeamChatPrefix", "+"); - - ActiveWinconditions = Collections.unmodifiableSet(config.getStringList("WinConditions").stream().map(Winconditions::valueOf).collect(Collectors.toSet())); - - TimeoutTime = config.getInt("WinConditionParams.TimeoutTime", 1200); - PercentWin = config.getDouble("WinConditionParams.PercentWin", 7.0); - PercentEntern = config.getBoolean("WinConditionParams.PercentEntern", true); - PercentBlocksWhitelist = config.getBoolean("WinConditionParams.BlocksWhitelist", false); - PercentBlocks = Collections.unmodifiableSet(config.getStringList("WinConditionParams.Blocks").stream().map(Material::valueOf).collect(Collectors.toSet())); - TechKoTime = config.getInt("WinConditionParams.TechKoTime", 90); - - EnterStages = Collections.unmodifiableList(config.getIntegerList("EnterStages")); - AllowMissiles = config.getBoolean("Arena.AllowMissiles", !EnterStages.isEmpty()); - - KitFile = config.getString("Kits.File", "kits.yml"); - MemberDefault = config.getString("Kits.MemberDefault", "default"); - LeaderDefault = config.getString("Kits.LeaderDefault", "default"); - PersonalKits = config.getBoolean("Kits.PersonalKits", false); - ForbiddenItems = Collections.unmodifiableSet(config.getStringList("Kits.ForbiddenItems").stream().map(Material::valueOf).collect(Collectors.toSet())); - - TechhiderActive = config.getBoolean("Techhider.Active", false); - ObfuscateWith = Material.getMaterial(config.getString("Techhider.ObfuscateWith", "end_stone").toUpperCase()); - HiddenBlocks = config.getStringList("Techhider.HiddenBlocks").stream().map(String::toUpperCase).map(Material::getMaterial).collect(Collectors.toSet()); - HiddenBlockEntities = Collections.unmodifiableSet(new HashSet<>(config.getStringList("Techhider.HiddenBlockEntities"))); - - if(schemsizeX < 0){ - schemsizeX = -schemsizeX; - blueCornerX = blueCornerX - schemsizeX; - } - if(schemsizeY < 0){ - schemsizeY = -schemsizeY; - blueCornerY = blueCornerY - schemsizeY; - } - if(schemsizeZ < 0){ - schemsizeZ = -schemsizeZ; - blueCornerZ = blueCornerZ - schemsizeZ; - } - BlueToRedX = worldconfig.getInt("BlueToRed.x", 0); BlueToRedY = worldconfig.getInt("BlueToRed.y", 0); - BlueToRedZ = worldconfig.getInt("BlueToRed.z", schemsizeZ + 50); - double teamBlueSpawnOffsetX = config.getDouble("Arena.SpawnOffset.x", 0); - double teamBlueSpawnOffsetY = config.getDouble("Arena.SpawnOffset.y", schemsizeY); - double teamBlueSpawnOffsetZ = config.getDouble("Arena.SpawnOffset.z", 0); + BlueToRedZ = worldconfig.getInt("BlueToRed.z", GameModeConfig.Schematic.Size.z + 50); int teamRedCornerX = BlueToRedX + blueCornerX; int teamRedCornerY = BlueToRedY + blueCornerY; int teamRedCornerZ = BlueToRedZ + blueCornerZ; - int teamBluePasteX = blueCornerX + schemsizeX / 2; - int teamBluePasteZ = blueCornerZ + schemsizeZ / 2; + int teamBluePasteX = blueCornerX + GameModeConfig.Schematic.Size.x / 2; + int teamBluePasteZ = blueCornerZ + GameModeConfig.Schematic.Size.z / 2; int teamRedPasteX = teamBluePasteX + BlueToRedX; int teamRedPasteZ = teamBluePasteZ + BlueToRedZ; TeamBlueSpawn = new Location(world, - teamBluePasteX + 0.5 + teamBlueSpawnOffsetX, - blueCornerY + 0.5 + teamBlueSpawnOffsetY, - teamBluePasteZ + 0.5 + teamBlueSpawnOffsetZ); + teamBluePasteX + 0.5 + GameModeConfig.Arena.SpawnOffset.x, + blueCornerY + 0.5 + GameModeConfig.Arena.SpawnOffset.y, + teamBluePasteZ + 0.5 + GameModeConfig.Arena.SpawnOffset.z); TeamRedSpawn = new Location(world, - teamRedPasteX + 0.5 - teamBlueSpawnOffsetX, - teamRedCornerY + 0.5 + teamBlueSpawnOffsetY, - teamRedPasteZ + 0.5 - teamBlueSpawnOffsetZ); + teamRedPasteX + 0.5 - GameModeConfig.Arena.SpawnOffset.x, + teamRedCornerY + 0.5 + GameModeConfig.Arena.SpawnOffset.y, + teamRedPasteZ + 0.5 - GameModeConfig.Arena.SpawnOffset.z); SpecSpawn = new Location(world, teamBluePasteX + BlueToRedX /2.0, - blueCornerY + BlueToRedY /2.0 + schemsizeY/2.0, + blueCornerY + BlueToRedY /2.0 + GameModeConfig.Schematic.Size.y/2.0, teamBluePasteZ + BlueToRedZ /2.0); Vector v1 = TeamBlueSpawn.toVector().subtract(TeamRedSpawn.toVector()); @@ -288,45 +169,45 @@ public class Config { int arenaMinZ; int arenaMaxZ; if(BlueToRedX > 0){ - arenaMinX = blueCornerX - schem2BorderX; - arenaMaxX = teamRedCornerX + schemsizeX + schem2BorderX; + arenaMinX = blueCornerX - GameModeConfig.Arena.Schem2Border.x; + arenaMaxX = teamRedCornerX + GameModeConfig.Schematic.Size.x + GameModeConfig.Arena.Schem2Border.x; teamRedRotate = true; teamBlueRotate = false; }else{ - arenaMinX = teamRedCornerX - schem2BorderX; - arenaMaxX = blueCornerX + schemsizeX + schem2BorderX; + arenaMinX = teamRedCornerX - GameModeConfig.Arena.Schem2Border.x; + arenaMaxX = blueCornerX + GameModeConfig.Schematic.Size.x + GameModeConfig.Arena.Schem2Border.x; teamRedRotate = false; teamBlueRotate = true; } if(BlueToRedZ > 0){ - arenaMinZ = blueCornerZ - schem2BorderZ; - arenaMaxZ = teamRedCornerZ + schemsizeZ + schem2BorderZ; + arenaMinZ = blueCornerZ - GameModeConfig.Arena.Schem2Border.z; + arenaMaxZ = teamRedCornerZ + GameModeConfig.Schematic.Size.z + GameModeConfig.Arena.Schem2Border.z; teamRedRotate = true; teamBlueRotate = false; }else{ - arenaMinZ = teamRedCornerZ - schem2BorderZ; - arenaMaxZ = blueCornerZ + schemsizeZ + schem2BorderZ; + arenaMinZ = teamRedCornerZ - GameModeConfig.Arena.Schem2Border.z; + arenaMaxZ = blueCornerZ + GameModeConfig.Schematic.Size.z + GameModeConfig.Arena.Schem2Border.z; if(BlueToRedZ != 0){ teamRedRotate = false; teamBlueRotate = true; } } - if(!rotate){ + if(!GameModeConfig.Schematic.Rotate){ teamRedRotate = false; teamBlueRotate = false; } RedRotate = teamRedRotate; BlueRotate = teamBlueRotate; - RedPasteRegion = Region.fromSize(teamRedCornerX, teamRedCornerY, teamRedCornerZ, schemsizeX, schemsizeY, schemsizeZ); - BluePasteRegion = Region.fromSize(blueCornerX, blueCornerY, blueCornerZ, schemsizeX, schemsizeY, schemsizeZ); + RedPasteRegion = Region.fromSize(teamRedCornerX, teamRedCornerY, teamRedCornerZ, GameModeConfig.Schematic.Size.x, GameModeConfig.Schematic.Size.y, GameModeConfig.Schematic.Size.z); + BluePasteRegion = Region.fromSize(blueCornerX, blueCornerY, blueCornerZ, GameModeConfig.Schematic.Size.x, GameModeConfig.Schematic.Size.y, GameModeConfig.Schematic.Size.z); - RedExtendRegion = Region.withExtension(teamRedCornerX, teamRedCornerY, teamRedCornerZ, schemsizeX, schemsizeY, schemsizeZ, PreperationArea, PreperationArea, PreperationArea); - BlueExtendRegion = Region.withExtension(blueCornerX, blueCornerY, blueCornerZ, schemsizeX, schemsizeY, schemsizeZ, PreperationArea, PreperationArea, PreperationArea); - ArenaRegion = Region.withExtension(arenaMinX, blueCornerY, arenaMinZ, arenaMaxX - arenaMinX, schemsizeY, arenaMaxZ - arenaMinZ, 0, PreperationArea, 0); + RedExtendRegion = Region.withExtension(teamRedCornerX, teamRedCornerY, teamRedCornerZ, GameModeConfig.Schematic.Size.x, GameModeConfig.Schematic.Size.y, GameModeConfig.Schematic.Size.z, GameModeConfig.Arena.BorderFromSchematic, GameModeConfig.Arena.BorderFromSchematic, GameModeConfig.Arena.BorderFromSchematic); + BlueExtendRegion = Region.withExtension(blueCornerX, blueCornerY, blueCornerZ, GameModeConfig.Schematic.Size.x, GameModeConfig.Schematic.Size.y, GameModeConfig.Schematic.Size.z, GameModeConfig.Arena.BorderFromSchematic, GameModeConfig.Arena.BorderFromSchematic, GameModeConfig.Arena.BorderFromSchematic); + ArenaRegion = Region.withExtension(arenaMinX, blueCornerY, arenaMinZ, arenaMaxX - arenaMinX, GameModeConfig.Schematic.Size.y, arenaMaxZ - arenaMinZ, 0, GameModeConfig.Arena.BorderFromSchematic, 0); PlayerRegion = new Region(arenaMinX, underBorder, arenaMinZ, arenaMaxX, world.getMaxHeight(), arenaMaxZ); - BlueInsetRegion = new Region(BluePasteRegion.getMinX() + schemInsetX, BluePasteRegion.getMinY() + schemInsetBottom, BluePasteRegion.getMinZ() + schemInsetZ, BluePasteRegion.getMaxX() - schemInsetX, BluePasteRegion.getMaxY() - schemInsetTop, BluePasteRegion.getMaxZ() - schemInsetZ); + BlueInsetRegion = new Region(BluePasteRegion.getMinX() + GameModeConfig.Schematic.Inset.x, BluePasteRegion.getMinY() + GameModeConfig.Schematic.Inset.bottom, BluePasteRegion.getMinZ() + GameModeConfig.Schematic.Inset.z, BluePasteRegion.getMaxX() - GameModeConfig.Schematic.Inset.x, BluePasteRegion.getMaxY() - GameModeConfig.Schematic.Inset.top, BluePasteRegion.getMaxZ() - GameModeConfig.Schematic.Inset.z); int eventKampfID = Integer.parseInt(System.getProperty("fightID", "0")); if(eventKampfID >= 1){ @@ -368,11 +249,11 @@ public class Config { } }else{ //No event - TeamRedColor = config.getString("Red.Prefix", "§c"); - TeamBlueColor = config.getString("Blue.Prefix", "§9"); - TeamRedName = config.getString("Red.Name", "Rot"); - TeamBlueName = config.getString("Blue.Name", "Blau"); - OnlyPublicSchematics = config.getBoolean("Schematic.OnlyPublicSchematics", false); + TeamRedColor = GameModeConfig.Red.Prefix; + TeamBlueColor = GameModeConfig.Blue.Prefix; + TeamRedName = GameModeConfig.Red.Name; + TeamBlueName = GameModeConfig.Blue.Name; + OnlyPublicSchematics = GameModeConfig.Schematic.OnlyPublicSchematics; EventTeamBlueID = 0; EventTeamRedID = 0; EventKampf = null; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java index 1ff85e23..15e2aeea 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java @@ -1,45 +1,43 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem; import com.comphenix.tinyprotocol.TinyProtocol; -import de.steamwar.core.WorldEditRendererCUIEditor; import de.steamwar.core.Core; -import de.steamwar.fightsystem.commands.*; -import de.steamwar.fightsystem.countdown.*; -import de.steamwar.fightsystem.event.*; +import de.steamwar.core.WorldEditRendererCUIEditor; +import de.steamwar.fightsystem.commands.TechareaCommand; import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.fight.FightTeam; -import de.steamwar.fightsystem.fight.FightWorld; -import de.steamwar.fightsystem.fight.HotbarKit; -import de.steamwar.fightsystem.listener.*; -import de.steamwar.fightsystem.listener.Shutdown; -import de.steamwar.fightsystem.record.FileRecorder; +import de.steamwar.fightsystem.listener.ClickAnalyzer; +import de.steamwar.fightsystem.listener.PistonListener; import de.steamwar.fightsystem.record.FileSource; import de.steamwar.fightsystem.record.GlobalRecorder; -import de.steamwar.fightsystem.record.LiveRecorder; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.OneShotStateDependent; import de.steamwar.fightsystem.states.StateDependentListener; import de.steamwar.fightsystem.utils.*; -import de.steamwar.fightsystem.winconditions.*; +import de.steamwar.fightsystem.winconditions.Wincondition; +import de.steamwar.fightsystem.winconditions.WinconditionComparisonTimeout; +import de.steamwar.fightsystem.winconditions.Winconditions; +import de.steamwar.linkage.AbstractLinker; +import de.steamwar.linkage.SpigotLinker; import de.steamwar.message.Message; import de.steamwar.sql.NodeData; import de.steamwar.sql.SchematicNode; @@ -58,6 +56,8 @@ public class FightSystem extends JavaPlugin { private TechHiderWrapper techHider; private HullHider hullHider; + private SpigotLinker spigotLinker; + @Override public void onLoad() { plugin = this; @@ -77,100 +77,32 @@ public class FightSystem extends JavaPlugin { message = new Message("de.steamwar.fightsystem.FightSystem", FightSystem.class.getClassLoader()); - new EntityDamage(); - new WaterRemover(); - new Permanent(); + spigotLinker = new SpigotLinker(this, message) { + @Override + protected void linkObject(Object any) { + // No Init needed for FightSystem! + } + }; + try { + spigotLinker.link(); + } catch (AbstractLinker.LinkException e) { + e.printStackTrace(); + Bukkit.shutdown(); + return; + } + new PistonListener(ArenaMode.AntiTestCheckPrepare, e -> e.setCancelled(true)); new PistonListener(ArenaMode.Test, e -> getMessage().broadcastActionbar("PISTON_PUSHED_OUTSIDE")); new PistonListener(ArenaMode.Prepare, e -> { getMessage().broadcast("PISTON_PUSHED_OUTSIDE"); shutdown(); }); - new Chat(); - new ArenaBorder(); - new IngameDeath(); - new InFightDamage(); - new InFightInventory(); - new DenyWorldInteraction(); - new DenyInventoryMovement(); - new EventJoin(); - new Recording(); - new Check(); - new Shutdown(); - new SetupQuit(); - new PrepareSchem(); - new TestJoin(); - new NormalJoin(); - new Spectator(); - new RunningWorldInteraction(); - new PersonalKitCreator(); - new ArrowStopper(); new StateDependentListener(ArenaMode.All, FightState.All, BountifulWrapper.impl.newDenyArrowPickupListener()); - new BlockFadeListener(); - new LeaveableArena(); - new ClickAnalyzer(); - new BlockPlaceCollision(); - new HotbarKit.HotbarKitListener(); - new JoinRequestListener(); new OneShotStateDependent(ArenaMode.All, FightState.PreSchemSetup, () -> Fight.playSound(SWSound.BLOCK_NOTE_PLING.getSound(), 100.0f, 2.0f)); new OneShotStateDependent(ArenaMode.Test, FightState.All, WorldEditRendererCUIEditor::new); - new EnterHandler(); techHider = new TechHiderWrapper(); hullHider = new HullHider(); - new FightWorld(); - new FightUI(); - new FightStatistics(); - new BungeeFightInfo(); - - new WinconditionAllDead(); - new WinconditionCaptainDead(); - new WinconditionBlocks(Winconditions.WATER_TECH_KO, "WaterTechKO", "BAR_WATER", FlatteningWrapper.impl::isWater); - new WinconditionBlocks(Winconditions.PUMPKIN_TECH_KO, "PumpkinTechKO", "BAR_CANNONS", block -> block.getType() == WinconditionBlocks.PUMPKIN_LANTERN); - new WinconditionPercent(Winconditions.PERCENT_SYSTEM, "Percent"); - new WinconditionPoints(); - new WinconditionPointsAirShip(); - new WinconditionTimeout(); - new WinconditionTimeTechKO(); - new WinconditionTimedDamageTechKO(); - new EventTeamOffWincondition(); - new WinconditionComparisonTimeout(Winconditions.HEART_RATIO_TIMEOUT, "HeartTimeout", "WIN_MORE_HEALTH", FightTeam::getHeartRatio); - new WinconditionComparisonTimeout(Winconditions.PERCENT_TIMEOUT, "PercentTimeout", "WIN_LESS_DAMAGE", team -> -Wincondition.getPercentWincondition().getPercent(team)); - - new HellsBells(); - new Meteor(); - new PersistentDamage(); - new TNTDistributor(); - new WinconditionAmongUs(); - new NoGravity(); - - new NoPlayersOnlineCountdown(); - new PreSchemCountdown(); - new PostSchemCountdown(); - new PreRunningCountdown(); - new SpectateOverCountdown(); - new EventSpectateCountdown(); - - new LeaveCommand(); - new KitCommand(); - new RemoveCommand(); - new RequestsCommand(); - new InfoCommand(); - new WGCommand(); - new TBCommand(); - new GamemodeCommand(); - new ReadyCommand(); - new AkCommand(); - new LockschemCommand(); - new StateCommand(); - new SkipCommand(); - new TechhiderbugCommand(); - new TPSWarpCommand(); - new UnrankCommand(); - new WinCommand(); - - new LiveRecorder(); - new FileRecorder(); FileSource.startReplay(); @@ -188,12 +120,15 @@ public class FightSystem extends JavaPlugin { }else if(Config.mode == ArenaMode.PREPARE) { Fight.getUnrotated().setSchem(SchematicNode.getSchematicNode(Config.PrepareSchemID)); } + + CraftbukkitWrapper.impl.setupGamerule(); } @Override public void onDisable() { GlobalRecorder.getInstance().close(); ClickAnalyzer.close(); + spigotLinker.unlink(); } public static void setSpectateState(FightTeam winFightTeam, String winreason, String subtitle, Object... params) { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.properties b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.properties index 22babff0..49e001f1 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.properties +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.properties @@ -1,20 +1,20 @@ # -# This file is a part of the SteamWar software. +# This file is a part of the SteamWar software. # -# Copyright (C) 2022 SteamWar.de-Serverteam +# 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 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. +# 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 . +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . # PREFIX=§eArena§8» diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem_de.properties b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem_de.properties index cd294425..6c3c3b19 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem_de.properties +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem_de.properties @@ -1,20 +1,20 @@ # -# This file is a part of the SteamWar software. +# This file is a part of the SteamWar software. # -# Copyright (C) 2022 SteamWar.de-Serverteam +# 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 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. +# 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 . +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . # # Commands diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/ai/AI.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/ai/AI.java index 0b681fc2..7152f40e 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/ai/AI.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/ai/AI.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/ai/AIManager.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/ai/AIManager.java index 3950a201..1ed59d98 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/ai/AIManager.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/ai/AIManager.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/ai/DummyAI.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/ai/DummyAI.java index 90fcd3d0..fd7e108c 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/ai/DummyAI.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/ai/DummyAI.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -43,7 +43,7 @@ public class DummyAI extends AI { @Override public SchematicNode chooseSchematic() { - List publics = SchematicNode.getAllSchematicsOfType(0, Config.SchematicType.toDB()); + List publics = SchematicNode.getAllSchematicsOfType(0, Config.GameModeConfig.Schematic.Type.toDB()); return publics.get(random.nextInt(publics.size())); } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/AkCommand.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/AkCommand.java index 27e6b797..73988c99 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/AkCommand.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/AkCommand.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.commands; @@ -25,6 +25,7 @@ import de.steamwar.fightsystem.FightSystem; import de.steamwar.fightsystem.fight.Kit; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCommand; +import de.steamwar.linkage.Linked; import de.steamwar.sql.SteamwarUser; import de.steamwar.sql.UserPerm; import org.bukkit.command.Command; @@ -32,6 +33,7 @@ import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +@Linked public class AkCommand implements CommandExecutor { public AkCommand() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/Commands.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/Commands.java index cff729df..7119173e 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/Commands.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/Commands.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.commands; @@ -149,8 +149,8 @@ public class Commands { return; Kit k = null; - if(Config.PersonalKits){ - PersonalKit kit = PersonalKit.get(SteamwarUser.get(p.getUniqueId()).getId(), Config.SchematicType.toDB(), kitName); + if(Config.GameModeConfig.Kits.PersonalKits){ + PersonalKit kit = PersonalKit.get(SteamwarUser.get(p.getUniqueId()).getId(), Config.GameModeConfig.Schematic.Type.toDB(), kitName); if(kit != null){ kit.setInUse(); k = new Kit(kit); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/GUI.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/GUI.java index 237d860e..729ce0b6 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/GUI.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/GUI.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.commands; @@ -152,8 +152,8 @@ public class GUI { List> entries = new ArrayList<>(); - if(Config.PersonalKits){ - List kits = PersonalKit.get(SteamwarUser.get(p.getUniqueId()).getId(), Config.SchematicType.toDB()); + if(Config.GameModeConfig.Kits.PersonalKits){ + List kits = PersonalKit.get(SteamwarUser.get(p.getUniqueId()).getId(), Config.GameModeConfig.Schematic.Type.toDB()); kits.forEach(kit -> entries.add(new SWListInv.SWListEntry<>(new SWItem(Material.LEATHER_CHESTPLATE, "§e" + kit.getName(), new ArrayList<>(), kit.isInUse(), clickType -> {}), new Kit(kit)))); }else{ List kitList = Kit.getAvailableKits(fightPlayer.isLeader()); @@ -169,19 +169,19 @@ public class GUI { if(entries.isEmpty()) { inv.setItem(22, new SWItem(Material.BARRIER, msg.parse("KIT_NO_KITS", p))); } - if(Config.PersonalKits){ + if(Config.GameModeConfig.Kits.PersonalKits){ inv.setItem(48, Material.NETHER_STAR, msg.parse("KIT_CREATE", p), clickType -> { SWAnvilInv anvilInv = new SWAnvilInv(p, msg.parse("KITNAME_TITLE", p)); anvilInv.setItem(Material.LEATHER_CHESTPLATE); anvilInv.setCallback(s -> { SteamwarUser user = SteamwarUser.get(p.getUniqueId()); - if(PersonalKit.get(user.getId(), Config.SchematicType.toDB(), s) != null) { + if(PersonalKit.get(user.getId(), Config.GameModeConfig.Schematic.Type.toDB(), s) != null) { msg.sendPrefixless("KITNAME_IN_USE", p, ChatMessageType.ACTION_BAR); p.closeInventory(); return; } Kit prototype = Kit.getAvailableKits(Fight.getFightPlayer(p).isLeader()).get(0); - PersonalKit kit = PersonalKit.create(user.getId(), Config.SchematicType.toDB(), s, prototype.getInventory(), prototype.getArmor()); + PersonalKit kit = PersonalKit.create(user.getId(), Config.GameModeConfig.Schematic.Type.toDB(), s, prototype.getInventory(), prototype.getArmor()); PersonalKitCreator.openKitCreator(p, kit); }); anvilInv.open(); @@ -202,14 +202,14 @@ public class GUI { return; } - int invSize = (Config.SubTypes.size() + 1) * 9; - SWInventory inv = new SWInventory(p, invSize, msg.parse("SCHEM_TITLE", p, Config.GameName)); - setupSchemTypeRow(p, inv, Config.SchematicType, 0); - for (int i = 0; i < Config.SubTypes.size(); i++) { - setupSchemTypeRow(p, inv, Config.SubTypes.get(i), i + 1); + int invSize = (Config.GameModeConfig.Schematic.SubTypes.size() + 1) * 9; + SWInventory inv = new SWInventory(p, invSize, msg.parse("SCHEM_TITLE", p, Config.GameModeConfig.GameName)); + setupSchemTypeRow(p, inv, Config.GameModeConfig.Schematic.Type, 0); + for (int i = 0; i < Config.GameModeConfig.Schematic.SubTypes.size(); i++) { + setupSchemTypeRow(p, inv, Config.GameModeConfig.Schematic.SubTypes.get(i), i + 1); } if (!Config.test() && SteamwarUser.get(p.getUniqueId()).hasPerm(UserPerm.TEAM)) { - SchematicNode node = SchematicNode.getSchematicNode(-1, Config.GameName, (Integer) null); + SchematicNode node = SchematicNode.getSchematicNode(-1, Config.GameModeConfig.GameName, (Integer) null); if (node != null) { inv.setItem(2, new SWItem(SWItem.getMaterial(node.getItem()), msg.parse("SCHEM_DIRT", p), click -> { schemSelect(p, node); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/GamemodeCommand.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/GamemodeCommand.java index 5c566261..02a142d0 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/GamemodeCommand.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/GamemodeCommand.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.commands; @@ -23,6 +23,7 @@ import com.google.common.collect.ImmutableList; import de.steamwar.core.CommandRemover; import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.FightSystem; +import de.steamwar.linkage.Linked; import net.md_5.bungee.api.ChatMessageType; import org.bukkit.GameMode; import org.bukkit.command.CommandSender; @@ -34,6 +35,7 @@ import java.util.ArrayList; import java.util.List; import java.util.logging.Level; +@Linked public class GamemodeCommand extends BukkitCommand { private static final List GAMEMODE_NAMES = ImmutableList.of("adventure", "creative", "survival", diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/InfoCommand.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/InfoCommand.java index 4cd6c19c..306a4fc5 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/InfoCommand.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/InfoCommand.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -26,6 +26,7 @@ import de.steamwar.fightsystem.fight.FightTeam; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCommand; import de.steamwar.fightsystem.utils.FightStatistics; +import de.steamwar.linkage.Linked; import de.steamwar.sql.SchematicNode; import de.steamwar.sql.SteamwarUser; import de.steamwar.sql.UserPerm; @@ -34,6 +35,7 @@ import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +@Linked public class InfoCommand implements CommandExecutor { public InfoCommand() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/KitCommand.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/KitCommand.java index 000711d8..3a4250f6 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/KitCommand.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/KitCommand.java @@ -1,32 +1,34 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.commands; import de.steamwar.fightsystem.ArenaMode; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCommand; +import de.steamwar.linkage.Linked; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +@Linked public class KitCommand implements CommandExecutor { public KitCommand() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/LeaveCommand.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/LeaveCommand.java index 902f7796..9934adc9 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/LeaveCommand.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/LeaveCommand.java @@ -1,32 +1,34 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.commands; import de.steamwar.fightsystem.ArenaMode; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCommand; +import de.steamwar.linkage.Linked; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +@Linked public class LeaveCommand implements CommandExecutor { public LeaveCommand() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/LockschemCommand.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/LockschemCommand.java index 9ea0c135..3d7684b2 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/LockschemCommand.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/LockschemCommand.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.commands; @@ -25,6 +25,7 @@ import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.fight.FightTeam; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCommand; +import de.steamwar.linkage.Linked; import de.steamwar.sql.*; import net.md_5.bungee.api.ChatMessageType; import org.bukkit.command.Command; @@ -32,6 +33,7 @@ import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +@Linked public class LockschemCommand implements CommandExecutor { public LockschemCommand() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/ReadyCommand.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/ReadyCommand.java index 4761ca57..127e8611 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/ReadyCommand.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/ReadyCommand.java @@ -1,32 +1,34 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.commands; import de.steamwar.fightsystem.ArenaMode; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCommand; +import de.steamwar.linkage.Linked; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +@Linked public class ReadyCommand implements CommandExecutor { public ReadyCommand() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/RemoveCommand.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/RemoveCommand.java index f7c93537..728dc989 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/RemoveCommand.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/RemoveCommand.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.commands; @@ -23,11 +23,13 @@ import de.steamwar.fightsystem.ArenaMode; import de.steamwar.fightsystem.FightSystem; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCommand; +import de.steamwar.linkage.Linked; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +@Linked public class RemoveCommand implements CommandExecutor { public RemoveCommand() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/RequestsCommand.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/RequestsCommand.java index 131cc898..d5bc2692 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/RequestsCommand.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/RequestsCommand.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.commands; @@ -27,6 +27,7 @@ import de.steamwar.fightsystem.fight.FightTeam; import de.steamwar.fightsystem.fight.JoinRequest; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCommand; +import de.steamwar.linkage.Linked; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -34,6 +35,7 @@ import org.bukkit.entity.Player; import java.util.function.BiConsumer; +@Linked public class RequestsCommand implements CommandExecutor { public RequestsCommand() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/SkipCommand.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/SkipCommand.java index a1bedda9..2844443c 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/SkipCommand.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/SkipCommand.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.commands; @@ -25,11 +25,13 @@ import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.record.PacketProcessor; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCommand; +import de.steamwar.linkage.Linked; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +@Linked public class SkipCommand implements CommandExecutor { public SkipCommand() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/StateCommand.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/StateCommand.java index 8299a8c6..bbbdb22a 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/StateCommand.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/StateCommand.java @@ -1,32 +1,34 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.commands; import de.steamwar.fightsystem.ArenaMode; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCommand; +import de.steamwar.linkage.Linked; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +@Linked public class StateCommand implements CommandExecutor { public StateCommand() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/TBCommand.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/TBCommand.java index fa18262c..4c2acf8a 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/TBCommand.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/TBCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.fightsystem.commands; @@ -23,11 +23,13 @@ import de.steamwar.fightsystem.ArenaMode; import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCommand; +import de.steamwar.linkage.Linked; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +@Linked public class TBCommand implements CommandExecutor { public TBCommand() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/TPSWarpCommand.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/TPSWarpCommand.java index 27927f72..434f373e 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/TPSWarpCommand.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/TPSWarpCommand.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -24,10 +24,12 @@ import de.steamwar.fightsystem.ArenaMode; import de.steamwar.fightsystem.FightSystem; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCommand; +import de.steamwar.linkage.Linked; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; +@Linked public class TPSWarpCommand implements CommandExecutor { public TPSWarpCommand() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/TechhiderbugCommand.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/TechhiderbugCommand.java index 3080c13e..d97103ed 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/TechhiderbugCommand.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/TechhiderbugCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2025 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.fightsystem.commands; @@ -26,6 +26,7 @@ import de.steamwar.fightsystem.FightSystem; import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCommand; +import de.steamwar.linkage.Linked; import de.steamwar.sql.SWException; import org.bukkit.Bukkit; import org.bukkit.command.Command; @@ -36,6 +37,7 @@ import java.io.StringWriter; import java.util.Arrays; import java.util.logging.Level; +@Linked public class TechhiderbugCommand implements CommandExecutor { public TechhiderbugCommand() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/UnrankCommand.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/UnrankCommand.java index 25bdf35b..5f9ff09d 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/UnrankCommand.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/UnrankCommand.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2022 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 . + * 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 . */ package de.steamwar.fightsystem.commands; @@ -23,11 +23,13 @@ import de.steamwar.fightsystem.ArenaMode; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCommand; import de.steamwar.fightsystem.utils.FightStatistics; +import de.steamwar.linkage.Linked; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +@Linked public class UnrankCommand implements CommandExecutor { public UnrankCommand () { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/WGCommand.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/WGCommand.java index 1ffe7dce..c151eefd 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/WGCommand.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/WGCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.fightsystem.commands; @@ -24,11 +24,13 @@ import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.fight.FightWorld; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCommand; +import de.steamwar.linkage.Linked; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +@Linked public class WGCommand implements CommandExecutor { public WGCommand() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/WinCommand.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/WinCommand.java index d522a8e2..3da47d29 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/WinCommand.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/WinCommand.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.fightsystem.commands; import de.steamwar.fightsystem.ArenaMode; @@ -7,12 +26,14 @@ import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.fight.FightTeam; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCommand; +import de.steamwar.linkage.Linked; import net.md_5.bungee.api.ChatMessageType; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +@Linked public class WinCommand implements CommandExecutor { public WinCommand() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/Countdown.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/Countdown.java index e96c6b16..c9739e24 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/Countdown.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/Countdown.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.countdown; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/EnternCountdown.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/EnternCountdown.java index 55bcbe38..80d41fd0 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/EnternCountdown.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/EnternCountdown.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.countdown; @@ -36,10 +36,10 @@ import java.util.List; public class EnternCountdown extends Countdown { private static int calcTime(FightPlayer fp, Countdown countdown) { - int time = Config.EnterStages.get(fp.getKit().getEnterStage()); + int time = Config.GameModeConfig.EnterStages.get(fp.getKit().getEnterStage()); if(countdown != null) { - time -= Config.TimeoutTime - countdown.getTimeLeft(); + time -= Config.GameModeConfig.WinConditionParams.TimeoutTime - countdown.getTimeLeft(); if(time < 0) time = 0; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/EventSpectateCountdown.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/EventSpectateCountdown.java index e8772398..9f8d2503 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/EventSpectateCountdown.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/EventSpectateCountdown.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.countdown; @@ -26,11 +26,13 @@ import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCountdown; import de.steamwar.fightsystem.utils.Message; import de.steamwar.fightsystem.utils.SWSound; +import de.steamwar.linkage.Linked; +@Linked public class EventSpectateCountdown extends Countdown { public EventSpectateCountdown() { - super(Config.SpectatorDuration, new Message("SHUTDOWN_COUNTDOWN"), SWSound.BLOCK_NOTE_PLING, false); + super(Config.GameModeConfig.Times.SpectatorDuration, new Message("SHUTDOWN_COUNTDOWN"), SWSound.BLOCK_NOTE_PLING, false); new StateDependentCountdown(ArenaMode.NotRestartable.contains(Config.mode) && !Config.replayserver(), FightState.Spectate, this); } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/NoPlayersOnlineCountdown.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/NoPlayersOnlineCountdown.java index 94e54e28..467854e0 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/NoPlayersOnlineCountdown.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/NoPlayersOnlineCountdown.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.countdown; @@ -24,14 +24,16 @@ import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCountdown; import de.steamwar.fightsystem.utils.Message; +import de.steamwar.linkage.Linked; import org.bukkit.Bukkit; +@Linked public class NoPlayersOnlineCountdown extends Countdown { public NoPlayersOnlineCountdown() { - super(Config.NoPlayerOnlineDuration, new Message("SHUTDOWN_COUNTDOWN"), null, false); + super(Config.GameModeConfig.Times.NoPlayersOnlineDuration, new Message("SHUTDOWN_COUNTDOWN"), null, false); - if (!Config.ArenaLeaveable) + if (!Config.GameModeConfig.Arena.Leaveable) new StateDependentCountdown(ArenaMode.AntiReplay, FightState.PreLeaderSetup, this); } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/PostSchemCountdown.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/PostSchemCountdown.java index cb5f2db2..4c15fa07 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/PostSchemCountdown.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/PostSchemCountdown.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.countdown; @@ -24,12 +24,14 @@ import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCountdown; import de.steamwar.fightsystem.utils.Message; +import de.steamwar.linkage.Linked; +@Linked public class PostSchemCountdown extends Countdown { public PostSchemCountdown() { - super(Config.SetupDuration, new Message("POST_SCHEM_COUNTDOWN"), null, false); - if(Config.mode == ArenaMode.PREPARE && Config.UnlimitedPrepare) + super(Config.GameModeConfig.Times.SetupDuration, new Message("POST_SCHEM_COUNTDOWN"), null, false); + if(Config.mode == ArenaMode.PREPARE && Config.GameModeConfig.Schematic.UnlimitedPrepare) return; new StateDependentCountdown(ArenaMode.SeriousFight, FightState.PostSchemSetup, this); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/PreRunningCountdown.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/PreRunningCountdown.java index 17684a70..45b8202e 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/PreRunningCountdown.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/PreRunningCountdown.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.countdown; @@ -25,11 +25,13 @@ import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCountdown; import de.steamwar.fightsystem.utils.Message; import de.steamwar.fightsystem.utils.SWSound; +import de.steamwar.linkage.Linked; +@Linked public class PreRunningCountdown extends Countdown { public PreRunningCountdown() { - super(Config.PreFightDuration, new Message("PRE_RUNNING_COUNTDOWN"), SWSound.BLOCK_NOTE_PLING, true); + super(Config.GameModeConfig.Times.PreFightDuration, new Message("PRE_RUNNING_COUNTDOWN"), SWSound.BLOCK_NOTE_PLING, true); new StateDependentCountdown(ArenaMode.AntiReplay, FightState.PreRunning, this); } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/PreSchemCountdown.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/PreSchemCountdown.java index 4200eb65..45a44296 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/PreSchemCountdown.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/PreSchemCountdown.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.countdown; @@ -25,11 +25,13 @@ import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCountdown; import de.steamwar.fightsystem.utils.Message; import de.steamwar.fightsystem.utils.SWSound; +import de.steamwar.linkage.Linked; +@Linked public class PreSchemCountdown extends Countdown { public PreSchemCountdown() { - super(Config.PreSchemPasteDuration, new Message("PRE_SCHEM_COUNTDOWN"), SWSound.BLOCK_NOTE_PLING, false); + super(Config.GameModeConfig.Times.PreSchemPasteDuration, new Message("PRE_SCHEM_COUNTDOWN"), SWSound.BLOCK_NOTE_PLING, false); new StateDependentCountdown(ArenaMode.AntiReplay, FightState.PreSchemSetup, this); } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/SpectateOverCountdown.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/SpectateOverCountdown.java index 9f3cb10d..4844536a 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/SpectateOverCountdown.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/SpectateOverCountdown.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.countdown; @@ -25,11 +25,13 @@ import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCountdown; import de.steamwar.fightsystem.utils.Message; import de.steamwar.fightsystem.utils.SWSound; +import de.steamwar.linkage.Linked; +@Linked public class SpectateOverCountdown extends Countdown { public SpectateOverCountdown() { - super(Config.test() ? 3600 : Config.SpectatorDuration, new Message("SPECTATE_COUNTDOWN"), SWSound.BLOCK_NOTE_PLING, false); + super(Config.test() ? 3600 : Config.GameModeConfig.Times.SpectatorDuration, new Message("SPECTATE_COUNTDOWN"), SWSound.BLOCK_NOTE_PLING, false); new StateDependentCountdown(ArenaMode.Restartable.contains(Config.mode) || Config.replayserver(), FightState.Spectate, this); } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/TimeOverCountdown.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/TimeOverCountdown.java index 3e2dde85..ed90d5e9 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/TimeOverCountdown.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/countdown/TimeOverCountdown.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.countdown; @@ -28,7 +28,7 @@ public class TimeOverCountdown extends Countdown { private final Runnable timeOver; public TimeOverCountdown(Runnable timeOver) { - super(Config.TimeoutTime, new Message("RUNNING_COUNTDOWN"), SWSound.BLOCK_NOTE_BASS, false); + super(Config.GameModeConfig.WinConditionParams.TimeoutTime, new Message("RUNNING_COUNTDOWN"), SWSound.BLOCK_NOTE_BASS, false); this.timeOver = timeOver; } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/HellsBells.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/HellsBells.java index 3cfa7a87..9620e594 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/HellsBells.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/HellsBells.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.event; @@ -29,8 +29,8 @@ import de.steamwar.fightsystem.states.StateDependent; import de.steamwar.fightsystem.utils.Message; import de.steamwar.fightsystem.utils.SWSound; import de.steamwar.fightsystem.winconditions.Winconditions; +import de.steamwar.linkage.Linked; import org.bukkit.Bukkit; -import org.bukkit.entity.EntityType; import org.bukkit.scheduler.BukkitTask; import java.util.Arrays; @@ -39,7 +39,7 @@ import java.util.Random; import java.util.concurrent.atomic.AtomicInteger; import java.util.logging.Level; - +@Linked public class HellsBells { public static final Random random = new Random(); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/Meteor.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/Meteor.java index 3f3115d6..226caee8 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/Meteor.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/Meteor.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.event; @@ -29,6 +29,7 @@ import de.steamwar.fightsystem.states.StateDependentListener; import de.steamwar.fightsystem.utils.Message; import de.steamwar.fightsystem.utils.SWSound; import de.steamwar.fightsystem.winconditions.Winconditions; +import de.steamwar.linkage.Linked; import org.bukkit.Bukkit; import org.bukkit.entity.Fireball; import org.bukkit.entity.LargeFireball; @@ -44,7 +45,7 @@ import java.util.Random; import java.util.concurrent.atomic.AtomicInteger; import java.util.logging.Level; - +@Linked public class Meteor implements Listener { public static final Random random = new Random(); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/NoGravity.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/NoGravity.java index 12246f8e..3c64c911 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/NoGravity.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/NoGravity.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.fightsystem.event; @@ -22,11 +22,13 @@ package de.steamwar.fightsystem.event; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; import de.steamwar.fightsystem.winconditions.Winconditions; +import de.steamwar.linkage.Linked; import org.bukkit.entity.EntityType; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.entity.EntitySpawnEvent; +@Linked public class NoGravity implements Listener { public NoGravity() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/PersistentDamage.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/PersistentDamage.java index 543eff9e..c8f0392f 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/PersistentDamage.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/PersistentDamage.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -28,10 +28,12 @@ import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.OneShotStateDependent; import de.steamwar.fightsystem.utils.WorldeditWrapper; import de.steamwar.fightsystem.winconditions.Winconditions; +import de.steamwar.linkage.Linked; import de.steamwar.sql.SchematicNode; import java.util.logging.Level; +@Linked public class PersistentDamage { public PersistentDamage() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/Point.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/Point.java index 13dc087f..1173fe0a 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/Point.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/Point.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.fightsystem.event; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/TNTDistributor.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/TNTDistributor.java index 8982bb3d..cb77334d 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/TNTDistributor.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/event/TNTDistributor.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -23,9 +23,11 @@ import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentTask; import de.steamwar.fightsystem.winconditions.Winconditions; +import de.steamwar.linkage.Linked; import org.bukkit.Material; import org.bukkit.inventory.ItemStack; +@Linked public class TNTDistributor { public TNTDistributor() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/events/BoardingEvent.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/events/BoardingEvent.java index 373d91b4..f55bbe73 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/events/BoardingEvent.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/events/BoardingEvent.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/events/TeamDeathEvent.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/events/TeamDeathEvent.java index 6cbdd059..5228210f 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/events/TeamDeathEvent.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/events/TeamDeathEvent.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/events/TeamLeaveEvent.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/events/TeamLeaveEvent.java index 36d96b0e..cafde226 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/events/TeamLeaveEvent.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/events/TeamLeaveEvent.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/events/TeamSpawnEvent.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/events/TeamSpawnEvent.java index 7ca62be4..62d37a83 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/events/TeamSpawnEvent.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/events/TeamSpawnEvent.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/Fight.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/Fight.java index 61f6a162..8d983b56 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/Fight.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/Fight.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.fight; @@ -102,7 +102,7 @@ public class Fight { if (Config.OnlyPublicSchematics) { return true; } - if (Config.IgnorePublicOnly || ArenaMode.RankedEvent.contains(Config.mode)) { + if (Config.GameModeConfig.Schematic.IgnorePublicOnly || ArenaMode.RankedEvent.contains(Config.mode)) { return false; } if (redTeam.getLeader() == null || blueTeam.getLeader() == null) { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightPlayer.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightPlayer.java index 763bd6fd..a5d605aa 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightPlayer.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightPlayer.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.fight; @@ -53,9 +53,9 @@ public class FightPlayer { this.entity = entity; this.team = team; this.isOut = false; - kit = Kit.getKitByName(Config.MemberDefault); - if(Config.PersonalKits){ - PersonalKit personalKit = PersonalKit.getKitInUse(user.getId(), Config.SchematicType.toDB()); + kit = Kit.getKitByName(Config.GameModeConfig.Kits.MemberDefault); + if(Config.GameModeConfig.Kits.PersonalKits){ + PersonalKit personalKit = PersonalKit.getKitInUse(user.getId(), Config.GameModeConfig.Schematic.Type.toDB()); if(personalKit != null){ kit = new Kit(personalKit); } @@ -75,7 +75,7 @@ public class FightPlayer { } public void startEnternCountdown(Countdown countdown) { - if(Config.EnterStages.size() > kit.getEnterStage() && kit.getEnterStage() >= 0) + if(Config.GameModeConfig.EnterStages.size() > kit.getEnterStage() && kit.getEnterStage() >= 0) enternCountdown = new EnternCountdown(this, countdown); } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightSchematic.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightSchematic.java index 7591d4bc..a9f38555 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightSchematic.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightSchematic.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.fight; @@ -115,9 +115,9 @@ public class FightSchematic extends StateDependent { return; if(clipboard == null){ - List publics = SchematicNode.getAllSchematicsOfType(0, Config.SchematicType.toDB()); + List publics = SchematicNode.getAllSchematicsOfType(0, Config.GameModeConfig.Schematic.Type.toDB()); if(publics.isEmpty()) { - for (SchematicType type : Config.SubTypes) { + for (SchematicType type : Config.GameModeConfig.Schematic.SubTypes) { publics = SchematicNode.getAllSchematicsOfType(0, type.toDB()); if (!publics.isEmpty()) { break; @@ -133,7 +133,7 @@ public class FightSchematic extends StateDependent { if(ArenaMode.AntiReplay.contains(Config.mode)) { boolean changeRotation = false; - if (Config.ActiveWinconditions.contains(Winconditions.RANDOM_ROTATE)) { + if (Config.GameModeConfig.WinConditions.contains(Winconditions.RANDOM_ROTATE)) { changeRotation = new Random().nextBoolean(); usedRotate = rotate ^ changeRotation; } @@ -163,9 +163,9 @@ public class FightSchematic extends StateDependent { clipboard, new Location(Config.world, region.centerX(), region.getMinY(), region.centerZ()), new Vector( - Config.PasteAligned && Config.BlueToRedX != 0 ? region.getSizeX()/2.0 - dims.getBlockX() : -dims.getBlockX()/2.0, - Config.WaterDepth != 0 ? Config.WaterDepth - WorldeditWrapper.impl.getWaterDepth(clipboard) : 0, - Config.PasteAligned && Config.BlueToRedZ != 0 ? region.getSizeZ()/2.0 - dims.getBlockZ() : -dims.getBlockZ()/2.0 + Config.GameModeConfig.Schematic.PasteAligned && Config.BlueToRedX != 0 ? region.getSizeX()/2.0 - dims.getBlockX() : -dims.getBlockX()/2.0, + Config.GameModeConfig.Arena.WaterDepth != 0 ? Config.GameModeConfig.Arena.WaterDepth - WorldeditWrapper.impl.getWaterDepth(clipboard) : 0, + Config.GameModeConfig.Schematic.PasteAligned && Config.BlueToRedZ != 0 ? region.getSizeZ()/2.0 - dims.getBlockZ() : -dims.getBlockZ()/2.0 ).add(new Vector(usedRotate ? 1 : 0, 0, usedRotate ? 1 : 0)), new AffineTransform().rotateY(usedRotate ? 180 : 0) ); @@ -179,17 +179,17 @@ public class FightSchematic extends StateDependent { @Override public void disable() { - if(!Config.ReplaceObsidianBedrock || Config.mode == ArenaMode.PREPARE) + if(!Config.GameModeConfig.Schematic.ReplaceObsidianBedrock || Config.mode == ArenaMode.PREPARE) return; FreezeWorld freezer = null; - if(!Config.ReplaceWithBlockupdates) + if(!Config.GameModeConfig.Schematic.ReplaceWithBlockupdates) freezer = new FreezeWorld(); replaceSync(Material.OBSIDIAN, Material.TNT); replaceSync(Material.BEDROCK, Material.SLIME_BLOCK); - if(!Config.ReplaceWithBlockupdates) + if(!Config.GameModeConfig.Schematic.ReplaceWithBlockupdates) freezer.disable(); } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightTeam.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightTeam.java index 47f73649..768a2851 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightTeam.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightTeam.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.fight; @@ -56,7 +56,7 @@ import java.util.function.Consumer; public class FightTeam { private static void setKitButton(HotbarKit kit, boolean leader) { - if (Kit.getAvailableKits(leader).size() > 1 || Config.PersonalKits) + if (Kit.getAvailableKits(leader).size() > 1 || Config.GameModeConfig.Kits.PersonalKits) kit.setItem(1, "CHOOSE_KIT", new ItemBuilder(Material.LEATHER_CHESTPLATE).enchant().build(), player -> GUI.kitSelection(player, "")); else kit.setItem(1, null, null, null); @@ -144,7 +144,7 @@ public class FightTeam { WorldOfColorWrapper.impl.setTeamColor(team, color); BountifulWrapper.impl.setNametagVisibility(team); team.setNameTagVisibility(NameTagVisibility.HIDE_FOR_OTHER_TEAMS); - if (!Config.ActiveWinconditions.contains(Winconditions.AMONG_US)) { + if (!Config.GameModeConfig.WinConditions.contains(Winconditions.AMONG_US)) { team.setAllowFriendlyFire(false); } @@ -357,10 +357,10 @@ public class FightTeam { if(!silent) FightUI.addSubtitle("UI_LEADER_JOINS", prefix, leader.getEntity().getName()); - publicsOnly = SchematicNode.getAllAccessibleSchematicsOfType(leader.getUser().getId(), Config.SchematicType.toDB()).isEmpty(); + publicsOnly = SchematicNode.getAllAccessibleSchematicsOfType(leader.getUser().getId(), Config.GameModeConfig.Schematic.Type.toDB()).isEmpty(); - if(!Config.PersonalKits) - leader.setKit(Kit.getKitByName(Config.LeaderDefault)); + if(!Config.GameModeConfig.Kits.PersonalKits) + leader.setKit(Kit.getKitByName(Config.GameModeConfig.Kits.LeaderDefault)); leader.ifPlayer(player -> { if(FightState.getFightState() != FightState.POST_SCHEM_SETUP) @@ -417,7 +417,7 @@ public class FightTeam { public void setSchem(SchematicNode schematic, int revision){ this.schematic.setSchematic(schematic, revision); - broadcast("SCHEMATIC_CHOSEN", Config.GameName, schematic.getName()); + broadcast("SCHEMATIC_CHOSEN", Config.GameModeConfig.GameName, schematic.getName()); } public void setReady(boolean ready) { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightWorld.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightWorld.java index efcc16a3..36a7c6fa 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightWorld.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightWorld.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.fight; @@ -27,6 +27,7 @@ import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependent; import de.steamwar.fightsystem.utils.CraftbukkitWrapper; import de.steamwar.fightsystem.utils.FlatteningWrapper; +import de.steamwar.linkage.Linked; import lombok.Getter; import org.bukkit.Bukkit; import org.bukkit.World; @@ -39,6 +40,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +@Linked public class FightWorld extends StateDependent { @Getter @@ -69,7 +71,7 @@ public class FightWorld extends StateDependent { public static void resetWorld(){ List entities = new ArrayList<>(); Recording.iterateOverEntities(Objects::nonNull, entity -> { - if(entity.getType() != EntityType.PLAYER && (!Config.ArenaLeaveable || Config.ArenaRegion.inRegion(entity.getLocation()))) + if(entity.getType() != EntityType.PLAYER && (!Config.GameModeConfig.Arena.Leaveable || Config.ArenaRegion.inRegion(entity.getLocation()))) entities.add(entity); }); entities.forEach(Entity::remove); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FreezeWorld.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FreezeWorld.java index 7b58543f..b3aff331 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FreezeWorld.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/FreezeWorld.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.fight; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/HotbarKit.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/HotbarKit.java index 6b3df110..01d20315 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/HotbarKit.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/HotbarKit.java @@ -1,53 +1,36 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2022 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 . + * 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 . */ package de.steamwar.fightsystem.fight; -import de.steamwar.core.Core; -import de.steamwar.fightsystem.ArenaMode; import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.FightSystem; import de.steamwar.fightsystem.commands.GUI; -import de.steamwar.fightsystem.listener.PersonalKitCreator; -import de.steamwar.fightsystem.states.FightState; -import de.steamwar.fightsystem.states.StateDependentListener; -import de.steamwar.fightsystem.states.StateDependentTask; import de.steamwar.fightsystem.utils.ItemBuilder; -import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.entity.Player; -import org.bukkit.event.Cancellable; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; -import org.bukkit.event.block.Action; -import org.bukkit.event.inventory.InventoryClickEvent; -import org.bukkit.event.inventory.InventoryOpenEvent; -import org.bukkit.event.player.PlayerInteractEvent; -import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.potion.PotionEffect; import java.util.Collection; -import java.util.HashSet; import java.util.Objects; -import java.util.Set; import java.util.function.Consumer; public class HotbarKit extends Kit { @@ -58,10 +41,10 @@ public class HotbarKit extends Kit { SPECTATOR_KIT.setItem(i, "JOIN_REQUEST", new ItemBuilder(Material.PAPER).build(), GUI::joinRequest); } - private static final int HOTBAR_SIZE = 9; + protected static final int HOTBAR_SIZE = 9; private final String[] nameTags; - private final Consumer[] onClicks; + protected final Consumer[] onClicks; protected HotbarKit(String name, ItemStack[] inventory, ItemStack[] armor, Collection effects, String[] nameTags, Consumer[] onClicks) { super(name, inventory, armor, effects); @@ -88,51 +71,10 @@ public class HotbarKit extends Kit { for(int i = 0; i < HOTBAR_SIZE; i++) { if(nameTags[i] != null) { ItemMeta meta = Objects.requireNonNull(getInventory()[i].getItemMeta()); - meta.setDisplayName(FightSystem.getMessage().parse(nameTags[i], player, Config.GameName)); + meta.setDisplayName(FightSystem.getMessage().parse(nameTags[i], player, Config.GameModeConfig.GameName)); getInventory()[i].setItemMeta(meta); } } super.loadToPlayer(player); } - - public static class HotbarKitListener implements Listener { - - private static final Set clicked = new HashSet<>(); - - public HotbarKitListener() { - new StateDependentListener(ArenaMode.AntiReplay, FightState.All, this); - new StateDependentTask(ArenaMode.AntiReplay, FightState.All, clicked::clear, 10, 10); - } - - @EventHandler - public void handlePlayerInteract(PlayerInteractEvent event) { - if(event.getAction() == Action.PHYSICAL || (Core.getVersion() > 8 && event.getHand() != EquipmentSlot.HAND)) - return; - - Player player = event.getPlayer(); - int slot = player.getInventory().getHeldItemSlot(); - click(player, slot, event); - } - - @EventHandler - public void onInventoryClick(InventoryClickEvent event) { - int slot = event.getSlot(); - if (slot < 0 || slot >= HOTBAR_SIZE) return; - - Player player = (Player) event.getWhoClicked(); - click(player, slot, event); - } - - private void click(Player player, int slot, Cancellable event) { - Kit activeKit = activeKits.get(player); - if(!(activeKit instanceof HotbarKit) || PersonalKitCreator.inKitCreator(player) || activeKit.getInventory()[slot] == null) - return; - - event.setCancelled(true); - if(!clicked.add(player)) - return; - - ((HotbarKit)activeKit).onClicks[slot].accept(player); - } - } } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/HotbarKitListener.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/HotbarKitListener.java new file mode 100644 index 00000000..fa8e1dc3 --- /dev/null +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/HotbarKitListener.java @@ -0,0 +1,81 @@ +/* + * 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 . + */ + +package de.steamwar.fightsystem.fight; + +import de.steamwar.core.Core; +import de.steamwar.fightsystem.ArenaMode; +import de.steamwar.fightsystem.listener.PersonalKitCreator; +import de.steamwar.fightsystem.states.FightState; +import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.fightsystem.states.StateDependentTask; +import de.steamwar.linkage.Linked; +import org.bukkit.entity.Player; +import org.bukkit.event.Cancellable; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.block.Action; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.inventory.EquipmentSlot; + +import java.util.HashSet; +import java.util.Set; + +@Linked +public class HotbarKitListener implements Listener { + + private static final Set clicked = new HashSet<>(); + + public HotbarKitListener() { + new StateDependentListener(ArenaMode.AntiReplay, FightState.All, this); + new StateDependentTask(ArenaMode.AntiReplay, FightState.All, clicked::clear, 10, 10); + } + + @EventHandler + public void handlePlayerInteract(PlayerInteractEvent event) { + if (event.getAction() == Action.PHYSICAL || (Core.getVersion() > 8 && event.getHand() != EquipmentSlot.HAND)) + return; + + Player player = event.getPlayer(); + int slot = player.getInventory().getHeldItemSlot(); + click(player, slot, event); + } + + @EventHandler + public void onInventoryClick(InventoryClickEvent event) { + int slot = event.getSlot(); + if (slot < 0 || slot >= HotbarKit.HOTBAR_SIZE) return; + + Player player = (Player) event.getWhoClicked(); + click(player, slot, event); + } + + private void click(Player player, int slot, Cancellable event) { + Kit activeKit = Kit.activeKits.get(player); + if (!(activeKit instanceof HotbarKit) || PersonalKitCreator.inKitCreator(player) || activeKit.getInventory()[slot] == null) + return; + + event.setCancelled(true); + if (!clicked.add(player)) + return; + + ((HotbarKit) activeKit).onClicks[slot].accept(player); + } +} diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/JoinRequest.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/JoinRequest.java index e4e349c7..0acf61f4 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/JoinRequest.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/JoinRequest.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2022 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 . + * 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 . */ package de.steamwar.fightsystem.fight; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/Kit.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/Kit.java index db97aa27..0bba6ae5 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/Kit.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/fight/Kit.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.fight; @@ -26,6 +26,7 @@ import de.steamwar.fightsystem.commands.Commands; import de.steamwar.fightsystem.commands.GUI; import de.steamwar.fightsystem.listener.PersonalKitCreator; import de.steamwar.fightsystem.utils.FlatteningWrapper; +import de.steamwar.fightsystem.utils.ReflectionWrapper; import de.steamwar.inventory.SWInventory; import de.steamwar.inventory.SWItem; import de.steamwar.sql.PersonalKit; @@ -48,7 +49,7 @@ import java.util.*; import java.util.logging.Level; public class Kit { - private static final File kits = new File(FightSystem.getPlugin().getDataFolder(), Config.KitFile); + private static final File kits = new File(FightSystem.getPlugin().getDataFolder(), Config.GameModeConfig.Kits.File); private static final ArrayList loadedKits = new ArrayList<>(); protected static final Map activeKits = new HashMap<>(); @@ -178,7 +179,7 @@ public class Kit { } public void removeBadItems(){ - Kit normal = Kit.getKitByName(Config.MemberDefault); + Kit normal = Kit.getKitByName(Config.GameModeConfig.Kits.MemberDefault); assert normal != null; for(int i = 0; i < inventory.length; i++){ @@ -193,7 +194,7 @@ public class Kit { return false; //Check for forbidden item - if(Config.ForbiddenItems.contains(stack.getType())) + if(Config.GameModeConfig.Kits.ForbiddenItems.contains(stack.getType())) return true; //Check for attribute modifiers @@ -210,21 +211,12 @@ public class Kit { return true; //Blocks prefilled inventories } - Kit normal = Kit.getKitByName(Config.MemberDefault); + Kit normal = Kit.getKitByName(Config.GameModeConfig.Kits.MemberDefault); assert normal != null; return !normal.isEnchantmentInKit(stack) && !stack.getEnchantments().isEmpty(); } - - private static final Class itemStack = Reflection.getClass("net.minecraft.world.item.ItemStack"); - private static final Reflection.Method asNMSCopy = Reflection.getTypedMethod(Reflection.getClass("org.bukkit.craftbukkit.inventory.CraftItemStack"), "asNMSCopy", itemStack, ItemStack.class); - private static final Class nbtTagCompound = Reflection.getClass("net.minecraft.nbt.CompoundTag"); - private static final Reflection.Method getTag = Reflection.getTypedMethod(itemStack, null, nbtTagCompound); - private static final Reflection.Method getKeys = Reflection.getTypedMethod(nbtTagCompound, null, Set.class); public static boolean hasItems(ItemStack stack) { - Set keys = new HashSet<>((Set) getKeys.invoke(getTag.invoke(asNMSCopy.invoke(null, stack)))); - keys.remove("Enchantments"); - keys.remove("Damage"); - return !keys.isEmpty(); + return ReflectionWrapper.impl.hasItems(stack); } private boolean isEnchantmentInKit(ItemStack stack){ @@ -311,8 +303,8 @@ public class Kit { } inv.setCallback(-999, click -> player.closeInventory()); - if(Config.PersonalKits){ - inv.setItem(49, SWItem.getMaterial("WOOD_AXE"), FightSystem.getMessage().parse("KIT_PREVIEW_EDIT", player), clickType -> PersonalKitCreator.openKitCreator(player, PersonalKit.get(SteamwarUser.get(player.getUniqueId()).getId(), Config.SchematicType.toDB(), name))); + if(Config.GameModeConfig.Kits.PersonalKits){ + inv.setItem(49, SWItem.getMaterial("WOOD_AXE"), FightSystem.getMessage().parse("KIT_PREVIEW_EDIT", player), clickType -> PersonalKitCreator.openKitCreator(player, PersonalKit.get(SteamwarUser.get(player.getUniqueId()).getId(), Config.GameModeConfig.Schematic.Type.toDB(), name))); inv.setItem(53, Material.BARRIER, FightSystem.getMessage().parse("KIT_PREVIEW_DELETE", player), clickType -> { player.closeInventory(); SWInventory conf = new SWInventory(player, 9, FightSystem.getMessage().parse("KIT_DELETION_CONFIRMATION", player)); @@ -320,9 +312,9 @@ public class Kit { conf.setItem(0, SWItem.getDye(10), FightSystem.getMessage().parse("KIT_DELETION_DELETE", player), click -> { player.closeInventory(); SteamwarUser user = SteamwarUser.get(player.getUniqueId()); - PersonalKit kit = PersonalKit.get(user.getId(), Config.SchematicType.toDB(), name); + PersonalKit kit = PersonalKit.get(user.getId(), Config.GameModeConfig.Schematic.Type.toDB(), name); if(kit.isInUse()) { - List kits = PersonalKit.get(user.getId(), Config.SchematicType.toDB()); + List kits = PersonalKit.get(user.getId(), Config.GameModeConfig.Schematic.Type.toDB()); if(!kits.isEmpty()){ PersonalKit kit1 = kits.get(0); kit1.setInUse(); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/ArenaBorder.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/ArenaBorder.java index 4c0daa45..16c125c3 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/ArenaBorder.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/ArenaBorder.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.listener; @@ -29,6 +29,7 @@ import de.steamwar.fightsystem.fight.FightPlayer; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; import de.steamwar.fightsystem.states.StateDependentTask; +import de.steamwar.linkage.Linked; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -37,6 +38,7 @@ import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerMoveEvent; import org.bukkit.event.player.PlayerQuitEvent; +@Linked public class ArenaBorder implements Listener { private final Border spectatorBorder = new Border(Config.PlayerRegion, true, 5, "NO_ARENA_LEAVING", "ArenaBorder.spectatorBorder"); @@ -45,7 +47,7 @@ public class ArenaBorder implements Listener { public ArenaBorder() { new StateDependentListener(ArenaMode.All, FightState.All, this); new StateDependentTask(ArenaMode.All, FightState.Running, this::damage, 2, 2); - new StateDependentListener(!Config.GroundWalkable, FightState.AntiRunning, new Listener() { + new StateDependentListener(!Config.GameModeConfig.Arena.GroundWalkable, FightState.AntiRunning, new Listener() { @EventHandler public void onMove(PlayerMoveEvent e) { Player player = e.getPlayer(); @@ -100,7 +102,7 @@ public class ArenaBorder implements Listener { } private void addToSpectator(Player player) { - if(Config.ArenaLeaveable || !player.isOnline() || playerBorder.contains(player)) + if(Config.GameModeConfig.Arena.Leaveable || !player.isOnline() || playerBorder.contains(player)) return; spectatorBorder.addPlayer(player); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/ArrowStopper.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/ArrowStopper.java index 361b86b6..19d2db5f 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/ArrowStopper.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/ArrowStopper.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.listener; @@ -24,6 +24,7 @@ import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentTask; import de.steamwar.fightsystem.utils.WorldOfColorWrapper; +import de.steamwar.linkage.Linked; import org.bukkit.Location; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; @@ -32,13 +33,14 @@ import org.bukkit.entity.Projectile; import org.bukkit.projectiles.ProjectileSource; import org.bukkit.util.Vector; +@Linked public class ArrowStopper { private static final Vector NULL_VECTOR = new Vector(0, 0, 0); private static final BlockFace[] BLOCK_FACES = {BlockFace.UP, BlockFace.DOWN, BlockFace.EAST, BlockFace.WEST, BlockFace.NORTH, BlockFace.SOUTH}; public ArrowStopper() { - new StateDependentTask(Config.TechhiderActive, FightState.Running, this::run, 1, 1); + new StateDependentTask(Config.GameModeConfig.Techhider.Active, FightState.Running, this::run, 1, 1); } private static final Class entityArrow = Reflection.getClass("net.minecraft.world.entity.projectile.AbstractArrow"); @@ -85,7 +87,7 @@ public class ArrowStopper { } private boolean checkBlock(Block block) { - return Config.HiddenBlocks.contains(block.getType()); + return Config.GameModeConfig.Techhider.HiddenBlocks.contains(block.getType()); } private boolean invalidEntity(Projectile entity) { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/BlockFadeListener.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/BlockFadeListener.java index 51b5b949..55179a5b 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/BlockFadeListener.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/BlockFadeListener.java @@ -1,17 +1,38 @@ +/* + * 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 . + */ + package de.steamwar.fightsystem.listener; import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.linkage.Linked; import org.bukkit.Material; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.block.BlockFadeEvent; +@Linked public class BlockFadeListener implements Listener { public BlockFadeListener() { - new StateDependentListener(Config.DisableSnowMelt, FightState.All, this); + new StateDependentListener(Config.GameModeConfig.Arena.DisableSnowMelt, FightState.All, this); } @EventHandler diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/BlockPlaceCollision.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/BlockPlaceCollision.java index 7b3bf541..c8636629 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/BlockPlaceCollision.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/BlockPlaceCollision.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.fightsystem.listener; @@ -23,6 +23,7 @@ import de.steamwar.fightsystem.ArenaMode; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; import de.steamwar.fightsystem.utils.FlatteningWrapper; +import de.steamwar.linkage.Linked; import org.bukkit.Location; import org.bukkit.block.Block; import org.bukkit.entity.Player; @@ -30,6 +31,7 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.block.BlockPlaceEvent; +@Linked public class BlockPlaceCollision implements Listener { public BlockPlaceCollision() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Border.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Border.java index 602a8e11..a8dcb026 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Border.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Border.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Chat.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Chat.java index 827f46c9..00a5c41e 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Chat.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Chat.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.listener; @@ -27,6 +27,7 @@ import de.steamwar.fightsystem.fight.FightTeam; import de.steamwar.fightsystem.record.GlobalRecorder; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; @@ -34,6 +35,7 @@ import org.bukkit.event.player.AsyncPlayerChatEvent; import java.util.logging.Level; +@Linked public class Chat implements Listener { public Chat(){ @@ -49,7 +51,7 @@ public class Chat implements Listener { FightTeam fightTeam = Fight.getPlayerTeam(player); if(fightTeam != null) { String teamName = fightTeam.getColoredName(); - if(message.startsWith(Config.TeamChatDetection)) { + if(message.startsWith(Config.GameModeConfig.TeamChatPrefix)) { fightTeam.broadcastChat(player, message.substring(1)); } else { broadcastChat("PARTICIPANT_CHAT", teamName, player.getName(), message); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Check.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Check.java index f6efd8cc..6fec0d80 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Check.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Check.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.listener; @@ -24,6 +24,7 @@ import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.FightSystem; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.linkage.Linked; import de.steamwar.sql.SchematicNode; import de.steamwar.sql.SteamwarUser; import de.steamwar.sql.UserPerm; @@ -36,6 +37,7 @@ import org.bukkit.event.player.PlayerJoinEvent; import java.util.logging.Level; +@Linked public class Check implements Listener { public Check() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/ClickAnalyzer.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/ClickAnalyzer.java index d4bd10dc..0777bcc7 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/ClickAnalyzer.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/ClickAnalyzer.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2022 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 . + * 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 . */ package de.steamwar.fightsystem.listener; @@ -24,10 +24,12 @@ import com.comphenix.tinyprotocol.TinyProtocol; import de.steamwar.core.Core; import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.utils.CraftbukkitWrapper; +import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; import java.io.*; +@Linked public class ClickAnalyzer { private static final PrintStream output; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/DenyInventoryMovement.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/DenyInventoryMovement.java index 6c7f71f8..492cfcd6 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/DenyInventoryMovement.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/DenyInventoryMovement.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.listener; @@ -23,12 +23,14 @@ import de.steamwar.fightsystem.ArenaMode; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; import de.steamwar.fightsystem.utils.BountifulWrapper; +import de.steamwar.linkage.Linked; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryDragEvent; import org.bukkit.event.player.PlayerPickupItemEvent; +@Linked public class DenyInventoryMovement implements Listener { public DenyInventoryMovement() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/DenyWorldInteraction.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/DenyWorldInteraction.java index f494d0bc..f21fb3d4 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/DenyWorldInteraction.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/DenyWorldInteraction.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.listener; @@ -25,6 +25,7 @@ import de.steamwar.fightsystem.FightSystem; import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.linkage.Linked; import net.md_5.bungee.api.ChatMessageType; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -38,6 +39,7 @@ import org.bukkit.event.hanging.HangingBreakEvent; import org.bukkit.event.player.PlayerDropItemEvent; import org.bukkit.event.player.PlayerKickEvent; +@Linked public class DenyWorldInteraction implements Listener { public DenyWorldInteraction() { @@ -80,13 +82,13 @@ public class DenyWorldInteraction implements Listener { @EventHandler public void handleEntityExplode(EntityExplodeEvent event) { - if(!Config.ArenaLeaveable || Config.ArenaRegion.inRegion(event.getLocation())) + if(!Config.GameModeConfig.Arena.Leaveable || Config.ArenaRegion.inRegion(event.getLocation())) event.setCancelled(true); } @EventHandler public void handleBlockBurn(BlockIgniteEvent event) { - if(!Config.ArenaLeaveable || Config.ArenaRegion.inRegion(event.getBlock())) + if(!Config.GameModeConfig.Arena.Leaveable || Config.ArenaRegion.inRegion(event.getBlock())) event.setCancelled(true); } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/EntityDamage.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/EntityDamage.java index 18959b68..56c2be37 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/EntityDamage.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/EntityDamage.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.listener; @@ -23,11 +23,13 @@ import de.steamwar.fightsystem.ArenaMode; import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.linkage.Linked; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.event.entity.EntityDamageEvent; +@Linked public class EntityDamage implements Listener { public EntityDamage() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/EventJoin.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/EventJoin.java index 6630becb..2dd3332d 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/EventJoin.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/EventJoin.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.listener; @@ -26,6 +26,7 @@ import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.fight.FightTeam; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.linkage.Linked; import de.steamwar.sql.SteamwarUser; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -33,6 +34,7 @@ import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerLoginEvent; +@Linked public class EventJoin implements Listener { public EventJoin() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/FightScoreboard.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/FightScoreboard.java index 7de1f306..1c7a463d 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/FightScoreboard.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/FightScoreboard.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.listener; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/InFightDamage.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/InFightDamage.java index 7194fdd6..3fc94b27 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/InFightDamage.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/InFightDamage.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.listener; @@ -25,6 +25,7 @@ import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; import de.steamwar.fightsystem.winconditions.Winconditions; +import de.steamwar.linkage.Linked; import net.md_5.bungee.api.ChatMessageType; import org.bukkit.entity.Arrow; import org.bukkit.entity.LivingEntity; @@ -34,10 +35,11 @@ import org.bukkit.event.entity.EntityDamageByEntityEvent; import java.util.Objects; +@Linked public class InFightDamage implements Listener { public InFightDamage() { - new StateDependentListener(!Config.ActiveWinconditions.contains(Winconditions.AMONG_US), FightState.Running, this); + new StateDependentListener(!Config.GameModeConfig.WinConditions.contains(Winconditions.AMONG_US), FightState.Running, this); } @EventHandler diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/InFightInventory.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/InFightInventory.java index ad41d0a0..b043bb86 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/InFightInventory.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/InFightInventory.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.listener; @@ -23,6 +23,7 @@ import de.steamwar.fightsystem.ArenaMode; import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.linkage.Linked; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -35,6 +36,7 @@ import java.util.Collections; import java.util.EnumSet; import java.util.Set; +@Linked public class InFightInventory implements Listener { private static final Set allowed = Collections.unmodifiableSet(EnumSet.of(Material.TNT, Material.AIR)); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/IngameDeath.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/IngameDeath.java index 6ff538f4..5e15eb84 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/IngameDeath.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/IngameDeath.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.listener; @@ -26,6 +26,7 @@ import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; import de.steamwar.fightsystem.utils.FightUI; import de.steamwar.fightsystem.utils.SWSound; +import de.steamwar.linkage.Linked; import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; import org.bukkit.event.EventHandler; @@ -36,6 +37,7 @@ import org.bukkit.event.player.PlayerQuitEvent; import java.util.function.Consumer; +@Linked public class IngameDeath implements Listener { public IngameDeath() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/JoinRequestListener.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/JoinRequestListener.java index 45121cf7..267b32c2 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/JoinRequestListener.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/JoinRequestListener.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2022 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 . + * 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 . */ package de.steamwar.fightsystem.listener; @@ -29,6 +29,7 @@ import de.steamwar.fightsystem.fight.JoinRequest; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.OneShotStateDependent; import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.linkage.Linked; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -38,6 +39,7 @@ import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerRespawnEvent; +@Linked public class JoinRequestListener implements Listener { public JoinRequestListener() { @@ -52,7 +54,7 @@ public class JoinRequestListener implements Listener { Player player = event.getPlayer(); FightPlayer fp = Fight.getFightPlayer(player); - if (!Config.ArenaLeaveable && (fp == null || !fp.isLiving())) { + if (!Config.GameModeConfig.Arena.Leaveable && (fp == null || !fp.isLiving())) { HotbarKit.SPECTATOR_KIT.loadToPlayer(player); } } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/LeaveableArena.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/LeaveableArena.java index 36a5a189..d08df0f2 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/LeaveableArena.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/LeaveableArena.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2022 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 . + * 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 . */ package de.steamwar.fightsystem.listener; @@ -23,6 +23,7 @@ import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.linkage.Linked; import org.bukkit.GameMode; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -35,12 +36,13 @@ import org.spigotmc.event.player.PlayerSpawnLocationEvent; import java.util.HashMap; import java.util.Map; +@Linked public class LeaveableArena implements Listener { private final Map spectatorsInArena = new HashMap<>(); public LeaveableArena() { - new StateDependentListener(Config.ArenaLeaveable, FightState.All, this); + new StateDependentListener(Config.GameModeConfig.Arena.Leaveable, FightState.All, this); } @EventHandler(priority = EventPriority.MONITOR) diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/NormalJoin.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/NormalJoin.java index 371ae75c..963b4502 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/NormalJoin.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/NormalJoin.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.listener; @@ -24,11 +24,13 @@ import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.fight.FightTeam; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerJoinEvent; +@Linked public class NormalJoin implements Listener { public NormalJoin() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Permanent.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Permanent.java index 4976463c..f4489caf 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Permanent.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Permanent.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.listener; @@ -29,6 +29,7 @@ import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; import de.steamwar.fightsystem.utils.BountifulWrapper; import de.steamwar.fightsystem.utils.FlatteningWrapper; +import de.steamwar.linkage.Linked; import net.md_5.bungee.api.ChatMessageType; import org.bukkit.GameMode; import org.bukkit.Material; @@ -54,6 +55,7 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.scoreboard.NameTagVisibility; import org.bukkit.scoreboard.Team; +@Linked public class Permanent implements Listener { private static final Team spectatorTeam = FightScoreboard.getBukkitTeam("Spectator"); @@ -97,7 +99,7 @@ public class Permanent implements Listener { Player player = event.getPlayer(); FightPlayer fp = Fight.getFightPlayer(player); - if (!Config.ArenaLeaveable && fp == null) { + if (!Config.GameModeConfig.Arena.Leaveable && fp == null) { player.setGameMode(GameMode.SPECTATOR); spectatorTeam.addEntry(player.getName()); player.teleport(Config.SpecSpawn); @@ -109,13 +111,13 @@ public class Permanent implements Listener { @EventHandler(priority = EventPriority.MONITOR) public void handlePlayerDeath(PlayerDeathEvent event) { - if(!Config.ArenaLeaveable || Fight.fighting(event.getEntity())) + if(!Config.GameModeConfig.Arena.Leaveable || Fight.fighting(event.getEntity())) event.setDeathMessage(null); } @EventHandler(priority = EventPriority.MONITOR) public void handlePlayerLeave(PlayerQuitEvent event) { - if(!Config.ArenaLeaveable) + if(!Config.GameModeConfig.Arena.Leaveable) event.setQuitMessage(null); } @@ -161,8 +163,8 @@ public class Permanent implements Listener { Player player = e.getPlayer(); ItemStack stack = e.getItem().getItemStack(); - if(Config.PersonalKits) { - if(Config.ForbiddenItems.contains(stack.getType())) { + if(Config.GameModeConfig.Kits.PersonalKits) { + if(Config.GameModeConfig.Kits.ForbiddenItems.contains(stack.getType())) { e.setCancelled(true); } } else { @@ -190,7 +192,7 @@ public class Permanent implements Listener { @EventHandler public void onWorldLoad(WorldLoadEvent e) { - if(!Config.ArenaLeaveable) + if(!Config.GameModeConfig.Arena.Leaveable) e.getWorld().setAutoSave(false); } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/PersonalKitCreator.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/PersonalKitCreator.java index f9a3b2d8..422e2a94 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/PersonalKitCreator.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/PersonalKitCreator.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.listener; @@ -26,6 +26,7 @@ import de.steamwar.fightsystem.fight.FightPlayer; import de.steamwar.fightsystem.fight.Kit; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.linkage.Linked; import de.steamwar.sql.PersonalKit; import net.md_5.bungee.api.ChatMessageType; import org.bukkit.Bukkit; @@ -46,12 +47,13 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +@Linked public class PersonalKitCreator implements Listener { private static final Map openKitCreators = new HashMap<>(); public PersonalKitCreator(){ - new StateDependentListener(Config.PersonalKits, FightState.Setup, this); + new StateDependentListener(Config.GameModeConfig.Kits.PersonalKits, FightState.Setup, this); } public static void openKitCreator(Player player, PersonalKit kit){ diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/PistonListener.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/PistonListener.java index 26c2fb89..a7dffacb 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/PistonListener.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/PistonListener.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.listener; @@ -45,8 +45,8 @@ public class PistonListener implements Listener { return; //Wenn Entern aktiv ist, sollen Raketen etc. entern können - new StateDependentListener(!Config.AllowMissiles, FightState.All, this); - new StateDependentListener(Config.AllowMissiles, FightState.Setup, this); + new StateDependentListener(!Config.GameModeConfig.Arena.AllowMissiles, FightState.All, this); + new StateDependentListener(Config.GameModeConfig.Arena.AllowMissiles, FightState.Setup, this); } @EventHandler diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/PrepareSchem.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/PrepareSchem.java index f02beeed..151a74ce 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/PrepareSchem.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/PrepareSchem.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.listener; @@ -31,6 +31,7 @@ import de.steamwar.fightsystem.states.StateDependentListener; import de.steamwar.fightsystem.utils.FlatteningWrapper; import de.steamwar.fightsystem.utils.Region; import de.steamwar.fightsystem.utils.WorldeditWrapper; +import de.steamwar.linkage.Linked; import de.steamwar.sql.SchematicNode; import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -42,6 +43,7 @@ import org.bukkit.util.Vector; import java.util.HashSet; import java.util.Set; +@Linked public class PrepareSchem implements Listener { private final Set stationaryMovingPistons = new HashSet<>(); @@ -83,7 +85,7 @@ public class PrepareSchem implements Listener { return; } - schem.setSchemtype(Config.SchematicType.checkType()); + schem.setSchemtype(Config.GameModeConfig.Schematic.Type.checkType()); schem.setPrepared(true); try{ diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Recording.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Recording.java index 117962eb..15935410 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Recording.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Recording.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.listener; @@ -39,6 +39,7 @@ import de.steamwar.fightsystem.utils.BountifulWrapper; import de.steamwar.fightsystem.utils.CraftbukkitWrapper; import de.steamwar.fightsystem.utils.FlatteningWrapper; import de.steamwar.fightsystem.utils.SWSound; +import de.steamwar.linkage.Linked; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; @@ -61,6 +62,7 @@ import java.util.function.BiFunction; import java.util.function.Consumer; import java.util.function.Predicate; +@Linked public class Recording implements Listener { private static final int AIR = 0; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/RunningWorldInteraction.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/RunningWorldInteraction.java index 7c00a9f1..c31d6701 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/RunningWorldInteraction.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/RunningWorldInteraction.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.listener; @@ -25,12 +25,14 @@ import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.fight.FightPlayer; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.linkage.Linked; import net.md_5.bungee.api.ChatMessageType; import org.bukkit.Material; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.block.BlockPlaceEvent; +@Linked public class RunningWorldInteraction implements Listener { public RunningWorldInteraction() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/SetupQuit.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/SetupQuit.java index 87d4b7e9..c203c910 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/SetupQuit.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/SetupQuit.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.listener; @@ -24,11 +24,13 @@ import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.fight.FightTeam; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerQuitEvent; +@Linked public class SetupQuit implements Listener { public SetupQuit(){ diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Shutdown.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Shutdown.java index 82057e92..c298ba7e 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Shutdown.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Shutdown.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.listener; @@ -23,11 +23,13 @@ import de.steamwar.fightsystem.ArenaMode; import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.linkage.Linked; import org.bukkit.Bukkit; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerQuitEvent; +@Linked public class Shutdown implements Listener { public Shutdown(){ @@ -36,7 +38,7 @@ public class Shutdown implements Listener { @EventHandler public void handlePlayerQuit(PlayerQuitEvent event) { - if(Config.replayserver() || Config.ArenaLeaveable) + if(Config.replayserver() || Config.GameModeConfig.Arena.Leaveable) return; //Shutdown server if nobody online diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Spectator.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Spectator.java index 399970ca..879e61f4 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Spectator.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Spectator.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2025 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.fightsystem.listener; @@ -22,6 +22,7 @@ package de.steamwar.fightsystem.listener; import java.util.HashSet; import java.util.Set; +import de.steamwar.linkage.Linked; import org.bukkit.Bukkit; import org.bukkit.GameMode; import org.bukkit.entity.Player; @@ -44,7 +45,7 @@ import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; import de.steamwar.fightsystem.states.StateDependentTask; - +@Linked public class Spectator implements Listener { private final Set pseudoSpectator = new HashSet<>(); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/TeamArea.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/TeamArea.java index 2f888452..ab453eeb 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/TeamArea.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/TeamArea.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.listener; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/TestJoin.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/TestJoin.java index 13a512a4..f14c2453 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/TestJoin.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/TestJoin.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.listener; @@ -24,6 +24,7 @@ import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.FightSystem; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.linkage.Linked; import de.steamwar.sql.SteamwarUser; import de.steamwar.sql.UserPerm; import org.bukkit.entity.Player; @@ -31,6 +32,7 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerJoinEvent; +@Linked public class TestJoin implements Listener { public TestJoin() { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/WaterRemover.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/WaterRemover.java index 847e647b..c8dda3cb 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/WaterRemover.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/WaterRemover.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.listener; @@ -27,10 +27,10 @@ import de.steamwar.fightsystem.fight.FightTeam; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; import de.steamwar.fightsystem.utils.FlatteningWrapper; +import de.steamwar.linkage.Linked; import org.bukkit.Location; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; -import org.bukkit.entity.EntityType; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityExplodeEvent; @@ -39,9 +39,10 @@ import org.bukkit.event.entity.EntitySpawnEvent; import java.util.HashMap; import java.util.Map; +@Linked public class WaterRemover implements Listener { - private static final int MIN_Y = Config.BluePasteRegion.getMinY() + Config.WaterDepth; + private static final int MIN_Y = Config.BluePasteRegion.getMinY() + Config.GameModeConfig.Arena.WaterDepth; private final Map tnt = new HashMap<>(); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/FileRecorder.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/FileRecorder.java index 98933dd8..d91924d1 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/FileRecorder.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/FileRecorder.java @@ -1,32 +1,34 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.record; import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependent; +import de.steamwar.linkage.Linked; import lombok.Getter; import java.io.*; import java.util.zip.GZIPOutputStream; +@Linked public class FileRecorder extends StateDependent implements Recorder { @Getter diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/FileSource.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/FileSource.java index 9e1a05ea..f26a3b2b 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/FileSource.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/FileSource.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.record; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/GlobalRecorder.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/GlobalRecorder.java index b0e9824b..436d8fbc 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/GlobalRecorder.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/GlobalRecorder.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.record; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/LiveRecorder.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/LiveRecorder.java index 55fef032..3a1525b0 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/LiveRecorder.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/LiveRecorder.java @@ -1,33 +1,35 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.record; import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependent; +import de.steamwar.linkage.Linked; import org.bukkit.Bukkit; import java.io.*; import java.net.Socket; import java.util.logging.Level; +@Linked public class LiveRecorder extends StateDependent implements Recorder { private DataOutputStream outputStream; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/LiveServer.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/LiveServer.java index 5bb63084..58547b36 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/LiveServer.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/LiveServer.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.record; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/LiveSource.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/LiveSource.java index 313ff85d..fe9c008a 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/LiveSource.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/LiveSource.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.record; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/PacketProcessor.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/PacketProcessor.java index f4906f42..8628d3fb 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/PacketProcessor.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/PacketProcessor.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.record; @@ -90,8 +90,8 @@ public class PacketProcessor implements Listener { private final PacketSource source; private final BukkitTask task; private final LinkedList syncList = new LinkedList<>(); - private final Set hiddenBlockIds = Config.HiddenBlocks.stream().flatMap(m -> BlockIds.impl.materialToAllIds(m).stream()).collect(Collectors.toSet()); - private final int obfuscateWith = BlockIds.impl.materialToId(Config.ObfuscateWith); + private final Set hiddenBlockIds = Config.GameModeConfig.Techhider.HiddenBlocks.stream().flatMap(m -> BlockIds.impl.materialToAllIds(m).stream()).collect(Collectors.toSet()); + private final int obfuscateWith = BlockIds.impl.materialToId(Config.GameModeConfig.Techhider.ObfuscateWith); private final FreezeWorld freezer = new FreezeWorld(); private final REntityServer entityServer = new REntityServer(); private final Map entities = new HashMap<>(); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/PacketSource.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/PacketSource.java index e3d994cc..d36d40ef 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/PacketSource.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/PacketSource.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.record; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/Recorder.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/Recorder.java index d0e1439c..f4267b49 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/Recorder.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/record/Recorder.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.record; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/FightState.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/FightState.java index cadcec66..930b7490 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/FightState.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/FightState.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.states; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/IStateDependent.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/IStateDependent.java index 1d9f170e..e699a519 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/IStateDependent.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/IStateDependent.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.states; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/OneShotStateDependent.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/OneShotStateDependent.java index 610168f3..afa992ca 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/OneShotStateDependent.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/OneShotStateDependent.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.states; @@ -36,7 +36,7 @@ public class OneShotStateDependent extends StateDependent{ } public OneShotStateDependent(Winconditions wincondition, Set states, Runnable runnable) { - super(Config.ActiveWinconditions.contains(wincondition), states); + super(Config.GameModeConfig.WinConditions.contains(wincondition), states); this.runnable = runnable; register(); } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependent.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependent.java index e20c4fbe..56bee0ec 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependent.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependent.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.states; @@ -31,7 +31,7 @@ public abstract class StateDependent implements IStateDependent { private final boolean register; protected StateDependent(Winconditions wincondition, Set states){ - this(Config.ActiveWinconditions.contains(wincondition), states); + this(Config.GameModeConfig.WinConditions.contains(wincondition), states); } protected StateDependent(Set mode, Set states){ diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependentCommand.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependentCommand.java index 2d25b68d..53ea244a 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependentCommand.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependentCommand.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.states; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependentCountdown.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependentCountdown.java index 4bdbc093..df8a93d5 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependentCountdown.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependentCountdown.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.states; @@ -43,7 +43,7 @@ public class StateDependentCountdown extends StateDependent { } public StateDependentCountdown(Winconditions wincondition, Set states, Countdown countdown) { - this(Config.ActiveWinconditions.contains(wincondition), states, countdown); + this(Config.GameModeConfig.WinConditions.contains(wincondition), states, countdown); } public StateDependentCountdown(boolean active, Set states, Countdown countdown) { diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependentListener.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependentListener.java index f5cfffc8..ba5c64b5 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependentListener.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependentListener.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.states; @@ -34,7 +34,7 @@ public class StateDependentListener extends StateDependent{ private final Listener listener; public StateDependentListener(Winconditions wincondition, Set states, Listener listener){ - super(Config.ActiveWinconditions.contains(wincondition), states); + super(Config.GameModeConfig.WinConditions.contains(wincondition), states); this.listener = listener; register(); } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependentTask.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependentTask.java index 950fbcb8..87e65f49 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependentTask.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/states/StateDependentTask.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.states; @@ -37,7 +37,7 @@ public class StateDependentTask extends StateDependent { private BukkitTask task = null; public StateDependentTask(Winconditions wincondition, Set states, Runnable runnable, long delay, long period){ - this(Config.ActiveWinconditions.contains(wincondition), states, runnable, delay, period); + this(Config.GameModeConfig.WinConditions.contains(wincondition), states, runnable, delay, period); } public StateDependentTask(boolean enabled, Set states, Runnable runnable, long delay, long period){ diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/BlockIdWrapper.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/BlockIdWrapper.java index a8f5d226..1a496970 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/BlockIdWrapper.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/BlockIdWrapper.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/BountifulWrapper.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/BountifulWrapper.java index 3e96c85a..3600127e 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/BountifulWrapper.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/BountifulWrapper.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/BungeeFightInfo.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/BungeeFightInfo.java index 783917bb..7d3b31f8 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/BungeeFightInfo.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/BungeeFightInfo.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; @@ -25,14 +25,15 @@ import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCountdown; import de.steamwar.fightsystem.states.StateDependentTask; +import de.steamwar.linkage.Linked; import de.steamwar.network.NetworkSender; import de.steamwar.network.packets.common.FightInfoPacket; import de.steamwar.sql.SteamwarUser; import org.bukkit.Bukkit; -import org.bukkit.entity.Player; import java.util.stream.Collectors; +@Linked public class BungeeFightInfo { public BungeeFightInfo() { @@ -42,7 +43,7 @@ public class BungeeFightInfo { private void send() { NetworkSender.send(new FightInfoPacket( Config.world.getName(), - Config.SchematicType.toDB(), + Config.GameModeConfig.Schematic.Type.toDB(), "", Fight.getBlueTeam().getColoredName(), Fight.getRedTeam().getColoredName(), diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/ColorConverter.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/ColorConverter.java index 32f44510..ad8fd242 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/ColorConverter.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/ColorConverter.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper.java index 242119f5..1100a272 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/CraftbukkitWrapper.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; @@ -33,4 +33,6 @@ public interface CraftbukkitWrapper { float headRotation(Entity e); Stream entityIterator(); + + void setupGamerule(); } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/EnterHandler.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/EnterHandler.java index 042efba0..51d66677 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/EnterHandler.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/EnterHandler.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.utils; @@ -24,9 +24,11 @@ import de.steamwar.fightsystem.fight.FightPlayer; import de.steamwar.fightsystem.fight.FightTeam; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.IStateDependent; +import de.steamwar.linkage.Linked; import java.util.Set; +@Linked public class EnterHandler implements IStateDependent { private static final Set enabled = FightState.Running; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java index 3d6c5cac..f3cd3d5c 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.utils; @@ -31,6 +31,7 @@ import de.steamwar.fightsystem.record.FileSource; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.OneShotStateDependent; import de.steamwar.fightsystem.winconditions.Wincondition; +import de.steamwar.linkage.Linked; import de.steamwar.network.NetworkSender; import de.steamwar.network.packets.common.FightEndsPacket; import de.steamwar.sql.EventFight; @@ -49,6 +50,7 @@ import java.util.stream.Collectors; import static de.steamwar.sql.Fight.create; import static de.steamwar.sql.Fight.markReplayAvailable; +@Linked public class FightStatistics { @Getter @@ -92,7 +94,7 @@ public class FightStatistics { private void disable() { FightTeam winner = FightSystem.getLastWinner(); String windescription = FightSystem.getLastWinreason(); - String gameMode = Config.SchematicType.toDB(); + String gameMode = Config.GameModeConfig.Schematic.Type.toDB(); Instant endTime = Instant.now(); int blueLeader = getLeader(Fight.getBlueTeam()); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightUI.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightUI.java index 122b6902..14ea8137 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightUI.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightUI.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; @@ -31,6 +31,7 @@ import de.steamwar.fightsystem.states.OneShotStateDependent; import de.steamwar.fightsystem.states.StateDependentCountdown; import de.steamwar.fightsystem.states.StateDependentTask; import de.steamwar.fightsystem.winconditions.Wincondition; +import de.steamwar.linkage.Linked; import lombok.Getter; import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -42,6 +43,7 @@ import java.util.Queue; import java.util.logging.Level; import java.util.stream.Collectors; +@Linked public class FightUI { @Getter diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/FlatteningWrapper.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/FlatteningWrapper.java index aa2f10e8..14e4c941 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/FlatteningWrapper.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/FlatteningWrapper.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/Hull.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/Hull.java index caf39e79..60fbd3ac 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/Hull.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/Hull.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -42,7 +42,7 @@ public class Hull { private static final IntVector[] NO_BRANCHES = new IntVector[0]; private static boolean isOccluding(Material material) { - return material.isOccluding() || Config.HiddenBlocks.contains(material); + return material.isOccluding() || Config.GameModeConfig.Techhider.HiddenBlocks.contains(material); } @Getter diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/HullHider.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/HullHider.java index c050656d..074a9e4d 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/HullHider.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/HullHider.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2022 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 . + * 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 . */ package de.steamwar.fightsystem.utils; @@ -62,6 +62,7 @@ public class HullHider implements Listener { private final Hull[] hulls; private final Map, BiFunction> packetHiders = new HashMap<>(); + private static final Class packetPlayOutExplosion = Reflection.getClass("net.minecraft.network.protocol.game.ClientboundExplodePacket"); public HullHider() { if(!TechHiderWrapper.ENABLED) { hulls = new Hull[0]; @@ -208,14 +209,8 @@ public class HullHider implements Listener { return packetHider(player, packet, new Location(Config.world, TechHider.blockPositionX.get(baseBlock), blockPositionY.get(baseBlock), TechHider.blockPositionZ.get(baseBlock))); } - private static final Class packetPlayOutExplosion = Reflection.getClass("net.minecraft.network.protocol.game.ClientboundExplodePacket"); - private static final Reflection.Field explosionBlocks = Reflection.getField(packetPlayOutExplosion, List.class, 0); - private static final Function explosionLocation = posPacketToLocation(packetPlayOutExplosion, double.class, 1.0); private Object explosionHider(Player player, Object packet) { - if(explosionBlocks.get(packet).isEmpty()) - return packetHider(player, packet, explosionLocation.apply(packet)); - - return packet; + return ReflectionWrapper.impl.explosionHider(player, packet, this::packetHider); } private void posHiderGenerator(String typeName, Class posType, double factor) { @@ -224,7 +219,7 @@ public class HullHider implements Listener { packetHiders.put(type, (player, packet) -> packetHider(player, packet, location.apply(packet))); } - private static Function posPacketToLocation(Class type, Class posType, double factor) { + public static Function posPacketToLocation(Class type, Class posType, double factor) { Reflection.Field x = Reflection.getField(type, posType, 0); Reflection.Field y = Reflection.getField(type, posType, 1); Reflection.Field z = Reflection.getField(type, posType, 2); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/HullHiderWrapper.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/HullHiderWrapper.java index 17a5195b..ca33a517 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/HullHiderWrapper.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/HullHiderWrapper.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/ItemBuilder.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/ItemBuilder.java index 728fb924..ddc92242 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/ItemBuilder.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/ItemBuilder.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/Message.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/Message.java index 9484b640..6cc2a23b 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/Message.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/Message.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/ReflectionWrapper.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/ReflectionWrapper.java new file mode 100644 index 00000000..cbc9f807 --- /dev/null +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/ReflectionWrapper.java @@ -0,0 +1,37 @@ +/* + * 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 . + */ + +package de.steamwar.fightsystem.utils; + +import de.steamwar.core.VersionDependent; +import de.steamwar.fightsystem.FightSystem; +import org.bukkit.Location; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; + +public interface ReflectionWrapper { + ReflectionWrapper impl = VersionDependent.getVersionImpl(FightSystem.getPlugin()); + + Object explosionHider(Player player, Object packet, PacketHiderFunction packetHiderFunction); + boolean hasItems(ItemStack stack); + + public interface PacketHiderFunction { + Object hide(Player player, Object packet, Location location); + } +} diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/Region.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/Region.java index 2d881513..e525f9a7 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/Region.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/Region.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/SWSound.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/SWSound.java index 9ae178d9..1022445d 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/SWSound.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/SWSound.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; 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..d72e6949 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/TechHiderWrapper.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/TechHiderWrapper.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; @@ -50,7 +50,7 @@ import java.util.concurrent.ConcurrentHashMap; public class TechHiderWrapper extends StateDependent implements TechHider.LocationEvaluator, Listener { - public static final boolean ENABLED = !Config.OnlyPublicSchematics && !Config.test() && Config.TechhiderActive; + public static final boolean ENABLED = !Config.OnlyPublicSchematics && !Config.test() && Config.GameModeConfig.Techhider.Active; @Getter private final ConcurrentHashMap hiddenRegion = new ConcurrentHashMap<>(); @@ -60,7 +60,7 @@ public class TechHiderWrapper extends StateDependent implements TechHider.Locati public TechHiderWrapper() { super(ENABLED, FightState.Schem); - techHider = new TechHider(this, Config.ObfuscateWith, Config.HiddenBlocks, Config.HiddenBlockEntities); + techHider = new TechHider(this, Config.GameModeConfig.Techhider.ObfuscateWith, Config.GameModeConfig.Techhider.HiddenBlocks, Config.GameModeConfig.Techhider.HiddenBlockEntities); try { key = new SecretKeySpec(Files.readAllBytes(new File(System.getProperty("user.home"), "hullhider.key").toPath()), "AES"); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/WorldOfColorWrapper.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/WorldOfColorWrapper.java index e69b4d29..32fef89a 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/WorldOfColorWrapper.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/WorldOfColorWrapper.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/WorldeditWrapper.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/WorldeditWrapper.java index 83c68803..dff1df66 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/WorldeditWrapper.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/WorldeditWrapper.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.utils; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/EventTeamOffWincondition.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/EventTeamOffWincondition.java index 77db2ff4..2557a489 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/EventTeamOffWincondition.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/EventTeamOffWincondition.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.winconditions; @@ -24,7 +24,9 @@ import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.fight.FightTeam; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.OneShotStateDependent; +import de.steamwar.linkage.Linked; +@Linked public class EventTeamOffWincondition extends Wincondition{ public EventTeamOffWincondition(){ diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/PrintableWincondition.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/PrintableWincondition.java index 6af28b0b..ea2dd83a 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/PrintableWincondition.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/PrintableWincondition.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.winconditions; diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/Wincondition.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/Wincondition.java index 3b62affa..091d1427 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/Wincondition.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/Wincondition.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.winconditions; @@ -36,7 +36,7 @@ import java.util.stream.Collectors; public abstract class Wincondition { @Getter - protected static WinconditionPercent percentWincondition = null; + protected static WinconditionBasePercent percentWincondition = null; protected static StateDependentCountdown timeOverCountdown = null; @Getter protected static final List printableWinconditions = new ArrayList<>(); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionAllDead.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionAllDead.java index 8f2d73a3..36281398 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionAllDead.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionAllDead.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.winconditions; @@ -24,9 +24,11 @@ import de.steamwar.fightsystem.fight.Fight; import de.steamwar.fightsystem.fight.FightTeam; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.linkage.Linked; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; +@Linked public class WinconditionAllDead extends Wincondition implements Listener { public WinconditionAllDead(){ diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionAmongUs.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionAmongUs.java index 80572084..593f3676 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionAmongUs.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionAmongUs.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.fightsystem.winconditions; @@ -26,6 +26,7 @@ import de.steamwar.fightsystem.fight.FightTeam; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.OneShotStateDependent; import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; @@ -34,6 +35,7 @@ import org.bukkit.event.player.PlayerQuitEvent; import java.util.*; +@Linked public class WinconditionAmongUs extends Wincondition implements Listener { private Map imposter = new HashMap<>(); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionBasePercent.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionBasePercent.java new file mode 100644 index 00000000..73711f2b --- /dev/null +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionBasePercent.java @@ -0,0 +1,133 @@ +/* + * 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 . + */ + +package de.steamwar.fightsystem.winconditions; + +import de.steamwar.fightsystem.Config; +import de.steamwar.fightsystem.fight.Fight; +import de.steamwar.fightsystem.fight.FightTeam; +import de.steamwar.fightsystem.states.FightState; +import de.steamwar.fightsystem.states.OneShotStateDependent; +import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.fightsystem.utils.Message; +import org.bukkit.entity.EntityType; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.EntityExplodeEvent; + +import java.util.HashMap; +import java.util.Map; +import java.util.function.Consumer; + +public abstract class WinconditionBasePercent extends Wincondition implements PrintableWincondition { + + private final Map teamMap = new HashMap<>(); + + protected Consumer checkWin = team -> { + if (getPercent(team) >= Config.GameModeConfig.WinConditionParams.PercentWin) { + win(Fight.getOpposite(team), "WIN_PERCENT", team.getColoredName()); + } + }; + protected Consumer postEnable = team -> {}; + + public WinconditionBasePercent(Winconditions wincondition, String windescription) { + super(windescription); + + if (Config.GameModeConfig.WinConditions.contains(wincondition)) { + printableWinconditions.add(this); + percentWincondition = this; + } + + Fight.teams().forEach(team -> new TeamPercent(team, wincondition)); + } + + public Message getDisplay(FightTeam team) { + return new Message("BAR_PERCENT", team.getPrefix() + (Math.round(10000.0 * (1.0 - getPercent(team) / Config.GameModeConfig.WinConditionParams.PercentWin)) / 100.0)); + } + + public double getPercent(FightTeam team) { + return teamMap.get(team).getPercent(); + } + + protected int getTotalBlocks(FightTeam team) { + return teamMap.get(team).totalBlocks; + } + + protected int getCurrentBlocks(FightTeam team) { + return teamMap.get(team).currentBlocks; + } + + private class TeamPercent implements Listener { + private final FightTeam team; + + private int totalBlocks = 0; + private int currentBlocks = 0; + private boolean countAnyBlock = false; + + private TeamPercent(FightTeam team, Winconditions wincondition) { + this.team = team; + + new OneShotStateDependent(wincondition, FightState.Running, this::enable); + new StateDependentListener(wincondition, FightState.Running, this).register(); + teamMap.put(team, this); + } + + @EventHandler + public void onEntityExplode(EntityExplodeEvent event) { + if ( + event.getEntityType() == EntityType.FIREBALL || + !team.getExtendRegion().inRegion(event.getEntity().getLocation()) || + (!Config.GameModeConfig.WinConditionParams.PercentEntern && !Config.GameModeConfig.EnterStages.isEmpty() && Config.GameModeConfig.EnterStages.get(0) >= Wincondition.getTimeOverCountdown().getTimeLeft()) + ) { + return; + } + + event.blockList().forEach(block -> { + if (countAnyBlock || Config.GameModeConfig.WinConditionParams.Blocks.contains(block.getType()) == Config.GameModeConfig.WinConditionParams.BlocksWhitelist) { + currentBlocks--; + } + }); + + checkWin.accept(team); + } + + private void enable() { + totalBlocks = 0; + countAnyBlock = false; + team.getSchemRegion().forEach((x, y, z) -> { + if (Config.GameModeConfig.WinConditionParams.Blocks.contains(Config.world.getBlockAt(x, y, z).getType()) == Config.GameModeConfig.WinConditionParams.BlocksWhitelist) + totalBlocks++; + }); + // Edge Case for DirtBlock + if (totalBlocks == 0) { + totalBlocks = team.getSchemRegion().volume(); + countAnyBlock = true; + } + currentBlocks = totalBlocks; + postEnable.accept(team); + } + + private double getPercent() { + if (currentBlocks >= totalBlocks) { + return 0; + } + return (totalBlocks - currentBlocks) * 100 / (double) totalBlocks; + } + } +} diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionBlocks.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionBlocks.java index 72c0873a..fce8f574 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionBlocks.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionBlocks.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.winconditions; @@ -35,7 +35,7 @@ import java.util.List; import java.util.Map; import java.util.function.Predicate; -public class WinconditionBlocks extends Wincondition implements PrintableWincondition { +public abstract class WinconditionBlocks extends Wincondition implements PrintableWincondition { public static final Material PUMPKIN_LANTERN = SWItem.getMaterial("JACK_O_LANTERN"); @@ -57,7 +57,7 @@ public class WinconditionBlocks extends Wincondition implements PrintableWincond } }; - if(Config.ActiveWinconditions.contains(wincondition)) + if(Config.GameModeConfig.WinConditions.contains(wincondition)) printableWinconditions.add(this); } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionCaptainDead.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionCaptainDead.java index de0205ab..5265aff3 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionCaptainDead.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionCaptainDead.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.winconditions; @@ -25,9 +25,11 @@ import de.steamwar.fightsystem.fight.FightPlayer; import de.steamwar.fightsystem.fight.FightTeam; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.linkage.Linked; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; +@Linked public class WinconditionCaptainDead extends Wincondition implements Listener { public WinconditionCaptainDead(){ diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionComparisonTimeout.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionComparisonTimeout.java index d3fa4c3c..375e7ad5 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionComparisonTimeout.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionComparisonTimeout.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.winconditions; @@ -27,11 +27,11 @@ import de.steamwar.fightsystem.states.StateDependentCountdown; import java.util.function.ToDoubleFunction; -public class WinconditionComparisonTimeout extends Wincondition { +public abstract class WinconditionComparisonTimeout extends Wincondition { public WinconditionComparisonTimeout(Winconditions wincondition, String windescription, String winMessage, ToDoubleFunction evaluate) { super(windescription); - if(Config.ActiveWinconditions.contains(wincondition)) { + if(Config.GameModeConfig.WinConditions.contains(wincondition)) { timeOverCountdown = new StateDependentCountdown(wincondition, FightState.Running, new TimeOverCountdown(() -> comparisonWin(evaluate, winMessage, "WIN_TIME_OVER"))); } } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionHearthRatioTimeout.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionHearthRatioTimeout.java new file mode 100644 index 00000000..b8b99c9f --- /dev/null +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionHearthRatioTimeout.java @@ -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 . + */ + +package de.steamwar.fightsystem.winconditions; + +import de.steamwar.fightsystem.fight.FightTeam; +import de.steamwar.linkage.Linked; + +@Linked +public class WinconditionHearthRatioTimeout extends WinconditionComparisonTimeout { + + public WinconditionHearthRatioTimeout() { + super(Winconditions.HEART_RATIO_TIMEOUT, "HeartTimeout", "WIN_MORE_HEALTH", FightTeam::getHeartRatio); + } +} diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionPercent.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionPercent.java index f98bdecc..e74a88c3 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionPercent.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionPercent.java @@ -1,133 +1,30 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.fightsystem.winconditions; -import de.steamwar.fightsystem.Config; -import de.steamwar.fightsystem.fight.Fight; -import de.steamwar.fightsystem.fight.FightTeam; -import de.steamwar.fightsystem.states.FightState; -import de.steamwar.fightsystem.states.OneShotStateDependent; -import de.steamwar.fightsystem.states.StateDependentListener; -import de.steamwar.fightsystem.utils.Message; -import org.bukkit.entity.EntityType; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; -import org.bukkit.event.entity.EntityExplodeEvent; +import de.steamwar.linkage.Linked; -import java.util.HashMap; -import java.util.Map; -import java.util.function.Consumer; +@Linked +public class WinconditionPercent extends WinconditionBasePercent { -public class WinconditionPercent extends Wincondition implements PrintableWincondition { - - private final Map teamMap = new HashMap<>(); - - protected Consumer checkWin = team -> { - if (getPercent(team) >= Config.PercentWin) { - win(Fight.getOpposite(team), "WIN_PERCENT", team.getColoredName()); - } - }; - protected Consumer postEnable = team -> {}; - - public WinconditionPercent(Winconditions wincondition, String windescription) { - super(windescription); - - if (Config.ActiveWinconditions.contains(wincondition)) { - printableWinconditions.add(this); - percentWincondition = this; - } - - Fight.teams().forEach(team -> new TeamPercent(team, wincondition)); - } - - public Message getDisplay(FightTeam team) { - return new Message("BAR_PERCENT", team.getPrefix() + (Math.round(10000.0 * (1.0 - getPercent(team) / Config.PercentWin)) / 100.0)); - } - - public double getPercent(FightTeam team) { - return teamMap.get(team).getPercent(); - } - - protected int getTotalBlocks(FightTeam team) { - return teamMap.get(team).totalBlocks; - } - - protected int getCurrentBlocks(FightTeam team) { - return teamMap.get(team).currentBlocks; - } - - private class TeamPercent implements Listener { - private final FightTeam team; - - private int totalBlocks = 0; - private int currentBlocks = 0; - private boolean countAnyBlock = false; - - private TeamPercent(FightTeam team, Winconditions wincondition) { - this.team = team; - - new OneShotStateDependent(wincondition, FightState.Running, this::enable); - new StateDependentListener(wincondition, FightState.Running, this).register(); - teamMap.put(team, this); - } - - @EventHandler - public void onEntityExplode(EntityExplodeEvent event) { - if ( - event.getEntityType() == EntityType.FIREBALL || - !team.getExtendRegion().inRegion(event.getEntity().getLocation()) || - (!Config.PercentEntern && !Config.EnterStages.isEmpty() && Config.EnterStages.get(0) >= Wincondition.getTimeOverCountdown().getTimeLeft()) - ) { - return; - } - - event.blockList().forEach(block -> { - if (countAnyBlock || Config.PercentBlocks.contains(block.getType()) == Config.PercentBlocksWhitelist) { - currentBlocks--; - } - }); - - checkWin.accept(team); - } - - private void enable() { - totalBlocks = 0; - countAnyBlock = false; - team.getSchemRegion().forEach((x, y, z) -> { - if (Config.PercentBlocks.contains(Config.world.getBlockAt(x, y, z).getType()) == Config.PercentBlocksWhitelist) - totalBlocks++; - }); - // Edge Case for DirtBlock - if (totalBlocks == 0) { - totalBlocks = team.getSchemRegion().volume(); - countAnyBlock = true; - } - currentBlocks = totalBlocks; - postEnable.accept(team); - } - - private double getPercent() { - if (currentBlocks >= totalBlocks) { - return 0; - } - return (totalBlocks - currentBlocks) * 100 / (double) totalBlocks; - } + public WinconditionPercent() { + super(Winconditions.PERCENT_SYSTEM, "Percent"); } } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionPercentTimeout.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionPercentTimeout.java new file mode 100644 index 00000000..f064aa99 --- /dev/null +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionPercentTimeout.java @@ -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 . + */ + +package de.steamwar.fightsystem.winconditions; + +import de.steamwar.linkage.Linked; + +@Linked +public class WinconditionPercentTimeout extends WinconditionComparisonTimeout { + + public WinconditionPercentTimeout() { + super(Winconditions.PERCENT_TIMEOUT, "PercentTimeout", "WIN_LESS_DAMAGE", team -> -Wincondition.getPercentWincondition().getPercent(team)); + } +} diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionPoints.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionPoints.java index 028e893e..558a66be 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionPoints.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionPoints.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.winconditions; @@ -27,6 +27,7 @@ import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCountdown; import de.steamwar.fightsystem.states.StateDependentListener; import de.steamwar.fightsystem.utils.Message; +import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; @@ -36,7 +37,8 @@ import org.bukkit.event.player.PlayerQuitEvent; import java.util.HashMap; import java.util.Map; -public class WinconditionPoints extends WinconditionPercent implements Listener { +@Linked +public class WinconditionPoints extends WinconditionBasePercent implements Listener { private final Map teamMap = new HashMap<>(); @@ -50,7 +52,7 @@ public class WinconditionPoints extends WinconditionPercent implements Listener new StateDependentListener(Winconditions.POINTS, FightState.Ingame, this); - if(Config.ActiveWinconditions.contains(Winconditions.POINTS)){ + if(Config.GameModeConfig.WinConditions.contains(Winconditions.POINTS)){ timeOverCountdown = new StateDependentCountdown(Winconditions.POINTS, FightState.Running, new TimeOverCountdown(this::timeOver)); } } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionPointsAirShip.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionPointsAirShip.java index 4f166a6d..f4d885db 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionPointsAirShip.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionPointsAirShip.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.fightsystem.winconditions; @@ -25,6 +25,7 @@ import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; import de.steamwar.fightsystem.states.StateDependentTask; import de.steamwar.fightsystem.utils.Message; +import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; @@ -35,7 +36,8 @@ import java.util.HashMap; import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; -public class WinconditionPointsAirShip extends WinconditionPercent implements Listener { +@Linked +public class WinconditionPointsAirShip extends WinconditionBasePercent implements Listener { private double[] as = new double[] { 0.5, diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionPumkinTechKO.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionPumkinTechKO.java new file mode 100644 index 00000000..ee9ad4eb --- /dev/null +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionPumkinTechKO.java @@ -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 . + */ + +package de.steamwar.fightsystem.winconditions; + +import de.steamwar.linkage.Linked; + +@Linked +public class WinconditionPumkinTechKO extends WinconditionBlocks { + + public WinconditionPumkinTechKO() { + super(Winconditions.PUMPKIN_TECH_KO, "PumpkinTechKO", "BAR_CANNONS", block -> block.getType() == WinconditionBlocks.PUMPKIN_LANTERN); + } +} diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionTimeTechKO.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionTimeTechKO.java index 789b130f..9e9a92a9 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionTimeTechKO.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionTimeTechKO.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.winconditions; @@ -30,6 +30,7 @@ import de.steamwar.fightsystem.states.StateDependentListener; import de.steamwar.fightsystem.states.StateDependentTask; import de.steamwar.fightsystem.utils.Message; import de.steamwar.fightsystem.utils.SWSound; +import de.steamwar.linkage.Linked; import org.bukkit.Location; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; @@ -39,9 +40,10 @@ import org.bukkit.event.entity.EntitySpawnEvent; import java.util.HashMap; import java.util.Map; +@Linked public class WinconditionTimeTechKO extends Wincondition implements Listener { - private static final int TECH_KO_HALF_TIME = Config.TechKoTime/2; + private static final int TECH_KO_HALF_TIME = Config.GameModeConfig.WinConditionParams.TechKoTime/2; private final Map spawnLocations = new HashMap<>(); private final Map countdowns = new HashMap<>(); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionTimedDamageTechKO.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionTimedDamageTechKO.java index c561400c..f118a0eb 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionTimedDamageTechKO.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionTimedDamageTechKO.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.fightsystem.winconditions; @@ -29,6 +29,7 @@ import de.steamwar.fightsystem.states.StateDependent; import de.steamwar.fightsystem.states.StateDependentListener; import de.steamwar.fightsystem.utils.Message; import de.steamwar.fightsystem.utils.SWSound; +import de.steamwar.linkage.Linked; import org.bukkit.Location; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; @@ -37,6 +38,7 @@ import org.bukkit.event.entity.EntityExplodeEvent; import java.util.HashMap; import java.util.Map; +@Linked public class WinconditionTimedDamageTechKO extends Wincondition implements PrintableWincondition, Listener { private final Map countdowns = new HashMap<>(); @@ -49,7 +51,7 @@ public class WinconditionTimedDamageTechKO extends Wincondition implements Print @Override public void enable() { Fight.teams().forEach(team -> { - TechKOCountdown countdown = new TechKOCountdown(team, Config.TechKoTime); + TechKOCountdown countdown = new TechKOCountdown(team, Config.GameModeConfig.WinConditionParams.TechKoTime); countdowns.put(team, countdown); countdown.enable(); }); diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionTimeout.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionTimeout.java index 3207fee8..56355722 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionTimeout.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionTimeout.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.fightsystem.winconditions; @@ -23,12 +23,14 @@ import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.countdown.TimeOverCountdown; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCountdown; +import de.steamwar.linkage.Linked; +@Linked public class WinconditionTimeout extends Wincondition { public WinconditionTimeout() { super("Timeout"); - if(Config.ActiveWinconditions.contains(Winconditions.TIMEOUT)){ + if(Config.GameModeConfig.WinConditions.contains(Winconditions.TIMEOUT)){ timeOverCountdown = new StateDependentCountdown(Winconditions.TIMEOUT, FightState.Running, new TimeOverCountdown(this::timeOver)); } } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionWaterTechKO.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionWaterTechKO.java new file mode 100644 index 00000000..89b72b5e --- /dev/null +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/WinconditionWaterTechKO.java @@ -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 . + */ + +package de.steamwar.fightsystem.winconditions; + +import de.steamwar.fightsystem.utils.FlatteningWrapper; +import de.steamwar.linkage.Linked; + +@Linked +public class WinconditionWaterTechKO extends WinconditionBlocks { + + public WinconditionWaterTechKO() { + super(Winconditions.WATER_TECH_KO, "WaterTechKO", "BAR_WATER", FlatteningWrapper.impl::isWater); + } +} diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/Winconditions.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/Winconditions.java index 4ba66cf3..2e4fb67d 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/Winconditions.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/Winconditions.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.fightsystem.winconditions; diff --git a/FightSystem/FightSystem_Standalone/build.gradle.kts b/FightSystem/FightSystem_Standalone/build.gradle.kts index 97e19a53..c237d262 100644 --- a/FightSystem/FightSystem_Standalone/build.gradle.kts +++ b/FightSystem/FightSystem_Standalone/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/FightSystem/build.gradle.kts b/FightSystem/build.gradle.kts index 9013824d..9224fa6b 100644 --- a/FightSystem/build.gradle.kts +++ b/FightSystem/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -50,6 +50,17 @@ tasks.register("WarGear20") { config = "WarGear20.yml" } +tasks.register("WarGear21") { + group = "run" + description = "Run a WarGear 1.21 Fight Server" + dependsOn(":SpigotCore:shadowJar") + dependsOn(":FightSystem:shadowJar") + template = "WarGear21" + worldName = "arenas/Pentraki" + config = "WarGear20.yml" + jar = "/jars/paper-1.21.6.jar" +} + tasks.register("SpaceCraftDev20") { group = "run" description = "Run a SpaceCraftDev 1.20 Fight Server" diff --git a/KotlinCore/build.gradle.kts b/KotlinCore/build.gradle.kts index c3bb85b5..c57d022e 100644 --- a/KotlinCore/build.gradle.kts +++ b/KotlinCore/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/KotlinCore/src/de/steamwar/kotlin/KotlinCore.kt b/KotlinCore/src/de/steamwar/kotlin/KotlinCore.kt index 1c4bc406..9b81bf0e 100644 --- a/KotlinCore/src/de/steamwar/kotlin/KotlinCore.kt +++ b/KotlinCore/src/de/steamwar/kotlin/KotlinCore.kt @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/KotlinCore/src/de/steamwar/kotlin/util/Area.kt b/KotlinCore/src/de/steamwar/kotlin/util/Area.kt index 5b96519f..667fec81 100644 --- a/KotlinCore/src/de/steamwar/kotlin/util/Area.kt +++ b/KotlinCore/src/de/steamwar/kotlin/util/Area.kt @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/LegacyBauSystem/build.gradle.kts b/LegacyBauSystem/build.gradle.kts index a3f42811..139fec4d 100644 --- a/LegacyBauSystem/build.gradle.kts +++ b/LegacyBauSystem/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -26,4 +26,4 @@ dependencies { compileOnly(libs.nms12) compileOnly(libs.worldedit12) -} +} \ No newline at end of file diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/BauSystem.java b/LegacyBauSystem/src/de/steamwar/bausystem/BauSystem.java index 6712e45a..2b6f816b 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/BauSystem.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/BauSystem.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/CraftbukkitWrapper.java b/LegacyBauSystem/src/de/steamwar/bausystem/CraftbukkitWrapper.java index 8dca9a27..580ca89c 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/CraftbukkitWrapper.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/CraftbukkitWrapper.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/CraftbukkitWrapper12.java b/LegacyBauSystem/src/de/steamwar/bausystem/CraftbukkitWrapper12.java index 46c1dbcb..d2e6bc06 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/CraftbukkitWrapper12.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/CraftbukkitWrapper12.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/FlatteningWrapper.java b/LegacyBauSystem/src/de/steamwar/bausystem/FlatteningWrapper.java index 2fbbcb64..55efd292 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/FlatteningWrapper.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/FlatteningWrapper.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/FlatteningWrapper12.java b/LegacyBauSystem/src/de/steamwar/bausystem/FlatteningWrapper12.java index b6cf7359..bcad7aef 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/FlatteningWrapper12.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/FlatteningWrapper12.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/Mapper.java b/LegacyBauSystem/src/de/steamwar/bausystem/Mapper.java index 591fdd08..9079cabe 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/Mapper.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/Mapper.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/Permission.java b/LegacyBauSystem/src/de/steamwar/bausystem/Permission.java index f3e50856..472941e4 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/Permission.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/Permission.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/RamUsage.java b/LegacyBauSystem/src/de/steamwar/bausystem/RamUsage.java index b3fc6fd4..2638b83f 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/RamUsage.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/RamUsage.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/SWUtils.java b/LegacyBauSystem/src/de/steamwar/bausystem/SWUtils.java index 5f22d5be..cdc9a7a3 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/SWUtils.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/SWUtils.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/TraceEntity12.java b/LegacyBauSystem/src/de/steamwar/bausystem/TraceEntity12.java index b30fc9eb..1e8d8c5a 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/TraceEntity12.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/TraceEntity12.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/WorldeditWrapper.java b/LegacyBauSystem/src/de/steamwar/bausystem/WorldeditWrapper.java index 8ba9bcc7..c6ee9ce3 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/WorldeditWrapper.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/WorldeditWrapper.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/WorldeditWrapper12.java b/LegacyBauSystem/src/de/steamwar/bausystem/WorldeditWrapper12.java index 8fdf94ac..1ee68074 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/WorldeditWrapper12.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/WorldeditWrapper12.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandClear.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandClear.java index 195d0f35..391dc3c8 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandClear.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandClear.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandColor.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandColor.java index ddd04fe9..2a7874dc 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandColor.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandColor.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.commands; import de.steamwar.bausystem.BauSystem; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandDebugStick.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandDebugStick.java index 33c045a0..0c6aa4a5 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandDebugStick.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandDebugStick.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandDetonator.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandDetonator.java index ca2bb9c7..df5fa6d3 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandDetonator.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandDetonator.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandFire.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandFire.java index 56b48621..b35c2e25 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandFire.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandFire.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandFreeze.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandFreeze.java index a3460edd..114817e9 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandFreeze.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandFreeze.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandGUI.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandGUI.java index 076d7c9d..6c0658e0 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandGUI.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandGUI.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandGamemode.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandGamemode.java index 5ddbfa0d..0a717412 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandGamemode.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandGamemode.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandGills.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandGills.java index 051ea107..1330ded1 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandGills.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandGills.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandInfo.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandInfo.java index b1831409..0e2f5dcd 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandInfo.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandInfo.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandKillAll.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandKillAll.java index 389a191a..36b5b29e 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandKillAll.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandKillAll.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandLoader.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandLoader.java index 628db208..60504d69 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandLoader.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandLoader.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandLockschem.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandLockschem.java index c5f20eb3..b1a0a071 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandLockschem.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandLockschem.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandNV.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandNV.java index 7b232a22..b37d21ae 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandNV.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandNV.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandProtect.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandProtect.java index f97d18e8..93551f8e 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandProtect.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandProtect.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandRedstoneTester.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandRedstoneTester.java index 91a8626a..30972ff2 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandRedstoneTester.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandRedstoneTester.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandRegion.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandRegion.java index 2efb478e..d779c2a5 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandRegion.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandRegion.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.commands; import de.steamwar.bausystem.BauSystem; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandReset.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandReset.java index 4ec404e5..3424b192 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandReset.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandReset.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandScript.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandScript.java index 8e071ea9..4563baa0 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandScript.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandScript.java @@ -1,22 +1,20 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2020 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 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. * - * 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 . - * / + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandScriptVars.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandScriptVars.java index f352fca8..961d909e 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandScriptVars.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandScriptVars.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandSelect.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandSelect.java index 96e6105e..e99cb8fb 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandSelect.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandSelect.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.commands; import de.steamwar.bausystem.BauSystem; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandSkull.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandSkull.java index ca98a7ed..1fdc4164 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandSkull.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandSkull.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandSpeed.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandSpeed.java index 195cefcd..ed6943c8 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandSpeed.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandSpeed.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTNT.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTNT.java index a96daf31..d7dc91ff 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTNT.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTNT.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTPSLimiter.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTPSLimiter.java index fe73d863..53ec3832 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTPSLimiter.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTPSLimiter.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTeleport.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTeleport.java index 04fa8c72..cb7fbdc6 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTeleport.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTeleport.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTestblock.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTestblock.java index ec206fa9..cbc71be6 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTestblock.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTestblock.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTime.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTime.java index 8a231052..c209ae1d 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTime.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTime.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTrace.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTrace.java index d1c9e2f0..615b4387 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTrace.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandTrace.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandWorldSpawn.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandWorldSpawn.java index 2f9c1340..90d3f5c5 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandWorldSpawn.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/CommandWorldSpawn.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/commands/RegionUtils.java b/LegacyBauSystem/src/de/steamwar/bausystem/commands/RegionUtils.java index 1c783030..21f610bc 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/commands/RegionUtils.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/commands/RegionUtils.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.commands; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/gui/GuiTraceShow.java b/LegacyBauSystem/src/de/steamwar/bausystem/gui/GuiTraceShow.java index caa03eb2..193bece5 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/gui/GuiTraceShow.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/gui/GuiTraceShow.java @@ -1,22 +1,20 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2020 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 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. * - * 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 . - * / + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.gui; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/AbstractTraceEntity.java b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/AbstractTraceEntity.java index 1df4d96d..e04e2eb7 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/AbstractTraceEntity.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/AbstractTraceEntity.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.bausystem.tracer; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/RoundedTNTPosition.java b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/RoundedTNTPosition.java index 73960575..5b669944 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/RoundedTNTPosition.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/RoundedTNTPosition.java @@ -1,22 +1,20 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2020 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 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. * - * 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 . - * / + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.tracer; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/TNTPosition.java b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/TNTPosition.java index d8deae6b..2d96cdac 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/TNTPosition.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/TNTPosition.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.bausystem.tracer; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/record/RecordStateMachine.java b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/record/RecordStateMachine.java index bd679386..32333d41 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/record/RecordStateMachine.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/record/RecordStateMachine.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.bausystem.tracer.record; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/record/RecordStatus.java b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/record/RecordStatus.java index b87e740c..38e45d2b 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/record/RecordStatus.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/record/RecordStatus.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.bausystem.tracer.record; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/record/Recorder.java b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/record/Recorder.java index 171afd01..e1f5fb91 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/record/Recorder.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/record/Recorder.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.bausystem.tracer.record; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/record/TraceAutoHandler.java b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/record/TraceAutoHandler.java index 58e52e41..4b0cdd44 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/record/TraceAutoHandler.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/record/TraceAutoHandler.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.bausystem.tracer.record; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/Record.java b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/Record.java index b6ac929c..598f4656 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/Record.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/Record.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.bausystem.tracer.show; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/ShowMode.java b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/ShowMode.java index d313189d..a86824b0 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/ShowMode.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/ShowMode.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.bausystem.tracer.show; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/ShowModeParameter.java b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/ShowModeParameter.java index ba67f716..18a39f7b 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/ShowModeParameter.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/ShowModeParameter.java @@ -1,22 +1,20 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2020 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 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. * - * 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 . - * / + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.tracer.show; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/ShowModeParameterType.java b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/ShowModeParameterType.java index 5cb046cf..b85a0928 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/ShowModeParameterType.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/ShowModeParameterType.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.tracer.show; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/StoredRecords.java b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/StoredRecords.java index b0a377ee..4ce637f7 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/StoredRecords.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/StoredRecords.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.bausystem.tracer.show; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/TraceShowManager.java b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/TraceShowManager.java index 0c4b88ee..2cce039e 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/TraceShowManager.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/TraceShowManager.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.tracer.show; import de.steamwar.bausystem.BauSystem; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/mode/EntityShowMode.java b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/mode/EntityShowMode.java index 0e1a27ef..bbb6057c 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/mode/EntityShowMode.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/tracer/show/mode/EntityShowMode.java @@ -1,22 +1,20 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2020 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 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. * - * 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 . - * / + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.tracer.show.mode; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/AFKStopper.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/AFKStopper.java index cf8e7bd2..74eb8f86 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/AFKStopper.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/AFKStopper.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem.world; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/AbstractAutoLoader.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/AbstractAutoLoader.java index d30fe2dc..70cf1487 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/AbstractAutoLoader.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/AbstractAutoLoader.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem.world; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/AutoLoader.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/AutoLoader.java index 92aa8bc1..5b3caec6 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/AutoLoader.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/AutoLoader.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem.world; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/BauScoreboard.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/BauScoreboard.java index 380bc715..0d1a5fdd 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/BauScoreboard.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/BauScoreboard.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem.world; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/ClipboardListener.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/ClipboardListener.java index 0ff91d44..bbf70596 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/ClipboardListener.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/ClipboardListener.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.bausystem.world; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/Color.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/Color.java index 2f068813..0b74a868 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/Color.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/Color.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.world; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/Detoloader.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/Detoloader.java index 531fff59..0016d167 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/Detoloader.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/Detoloader.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.bausystem.world; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/Detonator.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/Detonator.java index 93c90c54..d29ba59d 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/Detonator.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/Detonator.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.bausystem.world; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/DetonatorListener.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/DetonatorListener.java index b616fb97..afdd6e9d 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/DetonatorListener.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/DetonatorListener.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.world; import de.steamwar.bausystem.BauSystem; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/ItemFrameListener.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/ItemFrameListener.java index a8c9618f..f7058fe7 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/ItemFrameListener.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/ItemFrameListener.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.world; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/PredefinedBook.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/PredefinedBook.java index 355fd3b8..21250c01 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/PredefinedBook.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/PredefinedBook.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.world; import de.steamwar.bausystem.BauSystem; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/RegionListener.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/RegionListener.java index 19f18c02..4b835876 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/RegionListener.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/RegionListener.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem.world; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/ScriptListener.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/ScriptListener.java index b26055fe..23bbbb45 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/ScriptListener.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/ScriptListener.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.bausystem.world; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/SizedStack.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/SizedStack.java index d46b181d..ed62f6b1 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/SizedStack.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/SizedStack.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.bausystem.world; @SuppressWarnings({"unused", "UnusedReturnValue"}) diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/TPSUtils.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/TPSUtils.java index 4f16230b..cb253d9e 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/TPSUtils.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/TPSUtils.java @@ -1,21 +1,20 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2020 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 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. * - * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.world; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/Welt.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/Welt.java index 74c87374..459f3f7f 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/Welt.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/Welt.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.bausystem.world; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/GlobalRegion.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/GlobalRegion.java index 363284c4..4846bc3d 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/GlobalRegion.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/GlobalRegion.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.world.regions; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/PasteOptions.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/PasteOptions.java index 2dfbea07..fca143cc 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/PasteOptions.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/PasteOptions.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.world.regions; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/Point.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/Point.java index b7bdf43f..c85a5f6f 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/Point.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/Point.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.world.regions; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/Prototype.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/Prototype.java index f1ccca1c..49edd4e8 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/Prototype.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/Prototype.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.world.regions; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/Region.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/Region.java index 591f8761..1d602b64 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/Region.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/Region.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.world.regions; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/RegionExtensionType.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/RegionExtensionType.java index 28be3b69..b7f80a9a 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/RegionExtensionType.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/RegionExtensionType.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.world.regions; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/RegionSelectionType.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/RegionSelectionType.java index 40cb2f23..58a32986 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/RegionSelectionType.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/RegionSelectionType.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.world.regions; diff --git a/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/RegionType.java b/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/RegionType.java index ac47eb9d..da4a071a 100644 --- a/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/RegionType.java +++ b/LegacyBauSystem/src/de/steamwar/bausystem/world/regions/RegionType.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.bausystem.world.regions; diff --git a/LobbySystem/build.gradle.kts b/LobbySystem/build.gradle.kts index 8662545c..f658af8f 100644 --- a/LobbySystem/build.gradle.kts +++ b/LobbySystem/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -27,6 +27,8 @@ java { } dependencies { + compileOnly(libs.classindex) + annotationProcessor(libs.classindex) compileOnly(project(":SpigotCore", "default")) compileOnly(libs.spigotapi) diff --git a/LobbySystem/src/de/steamwar/lobby/Config.java b/LobbySystem/src/de/steamwar/lobby/Config.java index fd8eeb1c..41be1658 100644 --- a/LobbySystem/src/de/steamwar/lobby/Config.java +++ b/LobbySystem/src/de/steamwar/lobby/Config.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby; @@ -67,6 +67,6 @@ public class Config { yml.set("waitingHallSpawn", waitingHallSpawn); yml.set("jumpPoints", JumpAndRun.actualPoints); - LobbySystem.getPlugin().saveConfig(); + LobbySystem.getInstance().saveConfig(); } } diff --git a/LobbySystem/src/de/steamwar/lobby/Fightserver.java b/LobbySystem/src/de/steamwar/lobby/Fightserver.java index c1ee6f9e..ccf1fa9d 100644 --- a/LobbySystem/src/de/steamwar/lobby/Fightserver.java +++ b/LobbySystem/src/de/steamwar/lobby/Fightserver.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby; @@ -33,7 +33,7 @@ public class Fightserver { private static final Map servers = new HashMap<>(); public static void init() { - Bukkit.getScheduler().runTaskTimer(LobbySystem.getPlugin(), Fightserver::removeStopped, 20, 20); + Bukkit.getScheduler().runTaskTimer(LobbySystem.getInstance(), Fightserver::removeStopped, 20, 20); } public static void newFightInfo(FightInfoPacket in) { diff --git a/LobbySystem/src/de/steamwar/lobby/LobbyPacketHandler.java b/LobbySystem/src/de/steamwar/lobby/LobbyPacketHandler.java index eb9d5e7c..37284085 100644 --- a/LobbySystem/src/de/steamwar/lobby/LobbyPacketHandler.java +++ b/LobbySystem/src/de/steamwar/lobby/LobbyPacketHandler.java @@ -1,24 +1,25 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby; +import de.steamwar.linkage.Linked; import de.steamwar.lobby.jumpandrun.JumpAndRun; import de.steamwar.network.packets.PacketHandler; import de.steamwar.network.packets.common.FightInfoPacket; @@ -30,6 +31,7 @@ import org.bukkit.event.player.PlayerTeleportEvent; import java.util.Objects; +@Linked public class LobbyPacketHandler extends PacketHandler { @Handler diff --git a/LobbySystem/src/de/steamwar/lobby/LobbySystem.java b/LobbySystem/src/de/steamwar/lobby/LobbySystem.java index 900d0941..9dc76edc 100644 --- a/LobbySystem/src/de/steamwar/lobby/LobbySystem.java +++ b/LobbySystem/src/de/steamwar/lobby/LobbySystem.java @@ -1,38 +1,32 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby; import de.steamwar.core.Core; import de.steamwar.entity.REntityServer; -import de.steamwar.lobby.command.FlyCommand; -import de.steamwar.lobby.command.HologramCommand; -import de.steamwar.lobby.command.ModifyCommand; -import de.steamwar.lobby.command.PortalCommand; -import de.steamwar.lobby.jumpandrun.JumpAndRun; -import de.steamwar.lobby.jumpandrun.JumpAndRunCommand; -import de.steamwar.lobby.listener.*; +import de.steamwar.linkage.AbstractLinker; +import de.steamwar.linkage.SpigotLinker; +import de.steamwar.lobby.listener.AlphaWall; import de.steamwar.lobby.map.CustomMap; -import de.steamwar.lobby.particle.ParticleListener; -import de.steamwar.lobby.special.advent.AdventsCalendar; -import de.steamwar.lobby.team.TeamPlayer; import de.steamwar.message.Message; +import org.bukkit.Bukkit; import org.bukkit.plugin.java.JavaPlugin; public class LobbySystem extends JavaPlugin { @@ -43,6 +37,8 @@ public class LobbySystem extends JavaPlugin { private static REntityServer entityServer; private static REntityServer debugEntityServer; + private static SpigotLinker spigotLinker; + @Override public void onLoad() { plugin = this; @@ -56,43 +52,32 @@ public class LobbySystem extends JavaPlugin { Core.setServerName("Lobby"); CustomMap.init(); - Fightserver.init(); - new Portals(); - new PortalCommand(); - new HologramCommand(); - new FlyCommand(); - new ModifyCommand(); - - new JumpAndRun(); - new JumpAndRunCommand(); config = new Config(getConfig()); - new PlayerSpawn(); - new DoubleJumpListener(); - new ParticleListener(); - new InventoryInteraction(); - new WorldInteraction(); - new PlayerSeatListener(); - new MapsRotateListener(); - new TeleporterListener(); - new TeamPlayer(); + spigotLinker = new SpigotLinker(this, message); + try { + spigotLinker.link(); + } catch (AbstractLinker.LinkException e) { + e.printStackTrace(); + Bukkit.shutdown(); + return; + } // EggHunt.init(); - AdventsCalendar.init(); new AlphaWall(l -> l.getX() > 999, AlphaWall.REFLECT_X); new AlphaWall(l -> l.getX() < 2977, AlphaWall.REFLECT_X); new AlphaWall(l -> l.getZ() > 892, AlphaWall.REFLECT_Z); new AlphaWall(l -> l.getZ() < 1794, AlphaWall.REFLECT_Z); - new LobbyPacketHandler().register(); } @Override public void onDisable() { + spigotLinker.unlink(); } - public static LobbySystem getPlugin() { + public static LobbySystem getInstance() { return plugin; } diff --git a/LobbySystem/src/de/steamwar/lobby/LobbySystem.properties b/LobbySystem/src/de/steamwar/lobby/LobbySystem.properties index 55fff341..dc3de60f 100644 --- a/LobbySystem/src/de/steamwar/lobby/LobbySystem.properties +++ b/LobbySystem/src/de/steamwar/lobby/LobbySystem.properties @@ -1,3 +1,22 @@ +# +# 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 . +# + PREFIX = §eLobby§8System§8»§7 TIME = HH:mm:ss DATE=........ diff --git a/LobbySystem/src/de/steamwar/lobby/LobbySystem_de.properties b/LobbySystem/src/de/steamwar/lobby/LobbySystem_de.properties index efe41798..929164d4 100644 --- a/LobbySystem/src/de/steamwar/lobby/LobbySystem_de.properties +++ b/LobbySystem/src/de/steamwar/lobby/LobbySystem_de.properties @@ -1,3 +1,22 @@ +# +# 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 . +# + PREFIX = §eLobby§8System§8» TIME = HH:mm:ss DATE=........ diff --git a/LobbySystem/src/de/steamwar/lobby/boatrace/BoatRace.java b/LobbySystem/src/de/steamwar/lobby/boatrace/BoatRace.java index 18e8db6c..55c6daf7 100644 --- a/LobbySystem/src/de/steamwar/lobby/boatrace/BoatRace.java +++ b/LobbySystem/src/de/steamwar/lobby/boatrace/BoatRace.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.boatrace; import de.steamwar.entity.REntity; @@ -136,7 +155,7 @@ public class BoatRace implements EventListener, Listener { // boat.setBoatType(Boat.Type.values()[new Random().nextInt(Boat.Type.values().length)]); boat.addPassenger(player); bossBar = Bukkit.createBossBar("", BarColor.BLUE, BarStyle.SOLID); - task = Bukkit.getScheduler().runTaskTimer(LobbySystem.getPlugin(), () -> { + task = Bukkit.getScheduler().runTaskTimer(LobbySystem.getInstance(), () -> { hasBacked = false; if (nextCheckpoint != 0) { double kmh = lastDistance * 20 * 3.6; @@ -144,7 +163,7 @@ public class BoatRace implements EventListener, Listener { bossBar.setTitle(LobbySystem.getMessage().parse("BOAT_RACE_TITLE", player, nextCheckpoint, renderTime(System.currentTimeMillis() - startTime), (int) kmh)); } }, 0, 1); - Bukkit.getPluginManager().registerEvents(this, LobbySystem.getPlugin()); + Bukkit.getPluginManager().registerEvents(this, LobbySystem.getInstance()); } private boolean inRegion(Player p, Location loc1, Location loc2) { diff --git a/LobbySystem/src/de/steamwar/lobby/boatrace/BoatRacePositions.java b/LobbySystem/src/de/steamwar/lobby/boatrace/BoatRacePositions.java index 23b7a9e8..4171843a 100644 --- a/LobbySystem/src/de/steamwar/lobby/boatrace/BoatRacePositions.java +++ b/LobbySystem/src/de/steamwar/lobby/boatrace/BoatRacePositions.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.boatrace; import org.bukkit.Bukkit; diff --git a/LobbySystem/src/de/steamwar/lobby/command/FlyCommand.java b/LobbySystem/src/de/steamwar/lobby/command/FlyCommand.java index e16c6748..c95c1e59 100644 --- a/LobbySystem/src/de/steamwar/lobby/command/FlyCommand.java +++ b/LobbySystem/src/de/steamwar/lobby/command/FlyCommand.java @@ -1,30 +1,32 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.command; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.lobby.util.LobbyPlayer; import de.steamwar.sql.SteamwarUser; import de.steamwar.sql.UserPerm; import org.bukkit.entity.Player; +@Linked public class FlyCommand extends SWCommand { public FlyCommand() { diff --git a/LobbySystem/src/de/steamwar/lobby/command/HologramCommand.java b/LobbySystem/src/de/steamwar/lobby/command/HologramCommand.java index bfcc6b79..23c8466e 100644 --- a/LobbySystem/src/de/steamwar/lobby/command/HologramCommand.java +++ b/LobbySystem/src/de/steamwar/lobby/command/HologramCommand.java @@ -1,29 +1,31 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.command; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.lobby.LobbySystem; import de.steamwar.lobby.display.Hologram; import org.bukkit.entity.Player; +@Linked public class HologramCommand extends SWCommand { public HologramCommand() { diff --git a/LobbySystem/src/de/steamwar/lobby/command/ModifyCommand.java b/LobbySystem/src/de/steamwar/lobby/command/ModifyCommand.java index d782112d..747ac825 100644 --- a/LobbySystem/src/de/steamwar/lobby/command/ModifyCommand.java +++ b/LobbySystem/src/de/steamwar/lobby/command/ModifyCommand.java @@ -1,25 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.command; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.lobby.LobbySystem; import de.steamwar.lobby.listener.PlayerSpawn; import de.steamwar.sql.SteamwarUser; @@ -35,6 +36,7 @@ import org.bukkit.event.player.PlayerQuitEvent; import java.util.HashSet; import java.util.Set; +@Linked public class ModifyCommand extends SWCommand implements Listener { private static final Set modifying = new HashSet<>(); @@ -45,7 +47,7 @@ public class ModifyCommand extends SWCommand implements Listener { public ModifyCommand() { super("modify"); - Bukkit.getPluginManager().registerEvents(this, LobbySystem.getPlugin()); + Bukkit.getPluginManager().registerEvents(this, LobbySystem.getInstance()); } @Register diff --git a/LobbySystem/src/de/steamwar/lobby/command/PortalCommand.java b/LobbySystem/src/de/steamwar/lobby/command/PortalCommand.java index 5c8649bd..6069a3c4 100644 --- a/LobbySystem/src/de/steamwar/lobby/command/PortalCommand.java +++ b/LobbySystem/src/de/steamwar/lobby/command/PortalCommand.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.command; import com.sk89q.worldedit.IncompleteRegionException; @@ -8,6 +27,7 @@ import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.regions.RegionSelector; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeMapper; +import de.steamwar.linkage.Linked; import de.steamwar.lobby.LobbySystem; import de.steamwar.lobby.portal.*; import de.steamwar.sql.SteamwarUser; @@ -22,6 +42,7 @@ import org.bukkit.entity.Player; import java.util.ArrayList; import java.util.List; +@Linked public class PortalCommand extends SWCommand { public PortalCommand() { @@ -85,18 +106,21 @@ public class PortalCommand extends SWCommand { } @Register({"depth"}) - public void portalDepth(Player player, Portal portal, double depth) { + public void portalDepth(Player player, Portal portal, @Max(doubleValue = 10.0d) double depth) { + if (noPermissions(player)) return; portal.setDepth(depth); } @Register({"addblue"}) public void portalAddBlue(Player player, Portal portal) { + if (noPermissions(player)) return; FightserverPortal handler = (FightserverPortal) portal.getHandler(); handler.addBlue(locationOfPlayer(player)); } @Register({"addred"}) public void portalAddRed(Player player, Portal portal) { + if (noPermissions(player)) return; FightserverPortal handler = (FightserverPortal) portal.getHandler(); handler.addRed(locationOfPlayer(player)); } @@ -110,12 +134,14 @@ public class PortalCommand extends SWCommand { @Register({"removeblue"}) public void portalRemoveBlue(Player player, Portal portal, int i) { + if (noPermissions(player)) return; FightserverPortal handler = (FightserverPortal) portal.getHandler(); handler.removeBlue(i-1); } @Register({"removered"}) public void portalRemoveRed(Player player, Portal portal, int i) { + if (noPermissions(player)) return; FightserverPortal handler = (FightserverPortal) portal.getHandler(); handler.removeRed(i-1); } diff --git a/LobbySystem/src/de/steamwar/lobby/display/Hologram.java b/LobbySystem/src/de/steamwar/lobby/display/Hologram.java index 556c7d0b..2024b7b3 100644 --- a/LobbySystem/src/de/steamwar/lobby/display/Hologram.java +++ b/LobbySystem/src/de/steamwar/lobby/display/Hologram.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.display; diff --git a/LobbySystem/src/de/steamwar/lobby/display/NPC.java b/LobbySystem/src/de/steamwar/lobby/display/NPC.java index 3bbc5f2e..d82669f3 100644 --- a/LobbySystem/src/de/steamwar/lobby/display/NPC.java +++ b/LobbySystem/src/de/steamwar/lobby/display/NPC.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.display; diff --git a/LobbySystem/src/de/steamwar/lobby/jumpandrun/JumpAndRun.java b/LobbySystem/src/de/steamwar/lobby/jumpandrun/JumpAndRun.java index 68097463..adc63951 100644 --- a/LobbySystem/src/de/steamwar/lobby/jumpandrun/JumpAndRun.java +++ b/LobbySystem/src/de/steamwar/lobby/jumpandrun/JumpAndRun.java @@ -1,7 +1,26 @@ +/* + * 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 . + */ + package de.steamwar.lobby.jumpandrun; +import de.steamwar.linkage.Linked; import de.steamwar.lobby.LobbySystem; -import de.steamwar.lobby.listener.BasicListener; import de.steamwar.lobby.listener.PlayerSpawn; import de.steamwar.lobby.util.Leaderboard; import de.steamwar.sql.UserConfig; @@ -12,6 +31,7 @@ import org.bukkit.Material; import org.bukkit.Sound; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerMoveEvent; @@ -22,7 +42,8 @@ import org.bukkit.util.Vector; import java.text.SimpleDateFormat; import java.util.*; -public class JumpAndRun extends BasicListener { +@Linked +public class JumpAndRun implements Listener { public static final String JUMP_AND_RUN_CONFIG = "jump_and_run"; @@ -40,7 +61,7 @@ public class JumpAndRun extends BasicListener { private static final Leaderboard LEADERBOARD = new Leaderboard(LobbySystem.getEntityServer(false), JUMP_AND_RUN_CONFIG, new Location(Bukkit.getWorlds().get(0), 2338.5, 42.5, 1231.5), 5); { - Bukkit.getScheduler().runTaskTimer(LobbySystem.getPlugin(), () -> { + Bukkit.getScheduler().runTaskTimer(LobbySystem.getInstance(), () -> { Set toReset = new HashSet<>(); CURRENT_POS.forEach((player, index) -> { if (System.currentTimeMillis() - CLICKED.getOrDefault(player, 0L) > 500) { diff --git a/LobbySystem/src/de/steamwar/lobby/jumpandrun/JumpAndRunCommand.java b/LobbySystem/src/de/steamwar/lobby/jumpandrun/JumpAndRunCommand.java index 7e15b7a8..6d8211bb 100644 --- a/LobbySystem/src/de/steamwar/lobby/jumpandrun/JumpAndRunCommand.java +++ b/LobbySystem/src/de/steamwar/lobby/jumpandrun/JumpAndRunCommand.java @@ -1,6 +1,26 @@ +/* + * 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 . + */ + package de.steamwar.lobby.jumpandrun; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.lobby.LobbySystem; import de.steamwar.sql.UserConfig; import org.bukkit.entity.Player; @@ -9,6 +29,7 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; +@Linked public class JumpAndRunCommand extends SWCommand { public JumpAndRunCommand() { diff --git a/LobbySystem/src/de/steamwar/lobby/listener/AlphaWall.java b/LobbySystem/src/de/steamwar/lobby/listener/AlphaWall.java index 502488b5..a4fabb16 100644 --- a/LobbySystem/src/de/steamwar/lobby/listener/AlphaWall.java +++ b/LobbySystem/src/de/steamwar/lobby/listener/AlphaWall.java @@ -1,34 +1,37 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.listener; +import de.steamwar.lobby.LobbySystem; import de.steamwar.lobby.command.ModifyCommand; +import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerMoveEvent; import org.bukkit.event.player.PlayerTeleportEvent; import java.util.function.Function; -public class AlphaWall extends BasicListener { +public class AlphaWall implements Listener { public static float REFLECT_X = 360f; public static float REFLECT_Z = 180f; @@ -39,6 +42,7 @@ public class AlphaWall extends BasicListener { public AlphaWall(Function allowed, float reflect) { this.allowed = allowed; this.reflect = reflect; + Bukkit.getPluginManager().registerEvents(this, LobbySystem.getInstance()); } @EventHandler diff --git a/LobbySystem/src/de/steamwar/lobby/listener/BasicListener.java b/LobbySystem/src/de/steamwar/lobby/listener/BasicListener.java deleted file mode 100644 index 1979b463..00000000 --- a/LobbySystem/src/de/steamwar/lobby/listener/BasicListener.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2021 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 . - */ - -package de.steamwar.lobby.listener; - -import de.steamwar.lobby.LobbySystem; -import org.bukkit.Bukkit; -import org.bukkit.event.Listener; - -public class BasicListener implements Listener { - - public BasicListener () { - Bukkit.getPluginManager().registerEvents(this, LobbySystem.getPlugin()); - } -} diff --git a/LobbySystem/src/de/steamwar/lobby/listener/DoubleJumpListener.java b/LobbySystem/src/de/steamwar/lobby/listener/DoubleJumpListener.java index ae554f64..e97f3de6 100644 --- a/LobbySystem/src/de/steamwar/lobby/listener/DoubleJumpListener.java +++ b/LobbySystem/src/de/steamwar/lobby/listener/DoubleJumpListener.java @@ -1,24 +1,25 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.listener; +import de.steamwar.linkage.Linked; import de.steamwar.lobby.jumpandrun.JumpAndRun; import de.steamwar.lobby.util.LobbyPlayer; import org.bukkit.GameMode; @@ -26,12 +27,14 @@ import org.bukkit.Material; import org.bukkit.Sound; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerMoveEvent; import org.bukkit.event.player.PlayerToggleFlightEvent; import org.bukkit.util.Vector; -public class DoubleJumpListener extends BasicListener { +@Linked +public class DoubleJumpListener implements Listener { double multiplyer = 1.4; diff --git a/LobbySystem/src/de/steamwar/lobby/listener/InventoryInteraction.java b/LobbySystem/src/de/steamwar/lobby/listener/InventoryInteraction.java index 14b28d97..d5d6920c 100644 --- a/LobbySystem/src/de/steamwar/lobby/listener/InventoryInteraction.java +++ b/LobbySystem/src/de/steamwar/lobby/listener/InventoryInteraction.java @@ -1,24 +1,25 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.listener; +import de.steamwar.linkage.Linked; import de.steamwar.lobby.LobbySystem; import de.steamwar.lobby.command.ModifyCommand; import de.steamwar.lobby.special.advent.AdventsCalendar; @@ -26,6 +27,7 @@ import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.player.PlayerDropItemEvent; @@ -34,7 +36,8 @@ import org.bukkit.event.player.PlayerPickupItemEvent; import org.bukkit.event.player.PlayerSwapHandItemsEvent; import org.bukkit.inventory.ItemStack; -public class InventoryInteraction extends BasicListener { +@Linked +public class InventoryInteraction implements Listener { @EventHandler public void handlePlayerInteract(PlayerInteractEvent event) { @@ -50,7 +53,7 @@ public class InventoryInteraction extends BasicListener { offset = 0; } - Bukkit.getScheduler().runTaskLater(LobbySystem.getPlugin(), () -> { + Bukkit.getScheduler().runTaskLater(LobbySystem.getInstance(), () -> { event.getPlayer().getInventory().setItem(PlayerSpawn.FIREWORK_SLOT + offset, PlayerSpawn.FIREWORK); }, 1L); return; diff --git a/LobbySystem/src/de/steamwar/lobby/listener/MapsRotateListener.java b/LobbySystem/src/de/steamwar/lobby/listener/MapsRotateListener.java index e098da02..20cd055d 100644 --- a/LobbySystem/src/de/steamwar/lobby/listener/MapsRotateListener.java +++ b/LobbySystem/src/de/steamwar/lobby/listener/MapsRotateListener.java @@ -1,30 +1,33 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.listener; +import de.steamwar.linkage.Linked; import de.steamwar.lobby.command.ModifyCommand; import org.bukkit.entity.ItemFrame; import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerInteractEntityEvent; -public class MapsRotateListener extends BasicListener { +@Linked +public class MapsRotateListener implements Listener { @EventHandler public void onPlayerInteractEntity(PlayerInteractEntityEvent event) { diff --git a/LobbySystem/src/de/steamwar/lobby/listener/PlayerSeatListener.java b/LobbySystem/src/de/steamwar/lobby/listener/PlayerSeatListener.java index 45113f57..fae3e909 100644 --- a/LobbySystem/src/de/steamwar/lobby/listener/PlayerSeatListener.java +++ b/LobbySystem/src/de/steamwar/lobby/listener/PlayerSeatListener.java @@ -1,24 +1,25 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.listener; +import de.steamwar.linkage.Linked; import de.steamwar.lobby.LobbySystem; import org.bukkit.*; import org.bukkit.block.data.Bisected; @@ -28,6 +29,7 @@ import org.bukkit.entity.Arrow; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerQuitEvent; @@ -37,7 +39,8 @@ import org.spigotmc.event.entity.EntityDismountEvent; import java.util.HashSet; import java.util.Set; -public class PlayerSeatListener extends BasicListener{ +@Linked +public class PlayerSeatListener implements Listener { public static final World world = Bukkit.getWorlds().get(0); @@ -51,7 +54,7 @@ public class PlayerSeatListener extends BasicListener{ arrow.setTicksLived(1); } } - }.runTaskTimer(LobbySystem.getPlugin(), 20*60,20*60); + }.runTaskTimer(LobbySystem.getInstance(), 20*60,20*60); } @EventHandler diff --git a/LobbySystem/src/de/steamwar/lobby/listener/PlayerSpawn.java b/LobbySystem/src/de/steamwar/lobby/listener/PlayerSpawn.java index 3ca809c1..cf2ed29c 100644 --- a/LobbySystem/src/de/steamwar/lobby/listener/PlayerSpawn.java +++ b/LobbySystem/src/de/steamwar/lobby/listener/PlayerSpawn.java @@ -1,24 +1,25 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.listener; +import de.steamwar.linkage.Linked; import de.steamwar.lobby.LobbySystem; import de.steamwar.lobby.boatrace.BoatRace; import de.steamwar.lobby.special.advent.AdventsCalendar; @@ -31,13 +32,15 @@ import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.PlayerInventory; -public class PlayerSpawn extends BasicListener { +@Linked +public class PlayerSpawn implements Listener { public static final int FIREWORK_SLOT = 2; public static final ItemStack FIREWORK = new ItemBuilder(Material.FIREWORK_ROCKET, 1).setDisplayName("§5Rakete").build(); @@ -62,7 +65,7 @@ public class PlayerSpawn extends BasicListener { LobbySystem.getEntityServer(false).addPlayer(player); BoatRace.boatNpcServer.addPlayer(player); - Bukkit.getScheduler().runTaskLater(LobbySystem.getPlugin(), () -> NetworkSender.send(new ImALobbyPacket(), player), 20); + Bukkit.getScheduler().runTaskLater(LobbySystem.getInstance(), () -> NetworkSender.send(new ImALobbyPacket(), player), 20); } public static void giveItems(Player player) { diff --git a/LobbySystem/src/de/steamwar/lobby/listener/Portals.java b/LobbySystem/src/de/steamwar/lobby/listener/Portals.java index 576d17dc..0c372d18 100644 --- a/LobbySystem/src/de/steamwar/lobby/listener/Portals.java +++ b/LobbySystem/src/de/steamwar/lobby/listener/Portals.java @@ -1,28 +1,30 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.listener; +import de.steamwar.linkage.Linked; import de.steamwar.lobby.portal.Portal; import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerMoveEvent; import org.bukkit.event.player.PlayerQuitEvent; @@ -32,7 +34,8 @@ import java.util.Deque; import java.util.HashMap; import java.util.Map; -public class Portals extends BasicListener { +@Linked +public class Portals implements Listener { private static final Map> portalStack = new HashMap<>(); diff --git a/LobbySystem/src/de/steamwar/lobby/listener/TeleporterListener.java b/LobbySystem/src/de/steamwar/lobby/listener/TeleporterListener.java index 28909e3c..23b87658 100644 --- a/LobbySystem/src/de/steamwar/lobby/listener/TeleporterListener.java +++ b/LobbySystem/src/de/steamwar/lobby/listener/TeleporterListener.java @@ -1,33 +1,36 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.listener; import de.steamwar.inventory.SWInventory; import de.steamwar.inventory.SWItem; +import de.steamwar.linkage.Linked; import org.bukkit.*; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.player.PlayerInteractEvent; -public class TeleporterListener extends BasicListener { +@Linked +public class TeleporterListener implements Listener { private static final World world = Bukkit.getWorlds().get(0); diff --git a/LobbySystem/src/de/steamwar/lobby/listener/WorldInteraction.java b/LobbySystem/src/de/steamwar/lobby/listener/WorldInteraction.java index b4c439fc..1d378192 100644 --- a/LobbySystem/src/de/steamwar/lobby/listener/WorldInteraction.java +++ b/LobbySystem/src/de/steamwar/lobby/listener/WorldInteraction.java @@ -1,30 +1,32 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.listener; +import de.steamwar.linkage.Linked; import de.steamwar.lobby.command.ModifyCommand; import org.bukkit.Material; import org.bukkit.entity.HumanEntity; import org.bukkit.entity.ItemFrame; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockPhysicsEvent; @@ -33,13 +35,12 @@ import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.FoodLevelChangeEvent; import org.bukkit.event.hanging.HangingBreakByEntityEvent; -import org.bukkit.event.hanging.HangingBreakEvent; import org.bukkit.event.player.PlayerArmorStandManipulateEvent; import org.bukkit.event.player.PlayerInteractEvent; -import org.bukkit.event.server.MapInitializeEvent; import org.bukkit.util.Vector; -public class WorldInteraction extends BasicListener { +@Linked +public class WorldInteraction implements Listener { @EventHandler public void onEntityDamageByEntity(EntityDamageByEntityEvent event) { diff --git a/LobbySystem/src/de/steamwar/lobby/map/ColorInit.java b/LobbySystem/src/de/steamwar/lobby/map/ColorInit.java index 7e3c6ba0..4de9d206 100644 --- a/LobbySystem/src/de/steamwar/lobby/map/ColorInit.java +++ b/LobbySystem/src/de/steamwar/lobby/map/ColorInit.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.map; import org.bukkit.map.MapPalette; diff --git a/LobbySystem/src/de/steamwar/lobby/map/CustomMap.java b/LobbySystem/src/de/steamwar/lobby/map/CustomMap.java index 70053b87..5c140ae9 100644 --- a/LobbySystem/src/de/steamwar/lobby/map/CustomMap.java +++ b/LobbySystem/src/de/steamwar/lobby/map/CustomMap.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -75,12 +75,12 @@ public class CustomMap implements Listener { itemFrameIndex.put(itemFrames[i], i); } - Bukkit.getScheduler().runTaskTimer(LobbySystem.getPlugin(), () -> { + Bukkit.getScheduler().runTaskTimer(LobbySystem.getInstance(), () -> { long modified = mapFile.lastModified(); if (modified > lastModified) { lastModified = modified; System.out.println("Updating Banner: " + mapFile.getName()); - Bukkit.getScheduler().runTaskAsynchronously(LobbySystem.getPlugin(), () -> { + Bukkit.getScheduler().runTaskAsynchronously(LobbySystem.getInstance(), () -> { try { run(); } catch (IOException e) { @@ -89,7 +89,7 @@ public class CustomMap implements Listener { }); } }, 200L, 200L); - Bukkit.getPluginManager().registerEvents(this, LobbySystem.getPlugin()); + Bukkit.getPluginManager().registerEvents(this, LobbySystem.getInstance()); } @EventHandler @@ -169,7 +169,7 @@ public class CustomMap implements Listener { if (itemFrame == null) continue; int finalX = x; int finalY = y; - Bukkit.getScheduler().runTaskLater(LobbySystem.getPlugin(), () -> { + Bukkit.getScheduler().runTaskLater(LobbySystem.getInstance(), () -> { ItemStack itemStack = itemFrame.getItem(); MapMeta mapMeta = (MapMeta) itemStack.getItemMeta(); MapView mapView = mapMeta.getMapView(); diff --git a/LobbySystem/src/de/steamwar/lobby/particle/Gradient.java b/LobbySystem/src/de/steamwar/lobby/particle/Gradient.java index 35ffcd72..2509dd56 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/Gradient.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/Gradient.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.particle; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/ParticleData.java b/LobbySystem/src/de/steamwar/lobby/particle/ParticleData.java index 0bf1b5b8..ad475e94 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/ParticleData.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/ParticleData.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle; import de.steamwar.inventory.SWItem; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/ParticleElement.java b/LobbySystem/src/de/steamwar/lobby/particle/ParticleElement.java index 33b497f0..5b900192 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/ParticleElement.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/ParticleElement.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle; import org.bukkit.Bukkit; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/ParticleEnum.java b/LobbySystem/src/de/steamwar/lobby/particle/ParticleEnum.java index 67214427..57830aa3 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/ParticleEnum.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/ParticleEnum.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle; public interface ParticleEnum { diff --git a/LobbySystem/src/de/steamwar/lobby/particle/ParticleInventory.java b/LobbySystem/src/de/steamwar/lobby/particle/ParticleInventory.java index e1764149..b7291e91 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/ParticleInventory.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/ParticleInventory.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle; import de.steamwar.inventory.SWItem; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/ParticleListener.java b/LobbySystem/src/de/steamwar/lobby/particle/ParticleListener.java index 535ebd0b..52261647 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/ParticleListener.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/ParticleListener.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.particle; +import de.steamwar.linkage.Linked; import de.steamwar.lobby.LobbySystem; import de.steamwar.lobby.jumpandrun.JumpAndRun; -import de.steamwar.lobby.listener.BasicListener; import de.steamwar.lobby.listener.PlayerSpawn; import de.steamwar.lobby.util.LobbyPlayer; import de.steamwar.sql.SteamwarUser; @@ -30,6 +30,7 @@ import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerMoveEvent; @@ -38,7 +39,8 @@ import org.bukkit.event.player.PlayerQuitEvent; import java.util.HashMap; import java.util.Map; -public class ParticleListener extends BasicListener { +@Linked +public class ParticleListener implements Listener { private static final int PLAYER_MAX_SIZE = 20; private static final int SERVER_TEAM_MAX_SIZE = 40; @@ -48,7 +50,7 @@ public class ParticleListener extends BasicListener { private static Map movingPlayers = new HashMap<>(); public ParticleListener() { - Bukkit.getScheduler().runTaskTimer(LobbySystem.getPlugin(), () -> { + Bukkit.getScheduler().runTaskTimer(LobbySystem.getInstance(), () -> { movingPlayers.replaceAll((player, integer) -> integer - 1); movingPlayers.entrySet().removeIf(entry -> entry.getValue() <= 0); deg += 0.1; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/ParticleRequirement.java b/LobbySystem/src/de/steamwar/lobby/particle/ParticleRequirement.java index 80e6099f..bc5ba669 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/ParticleRequirement.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/ParticleRequirement.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle; import de.steamwar.lobby.LobbySystem; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/ParticleTickData.java b/LobbySystem/src/de/steamwar/lobby/particle/ParticleTickData.java index 30cac116..cfbea1bf 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/ParticleTickData.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/ParticleTickData.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle; import lombok.AllArgsConstructor; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/ParticleTickType.java b/LobbySystem/src/de/steamwar/lobby/particle/ParticleTickType.java index adc25e40..e4874ff0 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/ParticleTickType.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/ParticleTickType.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle; public enum ParticleTickType { diff --git a/LobbySystem/src/de/steamwar/lobby/particle/WingDesign.java b/LobbySystem/src/de/steamwar/lobby/particle/WingDesign.java index 125aa170..043914b9 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/WingDesign.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/WingDesign.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle; import lombok.SneakyThrows; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/Always.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/Always.java index 0eeb41ee..3c036e9d 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/Always.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/Always.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.particle.ParticleElement; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/Circle.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/Circle.java index 272886b9..969bd247 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/Circle.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/Circle.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.particle.ParticleElement; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/Cloud.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/Cloud.java index f7b91e79..d53ef969 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/Cloud.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/Cloud.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.particle.ParticleElement; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/Delayed.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/Delayed.java index 3fb9632e..3a45f0e5 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/Delayed.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/Delayed.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.LobbySystem; @@ -28,7 +47,7 @@ public class Delayed extends DelegatingParticleElement { public Delayed(ParticleElement particleElement, int interval) { super(particleElement); - Bukkit.getPluginManager().registerEvents(delayedData, LobbySystem.getPlugin()); + Bukkit.getPluginManager().registerEvents(delayedData, LobbySystem.getInstance()); this.interval = interval; if (interval <= 0) { throw new IllegalArgumentException("Interval must be greater than 0"); diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/DelegatingParticleElement.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/DelegatingParticleElement.java index 55d6e10b..58c76500 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/DelegatingParticleElement.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/DelegatingParticleElement.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.particle.ParticleData; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/DoubleCircle.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/DoubleCircle.java index 3d777c25..c7c090f1 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/DoubleCircle.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/DoubleCircle.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.particle.ParticleElement; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/DustParticle.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/DustParticle.java index a7edb3f0..375e80d1 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/DustParticle.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/DustParticle.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.particle.Gradient; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/Floor.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/Floor.java index 0b4ef7fd..d7c81e66 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/Floor.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/Floor.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.particle.ParticleElement; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/Flying.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/Flying.java index ed160a54..6d010c4a 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/Flying.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/Flying.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.particle.ParticleElement; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/Group.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/Group.java index 6e567a0c..ca027fed 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/Group.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/Group.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.particle.ParticleData; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/LocationMutator.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/LocationMutator.java index 41fd3425..f38ef40c 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/LocationMutator.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/LocationMutator.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.particle.ParticleElement; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/NonFloor.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/NonFloor.java index ebc01ebc..79fe9e3f 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/NonFloor.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/NonFloor.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.particle.ParticleElement; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/NonFlying.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/NonFlying.java index 4579e21a..072319d3 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/NonFlying.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/NonFlying.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.particle.ParticleElement; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/None.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/None.java index 42bb013d..158a2b21 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/None.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/None.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.particle.elements; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/OnlyOthers.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/OnlyOthers.java index b9068a30..cb65f0a5 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/OnlyOthers.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/OnlyOthers.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.particle.ParticleElement; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/OnlySelf.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/OnlySelf.java index feb96d06..a150b467 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/OnlySelf.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/OnlySelf.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.particle.ParticleElement; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/RandomParticle.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/RandomParticle.java index def3cabb..3dc0b809 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/RandomParticle.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/RandomParticle.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.LobbySystem; @@ -45,7 +64,7 @@ public class RandomParticle implements ParticleElement { throw new IllegalArgumentException("ParticleEnums must not be empty"); } this.randomData = new RandomData(particleEnums.length); - Bukkit.getPluginManager().registerEvents(randomData, LobbySystem.getPlugin()); + Bukkit.getPluginManager().registerEvents(randomData, LobbySystem.getInstance()); this.particleEnums = particleEnums; } diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/Separator.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/Separator.java index 6792b445..8d25da99 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/Separator.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/Separator.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.particle.ParticleData; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/SimpleParticle.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/SimpleParticle.java index 760f4eb9..23b556cb 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/SimpleParticle.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/SimpleParticle.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.particle.ParticleElement; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/Sneaking.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/Sneaking.java index 833e4c14..6cf86e40 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/Sneaking.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/Sneaking.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.particle.ParticleElement; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/TrippleCircle.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/TrippleCircle.java index 20372aa1..f5ba8b66 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/TrippleCircle.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/TrippleCircle.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.particle.ParticleElement; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/Wing.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/Wing.java index bb43da5a..147228d3 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/Wing.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/Wing.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements; import de.steamwar.lobby.particle.ParticleElement; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/custom/HearthBeat.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/custom/HearthBeat.java index 0e974e65..4f076c40 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/custom/HearthBeat.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/custom/HearthBeat.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements.custom; import de.steamwar.lobby.particle.ParticleElement; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/custom/NonMoving.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/custom/NonMoving.java index 64909584..c0f6cf6e 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/custom/NonMoving.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/custom/NonMoving.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements.custom; import de.steamwar.lobby.particle.ParticleElement; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/custom/PulseShimmer.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/custom/PulseShimmer.java index f286f14c..d48f5361 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/custom/PulseShimmer.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/custom/PulseShimmer.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements.custom; import de.steamwar.lobby.particle.ParticleElement; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/elements/custom/YOffset.java b/LobbySystem/src/de/steamwar/lobby/particle/elements/custom/YOffset.java index 0af32eac..f49e4219 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/elements/custom/YOffset.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/elements/custom/YOffset.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.elements.custom; import de.steamwar.lobby.particle.ParticleElement; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/particles/EasterParticle.java b/LobbySystem/src/de/steamwar/lobby/particle/particles/EasterParticle.java index 0d94f2ea..0833468b 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/particles/EasterParticle.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/particles/EasterParticle.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.particles; import de.steamwar.lobby.particle.ParticleData; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/particles/EventParticle.java b/LobbySystem/src/de/steamwar/lobby/particle/particles/EventParticle.java index a1d097fc..531e2051 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/particles/EventParticle.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/particles/EventParticle.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.particles; import de.steamwar.lobby.particle.ParticleData; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/particles/EventParticleParticipation.java b/LobbySystem/src/de/steamwar/lobby/particle/particles/EventParticleParticipation.java index 761aedaf..f599ac28 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/particles/EventParticleParticipation.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/particles/EventParticleParticipation.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.particles; import de.steamwar.lobby.particle.ParticleData; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/particles/EventParticlePlacement.java b/LobbySystem/src/de/steamwar/lobby/particle/particles/EventParticlePlacement.java index 678fe425..096d5d7b 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/particles/EventParticlePlacement.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/particles/EventParticlePlacement.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.particles; import de.steamwar.lobby.particle.ParticleData; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/particles/PlayerParticle.java b/LobbySystem/src/de/steamwar/lobby/particle/particles/PlayerParticle.java index bf421bea..21bd86ec 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/particles/PlayerParticle.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/particles/PlayerParticle.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.particles; import de.steamwar.lobby.particle.ParticleData; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/particles/RainCloudParticle.java b/LobbySystem/src/de/steamwar/lobby/particle/particles/RainCloudParticle.java index 85b495ff..a9da53e7 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/particles/RainCloudParticle.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/particles/RainCloudParticle.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.particles; import de.steamwar.lobby.particle.ParticleData; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/particles/ServerTeamParticle.java b/LobbySystem/src/de/steamwar/lobby/particle/particles/ServerTeamParticle.java index 0a7bc9d0..ec0d81da 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/particles/ServerTeamParticle.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/particles/ServerTeamParticle.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.particles; import de.steamwar.lobby.particle.ParticleData; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/particles/TeamParticle.java b/LobbySystem/src/de/steamwar/lobby/particle/particles/TeamParticle.java index ce20b77c..7cf3ef7d 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/particles/TeamParticle.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/particles/TeamParticle.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.particles; import de.steamwar.lobby.particle.ParticleData; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/particles/custom/CustomEasterParticle.java b/LobbySystem/src/de/steamwar/lobby/particle/particles/custom/CustomEasterParticle.java index da207081..3d8c704e 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/particles/custom/CustomEasterParticle.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/particles/custom/CustomEasterParticle.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.particles.custom; import de.steamwar.lobby.particle.*; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/particles/custom/CustomPlayerParticle.java b/LobbySystem/src/de/steamwar/lobby/particle/particles/custom/CustomPlayerParticle.java index 79c42b3b..f27da88c 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/particles/custom/CustomPlayerParticle.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/particles/custom/CustomPlayerParticle.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.particles.custom; import de.steamwar.lobby.particle.ParticleData; diff --git a/LobbySystem/src/de/steamwar/lobby/particle/particles/custom/CustomTeamParticle.java b/LobbySystem/src/de/steamwar/lobby/particle/particles/custom/CustomTeamParticle.java index 14b78595..6159aacb 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/particles/custom/CustomTeamParticle.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/particles/custom/CustomTeamParticle.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.particle.particles.custom; import de.steamwar.lobby.particle.ParticleData; diff --git a/LobbySystem/src/de/steamwar/lobby/portal/CommandPortal.java b/LobbySystem/src/de/steamwar/lobby/portal/CommandPortal.java index 36f7862a..7fd48595 100644 --- a/LobbySystem/src/de/steamwar/lobby/portal/CommandPortal.java +++ b/LobbySystem/src/de/steamwar/lobby/portal/CommandPortal.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.portal; @@ -60,7 +60,7 @@ public class CommandPortal implements PortalHandler { String[] pieces = new String[stackIds.length]; while (maxId > 0) { if(!stack.hasNext()) { - LobbySystem.getPlugin().getLogger().log(Level.WARNING, "Stackportal with missing elements: " + player.getName() + " /" + command); + LobbySystem.getInstance().getLogger().log(Level.WARNING, "Stackportal with missing elements: " + player.getName() + " /" + command); player.sendMessage("§cEigentlich solltest du gerade gar nicht durch dieses Portal durchgehen können..."); return; } diff --git a/LobbySystem/src/de/steamwar/lobby/portal/DummyPortal.java b/LobbySystem/src/de/steamwar/lobby/portal/DummyPortal.java index 9a761455..e586029f 100644 --- a/LobbySystem/src/de/steamwar/lobby/portal/DummyPortal.java +++ b/LobbySystem/src/de/steamwar/lobby/portal/DummyPortal.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.portal; diff --git a/LobbySystem/src/de/steamwar/lobby/portal/FightserverPortal.java b/LobbySystem/src/de/steamwar/lobby/portal/FightserverPortal.java index 7d82cfdc..85fd0d1c 100644 --- a/LobbySystem/src/de/steamwar/lobby/portal/FightserverPortal.java +++ b/LobbySystem/src/de/steamwar/lobby/portal/FightserverPortal.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.portal; @@ -234,7 +234,7 @@ public class FightserverPortal implements PortalHandler, Comparable. + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.portal; diff --git a/LobbySystem/src/de/steamwar/lobby/portal/PortalHandler.java b/LobbySystem/src/de/steamwar/lobby/portal/PortalHandler.java index 135fdd17..ecdca276 100644 --- a/LobbySystem/src/de/steamwar/lobby/portal/PortalHandler.java +++ b/LobbySystem/src/de/steamwar/lobby/portal/PortalHandler.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.portal; diff --git a/LobbySystem/src/de/steamwar/lobby/portal/PortalType.java b/LobbySystem/src/de/steamwar/lobby/portal/PortalType.java index db56dbb1..626aa900 100644 --- a/LobbySystem/src/de/steamwar/lobby/portal/PortalType.java +++ b/LobbySystem/src/de/steamwar/lobby/portal/PortalType.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.portal; diff --git a/LobbySystem/src/de/steamwar/lobby/portal/StackPortal.java b/LobbySystem/src/de/steamwar/lobby/portal/StackPortal.java index 500758af..3a1e13e1 100644 --- a/LobbySystem/src/de/steamwar/lobby/portal/StackPortal.java +++ b/LobbySystem/src/de/steamwar/lobby/portal/StackPortal.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.portal; diff --git a/LobbySystem/src/de/steamwar/lobby/portal/TeleportPortal.java b/LobbySystem/src/de/steamwar/lobby/portal/TeleportPortal.java index 9fa2443f..fb28a15d 100644 --- a/LobbySystem/src/de/steamwar/lobby/portal/TeleportPortal.java +++ b/LobbySystem/src/de/steamwar/lobby/portal/TeleportPortal.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.portal; @@ -70,7 +70,7 @@ public class TeleportPortal implements PortalHandler { private void teleport(Player player, Location from, Location to, Portal target) { if(target == null) { - LobbySystem.getPlugin().getLogger().log(Level.WARNING, "Portal with unknown target: " + portal.getId()); + LobbySystem.getInstance().getLogger().log(Level.WARNING, "Portal with unknown target: " + portal.getId()); player.sendMessage("§cAus unbekannten Gründen führt dieses Portal zurzeit in den Limbus"); return; } diff --git a/LobbySystem/src/de/steamwar/lobby/special/advent/AdventCommand.java b/LobbySystem/src/de/steamwar/lobby/special/advent/AdventCommand.java index 28b06419..e8d3c976 100644 --- a/LobbySystem/src/de/steamwar/lobby/special/advent/AdventCommand.java +++ b/LobbySystem/src/de/steamwar/lobby/special/advent/AdventCommand.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -23,6 +23,7 @@ import de.steamwar.command.SWCommand; import de.steamwar.inventory.SWInventory; import de.steamwar.inventory.SWItem; import de.steamwar.inventory.SWListInv; +import de.steamwar.linkage.Linked; import de.steamwar.lobby.LobbySystem; import de.steamwar.sql.NodeMember; import de.steamwar.sql.SchematicNode; @@ -34,6 +35,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Random; +@Linked public class AdventCommand extends SWCommand { public AdventCommand() { diff --git a/LobbySystem/src/de/steamwar/lobby/special/advent/AdventListener.java b/LobbySystem/src/de/steamwar/lobby/special/advent/AdventListener.java index 061d4ce3..d616e50c 100644 --- a/LobbySystem/src/de/steamwar/lobby/special/advent/AdventListener.java +++ b/LobbySystem/src/de/steamwar/lobby/special/advent/AdventListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -20,15 +20,17 @@ package de.steamwar.lobby.special.advent; import de.steamwar.inventory.SWItem; -import de.steamwar.lobby.listener.BasicListener; +import de.steamwar.linkage.Linked; import org.bukkit.Material; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.inventory.ItemStack; -public class AdventListener extends BasicListener { +@Linked +public class AdventListener implements Listener { public static final int ADVENT_SLOT = 7; public static final SWItem ADVENT = SWItem.getPlayerSkull("MHF_Present1"); diff --git a/LobbySystem/src/de/steamwar/lobby/special/advent/AdventsCalendar.java b/LobbySystem/src/de/steamwar/lobby/special/advent/AdventsCalendar.java index 43ae6af4..88c77a21 100644 --- a/LobbySystem/src/de/steamwar/lobby/special/advent/AdventsCalendar.java +++ b/LobbySystem/src/de/steamwar/lobby/special/advent/AdventsCalendar.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -35,15 +35,9 @@ public class AdventsCalendar { private static List presentList = new ArrayList<>(); - private static File file = new File(LobbySystem.getPlugin().getDataFolder(), "presents.yml"); + private static File file = new File(LobbySystem.getInstance().getDataFolder(), "presents.yml"); private static FileConfiguration fileConfiguration = YamlConfiguration.loadConfiguration(file); - public static void init() { - new AdventCommand(); - new AdventListener(); - new PresentClickListener(); - } - static { for (int i = 1; i <= 31; i++) { if (i > 24 && i < 31) continue; diff --git a/LobbySystem/src/de/steamwar/lobby/special/advent/Present.java b/LobbySystem/src/de/steamwar/lobby/special/advent/Present.java index 86884708..69d83468 100644 --- a/LobbySystem/src/de/steamwar/lobby/special/advent/Present.java +++ b/LobbySystem/src/de/steamwar/lobby/special/advent/Present.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -115,7 +115,7 @@ public class Present { locations.add(point); } generate(); - Bukkit.getScheduler().runTaskLater(LobbySystem.getPlugin(), () -> { + Bukkit.getScheduler().runTaskLater(LobbySystem.getInstance(), () -> { BlockData blockData = location.getBlock().getBlockData(); players.forEach(pl -> { if (pl == player) return; diff --git a/LobbySystem/src/de/steamwar/lobby/special/advent/PresentClickListener.java b/LobbySystem/src/de/steamwar/lobby/special/advent/PresentClickListener.java index 5e788980..927680e7 100644 --- a/LobbySystem/src/de/steamwar/lobby/special/advent/PresentClickListener.java +++ b/LobbySystem/src/de/steamwar/lobby/special/advent/PresentClickListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -19,18 +19,20 @@ package de.steamwar.lobby.special.advent; +import de.steamwar.linkage.Linked; import de.steamwar.lobby.LobbySystem; -import de.steamwar.lobby.listener.BasicListener; import de.steamwar.sql.NodeMember; import de.steamwar.sql.SteamwarUser; import org.bukkit.block.Block; import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerJoinEvent; import java.time.LocalDate; -public class PresentClickListener extends BasicListener { +@Linked +public class PresentClickListener implements Listener { @EventHandler public void onPlayerJoin(PlayerJoinEvent event) { diff --git a/LobbySystem/src/de/steamwar/lobby/special/easter/Egg.java b/LobbySystem/src/de/steamwar/lobby/special/easter/Egg.java index 206fd720..0d636541 100644 --- a/LobbySystem/src/de/steamwar/lobby/special/easter/Egg.java +++ b/LobbySystem/src/de/steamwar/lobby/special/easter/Egg.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.special.easter; import de.steamwar.inventory.SWItem; diff --git a/LobbySystem/src/de/steamwar/lobby/special/easter/EggClickListener.java b/LobbySystem/src/de/steamwar/lobby/special/easter/EggClickListener.java index 5b25c44e..6295ae6d 100644 --- a/LobbySystem/src/de/steamwar/lobby/special/easter/EggClickListener.java +++ b/LobbySystem/src/de/steamwar/lobby/special/easter/EggClickListener.java @@ -1,18 +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 . + */ + package de.steamwar.lobby.special.easter; import de.steamwar.lobby.LobbySystem; -import de.steamwar.lobby.listener.BasicListener; import de.steamwar.sql.UserConfig; +import org.bukkit.Bukkit; import org.bukkit.Particle; import org.bukkit.Sound; import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.util.Vector; -public class EggClickListener extends BasicListener { +public class EggClickListener implements Listener { + + public EggClickListener() { + Bukkit.getPluginManager().registerEvents(this, LobbySystem.getInstance()); + } @EventHandler public void onPlayerInteract(PlayerInteractEvent event) { diff --git a/LobbySystem/src/de/steamwar/lobby/special/easter/EggDifficulty.java b/LobbySystem/src/de/steamwar/lobby/special/easter/EggDifficulty.java index 6c86dcae..e0e066ce 100644 --- a/LobbySystem/src/de/steamwar/lobby/special/easter/EggDifficulty.java +++ b/LobbySystem/src/de/steamwar/lobby/special/easter/EggDifficulty.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.special.easter; public enum EggDifficulty { diff --git a/LobbySystem/src/de/steamwar/lobby/special/easter/EggHunt.java b/LobbySystem/src/de/steamwar/lobby/special/easter/EggHunt.java index 68f58efc..db94ffee 100644 --- a/LobbySystem/src/de/steamwar/lobby/special/easter/EggHunt.java +++ b/LobbySystem/src/de/steamwar/lobby/special/easter/EggHunt.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.special.easter; import de.steamwar.lobby.LobbySystem; @@ -22,7 +41,7 @@ public class EggHunt { } static { - File file = new File(LobbySystem.getPlugin().getDataFolder(), "eggs.yml"); + File file = new File(LobbySystem.getInstance().getDataFolder(), "eggs.yml"); FileConfiguration fileConfiguration = YamlConfiguration.loadConfiguration(file); fileConfiguration.getList("eggs") .forEach(o -> { diff --git a/LobbySystem/src/de/steamwar/lobby/special/easter/EggHuntCommand.java b/LobbySystem/src/de/steamwar/lobby/special/easter/EggHuntCommand.java index 93597bf5..64049821 100644 --- a/LobbySystem/src/de/steamwar/lobby/special/easter/EggHuntCommand.java +++ b/LobbySystem/src/de/steamwar/lobby/special/easter/EggHuntCommand.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.special.easter; import de.steamwar.command.SWCommand; diff --git a/LobbySystem/src/de/steamwar/lobby/special/easter/EggHuntListener.java b/LobbySystem/src/de/steamwar/lobby/special/easter/EggHuntListener.java index 92c903cf..688bd414 100644 --- a/LobbySystem/src/de/steamwar/lobby/special/easter/EggHuntListener.java +++ b/LobbySystem/src/de/steamwar/lobby/special/easter/EggHuntListener.java @@ -1,15 +1,40 @@ +/* + * 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 . + */ + package de.steamwar.lobby.special.easter; -import de.steamwar.lobby.listener.BasicListener; +import de.steamwar.lobby.LobbySystem; import de.steamwar.lobby.util.ItemBuilder; +import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.inventory.ItemStack; -public class EggHuntListener extends BasicListener { +public class EggHuntListener implements Listener { + + public EggHuntListener() { + Bukkit.getPluginManager().registerEvents(this, LobbySystem.getInstance()); + } public static final int EASTER_EGG_SLOT = 8; public static final ItemStack EASTER_HUNT = new ItemBuilder(Material.DRAGON_EGG, 1).setDisplayName("§fEaster Hunt").build(); diff --git a/LobbySystem/src/de/steamwar/lobby/team/TeamPlayer.java b/LobbySystem/src/de/steamwar/lobby/team/TeamPlayer.java index ce14aa04..8a294914 100644 --- a/LobbySystem/src/de/steamwar/lobby/team/TeamPlayer.java +++ b/LobbySystem/src/de/steamwar/lobby/team/TeamPlayer.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.team; +import de.steamwar.linkage.Linked; import de.steamwar.lobby.LobbySystem; import de.steamwar.lobby.display.NPC; -import de.steamwar.lobby.listener.BasicListener; import de.steamwar.sql.SteamwarUser; import lombok.AllArgsConstructor; import org.bukkit.Bukkit; @@ -32,6 +32,7 @@ import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.entity.Villager; import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.EntityInteractEvent; import org.bukkit.event.player.PlayerInteractEntityEvent; @@ -44,7 +45,8 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.logging.Level; import java.util.stream.Collectors; -public class TeamPlayer extends BasicListener { +@Linked +public class TeamPlayer implements Listener { private static final List cuboids = new ArrayList<>(); @@ -80,8 +82,8 @@ public class TeamPlayer extends BasicListener { }); AtomicInteger count = new AtomicInteger(); - LobbySystem.getPlugin().getLogger().log(Level.INFO, "Loaded " + entities.size() + " team players"); - Bukkit.getScheduler().runTaskTimer(LobbySystem.getPlugin(), () -> { + LobbySystem.getInstance().getLogger().log(Level.INFO, "Loaded " + entities.size() + " team players"); + Bukkit.getScheduler().runTaskTimer(LobbySystem.getInstance(), () -> { Collection active = world.getEntitiesByClass(Villager.class); if (active.size() > entities.size()) { Set duplicates = new HashSet<>(); @@ -109,7 +111,7 @@ public class TeamPlayer extends BasicListener { removed.incrementAndGet(); }); if (added.get() > 0 || removed.get() > 0) { - LobbySystem.getPlugin().getLogger().log(Level.INFO, "Loaded " + added.get() + " team players, removed " + removed.get() + " team players"); + LobbySystem.getInstance().getLogger().log(Level.INFO, "Loaded " + added.get() + " team players, removed " + removed.get() + " team players"); } } world.getEntitiesByClasses(Villager.class).forEach(entity -> { diff --git a/LobbySystem/src/de/steamwar/lobby/util/ItemBuilder.java b/LobbySystem/src/de/steamwar/lobby/util/ItemBuilder.java index 06e1cd83..562154e6 100644 --- a/LobbySystem/src/de/steamwar/lobby/util/ItemBuilder.java +++ b/LobbySystem/src/de/steamwar/lobby/util/ItemBuilder.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.util; diff --git a/LobbySystem/src/de/steamwar/lobby/util/Leaderboard.java b/LobbySystem/src/de/steamwar/lobby/util/Leaderboard.java index f3182a1c..68c9766a 100644 --- a/LobbySystem/src/de/steamwar/lobby/util/Leaderboard.java +++ b/LobbySystem/src/de/steamwar/lobby/util/Leaderboard.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.lobby.util; import de.steamwar.entity.RArmorStand; @@ -39,7 +58,7 @@ public class Leaderboard implements Listener { this.configKey = configKey; this.location = location; this.best = best; - Bukkit.getPluginManager().registerEvents(this, LobbySystem.getPlugin()); + Bukkit.getPluginManager().registerEvents(this, LobbySystem.getInstance()); update(); } diff --git a/LobbySystem/src/de/steamwar/lobby/util/LobbyPlayer.java b/LobbySystem/src/de/steamwar/lobby/util/LobbyPlayer.java index 2619af81..a98abfff 100644 --- a/LobbySystem/src/de/steamwar/lobby/util/LobbyPlayer.java +++ b/LobbySystem/src/de/steamwar/lobby/util/LobbyPlayer.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.lobby.util; diff --git a/MissileWars/build.gradle.kts b/MissileWars/build.gradle.kts index f393ea31..d5dffa66 100644 --- a/MissileWars/build.gradle.kts +++ b/MissileWars/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -27,6 +27,8 @@ java { } dependencies { + compileOnly(libs.classindex) + annotationProcessor(libs.classindex) compileOnly(project(":SpigotCore", "default")) compileOnly(libs.spigotapi) diff --git a/MissileWars/src/de/steamwar/misslewars/Config.java b/MissileWars/src/de/steamwar/misslewars/Config.java index 1838126c..b9ebc688 100644 --- a/MissileWars/src/de/steamwar/misslewars/Config.java +++ b/MissileWars/src/de/steamwar/misslewars/Config.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars; diff --git a/MissileWars/src/de/steamwar/misslewars/FightInfoPacketSender.java b/MissileWars/src/de/steamwar/misslewars/FightInfoPacketSender.java index ca58263f..a2bcd52e 100644 --- a/MissileWars/src/de/steamwar/misslewars/FightInfoPacketSender.java +++ b/MissileWars/src/de/steamwar/misslewars/FightInfoPacketSender.java @@ -1,22 +1,20 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2020 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 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. * - * 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 . - * / + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.misslewars; diff --git a/MissileWars/src/de/steamwar/misslewars/FightScoreboard.java b/MissileWars/src/de/steamwar/misslewars/FightScoreboard.java index ca217fe2..29ef61cf 100644 --- a/MissileWars/src/de/steamwar/misslewars/FightScoreboard.java +++ b/MissileWars/src/de/steamwar/misslewars/FightScoreboard.java @@ -1,24 +1,25 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars; +import de.steamwar.linkage.Linked; import de.steamwar.scoreboard.SWScoreboard; import de.steamwar.scoreboard.ScoreboardCallback; import org.bukkit.Bukkit; @@ -37,7 +38,8 @@ import java.util.Objects; /** * Modified Version of the Fight-System Scoreboard */ -class FightScoreboard implements Listener { +@Linked +public class FightScoreboard implements Listener { public FightScoreboard() { Bukkit.getPluginManager().registerEvents(this, MissileWars.getPlugin()); diff --git a/MissileWars/src/de/steamwar/misslewars/FightState.java b/MissileWars/src/de/steamwar/misslewars/FightState.java index d0210605..1ca74dc0 100644 --- a/MissileWars/src/de/steamwar/misslewars/FightState.java +++ b/MissileWars/src/de/steamwar/misslewars/FightState.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars; diff --git a/MissileWars/src/de/steamwar/misslewars/FightWorld.java b/MissileWars/src/de/steamwar/misslewars/FightWorld.java index 38dfab08..1187d840 100644 --- a/MissileWars/src/de/steamwar/misslewars/FightWorld.java +++ b/MissileWars/src/de/steamwar/misslewars/FightWorld.java @@ -1,22 +1,20 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2020 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 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. * - * 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 . - * / + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.misslewars; diff --git a/MissileWars/src/de/steamwar/misslewars/MWTeam.java b/MissileWars/src/de/steamwar/misslewars/MWTeam.java index b5ee7c51..88d9692d 100644 --- a/MissileWars/src/de/steamwar/misslewars/MWTeam.java +++ b/MissileWars/src/de/steamwar/misslewars/MWTeam.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars; diff --git a/MissileWars/src/de/steamwar/misslewars/MissileWars.java b/MissileWars/src/de/steamwar/misslewars/MissileWars.java index 2dab0597..3b9326e1 100644 --- a/MissileWars/src/de/steamwar/misslewars/MissileWars.java +++ b/MissileWars/src/de/steamwar/misslewars/MissileWars.java @@ -1,36 +1,28 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars; -import de.steamwar.misslewars.commands.AcceptCommand; -import de.steamwar.misslewars.commands.DeclineCommand; -import de.steamwar.misslewars.commands.InviteCommand; -import de.steamwar.misslewars.commands.SpectateCommand; -import de.steamwar.misslewars.countdowns.EndCountdown; -import de.steamwar.misslewars.countdowns.ItemCountdown; -import de.steamwar.misslewars.countdowns.WaitingCountdown; +import de.steamwar.linkage.AbstractLinker; +import de.steamwar.linkage.SpigotLinker; import de.steamwar.misslewars.items.CustomItem; import de.steamwar.misslewars.items.Missile; -import de.steamwar.misslewars.listener.*; -import de.steamwar.misslewars.listener.special.BarrierListener; -import de.steamwar.misslewars.listener.special.SpaceListener; import de.steamwar.misslewars.slowmo.SlowMoRunner; import de.steamwar.network.NetworkSender; import de.steamwar.network.packets.common.FightEndsPacket; @@ -63,37 +55,26 @@ public class MissileWars extends JavaPlugin { public void onEnable() { redTeam = new MWTeam(Config.TeamRedColor, Config.RedSpawn, Config.TeamRedName, Config.RedPortalZ); blueTeam = new MWTeam(Config.TeamBlueColor, Config.BlueSpawn, Config.TeamBlueName, Config.BluePortalZ); - new BreakListener(); - new DeathListener(); - new ItemListener(); - new ArenaListener(); - new ConnectionListener(); - new JoinListener(); - new EndListener(); - new PortalDestructListener(); - new WaitingListener(); - new FightListener(); - new ChatListener(); - new SpectateCommand(); - // Invitation Commands - new InviteCommand(); - new AcceptCommand(); - new DeclineCommand(); + SpigotLinker spigotLinker = new SpigotLinker(this, null) { + @Override + protected void linkObject(Object any) { + // No Init needed for MissileWars! + } + }; + try { + spigotLinker.link(); + } catch (AbstractLinker.LinkException e) { + e.printStackTrace(); + Bukkit.shutdown(); + return; + } - new WaitingCountdown(); - new ItemCountdown(); - new EndCountdown(); - - new FightScoreboard(); - Missile.init(); + Missile.init(); CustomItem.init(); StateDependent.setupState(fightState); - new BarrierListener(); - new SpaceListener(); - Bukkit.getScheduler().runTaskTimer(this, new FightInfoPacketSender(), 20, 20); Bukkit.getWorlds().forEach(world -> { diff --git a/MissileWars/src/de/steamwar/misslewars/SpawnPlatformCreator.java b/MissileWars/src/de/steamwar/misslewars/SpawnPlatformCreator.java index b9c222a1..4a0e3e7e 100644 --- a/MissileWars/src/de/steamwar/misslewars/SpawnPlatformCreator.java +++ b/MissileWars/src/de/steamwar/misslewars/SpawnPlatformCreator.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars; diff --git a/MissileWars/src/de/steamwar/misslewars/StateDependent.java b/MissileWars/src/de/steamwar/misslewars/StateDependent.java index 155d824d..d690756f 100644 --- a/MissileWars/src/de/steamwar/misslewars/StateDependent.java +++ b/MissileWars/src/de/steamwar/misslewars/StateDependent.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars; diff --git a/MissileWars/src/de/steamwar/misslewars/WinReasons.java b/MissileWars/src/de/steamwar/misslewars/WinReasons.java index ef52a173..a73d0dc1 100644 --- a/MissileWars/src/de/steamwar/misslewars/WinReasons.java +++ b/MissileWars/src/de/steamwar/misslewars/WinReasons.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars; diff --git a/MissileWars/src/de/steamwar/misslewars/commands/AcceptCommand.java b/MissileWars/src/de/steamwar/misslewars/commands/AcceptCommand.java index 60b4b056..835f7f21 100644 --- a/MissileWars/src/de/steamwar/misslewars/commands/AcceptCommand.java +++ b/MissileWars/src/de/steamwar/misslewars/commands/AcceptCommand.java @@ -1,33 +1,34 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2023 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 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. * - * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.misslewars.commands; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeValidator; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.Config; import de.steamwar.misslewars.MWTeam; import de.steamwar.misslewars.MissileWars; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +@Linked public class AcceptCommand extends SWCommand { public AcceptCommand() { diff --git a/MissileWars/src/de/steamwar/misslewars/commands/DeclineCommand.java b/MissileWars/src/de/steamwar/misslewars/commands/DeclineCommand.java index f0df4aa9..cabc72db 100644 --- a/MissileWars/src/de/steamwar/misslewars/commands/DeclineCommand.java +++ b/MissileWars/src/de/steamwar/misslewars/commands/DeclineCommand.java @@ -1,33 +1,34 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2023 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 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. * - * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.misslewars.commands; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeValidator; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.Config; import de.steamwar.misslewars.MWTeam; import de.steamwar.misslewars.MissileWars; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +@Linked public class DeclineCommand extends SWCommand { public DeclineCommand() { diff --git a/MissileWars/src/de/steamwar/misslewars/commands/InviteCommand.java b/MissileWars/src/de/steamwar/misslewars/commands/InviteCommand.java index b0925723..435b5ec3 100644 --- a/MissileWars/src/de/steamwar/misslewars/commands/InviteCommand.java +++ b/MissileWars/src/de/steamwar/misslewars/commands/InviteCommand.java @@ -1,21 +1,20 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2023 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 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. * - * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.misslewars.commands; @@ -24,6 +23,7 @@ import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeMapper; import de.steamwar.command.TypeValidator; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.Config; import de.steamwar.misslewars.MWTeam; import de.steamwar.misslewars.MissileWars; @@ -34,6 +34,7 @@ import org.bukkit.entity.Player; import java.util.Collection; import java.util.stream.Collectors; +@Linked public class InviteCommand extends SWCommand { public InviteCommand() { diff --git a/MissileWars/src/de/steamwar/misslewars/commands/SpectateCommand.java b/MissileWars/src/de/steamwar/misslewars/commands/SpectateCommand.java index f70fb063..ee2f0434 100644 --- a/MissileWars/src/de/steamwar/misslewars/commands/SpectateCommand.java +++ b/MissileWars/src/de/steamwar/misslewars/commands/SpectateCommand.java @@ -1,27 +1,27 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2023 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 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. * - * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.misslewars.commands; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeValidator; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.Config; import de.steamwar.misslewars.MWTeam; import de.steamwar.misslewars.MissileWars; @@ -29,6 +29,7 @@ import org.bukkit.GameMode; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +@Linked public class SpectateCommand extends SWCommand { public SpectateCommand() { diff --git a/MissileWars/src/de/steamwar/misslewars/countdowns/EndCountdown.java b/MissileWars/src/de/steamwar/misslewars/countdowns/EndCountdown.java index f2d3183b..b83f7978 100644 --- a/MissileWars/src/de/steamwar/misslewars/countdowns/EndCountdown.java +++ b/MissileWars/src/de/steamwar/misslewars/countdowns/EndCountdown.java @@ -1,24 +1,25 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars.countdowns; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.*; import de.steamwar.misslewars.listener.JoinListener; import org.bukkit.Bukkit; @@ -26,6 +27,7 @@ import org.bukkit.scheduler.BukkitTask; import java.util.EnumSet; +@Linked public class EndCountdown extends StateDependent { private BukkitTask task; diff --git a/MissileWars/src/de/steamwar/misslewars/countdowns/ItemCountdown.java b/MissileWars/src/de/steamwar/misslewars/countdowns/ItemCountdown.java index 5270934d..df520900 100644 --- a/MissileWars/src/de/steamwar/misslewars/countdowns/ItemCountdown.java +++ b/MissileWars/src/de/steamwar/misslewars/countdowns/ItemCountdown.java @@ -1,24 +1,25 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars.countdowns; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.Config; import de.steamwar.misslewars.FightState; import de.steamwar.misslewars.MissileWars; @@ -30,6 +31,7 @@ import org.bukkit.scheduler.BukkitTask; import java.util.EnumSet; +@Linked public class ItemCountdown extends StateDependent { private BukkitTask task; diff --git a/MissileWars/src/de/steamwar/misslewars/countdowns/WaitingCountdown.java b/MissileWars/src/de/steamwar/misslewars/countdowns/WaitingCountdown.java index 57c85f77..31610639 100644 --- a/MissileWars/src/de/steamwar/misslewars/countdowns/WaitingCountdown.java +++ b/MissileWars/src/de/steamwar/misslewars/countdowns/WaitingCountdown.java @@ -1,24 +1,25 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars.countdowns; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.Config; import de.steamwar.misslewars.FightState; import de.steamwar.misslewars.MissileWars; @@ -28,6 +29,7 @@ import org.bukkit.scheduler.BukkitTask; import java.util.EnumSet; +@Linked public class WaitingCountdown extends StateDependent { private BukkitTask task; diff --git a/MissileWars/src/de/steamwar/misslewars/items/CustomItem.java b/MissileWars/src/de/steamwar/misslewars/items/CustomItem.java index 51c689b8..37d966c6 100644 --- a/MissileWars/src/de/steamwar/misslewars/items/CustomItem.java +++ b/MissileWars/src/de/steamwar/misslewars/items/CustomItem.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.misslewars.items; diff --git a/MissileWars/src/de/steamwar/misslewars/items/Missile.java b/MissileWars/src/de/steamwar/misslewars/items/Missile.java index 6e648e49..d89448e0 100644 --- a/MissileWars/src/de/steamwar/misslewars/items/Missile.java +++ b/MissileWars/src/de/steamwar/misslewars/items/Missile.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars.items; diff --git a/MissileWars/src/de/steamwar/misslewars/items/SpecialItem.java b/MissileWars/src/de/steamwar/misslewars/items/SpecialItem.java index a287958b..b2ba547e 100644 --- a/MissileWars/src/de/steamwar/misslewars/items/SpecialItem.java +++ b/MissileWars/src/de/steamwar/misslewars/items/SpecialItem.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars.items; diff --git a/MissileWars/src/de/steamwar/misslewars/listener/ArenaListener.java b/MissileWars/src/de/steamwar/misslewars/listener/ArenaListener.java index 4d7a7ecc..407dd569 100644 --- a/MissileWars/src/de/steamwar/misslewars/listener/ArenaListener.java +++ b/MissileWars/src/de/steamwar/misslewars/listener/ArenaListener.java @@ -1,24 +1,25 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars.listener; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.Config; import de.steamwar.misslewars.FightState; import de.steamwar.misslewars.MWTeam; @@ -40,6 +41,7 @@ import java.util.EnumSet; import java.util.Map; import java.util.Objects; +@Linked public class ArenaListener extends BasicListener { public ArenaListener() { diff --git a/MissileWars/src/de/steamwar/misslewars/listener/BasicListener.java b/MissileWars/src/de/steamwar/misslewars/listener/BasicListener.java index b210216e..bb68fc0b 100644 --- a/MissileWars/src/de/steamwar/misslewars/listener/BasicListener.java +++ b/MissileWars/src/de/steamwar/misslewars/listener/BasicListener.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars.listener; diff --git a/MissileWars/src/de/steamwar/misslewars/listener/BreakListener.java b/MissileWars/src/de/steamwar/misslewars/listener/BreakListener.java index bbaf1a65..dba70e8d 100644 --- a/MissileWars/src/de/steamwar/misslewars/listener/BreakListener.java +++ b/MissileWars/src/de/steamwar/misslewars/listener/BreakListener.java @@ -1,32 +1,32 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2020 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 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. * - * 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 . - * / + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.misslewars.listener; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.FightState; import org.bukkit.event.EventHandler; import org.bukkit.event.block.BlockBreakEvent; import java.util.EnumSet; +@Linked public class BreakListener extends BasicListener { public BreakListener() { diff --git a/MissileWars/src/de/steamwar/misslewars/listener/ChatListener.java b/MissileWars/src/de/steamwar/misslewars/listener/ChatListener.java index 3e039b7b..28f8b8bc 100644 --- a/MissileWars/src/de/steamwar/misslewars/listener/ChatListener.java +++ b/MissileWars/src/de/steamwar/misslewars/listener/ChatListener.java @@ -1,24 +1,25 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars.listener; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.FightState; import de.steamwar.misslewars.MWTeam; import de.steamwar.misslewars.MissileWars; @@ -29,6 +30,7 @@ import org.bukkit.event.player.AsyncPlayerChatEvent; import java.util.EnumSet; +@Linked public class ChatListener extends BasicListener { public ChatListener() { diff --git a/MissileWars/src/de/steamwar/misslewars/listener/ConnectionListener.java b/MissileWars/src/de/steamwar/misslewars/listener/ConnectionListener.java index dab36fa4..6bbec6a2 100644 --- a/MissileWars/src/de/steamwar/misslewars/listener/ConnectionListener.java +++ b/MissileWars/src/de/steamwar/misslewars/listener/ConnectionListener.java @@ -1,24 +1,25 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars.listener; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.Config; import de.steamwar.misslewars.FightState; import de.steamwar.misslewars.MWTeam; @@ -32,6 +33,7 @@ import org.bukkit.event.player.PlayerQuitEvent; import java.util.EnumSet; +@Linked public class ConnectionListener extends BasicListener{ public ConnectionListener(){ diff --git a/MissileWars/src/de/steamwar/misslewars/listener/DeathListener.java b/MissileWars/src/de/steamwar/misslewars/listener/DeathListener.java index 5e77523a..191845f1 100644 --- a/MissileWars/src/de/steamwar/misslewars/listener/DeathListener.java +++ b/MissileWars/src/de/steamwar/misslewars/listener/DeathListener.java @@ -1,24 +1,25 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars.listener; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.FightState; import de.steamwar.misslewars.MWTeam; import de.steamwar.misslewars.MissileWars; @@ -38,6 +39,7 @@ import java.util.EnumSet; import java.util.HashSet; import java.util.Set; +@Linked public class DeathListener extends BasicListener { private static final Vector ZERO = new Vector(0, 0, 0); diff --git a/MissileWars/src/de/steamwar/misslewars/listener/EndListener.java b/MissileWars/src/de/steamwar/misslewars/listener/EndListener.java index 14833544..4dea27d4 100644 --- a/MissileWars/src/de/steamwar/misslewars/listener/EndListener.java +++ b/MissileWars/src/de/steamwar/misslewars/listener/EndListener.java @@ -1,24 +1,25 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars.listener; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.FightState; import org.bukkit.GameMode; import org.bukkit.event.EventHandler; @@ -26,6 +27,7 @@ import org.bukkit.event.player.PlayerJoinEvent; import java.util.EnumSet; +@Linked public class EndListener extends BasicListener { public EndListener(){ diff --git a/MissileWars/src/de/steamwar/misslewars/listener/FightListener.java b/MissileWars/src/de/steamwar/misslewars/listener/FightListener.java index 7ed369f8..552493d8 100644 --- a/MissileWars/src/de/steamwar/misslewars/listener/FightListener.java +++ b/MissileWars/src/de/steamwar/misslewars/listener/FightListener.java @@ -1,24 +1,25 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars.listener; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.FightState; import de.steamwar.misslewars.MissileWars; import org.bukkit.entity.Player; @@ -27,6 +28,7 @@ import org.bukkit.event.entity.EntityDamageByEntityEvent; import java.util.EnumSet; +@Linked public class FightListener extends BasicListener { public FightListener() { diff --git a/MissileWars/src/de/steamwar/misslewars/listener/ItemListener.java b/MissileWars/src/de/steamwar/misslewars/listener/ItemListener.java index 4856dc17..3c0bcbd1 100644 --- a/MissileWars/src/de/steamwar/misslewars/listener/ItemListener.java +++ b/MissileWars/src/de/steamwar/misslewars/listener/ItemListener.java @@ -1,24 +1,25 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars.listener; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.FightState; import de.steamwar.misslewars.MWTeam; import de.steamwar.misslewars.MissileWars; @@ -39,6 +40,7 @@ import java.util.EnumSet; import java.util.HashSet; import java.util.Set; +@Linked public class ItemListener extends BasicListener { private Set RED_ITEMS = new HashSet<>(); diff --git a/MissileWars/src/de/steamwar/misslewars/listener/JoinListener.java b/MissileWars/src/de/steamwar/misslewars/listener/JoinListener.java index 5947da8f..1cd327ea 100644 --- a/MissileWars/src/de/steamwar/misslewars/listener/JoinListener.java +++ b/MissileWars/src/de/steamwar/misslewars/listener/JoinListener.java @@ -1,24 +1,25 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars.listener; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.Config; import de.steamwar.misslewars.FightState; import de.steamwar.misslewars.MissileWars; @@ -30,6 +31,7 @@ import org.bukkit.event.player.PlayerJoinEvent; import java.util.EnumSet; +@Linked public class JoinListener extends BasicListener { public JoinListener(){ diff --git a/MissileWars/src/de/steamwar/misslewars/listener/PortalDestructListener.java b/MissileWars/src/de/steamwar/misslewars/listener/PortalDestructListener.java index c235ff35..a66f0426 100644 --- a/MissileWars/src/de/steamwar/misslewars/listener/PortalDestructListener.java +++ b/MissileWars/src/de/steamwar/misslewars/listener/PortalDestructListener.java @@ -1,24 +1,25 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars.listener; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.Config; import de.steamwar.misslewars.FightState; import de.steamwar.misslewars.MissileWars; @@ -31,6 +32,7 @@ import org.bukkit.event.entity.EntityExplodeEvent; import java.util.EnumSet; +@Linked public class PortalDestructListener extends BasicListener { public PortalDestructListener(){ diff --git a/MissileWars/src/de/steamwar/misslewars/listener/WaitingListener.java b/MissileWars/src/de/steamwar/misslewars/listener/WaitingListener.java index 1180edc3..e2395f28 100644 --- a/MissileWars/src/de/steamwar/misslewars/listener/WaitingListener.java +++ b/MissileWars/src/de/steamwar/misslewars/listener/WaitingListener.java @@ -1,24 +1,25 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.misslewars.listener; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.FightState; import org.bukkit.Bukkit; import org.bukkit.event.EventHandler; @@ -27,6 +28,7 @@ import org.bukkit.event.player.PlayerQuitEvent; import java.util.EnumSet; +@Linked public class WaitingListener extends BasicListener { public WaitingListener() { super(EnumSet.of(FightState.WAITING)); diff --git a/MissileWars/src/de/steamwar/misslewars/listener/special/BarrierListener.java b/MissileWars/src/de/steamwar/misslewars/listener/special/BarrierListener.java index 5220778c..63e07e3e 100644 --- a/MissileWars/src/de/steamwar/misslewars/listener/special/BarrierListener.java +++ b/MissileWars/src/de/steamwar/misslewars/listener/special/BarrierListener.java @@ -1,26 +1,25 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2020 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 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. * - * 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 . - * / + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.misslewars.listener.special; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.Config; import de.steamwar.misslewars.FightState; import de.steamwar.misslewars.listener.BasicListener; @@ -31,6 +30,7 @@ import org.bukkit.event.block.BlockPhysicsEvent; import java.util.EnumSet; +@Linked public class BarrierListener extends BasicListener { public BarrierListener() { diff --git a/MissileWars/src/de/steamwar/misslewars/listener/special/SpaceListener.java b/MissileWars/src/de/steamwar/misslewars/listener/special/SpaceListener.java index 654811ab..7d3ff5a9 100644 --- a/MissileWars/src/de/steamwar/misslewars/listener/special/SpaceListener.java +++ b/MissileWars/src/de/steamwar/misslewars/listener/special/SpaceListener.java @@ -1,26 +1,25 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2020 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 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. * - * 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 . - * / + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.misslewars.listener.special; +import de.steamwar.linkage.Linked; import de.steamwar.misslewars.Config; import de.steamwar.misslewars.FightState; import de.steamwar.misslewars.MissileWars; @@ -38,6 +37,7 @@ import org.bukkit.util.Vector; import java.util.EnumSet; +@Linked public class SpaceListener extends BasicListener { public SpaceListener() { diff --git a/MissileWars/src/de/steamwar/misslewars/scripts/RunnableScript.java b/MissileWars/src/de/steamwar/misslewars/scripts/RunnableScript.java index 5328bc31..4688f895 100644 --- a/MissileWars/src/de/steamwar/misslewars/scripts/RunnableScript.java +++ b/MissileWars/src/de/steamwar/misslewars/scripts/RunnableScript.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.misslewars.scripts; diff --git a/MissileWars/src/de/steamwar/misslewars/scripts/RunnableScriptEvent.java b/MissileWars/src/de/steamwar/misslewars/scripts/RunnableScriptEvent.java index 8459f559..56b2b944 100644 --- a/MissileWars/src/de/steamwar/misslewars/scripts/RunnableScriptEvent.java +++ b/MissileWars/src/de/steamwar/misslewars/scripts/RunnableScriptEvent.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.misslewars.scripts; diff --git a/MissileWars/src/de/steamwar/misslewars/scripts/Script.java b/MissileWars/src/de/steamwar/misslewars/scripts/Script.java index 095dfaf3..fc7e844d 100644 --- a/MissileWars/src/de/steamwar/misslewars/scripts/Script.java +++ b/MissileWars/src/de/steamwar/misslewars/scripts/Script.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.misslewars.scripts; diff --git a/MissileWars/src/de/steamwar/misslewars/scripts/ScriptedItem.java b/MissileWars/src/de/steamwar/misslewars/scripts/ScriptedItem.java index 4e1587d6..e1da0a8d 100644 --- a/MissileWars/src/de/steamwar/misslewars/scripts/ScriptedItem.java +++ b/MissileWars/src/de/steamwar/misslewars/scripts/ScriptedItem.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.misslewars.scripts; diff --git a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/CooldownScript.java b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/CooldownScript.java index 9b6dfcf5..dbf2697c 100644 --- a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/CooldownScript.java +++ b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/CooldownScript.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.misslewars.scripts.implemented; import com.google.gson.JsonObject; diff --git a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/DelayScript.java b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/DelayScript.java index f77b985a..5388f207 100644 --- a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/DelayScript.java +++ b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/DelayScript.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.misslewars.scripts.implemented; diff --git a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/FilterScript.java b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/FilterScript.java index 4cf250c9..041f3e63 100644 --- a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/FilterScript.java +++ b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/FilterScript.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.misslewars.scripts.implemented; diff --git a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/LaunchScript.java b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/LaunchScript.java index 83b44edf..e6aa41ca 100644 --- a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/LaunchScript.java +++ b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/LaunchScript.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.misslewars.scripts.implemented; diff --git a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/LocationScript.java b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/LocationScript.java index 1fb272ed..2e3c72b0 100644 --- a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/LocationScript.java +++ b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/LocationScript.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.misslewars.scripts.implemented; diff --git a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/PasteScript.java b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/PasteScript.java index db1b2cb4..79d9ef5e 100644 --- a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/PasteScript.java +++ b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/PasteScript.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.misslewars.scripts.implemented; diff --git a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/PotionScript.java b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/PotionScript.java index 34777dce..890553ee 100644 --- a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/PotionScript.java +++ b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/PotionScript.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.misslewars.scripts.implemented; diff --git a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/RandomPlayerScript.java b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/RandomPlayerScript.java index 240c5a24..bd0af11d 100644 --- a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/RandomPlayerScript.java +++ b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/RandomPlayerScript.java @@ -1,22 +1,20 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2020 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 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. * - * 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 . - * / + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.misslewars.scripts.implemented; diff --git a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/RemoveScript.java b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/RemoveScript.java index ede587ed..ab13ef19 100644 --- a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/RemoveScript.java +++ b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/RemoveScript.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.misslewars.scripts.implemented; diff --git a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/SlowMoScript.java b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/SlowMoScript.java index 54587fdf..5a657fb9 100644 --- a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/SlowMoScript.java +++ b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/SlowMoScript.java @@ -1,22 +1,20 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2020 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 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. * - * 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 . - * / + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.misslewars.scripts.implemented; diff --git a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/SoundScript.java b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/SoundScript.java index 32e40bb3..98d376c6 100644 --- a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/SoundScript.java +++ b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/SoundScript.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.misslewars.scripts.implemented; diff --git a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/SummonScript.java b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/SummonScript.java index a85ea3a6..8e1ac0c1 100644 --- a/MissileWars/src/de/steamwar/misslewars/scripts/implemented/SummonScript.java +++ b/MissileWars/src/de/steamwar/misslewars/scripts/implemented/SummonScript.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.misslewars.scripts.implemented; diff --git a/MissileWars/src/de/steamwar/misslewars/scripts/utils/EntityUtils.java b/MissileWars/src/de/steamwar/misslewars/scripts/utils/EntityUtils.java index 823751ee..101dd08c 100644 --- a/MissileWars/src/de/steamwar/misslewars/scripts/utils/EntityUtils.java +++ b/MissileWars/src/de/steamwar/misslewars/scripts/utils/EntityUtils.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.misslewars.scripts.utils; diff --git a/MissileWars/src/de/steamwar/misslewars/scripts/utils/JsonUtils.java b/MissileWars/src/de/steamwar/misslewars/scripts/utils/JsonUtils.java index f0a703ad..4fc888c8 100644 --- a/MissileWars/src/de/steamwar/misslewars/scripts/utils/JsonUtils.java +++ b/MissileWars/src/de/steamwar/misslewars/scripts/utils/JsonUtils.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.misslewars.scripts.utils; import com.google.gson.JsonObject; diff --git a/MissileWars/src/de/steamwar/misslewars/slowmo/SlowMoRunner.java b/MissileWars/src/de/steamwar/misslewars/slowmo/SlowMoRunner.java index 7a637d5c..739a24d1 100644 --- a/MissileWars/src/de/steamwar/misslewars/slowmo/SlowMoRunner.java +++ b/MissileWars/src/de/steamwar/misslewars/slowmo/SlowMoRunner.java @@ -1,22 +1,20 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2020 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 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. * - * 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 . - * / + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.misslewars.slowmo; diff --git a/MissileWars/src/de/steamwar/misslewars/slowmo/SlowMoUtils.java b/MissileWars/src/de/steamwar/misslewars/slowmo/SlowMoUtils.java index 01e55c37..4630784d 100644 --- a/MissileWars/src/de/steamwar/misslewars/slowmo/SlowMoUtils.java +++ b/MissileWars/src/de/steamwar/misslewars/slowmo/SlowMoUtils.java @@ -1,22 +1,20 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2020 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 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. * - * 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 . - * / + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.misslewars.slowmo; diff --git a/Realtime/build.gradle.kts b/Realtime/build.gradle.kts index ebde1d0a..df761ff0 100644 --- a/Realtime/build.gradle.kts +++ b/Realtime/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/Realtime/src/de/steamwar/realtime/Config.java b/Realtime/src/de/steamwar/realtime/Config.java index e39cef02..3d49ec88 100644 --- a/Realtime/src/de/steamwar/realtime/Config.java +++ b/Realtime/src/de/steamwar/realtime/Config.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.realtime; diff --git a/Realtime/src/de/steamwar/realtime/Realtime.java b/Realtime/src/de/steamwar/realtime/Realtime.java index cb2492ef..7a92152d 100644 --- a/Realtime/src/de/steamwar/realtime/Realtime.java +++ b/Realtime/src/de/steamwar/realtime/Realtime.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.realtime; diff --git a/SchematicSystem/SchematicSystem_15/build.gradle.kts b/SchematicSystem/SchematicSystem_15/build.gradle.kts index df407384..281e62fc 100644 --- a/SchematicSystem/SchematicSystem_15/build.gradle.kts +++ b/SchematicSystem/SchematicSystem_15/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SchematicSystem/SchematicSystem_15/src/de/steamwar/schematicsystem/autocheck/AutoChecker15.java b/SchematicSystem/SchematicSystem_15/src/de/steamwar/schematicsystem/autocheck/AutoChecker15.java index a97cb133..d6189931 100644 --- a/SchematicSystem/SchematicSystem_15/src/de/steamwar/schematicsystem/autocheck/AutoChecker15.java +++ b/SchematicSystem/SchematicSystem_15/src/de/steamwar/schematicsystem/autocheck/AutoChecker15.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.autocheck; @@ -24,7 +24,9 @@ import com.sk89q.worldedit.entity.Entity; import com.sk89q.worldedit.extent.clipboard.Clipboard; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BaseBlock; -import de.steamwar.schematicsystem.CheckSchemType; +import de.steamwar.core.Core; +import de.steamwar.sql.GameModeConfig; +import de.steamwar.sql.SchematicType; import org.bukkit.Material; import java.util.*; @@ -108,7 +110,7 @@ public class AutoChecker15 implements AutoChecker.IAutoChecker { if (!itemsInInv.getOrDefault(itemType, EnumSet.noneOf(Material.class)).contains(material)) { result.getForbiddenItems().computeIfAbsent(pos, blockVector3 -> new HashSet<>()).add(itemType); } else if(material == Material.DISPENSER && (itemType == Material.ARROW || itemType == Material.FIRE_CHARGE)) { - counter += item.getByte("Count"); + counter += Core.getVersion() >= 21 ? item.getInt("count") : item.getByte("Count"); } if (item.containsKey("tag")) { result.getForbiddenNbt().computeIfAbsent(pos, blockVector3 -> new HashSet<>()).add(itemType); @@ -118,7 +120,7 @@ public class AutoChecker15 implements AutoChecker.IAutoChecker { } @Override - public AutoCheckerResult check(Clipboard clipboard, CheckSchemType type) { + public AutoCheckerResult check(Clipboard clipboard, GameModeConfig type) { return AutoCheckerResult.builder() .type(type) .height(clipboard.getDimensions().getBlockY()) @@ -130,7 +132,7 @@ public class AutoChecker15 implements AutoChecker.IAutoChecker { } @Override - public AutoCheckerResult sizeCheck(Clipboard clipboard, CheckSchemType type) { + public AutoCheckerResult sizeCheck(Clipboard clipboard, GameModeConfig type) { return AutoCheckerResult.builder() .type(type) .height(clipboard.getDimensions().getBlockY()) diff --git a/SchematicSystem/SchematicSystem_15/src/de/steamwar/schematicsystem/autocheck/AutoCheckerItems15.java b/SchematicSystem/SchematicSystem_15/src/de/steamwar/schematicsystem/autocheck/AutoCheckerItems15.java index ee3f2827..0a04e8b2 100644 --- a/SchematicSystem/SchematicSystem_15/src/de/steamwar/schematicsystem/autocheck/AutoCheckerItems15.java +++ b/SchematicSystem/SchematicSystem_15/src/de/steamwar/schematicsystem/autocheck/AutoCheckerItems15.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.schematicsystem.autocheck; diff --git a/SchematicSystem/SchematicSystem_15/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommand15.java b/SchematicSystem/SchematicSystem_15/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommand15.java index 47f58a58..05036a9a 100644 --- a/SchematicSystem/SchematicSystem_15/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommand15.java +++ b/SchematicSystem/SchematicSystem_15/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommand15.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.commands.schematiccommand; @@ -31,18 +31,27 @@ import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockTypes; -import de.steamwar.schematicsystem.CheckSchemType; +import de.steamwar.core.Core; +import de.steamwar.sql.GameModeConfig; import de.steamwar.schematicsystem.autocheck.AutoCheckerResult; import de.steamwar.schematicsystem.autocheck.BlockPos; -import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommand; +import de.steamwar.sql.SchematicType; import org.bukkit.Material; import java.util.*; +import java.util.function.BiConsumer; +import java.util.function.BiFunction; +import java.util.function.Function; import java.util.stream.Collectors; public class SchematicCommand15 implements SchematicCommand.ISchematicCommand { + private static final Function getCount = item -> Core.getVersion() >= 21 ? item.getInt("count") : item.getByte("Count"); + private static final BiFunction setCount = (item, count) -> Core.getVersion() >= 21 ? + item.createBuilder().putInt("count", count).build() : + item.createBuilder().putByte("Count", count.byteValue()).build(); + @Override - public Clipboard fixClipboard(Clipboard clipboard, AutoCheckerResult result, CheckSchemType type) throws Exception { + public Clipboard fixClipboard(Clipboard clipboard, AutoCheckerResult result, GameModeConfig type) throws Exception { for (BlockPos blockPos : result.getBlockScanResult().getRecords()) { BlockVector3 vector = BlockVector3.at(blockPos.getX(), blockPos.getY(), blockPos.getZ()); clipboard.setBlock(vector, clipboard.getFullBlock(vector).toBaseBlock(new CompoundTag(Collections.emptyMap()))); @@ -76,9 +85,9 @@ public class SchematicCommand15 implements SchematicCommand.ISchematicCommand { clipboard.setBlock(vector, block.toBaseBlock(builder.build())); } - if(type.getMaxDispenserItems() > 0 ) { + if(type.Schematic.MaxDispenserItems > 0 ) { for (Map.Entry entry : result.getBlockScanResult().getDispenserItems().entrySet()) { - if(entry.getValue() <= type.getMaxDispenserItems()) { + if(entry.getValue() <= type.Schematic.MaxDispenserItems) { continue; } @@ -87,10 +96,10 @@ public class SchematicCommand15 implements SchematicCommand.ISchematicCommand { BaseBlock block = clipboard.getFullBlock(vector); CompoundTag tag = block.getNbtData(); CompoundTagBuilder builder = tag.createBuilder(); - List items = tag.getList("Items", CompoundTag.class); + List items = new ArrayList<>(tag.getList("Items", CompoundTag.class)); Collections.reverse(items); // To let the first item be in the Dispenser List list = new ArrayList<>(); - int diff = entry.getValue() - type.getMaxDispenserItems(); + int diff = entry.getValue() - type.Schematic.MaxDispenserItems; for (CompoundTag item : items) { if(item == null) { continue; @@ -101,12 +110,12 @@ public class SchematicCommand15 implements SchematicCommand.ISchematicCommand { continue; } - if(diff > item.getByte("Count")) { - diff -= item.getByte("Count"); + if(diff > getCount.apply(item)) { + diff -= getCount.apply(item); continue; } - item = item.createBuilder().putByte("Count", (byte) (item.getByte("Count") - diff)).build(); + item = setCount.apply(item, getCount.apply(item) - diff); diff = 0; list.add(item); } @@ -117,10 +126,9 @@ public class SchematicCommand15 implements SchematicCommand.ISchematicCommand { } if(!result.isLimitedBlocksOK()) { - Set toReplace = type.getLimits().entrySet().stream() + Set toReplace = type.Schematic.Limited.entrySet().stream() .filter(setIntegerEntry -> setIntegerEntry.getValue() == 0) .flatMap(setIntegerEntry -> setIntegerEntry.getKey().stream()) - .map(Material::matchMaterial) .collect(Collectors.toSet()); BlockState replaceType = Objects.requireNonNull(toReplace.contains(Material.END_STONE) ? BlockTypes.IRON_BLOCK : BlockTypes.END_STONE).getDefaultState(); BlockVector3 min = clipboard.getMinimumPoint(); diff --git a/SchematicSystem/SchematicSystem_19/build.gradle.kts b/SchematicSystem/SchematicSystem_19/build.gradle.kts index 38fcd471..0536403a 100644 --- a/SchematicSystem/SchematicSystem_19/build.gradle.kts +++ b/SchematicSystem/SchematicSystem_19/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2025 SteamWar.de-Serverteam + * 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 diff --git a/SchematicSystem/SchematicSystem_19/src/de/steamwar/schematicsystem/autocheck/AutoCheckerItems19.java b/SchematicSystem/SchematicSystem_19/src/de/steamwar/schematicsystem/autocheck/AutoCheckerItems19.java index 7aaa26b9..c23ad924 100644 --- a/SchematicSystem/SchematicSystem_19/src/de/steamwar/schematicsystem/autocheck/AutoCheckerItems19.java +++ b/SchematicSystem/SchematicSystem_19/src/de/steamwar/schematicsystem/autocheck/AutoCheckerItems19.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.schematicsystem.autocheck; diff --git a/SchematicSystem/SchematicSystem_8/build.gradle.kts b/SchematicSystem/SchematicSystem_8/build.gradle.kts index 5f0f9c62..77bba6f4 100644 --- a/SchematicSystem/SchematicSystem_8/build.gradle.kts +++ b/SchematicSystem/SchematicSystem_8/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SchematicSystem/SchematicSystem_8/src/de/steamwar/schematicsystem/autocheck/AutoChecker8.java b/SchematicSystem/SchematicSystem_8/src/de/steamwar/schematicsystem/autocheck/AutoChecker8.java index 1dbc8e44..c98b136a 100644 --- a/SchematicSystem/SchematicSystem_8/src/de/steamwar/schematicsystem/autocheck/AutoChecker8.java +++ b/SchematicSystem/SchematicSystem_8/src/de/steamwar/schematicsystem/autocheck/AutoChecker8.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.autocheck; @@ -25,7 +25,8 @@ import com.sk89q.worldedit.blocks.BaseBlock; import com.sk89q.worldedit.entity.Entity; import com.sk89q.worldedit.extent.clipboard.Clipboard; import com.sk89q.worldedit.regions.Region; -import de.steamwar.schematicsystem.CheckSchemType; +import de.steamwar.sql.GameModeConfig; +import de.steamwar.sql.SchematicType; import org.bukkit.Material; import java.util.*; @@ -148,7 +149,7 @@ public class AutoChecker8 implements AutoChecker.IAutoChecker { } @Override - public AutoCheckerResult check(Clipboard clipboard, CheckSchemType type) { + public AutoCheckerResult check(Clipboard clipboard, GameModeConfig type) { AutoChecker.BlockScanResult blockScanResult = new AutoChecker.BlockScanResult(); scan(blockScanResult, clipboard); @@ -163,7 +164,7 @@ public class AutoChecker8 implements AutoChecker.IAutoChecker { } @Override - public AutoCheckerResult sizeCheck(Clipboard clipboard, CheckSchemType type) { + public AutoCheckerResult sizeCheck(Clipboard clipboard, GameModeConfig type) { return AutoCheckerResult.builder() .type(type) .height(clipboard.getDimensions().getBlockY()) diff --git a/SchematicSystem/SchematicSystem_8/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommand8.java b/SchematicSystem/SchematicSystem_8/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommand8.java index ad38643a..e873ea49 100644 --- a/SchematicSystem/SchematicSystem_8/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommand8.java +++ b/SchematicSystem/SchematicSystem_8/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommand8.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.commands.schematiccommand; @@ -24,14 +24,15 @@ import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.extent.clipboard.Clipboard; import com.sk89q.worldedit.function.operation.ForwardExtentCopy; import com.sk89q.worldedit.function.operation.Operations; -import de.steamwar.schematicsystem.CheckSchemType; +import de.steamwar.sql.GameModeConfig; import de.steamwar.schematicsystem.autocheck.AutoCheckerResult; -import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommand; +import de.steamwar.sql.SchematicType; +import org.bukkit.Material; public class SchematicCommand8 implements SchematicCommand.ISchematicCommand { @Override - public Clipboard fixClipboard(Clipboard clipboard, AutoCheckerResult result, CheckSchemType type) throws Exception { + public Clipboard fixClipboard(Clipboard clipboard, AutoCheckerResult result, GameModeConfig type) throws Exception { return null; } diff --git a/SchematicSystem/SchematicSystem_Core/build.gradle.kts b/SchematicSystem/SchematicSystem_Core/build.gradle.kts index df9415f2..c18b3964 100644 --- a/SchematicSystem/SchematicSystem_Core/build.gradle.kts +++ b/SchematicSystem/SchematicSystem_Core/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -22,6 +22,8 @@ plugins { } dependencies { + compileOnly(libs.classindex) + annotationProcessor(libs.classindex) compileOnly(project(":SpigotCore", "default")) compileOnly(libs.spigotapi) diff --git a/SchematicSystem/SchematicSystem_Core/src/SchematicSystem.properties b/SchematicSystem/SchematicSystem_Core/src/SchematicSystem.properties index 5b8aee8f..e72b0f08 100644 --- a/SchematicSystem/SchematicSystem_Core/src/SchematicSystem.properties +++ b/SchematicSystem/SchematicSystem_Core/src/SchematicSystem.properties @@ -1,7 +1,7 @@ # # This file is a part of the SteamWar software. # -# Copyright (C) 2023 SteamWar.de-Serverteam +# 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 diff --git a/SchematicSystem/SchematicSystem_Core/src/SchematicSystem_de.properties b/SchematicSystem/SchematicSystem_Core/src/SchematicSystem_de.properties index 20205eee..b019e685 100644 --- a/SchematicSystem/SchematicSystem_Core/src/SchematicSystem_de.properties +++ b/SchematicSystem/SchematicSystem_Core/src/SchematicSystem_de.properties @@ -1,7 +1,7 @@ # # This file is a part of the SteamWar software. # -# Copyright (C) 2023 SteamWar.de-Serverteam +# 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 diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/CheckSchemType.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/CheckSchemType.java deleted file mode 100644 index fead2a47..00000000 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/CheckSchemType.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ - -package de.steamwar.schematicsystem; - -import de.steamwar.sql.SchematicType; -import lombok.Getter; -import org.bukkit.configuration.ConfigurationSection; -import org.bukkit.configuration.file.YamlConfiguration; - -import java.io.File; -import java.text.DateFormat; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.time.Instant; -import java.util.*; - -@Getter -public class CheckSchemType { - - private static final Map types = new HashMap<>(); - - private final int width; - private final int height; - private final int depth; - private final int maxDispenserItems; - - private final Map, Integer> limits; - private final int maxBlocks; - - private final Date deadline; - private final float maxBlastResistance; - - private CheckSchemType(ConfigurationSection section) { - String name = section.getString("Schematic.Type"); - width = section.getInt("Schematic.Size.x"); - height = section.getInt("Schematic.Size.y"); - depth = section.getInt("Schematic.Size.z"); - - maxDispenserItems = section.getInt("Schematic.MaxDispenserItems", 128); - maxBlocks = section.getInt("Schematic.MaxBlocks", 0); - - maxBlastResistance = (float) section.getDouble("Schematic.MaxDesignBlastResistance", Double.MAX_VALUE); - - limits = new HashMap<>(); - for(Map entry : section.getMapList("Schematic.Limited")) { - int amount = (Integer) entry.get("Amount"); - Set materials = new HashSet<>((List) entry.get("Materials")); - if(amount == 0) { - materials.forEach(material -> limits.put(Collections.singleton(material), 0)); - } else { - limits.put(materials, amount); - } - } - - String deadlineString = section.getString("deadline", null); - if (deadlineString != null) { - try { - SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm"); - deadline = dateFormat.parse(deadlineString); - } catch (ParseException e) { - throw new SecurityException(e.getMessage(), e); - } - } else { - deadline = null; - } - - types.put(SchematicType.fromDB(name.toLowerCase()), this); - types.put(SchematicType.fromDB("c" + name.toLowerCase()), this); - } - - static { - File folder = new File(SchematicSystem.getInstance().getDataFolder().getParentFile(), "FightSystem"); - - if(folder.exists()) { - for(File configFile : folder.listFiles((file, name) -> name.endsWith(".yml") && !name.endsWith(".kits.yml"))) { - YamlConfiguration config = YamlConfiguration.loadConfiguration(configFile); - if (!config.isList("CheckQuestions") && config.getBoolean("Schematic.ManualCheck", true)) - continue; - - new CheckSchemType(config); - } - } - } - - public static CheckSchemType get(SchematicType type){ - return types.get(type); - } - - public Map, Integer> getLimits() { - return new HashMap<>(limits); - } - - public boolean isAfterDeadline() { - return deadline != null && deadline.before(Date.from(Instant.now())); - } -} diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/SafeSchematicNode.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/SafeSchematicNode.java index 449d59d8..f9a28523 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/SafeSchematicNode.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/SafeSchematicNode.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem; diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/SchematicSystem.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/SchematicSystem.java index d6b94807..a4e04c43 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/SchematicSystem.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/SchematicSystem.java @@ -1,30 +1,31 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem; +import de.steamwar.linkage.AbstractLinker; +import de.steamwar.linkage.SpigotLinker; import de.steamwar.message.Message; -import de.steamwar.schematicsystem.commands.DownloadCommand; -import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommand; -import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandInitializer; -import de.steamwar.schematicsystem.listener.PlayerEventListener; +import de.steamwar.sql.GameModeConfig; +import de.steamwar.sql.SchematicType; import org.bukkit.Bukkit; +import org.bukkit.Material; import org.bukkit.plugin.java.JavaPlugin; public class SchematicSystem extends JavaPlugin { @@ -32,14 +33,24 @@ public class SchematicSystem extends JavaPlugin { private static SchematicSystem instance; + public static GameModeConfig getGameModeConfig(SchematicType type){ + GameModeConfig gameModeConfig = GameModeConfig.getBySchematicType(type); + if (gameModeConfig == null) return null; + if (gameModeConfig.CheckQuestions.isEmpty() && gameModeConfig.Schematic.ManualCheck) return null; + return gameModeConfig; + } + @Override public void onEnable() { instance = this; - SchematicCommandInitializer.init(); - new DownloadCommand(); - - Bukkit.getPluginManager().registerEvents(new PlayerEventListener(), this); + SpigotLinker spigotLinker = new SpigotLinker(this, MESSAGE); + try { + spigotLinker.link(); + } catch (AbstractLinker.LinkException e) { + e.printStackTrace(); + Bukkit.shutdown(); + } } public static SchematicSystem getInstance() { diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoChecker.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoChecker.java index ef4d9bea..eb464553 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoChecker.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoChecker.java @@ -1,28 +1,29 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.autocheck; import com.sk89q.worldedit.extent.clipboard.Clipboard; import de.steamwar.core.VersionDependent; -import de.steamwar.schematicsystem.CheckSchemType; +import de.steamwar.sql.GameModeConfig; import de.steamwar.schematicsystem.SchematicSystem; +import de.steamwar.sql.SchematicType; import lombok.Getter; import lombok.ToString; import org.bukkit.Material; @@ -31,19 +32,19 @@ import java.util.*; public class AutoChecker { - public static AutoCheckerResult check(Clipboard clipboard, CheckSchemType type) { + public static AutoCheckerResult check(Clipboard clipboard, GameModeConfig type) { return impl.check(clipboard, type); } - public static AutoCheckerResult sizeCheck(Clipboard clipboard, CheckSchemType type) { + public static AutoCheckerResult sizeCheck(Clipboard clipboard, GameModeConfig type) { return impl.sizeCheck(clipboard, type); } private static final IAutoChecker impl = VersionDependent.getVersionImpl(SchematicSystem.getInstance()); public interface IAutoChecker { - AutoCheckerResult check(Clipboard clipboard, CheckSchemType type); - AutoCheckerResult sizeCheck(Clipboard clipboard, CheckSchemType type); + AutoCheckerResult check(Clipboard clipboard, GameModeConfig type); + AutoCheckerResult sizeCheck(Clipboard clipboard, GameModeConfig type); } @Getter diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoCheckerItems.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoCheckerItems.java index fb103f67..c3d63c9b 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoCheckerItems.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoCheckerItems.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.schematicsystem.autocheck; diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoCheckerResult.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoCheckerResult.java index a7d13f17..60ab9070 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoCheckerResult.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoCheckerResult.java @@ -1,27 +1,28 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.autocheck; import de.steamwar.core.Core; -import de.steamwar.schematicsystem.CheckSchemType; +import de.steamwar.sql.GameModeConfig; import de.steamwar.schematicsystem.SchematicSystem; +import de.steamwar.sql.SchematicType; import lombok.Builder; import lombok.Getter; import lombok.ToString; @@ -29,13 +30,15 @@ import net.md_5.bungee.api.chat.ClickEvent; import org.bukkit.Material; import org.bukkit.entity.Player; -import java.util.*; +import java.util.Collection; +import java.util.List; +import java.util.Map; @Builder @Getter @ToString public class AutoCheckerResult { - private final CheckSchemType type; + private final GameModeConfig type; private final int width; private final int height; private final int depth; @@ -61,7 +64,7 @@ public class AutoCheckerResult { } public boolean isDispenserItemsOK() { - return blockScanResult.getDispenserItems().values().stream().allMatch(i -> i <= type.getMaxDispenserItems()); + return blockScanResult.getDispenserItems().values().stream().allMatch(i -> i <= type.Schematic.MaxDispenserItems); } public boolean hasWarnings() { @@ -73,25 +76,25 @@ public class AutoCheckerResult { } public boolean isTooWide() { - return width > type.getWidth(); + return width > type.Schematic.Size.x; } public boolean isTooHigh() { - return height > type.getHeight(); + return height > type.Schematic.Size.y; } public boolean isTooDeep() { - return depth > type.getDepth(); + return depth > type.Schematic.Size.z; } public boolean isBlockCountOk() { - return type.getMaxBlocks() == 0 || blockScanResult.getBlockCounts().entrySet().stream().filter(entry -> entry.getKey() != Material.AIR).map(Map.Entry::getValue).reduce(Integer::sum).map(i -> i <= type.getMaxBlocks()).orElse(false); + return type.Schematic.MaxBlocks == 0 || blockScanResult.getBlockCounts().entrySet().stream().filter(entry -> entry.getKey() != Material.AIR).map(Map.Entry::getValue).reduce(Integer::sum).map(i -> i <= type.Schematic.MaxBlocks).orElse(false); } public boolean isLimitedBlocksOK() { try { - return type.getLimits().entrySet().stream() - .map(setIntegerEntry -> setIntegerEntry.getKey().stream().map(Material::getMaterial).map(blockScanResult.getBlockCounts()::get).map(i -> i == null || i <= setIntegerEntry.getValue()).reduce(Boolean::logicalAnd).orElse(false)) + return type.Schematic.Limited.entrySet().stream() + .map(setIntegerEntry -> setIntegerEntry.getKey().stream().map(blockScanResult.getBlockCounts()::get).map(i -> i == null || i <= setIntegerEntry.getValue()).reduce(Boolean::logicalAnd).orElse(false)) .reduce(Boolean::logicalAnd).orElse(true); } catch (NullPointerException e) { return false; @@ -99,21 +102,20 @@ public class AutoCheckerResult { } public boolean isDesignBlastResistanceOK() { - return blockScanResult.getDesignBlocks().keySet().stream().map(Material::getBlastResistance).noneMatch(i -> i > type.getMaxBlastResistance()); + return blockScanResult.getDesignBlocks().keySet().stream().map(Material::getBlastResistance).noneMatch(i -> i > type.Schematic.MaxDesignBlastResistance); } public void sendErrorMessage(Player p, String schemName) { SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_HEADER", p, schemName); - if(isTooWide()) SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_WIDTH", p, width, type.getWidth()); - if(isTooHigh()) SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_HEIGHT", p, height, type.getHeight()); - if(isTooDeep()) SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_LENGTH", p, depth, type.getDepth()); - if(type.getMaxBlocks() != 0 && !isBlockCountOk()) { - SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_BLOCKS", p, blockScanResult.getBlockCounts().values().stream().reduce(Integer::sum).orElse(0), type.getMaxBlocks()); + if(isTooWide()) SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_WIDTH", p, width, type.Schematic.Size.x); + if(isTooHigh()) SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_HEIGHT", p, height, type.Schematic.Size.y); + if(isTooDeep()) SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_LENGTH", p, depth, type.Schematic.Size.z); + if(type.Schematic.MaxBlocks != 0 && !isBlockCountOk()) { + SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_BLOCKS", p, blockScanResult.getBlockCounts().values().stream().reduce(Integer::sum).orElse(0), type.Schematic.MaxBlocks); } if(!isLimitedBlocksOK()) { - type.getLimits().forEach((strings, integer) -> { - for (String string : strings) { - Material mat = Material.matchMaterial(string); + type.Schematic.Limited.forEach((materials, integer) -> { + for (Material mat : materials) { if(mat != null && blockScanResult.getBlockCounts().getOrDefault(mat, 0) > integer) { if(integer == 0) { SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_FORBIDDEN_BLOCK", p, mat.name()); @@ -124,13 +126,13 @@ public class AutoCheckerResult { } }); } - blockScanResult.getDispenserItems().entrySet().stream().filter(blockVector3IntegerEntry -> blockVector3IntegerEntry.getValue() > type.getMaxDispenserItems()).forEach(blockVector3IntegerEntry -> { + blockScanResult.getDispenserItems().entrySet().stream().filter(blockVector3IntegerEntry -> blockVector3IntegerEntry.getValue() > type.Schematic.MaxDispenserItems).forEach(blockVector3IntegerEntry -> { SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_TOO_MANY_DISPENSER_ITEMS", p, SchematicSystem.MESSAGE.parse("AUTO_CHECKER_RESULT_TELEPORT_HERE", p), tpCommandTo(blockVector3IntegerEntry.getKey()), blockVector3IntegerEntry.getKey().getBlockX(), blockVector3IntegerEntry.getKey().getBlockY(), blockVector3IntegerEntry.getKey().getBlockZ(), blockVector3IntegerEntry.getValue(), - type.getMaxDispenserItems()); + type.Schematic.MaxDispenserItems); }); blockScanResult.getRecords().forEach(blockVector3 -> { SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_RECORD", p, SchematicSystem.MESSAGE.parse("AUTO_CHECKER_RESULT_TELEPORT_HERE", p), tpCommandTo(blockVector3), blockVector3.getBlockX(), blockVector3.getBlockY(), blockVector3.getBlockZ()); @@ -146,7 +148,7 @@ public class AutoCheckerResult { }); if(Core.getVersion() > 12) { blockScanResult.getDesignBlocks().forEach((material, poss) -> { - if(material.getBlastResistance() > type.getMaxBlastResistance()) { + if(material.getBlastResistance() > type.Schematic.MaxDesignBlastResistance) { poss.forEach(pos -> { SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_DESIGN_BLOCK", p, SchematicSystem.MESSAGE.parse("AUTO_CHECKER_RESULT_TELEPORT_HERE", p), tpCommandTo(pos), material.name(), pos.getBlockX(), pos.getBlockY(), pos.getBlockZ()); }); @@ -157,7 +159,7 @@ public class AutoCheckerResult { SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_ENTITY", p, SchematicSystem.MESSAGE.parse("AUTO_CHECKER_RESULT_TELEPORT_HERE", p), tpCommandTo(blockPos), blockPos.getX(), blockPos.getY(), blockPos.getZ()); }); if(type.isAfterDeadline()) { - SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_AFTER_DEADLINE", p, type.getDeadline()); + SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_AFTER_DEADLINE", p, type.Deadline); } } diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/BlockPos.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/BlockPos.java index 7dff0dbe..255ae962 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/BlockPos.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/BlockPos.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2022 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 . -*/ + * 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 . + */ package de.steamwar.schematicsystem.autocheck; diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/DownloadCommand.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/DownloadCommand.java index 3e2f009d..ed275c07 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/DownloadCommand.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/DownloadCommand.java @@ -1,25 +1,26 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.commands; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.schematicsystem.SchematicSystem; import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandUtils; import de.steamwar.sql.*; @@ -27,6 +28,7 @@ import org.bukkit.entity.Player; import java.io.IOException; +@Linked public class DownloadCommand extends SWCommand { public DownloadCommand() { super("download", "/download"); diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/GUI.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/GUI.java index ec59b16d..d5428118 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/GUI.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/GUI.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.commands.schematiccommand; @@ -23,7 +23,6 @@ import com.sk89q.worldedit.extent.clipboard.Clipboard; import de.steamwar.core.Core; import de.steamwar.data.CMDs; import de.steamwar.inventory.*; -import de.steamwar.schematicsystem.CheckSchemType; import de.steamwar.schematicsystem.SafeSchematicNode; import de.steamwar.schematicsystem.SchematicSystem; import de.steamwar.schematicsystem.autocheck.AutoChecker; @@ -245,7 +244,7 @@ public class GUI { Clipboard finalClipboard = clipboard; List types = SchematicType.values().parallelStream() .filter(SchematicType::isAssignable) - .filter(type -> finalClipboard == null || CheckSchemType.get(type) == null || AutoChecker.sizeCheck(finalClipboard, CheckSchemType.get(type)).fastOk()) + .filter(type -> finalClipboard == null || SchematicSystem.getGameModeConfig(type) == null || AutoChecker.sizeCheck(finalClipboard, SchematicSystem.getGameModeConfig(type)).fastOk()) .collect(Collectors.toList()); List> items = types.stream() diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommand.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommand.java index b3ecf374..90c6d3c7 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommand.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommand.java @@ -1,39 +1,46 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.commands.schematiccommand; -import com.sk89q.worldedit.*; +import com.sk89q.worldedit.EditSession; +import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.extent.clipboard.Clipboard; -import de.steamwar.command.*; +import de.steamwar.command.AbstractSWCommand; +import de.steamwar.command.SWCommand; +import de.steamwar.command.TypeMapper; +import de.steamwar.command.TypeValidator; import de.steamwar.core.VersionDependent; -import de.steamwar.schematicsystem.CheckSchemType; +import de.steamwar.sql.GameModeConfig; +import de.steamwar.linkage.Linked; import de.steamwar.schematicsystem.SchematicSystem; import de.steamwar.schematicsystem.autocheck.AutoCheckerResult; import de.steamwar.sql.*; +import org.bukkit.Material; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import static de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandHelp.*; -import static de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandUtils.*; +import static de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandUtils.togglePublic; @SuppressWarnings("unused") +@Linked public class SchematicCommand extends SWCommand { public SchematicCommand() { @@ -105,9 +112,9 @@ public class SchematicCommand extends SWCommand { return SchematicMapper.nodeTypeMapper(); } - @ClassMapper(value = CheckSchemType.class, local = true) - public static TypeMapper checkSchemTypeTypeMapper() { - return SchematicMapper.checkSchemTypeTypeMapper(); + @ClassMapper(value = GameModeConfig.class, local = true) + public static TypeMapper> gameModeConfigTypeMapper() { + return SchematicMapper.gameModeConfigTypeMapper(); } @Override @@ -143,7 +150,7 @@ public class SchematicCommand extends SWCommand { public static final ISchematicCommand impl = VersionDependent.getVersionImpl(SchematicSystem.getInstance()); public interface ISchematicCommand { - Clipboard fixClipboard(Clipboard clipboard, AutoCheckerResult result, CheckSchemType type) throws Exception; + Clipboard fixClipboard(Clipboard clipboard, AutoCheckerResult result, GameModeConfig type) throws Exception; void createCopy(EditSession editSession, Clipboard clipboard) throws WorldEditException; } } diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommandHelp.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommandHelp.java index 1cb0ebd8..07161973 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommandHelp.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommandHelp.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.commands.schematiccommand; diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommandInitializer.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommandInitializer.java deleted file mode 100644 index 7245ead6..00000000 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommandInitializer.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . - */ - -package de.steamwar.schematicsystem.commands.schematiccommand; - -import de.steamwar.schematicsystem.SchematicSystem; -import de.steamwar.schematicsystem.commands.schematiccommand.parts.*; - -public class SchematicCommandInitializer { - - public static void init() { - new SchematicCommand().setMessage(SchematicSystem.MESSAGE); - new CheckPart().setMessage(SchematicSystem.MESSAGE); - new MemberPart().setMessage(SchematicSystem.MESSAGE); - new ModifyPart().setMessage(SchematicSystem.MESSAGE); - new SavePart().setMessage(SchematicSystem.MESSAGE); - new SearchPart().setMessage(SchematicSystem.MESSAGE); - new ViewPart().setMessage(SchematicSystem.MESSAGE); - } -} diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommandUtils.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommandUtils.java index ad1ced2e..cea1122c 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommandUtils.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommandUtils.java @@ -1,31 +1,31 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.commands.schematiccommand; import com.sk89q.worldedit.extent.clipboard.Clipboard; +import de.steamwar.sql.GameModeConfig; import de.steamwar.inventory.SWInventory; import de.steamwar.inventory.SWItem; import de.steamwar.network.NetworkSender; import de.steamwar.network.packets.client.PrepareSchemPacket; import de.steamwar.providers.BauServerInfo; -import de.steamwar.schematicsystem.CheckSchemType; import de.steamwar.schematicsystem.SchematicSystem; import de.steamwar.schematicsystem.autocheck.AutoChecker; import de.steamwar.schematicsystem.autocheck.AutoCheckerResult; @@ -40,6 +40,7 @@ import net.md_5.bungee.api.chat.ComponentBuilder; import net.md_5.bungee.api.chat.HoverEvent; import net.md_5.bungee.api.chat.TextComponent; import org.bukkit.Bukkit; +import org.bukkit.Material; import org.bukkit.entity.Player; import java.io.IOException; @@ -311,7 +312,7 @@ public class SchematicCommandUtils { } } - public static void check(Player player, Clipboard clipboard, CheckSchemType type, String schemName, boolean gui) { + public static void check(Player player, Clipboard clipboard, GameModeConfig type, String schemName, boolean gui) { AutoCheckerResult result = AutoChecker.check(clipboard, type); if(!result.isOk()) { result.sendErrorMessage(player, schemName); @@ -454,9 +455,9 @@ public class SchematicCommandUtils { return; } - CheckSchemType checkSchemType = CheckSchemType.get(type); + GameModeConfig checkSchemType = SchematicSystem.getGameModeConfig(type); if (checkSchemType.isAfterDeadline()) { - SchematicSystem.MESSAGE.send("UTIL_TYPE_AFTER_DEADLINE", player, checkSchemType.getDeadline()); + SchematicSystem.MESSAGE.send("UTIL_TYPE_AFTER_DEADLINE", player, checkSchemType.Deadline); return; } diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicMapper.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicMapper.java index bcf60e63..157e8d2d 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicMapper.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicMapper.java @@ -1,30 +1,32 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.commands.schematiccommand; import de.steamwar.command.TypeMapper; -import de.steamwar.schematicsystem.CheckSchemType; +import de.steamwar.sql.GameModeConfig; +import de.steamwar.schematicsystem.SchematicSystem; import de.steamwar.sql.NodeMember; import de.steamwar.sql.SchematicNode; import de.steamwar.sql.SchematicType; import de.steamwar.sql.SteamwarUser; +import org.bukkit.Material; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -175,16 +177,16 @@ public class SchematicMapper { }; } - public static TypeMapper checkSchemTypeTypeMapper() { - return new TypeMapper() { + public static TypeMapper> gameModeConfigTypeMapper() { + return new TypeMapper>() { @Override public Collection tabCompletes(CommandSender commandSender, String[] strings, String s) { - return SchematicType.values().stream().filter(type -> CheckSchemType.get(type) != null).map(SchematicType::name).collect(Collectors.toList()); + return SchematicType.values().stream().filter(type -> SchematicSystem.getGameModeConfig(type) != null).map(SchematicType::name).collect(Collectors.toList()); } @Override - public CheckSchemType map(CommandSender commandSender, String[] previousArguments, String s) { - return SchematicType.values().stream().filter(type -> type.name().equalsIgnoreCase(s)).map(CheckSchemType::get).findAny().orElse(null); + public GameModeConfig map(CommandSender commandSender, String[] previousArguments, String s) { + return SchematicType.values().stream().filter(type -> type.name().equalsIgnoreCase(s)).map(SchematicSystem::getGameModeConfig).findAny().orElse(null); } }; } diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicValidator.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicValidator.java index e6bff1dd..bd02c3d2 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicValidator.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicValidator.java @@ -1,25 +1,24 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.commands.schematiccommand; -import de.steamwar.command.AbstractSWCommand; import de.steamwar.command.AbstractValidator; import de.steamwar.command.TypeValidator; import de.steamwar.sql.SchematicNode; diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/CheckPart.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/CheckPart.java index 9f23a795..9e3be830 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/CheckPart.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/CheckPart.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.commands.schematiccommand.parts; @@ -28,29 +28,33 @@ import com.sk89q.worldedit.session.ClipboardHolder; import de.steamwar.command.AbstractSWCommand; import de.steamwar.command.SWCommand; import de.steamwar.core.Core; -import de.steamwar.schematicsystem.CheckSchemType; +import de.steamwar.sql.GameModeConfig; +import de.steamwar.linkage.Linked; import de.steamwar.schematicsystem.SchematicSystem; import de.steamwar.schematicsystem.autocheck.AutoChecker; import de.steamwar.schematicsystem.autocheck.AutoCheckerResult; import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommand; import de.steamwar.sql.SchematicData; import de.steamwar.sql.SchematicNode; +import de.steamwar.sql.SchematicType; +import org.bukkit.Material; import org.bukkit.entity.Player; import java.io.IOException; import java.util.logging.Level; -import static de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandUtils.check; import static de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommand.impl; +import static de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandUtils.check; @AbstractSWCommand.PartOf(SchematicCommand.class) +@Linked public class CheckPart extends SWCommand { public CheckPart() { super(null); } @Register("check") - public void checkCommand(Player player, @Validator("isOwnerSchematicValidator") SchematicNode node, CheckSchemType type) { + public void checkCommand(Player player, @Validator("isOwnerSchematicValidator") SchematicNode node, GameModeConfig type) { try { check(player, new SchematicData(node).load(), type, node.getName(), false); } catch (IOException e) { @@ -59,7 +63,7 @@ public class CheckPart extends SWCommand { } @Register(value = {"check", "clipboard"}) - public void checkClipboardCommand(Player player, @ErrorMessage("UTIL_CHECK_TYPE_NOT_FOUND") CheckSchemType type) { + public void checkClipboardCommand(Player player, @ErrorMessage("UTIL_CHECK_TYPE_NOT_FOUND") GameModeConfig type) { try { check(player, WorldEdit.getInstance().getSessionManager().findByName(player.getName()).getClipboard().getClipboard(), type, "clipboard", false); } catch (EmptyClipboardException e) { @@ -68,7 +72,7 @@ public class CheckPart extends SWCommand { } @Register(value = {"check", "selection"}) - public void checkSelectionCommand(Player player, @ErrorMessage("UTIL_CHECK_TYPE_NOT_FOUND") CheckSchemType type) { + public void checkSelectionCommand(Player player, @ErrorMessage("UTIL_CHECK_TYPE_NOT_FOUND") GameModeConfig type) { try { Clipboard clipboard = new BlockArrayClipboard(WorldEdit.getInstance().getSessionManager().findByName(player.getName()).getSelection(new BukkitWorld(player.getWorld()))); EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(new BukkitWorld(player.getWorld()), -1); @@ -84,7 +88,7 @@ public class CheckPart extends SWCommand { } @Register("fix") - public void fixSchematicCommand(Player player, @ErrorMessage("UTIL_CHECK_TYPE_NOT_FOUND") CheckSchemType type) { + public void fixSchematicCommand(Player player, @ErrorMessage("UTIL_CHECK_TYPE_NOT_FOUND") GameModeConfig type) { if(Core.getVersion() < 15) { SchematicSystem.MESSAGE.send("COMMAND_FIX_WRONG_VERSION", player); return; diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/MemberPart.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/MemberPart.java index f7f09ac3..8ffa543b 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/MemberPart.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/MemberPart.java @@ -1,26 +1,27 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.commands.schematiccommand.parts; import de.steamwar.command.AbstractSWCommand; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.schematicsystem.SchematicSystem; import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommand; import de.steamwar.sql.*; @@ -36,6 +37,7 @@ import static de.steamwar.schematicsystem.commands.schematiccommand.SchematicCom import static de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandUtils.mkdirs; @AbstractSWCommand.PartOf(SchematicCommand.class) +@Linked public class MemberPart extends SWCommand { public MemberPart() { super(null); diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/ModifyPart.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/ModifyPart.java index bc1e89c6..eb7a8c10 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/ModifyPart.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/ModifyPart.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.commands.schematiccommand.parts; @@ -22,12 +22,12 @@ package de.steamwar.schematicsystem.commands.schematiccommand.parts; import com.sk89q.worldedit.extent.clipboard.Clipboard; import de.steamwar.command.AbstractSWCommand; import de.steamwar.command.SWCommand; -import de.steamwar.schematicsystem.CheckSchemType; +import de.steamwar.linkage.Linked; import de.steamwar.schematicsystem.SafeSchematicNode; import de.steamwar.schematicsystem.SchematicSystem; import de.steamwar.schematicsystem.autocheck.AutoChecker; -import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandUtils; import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommand; +import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandUtils; import de.steamwar.sql.*; import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.chat.ClickEvent; @@ -40,6 +40,7 @@ import java.io.IOException; import static de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandUtils.*; @AbstractSWCommand.PartOf(SchematicCommand.class) +@Linked public class ModifyPart extends SWCommand { public ModifyPart() { super(null); @@ -61,7 +62,7 @@ public class ModifyPart extends SWCommand { SchematicType.values().parallelStream() .filter(SchematicType::isAssignable) - .filter(type -> finalClipboard == null || CheckSchemType.get(type) == null || AutoChecker.sizeCheck(finalClipboard, CheckSchemType.get(type)).fastOk()) + .filter(type -> finalClipboard != null && SchematicSystem.getGameModeConfig(type) != null && AutoChecker.sizeCheck(finalClipboard, SchematicSystem.getGameModeConfig(type)).fastOk()) .forEach(type -> { TextComponent component = new TextComponent(type.name() + " "); component.setColor(ChatColor.GRAY); @@ -174,12 +175,6 @@ public class ModifyPart extends SWCommand { } } - @Register("lockreplay") - public void lockreplay(Player player, @Validator("isOwnerSchematicValidator") SchematicNode node) { - node.setAllowReplay(false); - SchematicSystem.MESSAGE.send("COMMAND_LOCKREPLAY", player, node.getName()); - } - @Register("replacecolor") public void replacecolor(Player player, @Validator("isOwnerSchematicValidator") SchematicNode node) { boolean state = !node.replaceColor(); diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/SavePart.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/SavePart.java index d373f503..7aa98ed0 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/SavePart.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/SavePart.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.commands.schematiccommand.parts; @@ -23,6 +23,7 @@ import de.steamwar.command.AbstractSWCommand; import de.steamwar.command.SWCommand; import de.steamwar.inventory.SWAnvilInv; import de.steamwar.inventory.SchematicSelector; +import de.steamwar.linkage.Linked; import de.steamwar.providers.BauServerInfo; import de.steamwar.schematicsystem.SchematicSystem; import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommand; @@ -36,6 +37,7 @@ import java.util.logging.Level; import static de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandUtils.*; @AbstractSWCommand.PartOf(SchematicCommand.class) +@Linked public class SavePart extends SWCommand { public SavePart() { diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/SearchPart.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/SearchPart.java index 00dfd850..d6834468 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/SearchPart.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/SearchPart.java @@ -1,28 +1,29 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.commands.schematiccommand.parts; import de.steamwar.command.*; +import de.steamwar.linkage.Linked; import de.steamwar.schematicsystem.SchematicSystem; -import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandUtils; import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommand; +import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandUtils; import de.steamwar.sql.SchematicNode; import de.steamwar.sql.SchematicType; import de.steamwar.sql.SteamwarUser; @@ -40,6 +41,7 @@ import static de.steamwar.schematicsystem.commands.schematiccommand.SchematicCom import static de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandUtils.getUser; @AbstractSWCommand.PartOf(SchematicCommand.class) +@Linked public class SearchPart extends SWCommand { private static final Map> searchMapper = new HashMap<>(); diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/ViewPart.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/ViewPart.java index a22c1813..35544a4f 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/ViewPart.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/ViewPart.java @@ -1,30 +1,31 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.commands.schematiccommand.parts; import de.steamwar.command.AbstractSWCommand; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.schematicsystem.SchematicSystem; import de.steamwar.schematicsystem.commands.schematiccommand.GUI; -import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandUtils; import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommand; +import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandUtils; import de.steamwar.sql.NodeData; import de.steamwar.sql.SchematicNode; import de.steamwar.sql.SteamwarUser; @@ -34,13 +35,12 @@ import net.md_5.bungee.api.chat.HoverEvent; import net.md_5.bungee.api.chat.TextComponent; import org.bukkit.entity.Player; -import java.time.format.DateTimeFormatter; -import java.time.format.FormatStyle; import java.util.List; import static de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandUtils.*; @AbstractSWCommand.PartOf(SchematicCommand.class) +@Linked public class ViewPart extends SWCommand { public ViewPart() { super(null); diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/listener/PlayerEventListener.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/listener/PlayerEventListener.java index 3afb8ddd..153e6f45 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/listener/PlayerEventListener.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/listener/PlayerEventListener.java @@ -1,29 +1,31 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . + * 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 . */ package de.steamwar.schematicsystem.listener; +import de.steamwar.linkage.Linked; import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandUtils; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerQuitEvent; +@Linked public class PlayerEventListener implements Listener { @EventHandler diff --git a/SchematicSystem/build.gradle.kts b/SchematicSystem/build.gradle.kts index 813550b2..ee8e8960 100644 --- a/SchematicSystem/build.gradle.kts +++ b/SchematicSystem/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/CRIUDummy/build.gradle.kts b/SpigotCore/CRIUDummy/build.gradle.kts index d8a1521e..19554b1c 100644 --- a/SpigotCore/CRIUDummy/build.gradle.kts +++ b/SpigotCore/CRIUDummy/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/CRIUDummy/src/org/eclipse/openj9/criu/CRIUSupport.java b/SpigotCore/CRIUDummy/src/org/eclipse/openj9/criu/CRIUSupport.java index 8fc6686f..05d3655a 100644 --- a/SpigotCore/CRIUDummy/src/org/eclipse/openj9/criu/CRIUSupport.java +++ b/SpigotCore/CRIUDummy/src/org/eclipse/openj9/criu/CRIUSupport.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/CRIUDummy/src/org/eclipse/openj9/criu/JVMCRIUException.java b/SpigotCore/CRIUDummy/src/org/eclipse/openj9/criu/JVMCRIUException.java index 415844e9..7ee7a172 100644 --- a/SpigotCore/CRIUDummy/src/org/eclipse/openj9/criu/JVMCRIUException.java +++ b/SpigotCore/CRIUDummy/src/org/eclipse/openj9/criu/JVMCRIUException.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_10/build.gradle.kts b/SpigotCore/SpigotCore_10/build.gradle.kts index 9606f5c6..cff91969 100644 --- a/SpigotCore/SpigotCore_10/build.gradle.kts +++ b/SpigotCore/SpigotCore_10/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_12/build.gradle.kts b/SpigotCore/SpigotCore_12/build.gradle.kts index da6a46c9..79ec438a 100644 --- a/SpigotCore/SpigotCore_12/build.gradle.kts +++ b/SpigotCore/SpigotCore_12/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_12/src/de/steamwar/core/LocaleChangeWrapper12.java b/SpigotCore/SpigotCore_12/src/de/steamwar/core/LocaleChangeWrapper12.java index 152751ce..718369d4 100644 --- a/SpigotCore/SpigotCore_12/src/de/steamwar/core/LocaleChangeWrapper12.java +++ b/SpigotCore/SpigotCore_12/src/de/steamwar/core/LocaleChangeWrapper12.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_14/build.gradle.kts b/SpigotCore/SpigotCore_14/build.gradle.kts index 5ffc8c1c..e4746ba5 100644 --- a/SpigotCore/SpigotCore_14/build.gradle.kts +++ b/SpigotCore/SpigotCore_14/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_14/src/de/steamwar/core/FlatteningWrapper14.java b/SpigotCore/SpigotCore_14/src/de/steamwar/core/FlatteningWrapper14.java index 2033fc09..82e1c879 100644 --- a/SpigotCore/SpigotCore_14/src/de/steamwar/core/FlatteningWrapper14.java +++ b/SpigotCore/SpigotCore_14/src/de/steamwar/core/FlatteningWrapper14.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_14/src/de/steamwar/core/RecipeDiscoverWrapper14.java b/SpigotCore/SpigotCore_14/src/de/steamwar/core/RecipeDiscoverWrapper14.java index 93e050d8..d9b4bf17 100644 --- a/SpigotCore/SpigotCore_14/src/de/steamwar/core/RecipeDiscoverWrapper14.java +++ b/SpigotCore/SpigotCore_14/src/de/steamwar/core/RecipeDiscoverWrapper14.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_14/src/de/steamwar/core/TrickyTrialsWrapper14.java b/SpigotCore/SpigotCore_14/src/de/steamwar/core/TrickyTrialsWrapper14.java index aa30ea37..6b337111 100644 --- a/SpigotCore/SpigotCore_14/src/de/steamwar/core/TrickyTrialsWrapper14.java +++ b/SpigotCore/SpigotCore_14/src/de/steamwar/core/TrickyTrialsWrapper14.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_14/src/de/steamwar/core/WorldEditWrapper14.java b/SpigotCore/SpigotCore_14/src/de/steamwar/core/WorldEditWrapper14.java index b682dad3..60e4758d 100644 --- a/SpigotCore/SpigotCore_14/src/de/steamwar/core/WorldEditWrapper14.java +++ b/SpigotCore/SpigotCore_14/src/de/steamwar/core/WorldEditWrapper14.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_14/src/de/steamwar/techhider/BlockIds14.java b/SpigotCore/SpigotCore_14/src/de/steamwar/techhider/BlockIds14.java index 6e2c0397..5b1a7b4c 100644 --- a/SpigotCore/SpigotCore_14/src/de/steamwar/techhider/BlockIds14.java +++ b/SpigotCore/SpigotCore_14/src/de/steamwar/techhider/BlockIds14.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.techhider; diff --git a/SpigotCore/SpigotCore_14/src/de/steamwar/techhider/ChunkHider14.java b/SpigotCore/SpigotCore_14/src/de/steamwar/techhider/ChunkHider14.java index a9a37e1b..eade69b0 100644 --- a/SpigotCore/SpigotCore_14/src/de/steamwar/techhider/ChunkHider14.java +++ b/SpigotCore/SpigotCore_14/src/de/steamwar/techhider/ChunkHider14.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.techhider; diff --git a/SpigotCore/SpigotCore_14/src/de/steamwar/techhider/ProtocolWrapper14.java b/SpigotCore/SpigotCore_14/src/de/steamwar/techhider/ProtocolWrapper14.java index 7c658dbd..c68b6937 100644 --- a/SpigotCore/SpigotCore_14/src/de/steamwar/techhider/ProtocolWrapper14.java +++ b/SpigotCore/SpigotCore_14/src/de/steamwar/techhider/ProtocolWrapper14.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.techhider; diff --git a/SpigotCore/SpigotCore_15/build.gradle.kts b/SpigotCore/SpigotCore_15/build.gradle.kts index 1e49db83..d112f426 100644 --- a/SpigotCore/SpigotCore_15/build.gradle.kts +++ b/SpigotCore/SpigotCore_15/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_18/build.gradle.kts b/SpigotCore/SpigotCore_18/build.gradle.kts index a3d4fb44..7c445409 100644 --- a/SpigotCore/SpigotCore_18/build.gradle.kts +++ b/SpigotCore/SpigotCore_18/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_18/src/de/steamwar/core/CraftbukkitWrapper18.java b/SpigotCore/SpigotCore_18/src/de/steamwar/core/CraftbukkitWrapper18.java index 6cfaade4..9e7c1785 100644 --- a/SpigotCore/SpigotCore_18/src/de/steamwar/core/CraftbukkitWrapper18.java +++ b/SpigotCore/SpigotCore_18/src/de/steamwar/core/CraftbukkitWrapper18.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . -*/ + * 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 . + */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_18/src/de/steamwar/core/ProtocolWrapper18.java b/SpigotCore/SpigotCore_18/src/de/steamwar/core/ProtocolWrapper18.java index e5cdf160..544237ce 100644 --- a/SpigotCore/SpigotCore_18/src/de/steamwar/core/ProtocolWrapper18.java +++ b/SpigotCore/SpigotCore_18/src/de/steamwar/core/ProtocolWrapper18.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_18/src/de/steamwar/core/WorldEditWrapper18.java b/SpigotCore/SpigotCore_18/src/de/steamwar/core/WorldEditWrapper18.java index 1c216a1a..111265cc 100644 --- a/SpigotCore/SpigotCore_18/src/de/steamwar/core/WorldEditWrapper18.java +++ b/SpigotCore/SpigotCore_18/src/de/steamwar/core/WorldEditWrapper18.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_18/src/de/steamwar/techhider/ChunkHider18.java b/SpigotCore/SpigotCore_18/src/de/steamwar/techhider/ChunkHider18.java index ace24a54..3033feac 100644 --- a/SpigotCore/SpigotCore_18/src/de/steamwar/techhider/ChunkHider18.java +++ b/SpigotCore/SpigotCore_18/src/de/steamwar/techhider/ChunkHider18.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.techhider; diff --git a/SpigotCore/SpigotCore_18/src/de/steamwar/techhider/ProtocolWrapper18.java b/SpigotCore/SpigotCore_18/src/de/steamwar/techhider/ProtocolWrapper18.java index 1553806a..54f41d90 100644 --- a/SpigotCore/SpigotCore_18/src/de/steamwar/techhider/ProtocolWrapper18.java +++ b/SpigotCore/SpigotCore_18/src/de/steamwar/techhider/ProtocolWrapper18.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.techhider; diff --git a/SpigotCore/SpigotCore_19/build.gradle.kts b/SpigotCore/SpigotCore_19/build.gradle.kts index ce9922e4..1d696271 100644 --- a/SpigotCore/SpigotCore_19/build.gradle.kts +++ b/SpigotCore/SpigotCore_19/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_19/src/de/steamwar/core/ChatWrapper19.java b/SpigotCore/SpigotCore_19/src/de/steamwar/core/ChatWrapper19.java index d8225ae6..79c98420 100644 --- a/SpigotCore/SpigotCore_19/src/de/steamwar/core/ChatWrapper19.java +++ b/SpigotCore/SpigotCore_19/src/de/steamwar/core/ChatWrapper19.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_19/src/de/steamwar/core/ProtocolWrapper19.java b/SpigotCore/SpigotCore_19/src/de/steamwar/core/ProtocolWrapper19.java index f796dcdd..ac378188 100644 --- a/SpigotCore/SpigotCore_19/src/de/steamwar/core/ProtocolWrapper19.java +++ b/SpigotCore/SpigotCore_19/src/de/steamwar/core/ProtocolWrapper19.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_19/src/de/steamwar/techhider/ProtocolWrapper19.java b/SpigotCore/SpigotCore_19/src/de/steamwar/techhider/ProtocolWrapper19.java index 7909b0fd..2aded961 100644 --- a/SpigotCore/SpigotCore_19/src/de/steamwar/techhider/ProtocolWrapper19.java +++ b/SpigotCore/SpigotCore_19/src/de/steamwar/techhider/ProtocolWrapper19.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.techhider; diff --git a/SpigotCore/SpigotCore_20/build.gradle.kts b/SpigotCore/SpigotCore_20/build.gradle.kts index 79f667e0..357feb75 100644 --- a/SpigotCore/SpigotCore_20/build.gradle.kts +++ b/SpigotCore/SpigotCore_20/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_20/src/de/steamwar/core/CraftbukkitWrapper20.java b/SpigotCore/SpigotCore_20/src/de/steamwar/core/CraftbukkitWrapper20.java index 31faa3f0..ca2e059e 100644 --- a/SpigotCore/SpigotCore_20/src/de/steamwar/core/CraftbukkitWrapper20.java +++ b/SpigotCore/SpigotCore_20/src/de/steamwar/core/CraftbukkitWrapper20.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . -*/ + * 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 . + */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_20/src/de/steamwar/core/WorldEditRendererWrapper20.java b/SpigotCore/SpigotCore_20/src/de/steamwar/core/WorldEditRendererWrapper20.java index 36ded8ef..3403415a 100644 --- a/SpigotCore/SpigotCore_20/src/de/steamwar/core/WorldEditRendererWrapper20.java +++ b/SpigotCore/SpigotCore_20/src/de/steamwar/core/WorldEditRendererWrapper20.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; @@ -87,9 +87,7 @@ public class WorldEditRendererWrapper20 implements WorldEditRendererWrapper { box = new CWireframe(server); boxPair.set(clipboard, box); } - box.setPos1(null).setPos2(null); - box.setPos1(pos1.toLocation(player.getWorld())); - box.setPos2(pos2.toLocation(player.getWorld())); + box.setPos1And2(pos1.toLocation(player.getWorld()), pos2.toLocation(player.getWorld())); box.setWidth(width); box.setBlock(block); } diff --git a/SpigotCore/SpigotCore_21/build.gradle.kts b/SpigotCore/SpigotCore_21/build.gradle.kts index 8f2acba4..e8440e00 100644 --- a/SpigotCore/SpigotCore_21/build.gradle.kts +++ b/SpigotCore/SpigotCore_21/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -37,4 +37,7 @@ dependencies { compileOnly(libs.paperapi21) compileOnly(libs.nms21) + compileOnly(libs.datafixer) + compileOnly(libs.netty) + compileOnly(libs.authlib) } diff --git a/SpigotCore/SpigotCore_21/src/de/steamwar/core/BountifulWrapper21.java b/SpigotCore/SpigotCore_21/src/de/steamwar/core/BountifulWrapper21.java index be404e30..c8b4c8b0 100644 --- a/SpigotCore/SpigotCore_21/src/de/steamwar/core/BountifulWrapper21.java +++ b/SpigotCore/SpigotCore_21/src/de/steamwar/core/BountifulWrapper21.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_21/src/de/steamwar/core/ChatWrapper21.java b/SpigotCore/SpigotCore_21/src/de/steamwar/core/ChatWrapper21.java index 64757bbe..b3570146 100644 --- a/SpigotCore/SpigotCore_21/src/de/steamwar/core/ChatWrapper21.java +++ b/SpigotCore/SpigotCore_21/src/de/steamwar/core/ChatWrapper21.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_21/src/de/steamwar/core/CraftbukkitWrapper21.java b/SpigotCore/SpigotCore_21/src/de/steamwar/core/CraftbukkitWrapper21.java index a774c401..033ab273 100644 --- a/SpigotCore/SpigotCore_21/src/de/steamwar/core/CraftbukkitWrapper21.java +++ b/SpigotCore/SpigotCore_21/src/de/steamwar/core/CraftbukkitWrapper21.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_21/src/de/steamwar/core/FlatteningWrapper21.java b/SpigotCore/SpigotCore_21/src/de/steamwar/core/FlatteningWrapper21.java new file mode 100644 index 00000000..25ada9a8 --- /dev/null +++ b/SpigotCore/SpigotCore_21/src/de/steamwar/core/FlatteningWrapper21.java @@ -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 . + */ + +package de.steamwar.core; + +import com.destroystokyo.paper.profile.PlayerProfile; +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.OfflinePlayer; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.SkullMeta; + +public class FlatteningWrapper21 extends FlatteningWrapper14 implements FlatteningWrapper.IFlatteningWrapper { + + @Override + public ItemStack setSkullOwner(String player) { + ItemStack head = new ItemStack(Material.PLAYER_HEAD, 1); + head.editMeta(SkullMeta.class, skullMeta -> { + OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(player.startsWith(".") ? player.substring(1) : player); + PlayerProfile playerProfile = offlinePlayer.getPlayerProfile(); + if (!playerProfile.isComplete()) playerProfile.complete(); + skullMeta.setPlayerProfile(playerProfile); + }); + return head; + } +} diff --git a/SpigotCore/SpigotCore_21/src/de/steamwar/core/ProtocolWrapper21.java b/SpigotCore/SpigotCore_21/src/de/steamwar/core/ProtocolWrapper21.java new file mode 100644 index 00000000..2186e32b --- /dev/null +++ b/SpigotCore/SpigotCore_21/src/de/steamwar/core/ProtocolWrapper21.java @@ -0,0 +1,66 @@ +/* + * 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 . + */ + +package de.steamwar.core; + +import com.mojang.authlib.GameProfile; +import com.mojang.datafixers.util.Pair; +import de.steamwar.Reflection; +import net.minecraft.Util; +import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket; +import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket; +import net.minecraft.world.level.GameType; +import org.bukkit.GameMode; + +import java.util.Collections; +import java.util.EnumSet; +import java.util.List; +import java.util.function.LongSupplier; + +public class ProtocolWrapper21 implements ProtocolWrapper { + + private static final Reflection.Field equipmentStack = Reflection.getField(equipmentPacket, List.class, 0); + @Override + public void setEquipmentPacketStack(Object packet, Object slot, Object stack) { + equipmentStack.set(packet, Collections.singletonList(new Pair<>(slot, stack))); + } + + private static final Reflection.Constructor removePacketConstructor = Reflection.getConstructor(ClientboundPlayerInfoRemovePacket.class, List.class); + + @Override + @SuppressWarnings("deprecation") + public Object playerInfoPacketConstructor(PlayerInfoAction action, GameProfile profile, GameMode mode) { + if(action == PlayerInfoAction.REMOVE) + return removePacketConstructor.invoke(Collections.singletonList(profile.getId())); + return switch (action) { + case ADD -> new ClientboundPlayerInfoUpdatePacket(EnumSet.of(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE), new ClientboundPlayerInfoUpdatePacket.Entry( + profile.getId(), profile, true, 0, GameType.byId(mode.getValue()), null, true, 0, null + )); + case GAMEMODE -> new ClientboundPlayerInfoUpdatePacket(EnumSet.of(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE), new ClientboundPlayerInfoUpdatePacket.Entry( + profile.getId(), profile, true, 0, GameType.byId(mode.getValue()), null, true, 0, null + )); + default -> null; + }; + } + + @Override + public void initTPSWarp(LongSupplier longSupplier) { + Util.timeSource = () -> System.nanoTime() + longSupplier.getAsLong(); + } +} diff --git a/SpigotCore/SpigotCore_21/src/de/steamwar/core/TrickyParticleWrapper21.java b/SpigotCore/SpigotCore_21/src/de/steamwar/core/TrickyParticleWrapper21.java index 5575a45b..4f3ca8f0 100644 --- a/SpigotCore/SpigotCore_21/src/de/steamwar/core/TrickyParticleWrapper21.java +++ b/SpigotCore/SpigotCore_21/src/de/steamwar/core/TrickyParticleWrapper21.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_21/src/de/steamwar/core/TrickyTrialsWrapper21.java b/SpigotCore/SpigotCore_21/src/de/steamwar/core/TrickyTrialsWrapper21.java index fe3bc55f..a0800dac 100644 --- a/SpigotCore/SpigotCore_21/src/de/steamwar/core/TrickyTrialsWrapper21.java +++ b/SpigotCore/SpigotCore_21/src/de/steamwar/core/TrickyTrialsWrapper21.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_21/src/de/steamwar/core/WorldEditWrapper21.java b/SpigotCore/SpigotCore_21/src/de/steamwar/core/WorldEditWrapper21.java index 52947f3a..a7e90c41 100644 --- a/SpigotCore/SpigotCore_21/src/de/steamwar/core/WorldEditWrapper21.java +++ b/SpigotCore/SpigotCore_21/src/de/steamwar/core/WorldEditWrapper21.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_21/src/de/steamwar/scoreboard/SWScoreboard21.java b/SpigotCore/SpigotCore_21/src/de/steamwar/scoreboard/SWScoreboard21.java index 019e3898..cfb64049 100644 --- a/SpigotCore/SpigotCore_21/src/de/steamwar/scoreboard/SWScoreboard21.java +++ b/SpigotCore/SpigotCore_21/src/de/steamwar/scoreboard/SWScoreboard21.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_21/src/de/steamwar/techhider/ChunkHider21.java b/SpigotCore/SpigotCore_21/src/de/steamwar/techhider/ChunkHider21.java new file mode 100644 index 00000000..0d0cb782 --- /dev/null +++ b/SpigotCore/SpigotCore_21/src/de/steamwar/techhider/ChunkHider21.java @@ -0,0 +1,157 @@ +/* + * 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 . + */ + +package de.steamwar.techhider; + +import de.steamwar.Reflection; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; +import net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData; +import net.minecraft.network.protocol.game.ClientboundLevelChunkWithLightPacket; +import net.minecraft.util.SimpleBitStorage; +import net.minecraft.world.level.block.entity.BlockEntityType; +import org.bukkit.entity.Player; + +import java.util.List; +import java.util.Set; +import java.util.function.BiFunction; +import java.util.function.UnaryOperator; +import java.util.stream.Collectors; + +public class ChunkHider21 implements ChunkHider { + @Override + public Class mapChunkPacket() { + return ClientboundLevelChunkWithLightPacket.class; + } + + private static final UnaryOperator chunkPacketCloner = ProtocolUtils.shallowCloneGenerator(ClientboundLevelChunkWithLightPacket.class); + private static final UnaryOperator chunkDataCloner = ProtocolUtils.shallowCloneGenerator(ClientboundLevelChunkPacketData.class); + + private static final Reflection.Field chunkXField = Reflection.getField(ClientboundLevelChunkWithLightPacket.class, int.class, 0); + private static final Reflection.Field chunkZField = Reflection.getField(ClientboundLevelChunkWithLightPacket.class, int.class, 1); + private static final Reflection.Field chunkData = Reflection.getField(ClientboundLevelChunkWithLightPacket.class, ClientboundLevelChunkPacketData.class, 0); + + private static final Reflection.Field dataField = Reflection.getField(ClientboundLevelChunkPacketData.class, byte[].class, 0); + private static final Reflection.Field tileEntities = Reflection.getField(ClientboundLevelChunkPacketData.class, List.class, 0); + + @Override + public BiFunction chunkHiderGenerator(TechHider techHider) { + return (p, packet) -> { + int chunkX = chunkXField.get(packet); + int chunkZ = chunkZField.get(packet); + if (techHider.getLocationEvaluator().skipChunk(p, chunkX, chunkZ)) + return packet; + + packet = chunkPacketCloner.apply(packet); + Object dataWrapper = chunkDataCloner.apply(chunkData.get(packet)); + + Set hiddenBlockEntities = techHider.getHiddenBlockEntities(); + tileEntities.set(dataWrapper, ((List)tileEntities.get(dataWrapper)).stream().filter(te -> tileEntityVisible(hiddenBlockEntities, te)).collect(Collectors.toList())); + + ByteBuf in = Unpooled.wrappedBuffer(dataField.get(dataWrapper)); + ByteBuf out = Unpooled.buffer(in.readableBytes() + 64); + for(int yOffset = p.getWorld().getMinHeight(); yOffset < p.getWorld().getMaxHeight(); yOffset += 16) { + SectionHider section = new SectionHider(p, techHider, in, out, chunkX, yOffset/16, chunkZ); + section.copyBlockCount(); + + blocks(section); + biomes(section); + } + + if (in.readableBytes() != 0) { + throw new IllegalStateException("ChunkHider21: Incomplete chunk data, " + in.readableBytes() + " bytes left"); + } + + byte[] data = new byte[out.readableBytes()]; + out.readBytes(data); + dataField.set(dataWrapper, data); + + chunkData.set(packet, dataWrapper); + return packet; + }; + } + + public static final Class tileEntity = Reflection.getClass("net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData$BlockEntityInfo"); + protected static final Reflection.Field entityType = Reflection.getField(tileEntity, BlockEntityType.class, 0); + private static final Class builtInRegestries = Reflection.getClass("net.minecraft.core.registries.BuiltInRegistries"); + private static final Class registry = Reflection.getClass("net.minecraft.core.Registry"); + private static final Reflection.Field nameField = Reflection.getField(builtInRegestries, "BLOCK_ENTITY_TYPE", registry); + private static final Class resourceLocation = Reflection.getClass("net.minecraft.resources.ResourceLocation"); + private static final Reflection.Method getKey = Reflection.getTypedMethod(registry, "getKey", resourceLocation, Object.class); + private static final Reflection.Method getName = Reflection.getTypedMethod(resourceLocation, "getPath", String.class); + protected boolean tileEntityVisible(Set hiddenBlockEntities, Object tile) { + return !hiddenBlockEntities.contains(getName.invoke(getKey.invoke(nameField.get(null), entityType.get(tile)))); + } + + private void blocks(SectionHider section) { + section.copyBitsPerBlock(); + + boolean singleValued = section.getBitsPerBlock() == 0; + if (singleValued) { + int value = ProtocolUtils.readVarInt(section.getIn()); + ProtocolUtils.writeVarInt(section.getOut(), !section.isSkipSection() && section.getObfuscate().contains(value) ? section.getTarget() : value); + return; + } else { + section.processPalette(); + } + + if (section.isSkipSection() || (!section.blockPrecise() && section.isPaletted())) { + section.skipNewDataArray(4096); + return; + } + + SimpleBitStorage values = new SimpleBitStorage(section.getBitsPerBlock(), 4096, section.readNewDataArray(4096)); + + for (int y = 0; y < 16; y++) { + for (int z = 0; z < 16; z++) { + for (int x = 0; x < 16; x++) { + int pos = (((y * 16) + z) * 16) + x; + + TechHider.State test = section.test(x, y, z); + + switch (test) { + case SKIP: + break; + case CHECK: + if (!section.getObfuscate().contains(values.get(pos))) + break; + case HIDE: + values.set(pos, section.getTarget()); + break; + case HIDE_AIR: + default: + values.set(pos, section.getAir()); + } + } + } + } + + section.writeDataArray(values.getRaw()); + } + + private void biomes(SectionHider section) { + section.copyBitsPerBlock(); + if(section.getBitsPerBlock() == 0) { + section.copyVarInt(); + } else if(section.getBitsPerBlock() < 6) { + section.skipPalette(); + section.skipNewDataArray(64); + } + } +} diff --git a/SpigotCore/SpigotCore_8/build.gradle.kts b/SpigotCore/SpigotCore_8/build.gradle.kts index f03254dd..cc99f61e 100644 --- a/SpigotCore/SpigotCore_8/build.gradle.kts +++ b/SpigotCore/SpigotCore_8/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/core/BountifulWrapper8.java b/SpigotCore/SpigotCore_8/src/de/steamwar/core/BountifulWrapper8.java index 9f0d8e1a..eb3c8bc1 100644 --- a/SpigotCore/SpigotCore_8/src/de/steamwar/core/BountifulWrapper8.java +++ b/SpigotCore/SpigotCore_8/src/de/steamwar/core/BountifulWrapper8.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . + * 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 . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/core/ChatWrapper8.java b/SpigotCore/SpigotCore_8/src/de/steamwar/core/ChatWrapper8.java index c41c1710..969e32ad 100644 --- a/SpigotCore/SpigotCore_8/src/de/steamwar/core/ChatWrapper8.java +++ b/SpigotCore/SpigotCore_8/src/de/steamwar/core/ChatWrapper8.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/core/CraftbukkitWrapper8.java b/SpigotCore/SpigotCore_8/src/de/steamwar/core/CraftbukkitWrapper8.java index 23be7911..9f04130f 100644 --- a/SpigotCore/SpigotCore_8/src/de/steamwar/core/CraftbukkitWrapper8.java +++ b/SpigotCore/SpigotCore_8/src/de/steamwar/core/CraftbukkitWrapper8.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/core/FlatteningWrapper8.java b/SpigotCore/SpigotCore_8/src/de/steamwar/core/FlatteningWrapper8.java index b191a069..4c85eca0 100644 --- a/SpigotCore/SpigotCore_8/src/de/steamwar/core/FlatteningWrapper8.java +++ b/SpigotCore/SpigotCore_8/src/de/steamwar/core/FlatteningWrapper8.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/core/IDConverter8.java b/SpigotCore/SpigotCore_8/src/de/steamwar/core/IDConverter8.java index 7026365b..e13ad74a 100644 --- a/SpigotCore/SpigotCore_8/src/de/steamwar/core/IDConverter8.java +++ b/SpigotCore/SpigotCore_8/src/de/steamwar/core/IDConverter8.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/core/LocaleChangeWrapper8.java b/SpigotCore/SpigotCore_8/src/de/steamwar/core/LocaleChangeWrapper8.java index ddee9c6c..76c565df 100644 --- a/SpigotCore/SpigotCore_8/src/de/steamwar/core/LocaleChangeWrapper8.java +++ b/SpigotCore/SpigotCore_8/src/de/steamwar/core/LocaleChangeWrapper8.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/core/ProtocolWrapper8.java b/SpigotCore/SpigotCore_8/src/de/steamwar/core/ProtocolWrapper8.java index e30caa17..d897487b 100644 --- a/SpigotCore/SpigotCore_8/src/de/steamwar/core/ProtocolWrapper8.java +++ b/SpigotCore/SpigotCore_8/src/de/steamwar/core/ProtocolWrapper8.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/core/RecipeDiscoverWrapper8.java b/SpigotCore/SpigotCore_8/src/de/steamwar/core/RecipeDiscoverWrapper8.java index 59faa4cb..841719cd 100644 --- a/SpigotCore/SpigotCore_8/src/de/steamwar/core/RecipeDiscoverWrapper8.java +++ b/SpigotCore/SpigotCore_8/src/de/steamwar/core/RecipeDiscoverWrapper8.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/core/TrickyTrialsWrapper8.java b/SpigotCore/SpigotCore_8/src/de/steamwar/core/TrickyTrialsWrapper8.java index 5bb66d2d..9aff1020 100644 --- a/SpigotCore/SpigotCore_8/src/de/steamwar/core/TrickyTrialsWrapper8.java +++ b/SpigotCore/SpigotCore_8/src/de/steamwar/core/TrickyTrialsWrapper8.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/core/WorldEditRendererWrapper8.java b/SpigotCore/SpigotCore_8/src/de/steamwar/core/WorldEditRendererWrapper8.java index 68f64c46..1994e42f 100644 --- a/SpigotCore/SpigotCore_8/src/de/steamwar/core/WorldEditRendererWrapper8.java +++ b/SpigotCore/SpigotCore_8/src/de/steamwar/core/WorldEditRendererWrapper8.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/core/WorldEditWrapper8.java b/SpigotCore/SpigotCore_8/src/de/steamwar/core/WorldEditWrapper8.java index 75957933..cc021f19 100644 --- a/SpigotCore/SpigotCore_8/src/de/steamwar/core/WorldEditWrapper8.java +++ b/SpigotCore/SpigotCore_8/src/de/steamwar/core/WorldEditWrapper8.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/scoreboard/SWScoreboard8.java b/SpigotCore/SpigotCore_8/src/de/steamwar/scoreboard/SWScoreboard8.java index a1648419..75b4da57 100644 --- a/SpigotCore/SpigotCore_8/src/de/steamwar/scoreboard/SWScoreboard8.java +++ b/SpigotCore/SpigotCore_8/src/de/steamwar/scoreboard/SWScoreboard8.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/techhider/BlockIds8.java b/SpigotCore/SpigotCore_8/src/de/steamwar/techhider/BlockIds8.java index 64ac6c41..25535af8 100644 --- a/SpigotCore/SpigotCore_8/src/de/steamwar/techhider/BlockIds8.java +++ b/SpigotCore/SpigotCore_8/src/de/steamwar/techhider/BlockIds8.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.techhider; diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/techhider/ChunkHider8.java b/SpigotCore/SpigotCore_8/src/de/steamwar/techhider/ChunkHider8.java index 0aebc6e1..6b7441a4 100644 --- a/SpigotCore/SpigotCore_8/src/de/steamwar/techhider/ChunkHider8.java +++ b/SpigotCore/SpigotCore_8/src/de/steamwar/techhider/ChunkHider8.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.techhider; diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/techhider/ProtocolWrapper8.java b/SpigotCore/SpigotCore_8/src/de/steamwar/techhider/ProtocolWrapper8.java index 78633bc1..28d6b8f6 100644 --- a/SpigotCore/SpigotCore_8/src/de/steamwar/techhider/ProtocolWrapper8.java +++ b/SpigotCore/SpigotCore_8/src/de/steamwar/techhider/ProtocolWrapper8.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.techhider; diff --git a/SpigotCore/SpigotCore_9/build.gradle.kts b/SpigotCore/SpigotCore_9/build.gradle.kts index c149a3fd..1abca6d1 100644 --- a/SpigotCore/SpigotCore_9/build.gradle.kts +++ b/SpigotCore/SpigotCore_9/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_9/src/de/steamwar/core/BountifulWrapper9.java b/SpigotCore/SpigotCore_9/src/de/steamwar/core/BountifulWrapper9.java index 156662a8..a77a0abe 100644 --- a/SpigotCore/SpigotCore_9/src/de/steamwar/core/BountifulWrapper9.java +++ b/SpigotCore/SpigotCore_9/src/de/steamwar/core/BountifulWrapper9.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . + * 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 . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_9/src/de/steamwar/core/CraftbukkitWrapper9.java b/SpigotCore/SpigotCore_9/src/de/steamwar/core/CraftbukkitWrapper9.java index 608209dc..847036cc 100644 --- a/SpigotCore/SpigotCore_9/src/de/steamwar/core/CraftbukkitWrapper9.java +++ b/SpigotCore/SpigotCore_9/src/de/steamwar/core/CraftbukkitWrapper9.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_9/src/de/steamwar/core/TrickyParticleWrapper9.java b/SpigotCore/SpigotCore_9/src/de/steamwar/core/TrickyParticleWrapper9.java index 5c2c879b..2304ee3c 100644 --- a/SpigotCore/SpigotCore_9/src/de/steamwar/core/TrickyParticleWrapper9.java +++ b/SpigotCore/SpigotCore_9/src/de/steamwar/core/TrickyParticleWrapper9.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_9/src/de/steamwar/core/WorldEditRendererWrapper9.java b/SpigotCore/SpigotCore_9/src/de/steamwar/core/WorldEditRendererWrapper9.java index 5da6104a..7c39b7ff 100644 --- a/SpigotCore/SpigotCore_9/src/de/steamwar/core/WorldEditRendererWrapper9.java +++ b/SpigotCore/SpigotCore_9/src/de/steamwar/core/WorldEditRendererWrapper9.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_9/src/de/steamwar/techhider/ChunkHider9.java b/SpigotCore/SpigotCore_9/src/de/steamwar/techhider/ChunkHider9.java index 96060822..71b47743 100644 --- a/SpigotCore/SpigotCore_9/src/de/steamwar/techhider/ChunkHider9.java +++ b/SpigotCore/SpigotCore_9/src/de/steamwar/techhider/ChunkHider9.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.techhider; diff --git a/SpigotCore/SpigotCore_Main/build.gradle.kts b/SpigotCore/SpigotCore_Main/build.gradle.kts index cc941d8c..85ff16cc 100644 --- a/SpigotCore/SpigotCore_Main/build.gradle.kts +++ b/SpigotCore/SpigotCore_Main/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -26,6 +26,8 @@ tasks.compileJava { } dependencies { + compileOnly(libs.classindex) + annotationProcessor(libs.classindex) compileOnly(project(":CommonCore", "default")) compileOnly(project(":CommandFramework", "default")) compileOnly(project(":SpigotCore:CRIUDummy", "default")) diff --git a/SpigotCore/SpigotCore_Main/src/SpigotCore.properties b/SpigotCore/SpigotCore_Main/src/SpigotCore.properties index 94e57d6c..98fde115 100644 --- a/SpigotCore/SpigotCore_Main/src/SpigotCore.properties +++ b/SpigotCore/SpigotCore_Main/src/SpigotCore.properties @@ -1,7 +1,7 @@ # # This file is a part of the SteamWar software. # -# Copyright (C) 2024 SteamWar.de-Serverteam +# 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 diff --git a/SpigotCore/SpigotCore_Main/src/SpigotCore_de.properties b/SpigotCore/SpigotCore_Main/src/SpigotCore_de.properties index 1f573eff..9b5eaccc 100644 --- a/SpigotCore/SpigotCore_Main/src/SpigotCore_de.properties +++ b/SpigotCore/SpigotCore_Main/src/SpigotCore_de.properties @@ -1,7 +1,7 @@ # # This file is a part of the SteamWar software. # -# Copyright (C) 2024 SteamWar.de-Serverteam +# 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 diff --git a/SpigotCore/SpigotCore_Main/src/com/comphenix/tinyprotocol/TinyProtocol.java b/SpigotCore/SpigotCore_Main/src/com/comphenix/tinyprotocol/TinyProtocol.java index 6f1dbf1a..cb4aca06 100644 --- a/SpigotCore/SpigotCore_Main/src/com/comphenix/tinyprotocol/TinyProtocol.java +++ b/SpigotCore/SpigotCore_Main/src/com/comphenix/tinyprotocol/TinyProtocol.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/Reflection.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/Reflection.java index 86dca0bf..5b5d88d2 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/Reflection.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/Reflection.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar; @@ -157,7 +157,23 @@ public final class Reflection { } else if(MAJOR_VERSION < 21 || MINOR_VERSION < 4) { return Class.forName(spigotClassnames.getOrDefault(name, name)); } else { - return Class.forName(name); + Class clazz = null; + try { + clazz = Class.forName(name); + } catch (ClassNotFoundException e) {} + if (clazz != null && clazz.getName().equals(name)) { + return clazz; + } + + try { + return Core.class.getClassLoader().getParent().loadClass(name); + } catch (ClassNotFoundException e) { + if (clazz == null) { + throw e; + } + + return clazz; + } } } catch (ClassNotFoundException e) { throw new IllegalArgumentException("Cannot find " + name, e); diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/command/CaseInsensitiveCommandsListener.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/command/CaseInsensitiveCommandsListener.java index 05eafdbb..600a405b 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/command/CaseInsensitiveCommandsListener.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/command/CaseInsensitiveCommandsListener.java @@ -1,25 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; import de.steamwar.core.Core; +import de.steamwar.linkage.Linked; import de.steamwar.providers.BauServerInfo; import de.steamwar.sql.AuditLog; import de.steamwar.sql.SteamwarUser; @@ -28,6 +29,7 @@ import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerCommandPreprocessEvent; +@Linked public class CaseInsensitiveCommandsListener implements Listener { @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/command/CommandRegistering.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/command/CommandRegistering.java index 143ea2aa..4adffb58 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/command/CommandRegistering.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/command/CommandRegistering.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/command/SWCommand.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/command/SWCommand.java index 5094da45..9bc8fea8 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/command/SWCommand.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/command/SWCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; @@ -44,7 +44,7 @@ public class SWCommand extends AbstractSWCommand { private Command command; @Setter - private Message message = null; + protected Message message = null; private List defaultHelpMessages = new ArrayList<>(); protected SWCommand(String command) { diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/command/TypeMapper.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/command/TypeMapper.java index 08c99cd0..8beaa2f0 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/command/TypeMapper.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/command/TypeMapper.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/command/TypeUtils.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/command/TypeUtils.java index f4db4f9e..30deed6e 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/command/TypeUtils.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/command/TypeUtils.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/command/TypeValidator.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/command/TypeValidator.java index a07f11eb..89252aad 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/command/TypeValidator.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/command/TypeValidator.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/BountifulWrapper.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/BountifulWrapper.java index f1c86afe..4cf64ac7 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/BountifulWrapper.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/BountifulWrapper.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CRIUSleepEvent.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CRIUSleepEvent.java index eb8faaf0..45e9bf4e 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CRIUSleepEvent.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CRIUSleepEvent.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CRIUWakeupEvent.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CRIUWakeupEvent.java index 90a6ee32..6c644e0f 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CRIUWakeupEvent.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CRIUWakeupEvent.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/ChatWrapper.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/ChatWrapper.java index 8c7d1868..668a47a7 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/ChatWrapper.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/ChatWrapper.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CheckpointUtils.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CheckpointUtils.java index 56e71994..7fe128ec 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CheckpointUtils.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CheckpointUtils.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CheckpointUtilsJ9.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CheckpointUtilsJ9.java index 81f936de..8f34ae6a 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CheckpointUtilsJ9.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CheckpointUtilsJ9.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CommandRemover.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CommandRemover.java index 52787db6..8b6aa992 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CommandRemover.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CommandRemover.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/Core.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/Core.java index 91c05851..64c16174 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/Core.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/Core.java @@ -1,35 +1,34 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.core; 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; +import de.steamwar.command.SWCommandUtils; +import de.steamwar.command.SWTypeMapperCreator; +import de.steamwar.command.TabCompletionCache; +import de.steamwar.command.TypeMapper; +import de.steamwar.linkage.AbstractLinker; +import de.steamwar.linkage.SpigotLinker; import de.steamwar.message.Message; import de.steamwar.network.NetworkReceiver; -import de.steamwar.network.handlers.ServerDataHandler; import de.steamwar.sql.SchematicNode; import de.steamwar.sql.SteamwarUser; import de.steamwar.sql.internal.Statement; @@ -37,7 +36,6 @@ import lombok.Getter; import lombok.Setter; import org.bukkit.Bukkit; import org.bukkit.command.CommandSender; -import org.bukkit.event.Listener; import org.bukkit.plugin.java.JavaPlugin; import java.io.BufferedReader; @@ -95,9 +93,16 @@ public class Core extends JavaPlugin { } }); - for(Listener listener : new Listener[]{new CaseInsensitiveCommandsListener(), new PlayerJoinedEvent(), new ChattingEvent(), new WorldLoadEvent(), RecipeDiscoverWrapper.impl}) { - getServer().getPluginManager().registerEvents(listener, this); - } + SpigotLinker spigotLinker = new SpigotLinker(this, MESSAGE); + try { + spigotLinker.link(); + } catch (AbstractLinker.LinkException e) { + e.printStackTrace(); + Bukkit.shutdown(); + return; + } + + Bukkit.getServer().getPluginManager().registerEvents(RecipeDiscoverWrapper.impl, this); if(!Statement.productionDatabase()) { getServer().getPluginManager().registerEvents(LocaleChangeWrapper.impl, this); } @@ -105,18 +110,8 @@ public class Core extends JavaPlugin { getServer().getMessenger().registerIncomingPluginChannel(this, "sw:bridge", new NetworkReceiver()); getServer().getMessenger().registerOutgoingPluginChannel(this, "sw:bridge"); - if(Core.getVersion() < 19) - AuthlibInjector.inject(); - TinyProtocol.init(); CheckpointUtils.signalHandler(); - new AntiNocom(); - - if(Core.getVersion() >= 19) - new ServerDataHandler(); - - if(Bukkit.getPluginManager().getPlugin("WorldEdit") != null) - new WorldEditRenderer(); Bukkit.getScheduler().runTaskTimer(this, TabCompletionCache::invalidateOldEntries, 20, 20); Bukkit.getScheduler().runTaskTimer(Core.getInstance(), SteamwarUser::clear, 72000, 72000); diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CraftbukkitWrapper.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CraftbukkitWrapper.java index 13cd06a7..dfeed83c 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CraftbukkitWrapper.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CraftbukkitWrapper.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . -*/ + * 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 . + */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CrashDetector.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CrashDetector.java index 543eccad..1963c8f9 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CrashDetector.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/CrashDetector.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/ErrorHandler.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/ErrorHandler.java index 5a801f11..640d7ac0 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/ErrorHandler.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/ErrorHandler.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/FlatteningWrapper.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/FlatteningWrapper.java index b4d954f8..2a6d6370 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/FlatteningWrapper.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/FlatteningWrapper.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/LocaleChangeWrapper.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/LocaleChangeWrapper.java index 6db67b79..0726dfb2 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/LocaleChangeWrapper.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/LocaleChangeWrapper.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/PlayerVersion.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/PlayerVersion.java index 512df0d3..cf232f1d 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/PlayerVersion.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/PlayerVersion.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/ProtocolWrapper.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/ProtocolWrapper.java index 9c226741..dcdb1791 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/ProtocolWrapper.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/ProtocolWrapper.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/RecipeDiscoverWrapper.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/RecipeDiscoverWrapper.java index 0d6b9da4..53b27d65 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/RecipeDiscoverWrapper.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/RecipeDiscoverWrapper.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TPSWarpUtils.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TPSWarpUtils.java index 439864ed..c5979bcf 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TPSWarpUtils.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TPSWarpUtils.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TPSWatcher.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TPSWatcher.java index f6714e0e..e88b1e82 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TPSWatcher.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TPSWatcher.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TrickyParticleWrapper.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TrickyParticleWrapper.java index ae781100..7b86bacf 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TrickyParticleWrapper.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TrickyParticleWrapper.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TrickyTrialsWrapper.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TrickyTrialsWrapper.java index 9a3d51dd..ab0aeb61 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TrickyTrialsWrapper.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TrickyTrialsWrapper.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/VersionDependent.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/VersionDependent.java index 2fe94ce5..d31e9a24 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/VersionDependent.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/VersionDependent.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . -*/ + * 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 . + */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/WorldEditRenderer.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/WorldEditRenderer.java index 79c54986..3e84f30e 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/WorldEditRenderer.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/WorldEditRenderer.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; @@ -28,6 +28,8 @@ import com.sk89q.worldedit.math.transform.Transform; import com.sk89q.worldedit.regions.Region; import com.sk89q.worldedit.regions.RegionSelector; import com.sk89q.worldedit.world.World; +import de.steamwar.linkage.Linked; +import de.steamwar.linkage.PluginCheck; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.entity.Player; @@ -37,6 +39,8 @@ import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.player.*; import org.bukkit.util.Vector; +@Linked +@PluginCheck("WorldEdit") public class WorldEditRenderer implements Listener { private static WorldEditRenderer INSTANCE; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/WorldEditRendererCUIEditor.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/WorldEditRendererCUIEditor.java index e50eac9d..0060d29a 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/WorldEditRendererCUIEditor.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/WorldEditRendererCUIEditor.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; @@ -24,18 +24,36 @@ import de.steamwar.inventory.SWInventory; import de.steamwar.inventory.SWItem; import de.steamwar.sql.UserConfig; import lombok.AllArgsConstructor; +import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.block.data.type.Light; import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.inventory.meta.BlockDataMeta; import org.bukkit.inventory.meta.ItemMeta; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; +import java.util.*; + +public class WorldEditRendererCUIEditor implements Listener { + + @EventHandler + public void onPlayerQuit(PlayerQuitEvent event) { + for (Type type : Type.values()) { + type.materialCache.remove(event.getPlayer()); + type.widthCache.remove(event.getPlayer()); + } + } + + @EventHandler + public void onCRIUSleep(CRIUSleepEvent event) { + for (Type type : Type.values()) { + type.materialCache.clear(); + type.widthCache.clear(); + } + } -public class WorldEditRendererCUIEditor { @AllArgsConstructor public enum Type { @@ -43,34 +61,43 @@ public class WorldEditRendererCUIEditor { CLIPBOARD("cui_clipboard_material", "cui_clipboard_width", Material.LIME_CONCRETE, Width.SLIM), ; + private final Map materialCache = new HashMap<>(); + private final Map widthCache = new HashMap<>(); + private final String configMaterial; private final String configWidth; private final Material defaultMaterial; private final Width defaultWidth; public Material getMaterial(Player player) { - String material = UserConfig.getConfig(player.getUniqueId(), configMaterial); - if (material == null) { - return defaultMaterial; - } else { - return Material.valueOf(material); - } + return materialCache.computeIfAbsent(player, p -> { + String material = UserConfig.getConfig(p.getUniqueId(), configMaterial); + if (material == null) { + return defaultMaterial; + } else { + return Material.valueOf(material); + } + }); } public void setMaterial(Player player, Material material) { + materialCache.put(player, material); UserConfig.updatePlayerConfig(player.getUniqueId(), configMaterial, material.name()); } public Width getWidth(Player player) { - String width = UserConfig.getConfig(player.getUniqueId(), configWidth); - if (width == null) { - return defaultWidth; - } else { - return Width.valueOf(width); - } + return widthCache.computeIfAbsent(player, p -> { + String width = UserConfig.getConfig(p.getUniqueId(), configWidth); + if (width == null) { + return defaultWidth; + } else { + return Width.valueOf(width); + } + }); } public void setWidth(Player player, Width width) { + widthCache.put(player, width); UserConfig.updatePlayerConfig(player.getUniqueId(), configWidth, width.name()); } } @@ -88,6 +115,7 @@ public class WorldEditRendererCUIEditor { } public WorldEditRendererCUIEditor() { + Bukkit.getPluginManager().registerEvents(this, Core.getInstance()); if (Core.getVersion() >= 20) { new Command(); } diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/WorldEditRendererWrapper.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/WorldEditRendererWrapper.java index 2439d40d..4651cb06 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/WorldEditRendererWrapper.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/WorldEditRendererWrapper.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/WorldEditWrapper.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/WorldEditWrapper.java index 9928b947..f3b0accc 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/WorldEditWrapper.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/WorldEditWrapper.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/authlib/AuthlibInjector.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/authlib/AuthlibInjector.java index b9c4011a..95927bf3 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/authlib/AuthlibInjector.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/authlib/AuthlibInjector.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core.authlib; @@ -22,11 +22,16 @@ package de.steamwar.core.authlib; import de.steamwar.Reflection; import com.mojang.authlib.GameProfileRepository; import com.mojang.authlib.yggdrasil.YggdrasilGameProfileRepository; +import de.steamwar.linkage.Linked; +import de.steamwar.linkage.MaxVersion; +import de.steamwar.linkage.api.Enable; -public class AuthlibInjector { - private AuthlibInjector() {} +@Linked +@MaxVersion(18) +public class AuthlibInjector implements Enable { - public static void inject() { + @Override + public void enable() { Class minecraftServerClass = Reflection.getClass("net.minecraft.server.MinecraftServer"); Reflection.Field gameProfile = Reflection.getField(minecraftServerClass, GameProfileRepository.class, 0); Object minecraftServer = Reflection.getTypedMethod(minecraftServerClass, "getServer", minecraftServerClass).invoke(null); diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/authlib/SteamwarGameProfileRepository.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/authlib/SteamwarGameProfileRepository.java index 9045de17..c2f9412c 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/authlib/SteamwarGameProfileRepository.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/authlib/SteamwarGameProfileRepository.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core.authlib; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/events/AntiNocom.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/events/AntiNocom.java index 14f8badc..40cdb955 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/events/AntiNocom.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/events/AntiNocom.java @@ -1,27 +1,28 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.core.events; -import de.steamwar.Reflection; import com.comphenix.tinyprotocol.TinyProtocol; +import de.steamwar.Reflection; import de.steamwar.core.Core; +import de.steamwar.linkage.Linked; import de.steamwar.sql.SWException; import de.steamwar.techhider.ProtocolUtils; import de.steamwar.techhider.TechHider; @@ -35,14 +36,13 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Function; +@Linked public class AntiNocom implements Listener { private final Map flags = new ConcurrentHashMap<>(); public AntiNocom() { - Bukkit.getServer().getPluginManager().registerEvents(this, Core.getInstance()); TinyProtocol.instance.addFilter(blockDig, this::onDig); - if(Core.getVersion() > 8) { registerUseItem(); } diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/events/ChattingEvent.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/events/ChattingEvent.java index 1de582f2..bf5c573f 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/events/ChattingEvent.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/events/ChattingEvent.java @@ -1,30 +1,32 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.core.events; import de.steamwar.core.Core; +import de.steamwar.linkage.Linked; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.player.AsyncPlayerChatEvent; +@Linked public class ChattingEvent implements Listener { @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/events/PlayerJoinedEvent.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/events/PlayerJoinedEvent.java index d3fd33a0..e8b7789e 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/events/PlayerJoinedEvent.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/events/PlayerJoinedEvent.java @@ -1,25 +1,26 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.core.events; import de.steamwar.core.Core; +import de.steamwar.linkage.Linked; import de.steamwar.providers.BauServerInfo; import de.steamwar.sql.AuditLog; import de.steamwar.sql.SteamwarUser; @@ -32,7 +33,7 @@ import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; - +@Linked public class PlayerJoinedEvent implements Listener{ @EventHandler(priority = EventPriority.LOWEST) diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/events/WorldLoadEvent.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/events/WorldLoadEvent.java index c28f998e..4f150a51 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/events/WorldLoadEvent.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/events/WorldLoadEvent.java @@ -1,28 +1,30 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.core.events; +import de.steamwar.linkage.Linked; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.world.WorldInitEvent; +@Linked public class WorldLoadEvent implements Listener { @EventHandler diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/data/GameModeConfigUtils.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/data/GameModeConfigUtils.java new file mode 100644 index 00000000..a14aa31e --- /dev/null +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/data/GameModeConfigUtils.java @@ -0,0 +1,41 @@ +/* + * 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 . + */ + +package de.steamwar.data; + +import lombok.experimental.UtilityClass; +import org.bukkit.Material; + +import java.util.function.Function; + +@UtilityClass +public class GameModeConfigUtils { + + public static final Function ToMaterial = material -> { + Material mat = Material.getMaterial(material); + if (mat == null) { + try { + mat = Material.valueOf(material); + } catch (IllegalArgumentException e) { + // Ignore + } + } + return mat; + }; +} diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CCubedTextDisplay.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CCubedTextDisplay.java index 09b8f2f7..c5ebac51 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CCubedTextDisplay.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CCubedTextDisplay.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.entity; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CEntity.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CEntity.java index 373a2acf..63aa9010 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CEntity.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CEntity.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.entity; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CLine.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CLine.java index f8f01928..7e9ae4cc 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CLine.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CLine.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.entity; @@ -59,6 +59,14 @@ public class CLine extends CEntity { return this; } + public CLine setFromAndTo(Location from, Location to) { + if (Objects.equals(from, this.from) && Objects.equals(to, this.to)) return this; + this.from = from; + this.to = to; + tick(); + return this; + } + public CLine setFrom(Location from) { return checkAndSet(this.from, from, location -> this.from = location); } @@ -99,7 +107,16 @@ public class CLine extends CEntity { @Override void tick() { - if (from == null || to == null) return; + if (from == null || to == null) { + if (startLine != null) startLine.hide(true); + if (middleLine != null) middleLine.hide(true); + if (endLine != null) endLine.hide(true); + return; + } else { + if (startLine != null) startLine.hide(false); + if (middleLine != null) middleLine.hide(false); + if (endLine != null) endLine.hide(false); + } if (hide) return; updateStart(); updateMiddle(); diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CRay.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CRay.java index f48badb0..0de13585 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CRay.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CRay.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.entity; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CWireframe.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CWireframe.java index cf15912d..9f75c6e5 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CWireframe.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/CWireframe.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.entity; @@ -22,11 +22,9 @@ package de.steamwar.entity; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.block.data.BlockData; -import org.bukkit.util.Consumer; import org.bukkit.util.Vector; import java.util.List; -import java.util.Objects; /** * Compound Box (12 CLine) @@ -46,6 +44,13 @@ public class CWireframe extends CEntity { } } + public CWireframe setPos1And2(Location pos1, Location pos2) { + this.pos1 = pos1; + this.pos2 = pos2; + updateAndSpawnLines(); + return this; + } + public CWireframe setPos1(Location pos1) { this.pos1 = pos1; updateAndSpawnLines(); @@ -75,29 +80,30 @@ public class CWireframe extends CEntity { } private void updateAndSpawnLines() { - if (pos1 == null || pos2 == null) return; + List lines = getEntitiesByType(CLine.class); + if (pos1 == null || pos2 == null) { + lines.forEach(line -> line.setFrom(null).setTo(null)); + return; + } World world = pos1.getWorld(); Vector min = Vector.getMinimum(pos1.toVector(), pos2.toVector()); Vector max = Vector.getMaximum(pos1.toVector(), pos2.toVector()) .add(new Vector(1 - width, 1 - width, 1 - width)); - List lines = getEntitiesByType(CLine.class); - lines.forEach(line -> line.setFrom(null).setTo(null)); + lines.get(0).setFromAndTo(new Vector(min.getX(), min.getY(), min.getZ()).toLocation(world), new Vector(max.getX() + width, min.getY(), min.getZ()).toLocation(world)); + lines.get(1).setFromAndTo(new Vector(min.getX(), max.getY(), min.getZ()).toLocation(world), new Vector(max.getX() + width, max.getY(), min.getZ()).toLocation(world)); + lines.get(2).setFromAndTo(new Vector(min.getX(), min.getY(), max.getZ()).toLocation(world), new Vector(max.getX() + width, min.getY(), max.getZ()).toLocation(world)); + lines.get(3).setFromAndTo(new Vector(min.getX(), max.getY(), max.getZ()).toLocation(world), new Vector(max.getX() + width, max.getY(), max.getZ()).toLocation(world)); - lines.get(0).setFrom(new Vector(min.getX(), min.getY(), min.getZ()).toLocation(world)).setTo(new Vector(max.getX() + width, min.getY(), min.getZ()).toLocation(world)); - lines.get(1).setFrom(new Vector(min.getX(), max.getY(), min.getZ()).toLocation(world)).setTo(new Vector(max.getX() + width, max.getY(), min.getZ()).toLocation(world)); - lines.get(2).setFrom(new Vector(min.getX(), min.getY(), max.getZ()).toLocation(world)).setTo(new Vector(max.getX() + width, min.getY(), max.getZ()).toLocation(world)); - lines.get(3).setFrom(new Vector(min.getX(), max.getY(), max.getZ()).toLocation(world)).setTo(new Vector(max.getX() + width, max.getY(), max.getZ()).toLocation(world)); + lines.get(4).setFromAndTo(new Vector(min.getX(), min.getY(), min.getZ()).toLocation(world), new Vector(min.getX(), max.getY() + width, min.getZ()).toLocation(world)); + lines.get(5).setFromAndTo(new Vector(max.getX(), min.getY(), min.getZ()).toLocation(world), new Vector(max.getX(), max.getY() + width, min.getZ()).toLocation(world)); + lines.get(6).setFromAndTo(new Vector(min.getX(), min.getY(), max.getZ()).toLocation(world), new Vector(min.getX(), max.getY() + width, max.getZ()).toLocation(world)); + lines.get(7).setFromAndTo(new Vector(max.getX(), min.getY(), max.getZ()).toLocation(world), new Vector(max.getX(), max.getY() + width, max.getZ()).toLocation(world)); - lines.get(4).setFrom(new Vector(min.getX(), min.getY(), min.getZ()).toLocation(world)).setTo(new Vector(min.getX(), max.getY() + width, min.getZ()).toLocation(world)); - lines.get(5).setFrom(new Vector(max.getX(), min.getY(), min.getZ()).toLocation(world)).setTo(new Vector(max.getX(), max.getY() + width, min.getZ()).toLocation(world)); - lines.get(6).setFrom(new Vector(min.getX(), min.getY(), max.getZ()).toLocation(world)).setTo(new Vector(min.getX(), max.getY() + width, max.getZ()).toLocation(world)); - lines.get(7).setFrom(new Vector(max.getX(), min.getY(), max.getZ()).toLocation(world)).setTo(new Vector(max.getX(), max.getY() + width, max.getZ()).toLocation(world)); - - lines.get(8).setFrom(new Vector(min.getX(), min.getY(), min.getZ()).toLocation(world)).setTo(new Vector(min.getX(), min.getY(), max.getZ() + width).toLocation(world)); - lines.get(9).setFrom(new Vector(max.getX(), min.getY(), min.getZ()).toLocation(world)).setTo(new Vector(max.getX(), min.getY(), max.getZ() + width).toLocation(world)); - lines.get(10).setFrom(new Vector(min.getX(), max.getY(), min.getZ()).toLocation(world)).setTo(new Vector(min.getX(), max.getY(), max.getZ() + width).toLocation(world)); - lines.get(11).setFrom(new Vector(max.getX(), max.getY(), min.getZ()).toLocation(world)).setTo(new Vector(max.getX(), max.getY(), max.getZ() + width).toLocation(world)); + lines.get(8).setFromAndTo(new Vector(min.getX(), min.getY(), min.getZ()).toLocation(world), new Vector(min.getX(), min.getY(), max.getZ() + width).toLocation(world)); + lines.get(9).setFromAndTo(new Vector(max.getX(), min.getY(), min.getZ()).toLocation(world), new Vector(max.getX(), min.getY(), max.getZ() + width).toLocation(world)); + lines.get(10).setFromAndTo(new Vector(min.getX(), max.getY(), min.getZ()).toLocation(world), new Vector(min.getX(), max.getY(), max.getZ() + width).toLocation(world)); + lines.get(11).setFromAndTo(new Vector(max.getX(), max.getY(), min.getZ()).toLocation(world), new Vector(max.getX(), max.getY(), max.getZ() + width).toLocation(world)); } } diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RArmorStand.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RArmorStand.java index 420c6f47..249d2cda 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RArmorStand.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RArmorStand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.entity; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RBlockDisplay.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RBlockDisplay.java index 3a00ae9c..0058617a 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RBlockDisplay.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RBlockDisplay.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RDisplay.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RDisplay.java index d176054d..34c3a2eb 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RDisplay.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RDisplay.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/REntity.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/REntity.java index a27e6f5e..840b413e 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/REntity.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/REntity.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.entity; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/REntityServer.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/REntityServer.java index cfa53943..3ba28d38 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/REntityServer.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/REntityServer.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.entity; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RFallingBlockEntity.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RFallingBlockEntity.java index ae70775a..92d19f90 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RFallingBlockEntity.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RFallingBlockEntity.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.entity; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RItemDisplay.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RItemDisplay.java index 45889637..894ba21c 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RItemDisplay.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RItemDisplay.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RPlayer.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RPlayer.java index 3596fc3f..ce79a8cb 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RPlayer.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RPlayer.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.entity; @@ -87,7 +87,7 @@ public class RPlayer extends REntity { gameProfile.getProperties().put("textures", skinData); return gameProfile; } else { - return new GameProfile(actualUUID, name); + return new GameProfile(uuid, name); } } diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RTextDisplay.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RTextDisplay.java index f221e351..29cb8a21 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RTextDisplay.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RTextDisplay.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/InvCallback.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/InvCallback.java index 0ac23234..75e860ed 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/InvCallback.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/InvCallback.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.inventory; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWAnvilInv.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWAnvilInv.java index 3ff1aa1e..d552cfc9 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWAnvilInv.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWAnvilInv.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.inventory; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWInventory.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWInventory.java index 6b009004..b8e4900c 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWInventory.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWInventory.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.inventory; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWItem.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWItem.java index 7fb27810..1b230121 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWItem.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWItem.java @@ -1,26 +1,27 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.inventory; import com.google.gson.JsonArray; import com.google.gson.JsonObject; +import de.steamwar.core.Core; import de.steamwar.core.FlatteningWrapper; import de.steamwar.core.TrickyTrialsWrapper; import org.bukkit.Material; @@ -216,8 +217,10 @@ public class SWItem { } public SWItem setCustomModelData(int customModelData) { - itemMeta.setCustomModelData(customModelData); - itemStack.setItemMeta(itemMeta); + if (Core.getVersion() > 12) { + itemMeta.setCustomModelData(customModelData); + itemStack.setItemMeta(itemMeta); + } return this; } diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWListInv.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWListInv.java index 181d8414..5675e4f7 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWListInv.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWListInv.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.inventory; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java index 6d7a6201..f5975063 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.inventory; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelectorInjectable.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelectorInjectable.java index 235dda4f..3a292997 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelectorInjectable.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelectorInjectable.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.inventory; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/UtilGui.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/UtilGui.java index 298d0c0f..0ae87212 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/UtilGui.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/UtilGui.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.inventory; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/linkage/SpigotLinker.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/linkage/SpigotLinker.java new file mode 100644 index 00000000..c157aa85 --- /dev/null +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/linkage/SpigotLinker.java @@ -0,0 +1,82 @@ +/* + * 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 . + */ + +package de.steamwar.linkage; + +import de.steamwar.command.SWCommand; +import de.steamwar.core.Core; +import de.steamwar.message.Message; +import de.steamwar.network.packets.PacketHandler; +import lombok.NonNull; +import org.bukkit.Bukkit; +import org.bukkit.event.HandlerList; +import org.bukkit.event.Listener; +import org.bukkit.plugin.java.JavaPlugin; + +public class SpigotLinker extends AbstractLinker { + + private final Message message; + + public SpigotLinker(@NonNull JavaPlugin plugin, Message message) { + super(plugin); + this.message = message; + } + + @Override + protected boolean versionCheck(@NonNull Class clazz, MinVersion minVersion, MaxVersion maxVersion) { + if (minVersion != null && Core.getVersion() < minVersion.value()) { + return false; + } + if (maxVersion != null && Core.getVersion() > maxVersion.value()) { + return false; + } + return true; + } + + @Override + protected boolean pluginCheck(@NonNull Class clazz, PluginCheck pluginCheck) { + if (pluginCheck.has() == PluginCheck.Has.THIS && Bukkit.getPluginManager().getPlugin(pluginCheck.value()) != null) { + return true; + } + if (pluginCheck.has() == PluginCheck.Has.NOT && Bukkit.getPluginManager().getPlugin(pluginCheck.value()) == null) { + return true; + } + return false; + } + + @Override + protected void linkObject(Object any) { + if (any instanceof SWCommand) { + ((SWCommand) any).setMessage(message); + } + if (any instanceof Listener) { + Bukkit.getPluginManager().registerEvents((Listener) any, plugin); + } + if (any instanceof PacketHandler) { + ((PacketHandler) any).register(); + } + } + + @Override + protected void unlinkObject(Object any) { + if (any instanceof Listener) { + HandlerList.unregisterAll((Listener) any); + } + } +} diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/message/Message.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/message/Message.java index b9ae84b7..f24b84e6 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/message/Message.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/message/Message.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.message; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/message/SubMessage.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/message/SubMessage.java index e40b74a5..705ee0c1 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/message/SubMessage.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/message/SubMessage.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/network/CoreNetworkHandler.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/network/CoreNetworkHandler.java index 4c3d7e45..10adeac0 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/network/CoreNetworkHandler.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/network/CoreNetworkHandler.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/network/NetworkReceiver.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/network/NetworkReceiver.java index c93046cd..5ef8bf66 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/network/NetworkReceiver.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/network/NetworkReceiver.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/network/NetworkSender.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/network/NetworkSender.java index 197efd64..ba3b4ee0 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/network/NetworkSender.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/network/NetworkSender.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/network/handlers/InventoryHandler.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/network/handlers/InventoryHandler.java index cbf2b8f5..d2e8e73b 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/network/handlers/InventoryHandler.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/network/handlers/InventoryHandler.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.network.handlers; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/network/handlers/ServerDataHandler.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/network/handlers/ServerDataHandler.java index 8941432b..eec211b2 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/network/handlers/ServerDataHandler.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/network/handlers/ServerDataHandler.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -21,7 +21,11 @@ package de.steamwar.network.handlers; import de.steamwar.Reflection; import com.comphenix.tinyprotocol.TinyProtocol; +import de.steamwar.linkage.Linked; +import de.steamwar.linkage.MinVersion; +@Linked +@MinVersion(19) public class ServerDataHandler { public ServerDataHandler() { diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/providers/BauServerInfo.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/providers/BauServerInfo.java index 309db835..8f937e3a 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/providers/BauServerInfo.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/providers/BauServerInfo.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.providers; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/scoreboard/SWScoreboard.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/scoreboard/SWScoreboard.java index 1d5c2d79..06ea4346 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/scoreboard/SWScoreboard.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/scoreboard/SWScoreboard.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.scoreboard; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/scoreboard/ScoreboardCallback.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/scoreboard/ScoreboardCallback.java index 11e403ba..b4071114 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/scoreboard/ScoreboardCallback.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/scoreboard/ScoreboardCallback.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.scoreboard; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/PersonalKit.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/PersonalKit.java index 36e31490..13b05f37 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/PersonalKit.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/PersonalKit.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.sql; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/SQLConfigImpl.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/SQLConfigImpl.java index dd54f35d..52364529 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/SQLConfigImpl.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/SQLConfigImpl.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/SQLWrapperImpl.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/SQLWrapperImpl.java index 7428574e..39e2cef6 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/SQLWrapperImpl.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/SQLWrapperImpl.java @@ -1,69 +1,43 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; import de.steamwar.core.Core; +import de.steamwar.data.GameModeConfigUtils; import org.bukkit.Bukkit; +import org.bukkit.Material; import org.bukkit.World; -import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.entity.Player; import java.io.File; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; -public class SQLWrapperImpl implements SQLWrapper { +public class SQLWrapperImpl implements SQLWrapper { @Override - public void loadSchemTypes(List tmpTypes, Map tmpFromDB) { - File folder = new File(Core.getInstance().getDataFolder().getParentFile(), "FightSystem"); - if(folder.exists()) { - for(File configFile : Arrays.stream(folder.listFiles((file, name) -> name.endsWith(".yml") && !name.endsWith(".kits.yml"))).sorted().collect(Collectors.toList())) { - YamlConfiguration config = YamlConfiguration.loadConfiguration(configFile); - if(!config.isConfigurationSection("Schematic")) - continue; + public File getSchemTypesFolder() { + return new File(Core.getInstance().getDataFolder().getParentFile(), "FightSystem"); + } - String type = config.getString("Schematic.Type"); - assert type != null; - String shortcut = config.getString("Schematic.Shortcut"); - if(tmpFromDB.containsKey(type.toLowerCase())) - continue; - - SchematicType checktype = null; - String material = config.getString("Schematic.Material", "STONE_BUTTON"); - - if(!config.getStringList("CheckQuestions").isEmpty()) { - checktype = new SchematicType("C" + type, "C" + shortcut, SchematicType.Type.CHECK_TYPE, null, material, true); - tmpTypes.add(checktype); - tmpFromDB.put(checktype.toDB(), checktype); - } - - boolean manualCheck = config.getBoolean("Schematic.ManualCheck", true); - - SchematicType current = new SchematicType(type, shortcut, config.isConfigurationSection("Server") ? SchematicType.Type.FIGHT_TYPE : SchematicType.Type.NORMAL, checktype, material, manualCheck); - tmpTypes.add(current); - tmpFromDB.put(type.toLowerCase(), current); - } - } + @Override + public GameModeConfig loadGameModeConfig(File file) { + return new GameModeConfig<>(file, GameModeConfigUtils.ToMaterial, GameModeConfig.ToString, GameModeConfig.ToStaticWarGear, true); } private static final String SERVER_VERSION = Bukkit.getServer().getVersion(); @@ -71,10 +45,10 @@ public class SQLWrapperImpl implements SQLWrapper { @Override public void additionalExceptionMetadata(StringBuilder builder) { builder.append("\nPlayers: "); - for(Player player : Bukkit.getOnlinePlayers()) + for (Player player : Bukkit.getOnlinePlayers()) builder.append(player.getName()).append(" "); builder.append("\nWorlds: "); - for(World world : Bukkit.getWorlds()) + for (World world : Bukkit.getWorlds()) builder.append(world.getName()).append(" "); builder.append("\nServer: ").append(SERVER_VERSION); } diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/SchematicData.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/SchematicData.java index 53cb261d..007c7a2c 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/SchematicData.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/SchematicData.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2025 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/BlockIds.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/BlockIds.java index fa2f7f6e..168b87da 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/BlockIds.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/BlockIds.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.techhider; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ChunkHider.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ChunkHider.java index a74feb42..bdc8cdd3 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ChunkHider.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ChunkHider.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2022 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 . + * 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 . */ package de.steamwar.techhider; @@ -53,6 +53,7 @@ public interface ChunkHider { private boolean paletted; private int bitsPerBlock; + private int blockCount; private int air; private int target; private Set obfuscate; @@ -86,7 +87,8 @@ public interface ChunkHider { } public void copyBlockCount() { - out.writeShort(in.readShort()); + this.blockCount = in.readShort(); + out.writeShort(blockCount); } public void copyBitsPerBlock() { @@ -140,6 +142,16 @@ public interface ChunkHider { out.writeBytes(in, dataArrayLength*8); } + public void skipNewDataArray(int entries) { + if (bitsPerBlock == 0) { + return; + } + + char valuesPerLong = (char)(64 / bitsPerBlock); + int i1 = (entries + valuesPerLong - 1) / valuesPerLong; + out.writeBytes(in, i1 * Long.BYTES); + } + public long[] readDataArray() { long[] array = new long[copyVarInt()]; for(int i = 0; i < array.length; i++) @@ -148,6 +160,20 @@ public interface ChunkHider { return array; } + public long[] readNewDataArray(int entries) { + if (bitsPerBlock == 0) { + return new long[entries]; + } + + char valuesPerLong = (char) (64 / bitsPerBlock); + int i1 = (entries + valuesPerLong - 1) / valuesPerLong; + long[] array = new long[i1]; + for(int i = 0; i < i1; i++) + array[i] = in.readLong(); + + return array; + } + public void writeDataArray(long[] array) { for(long l : array) out.writeLong(l); diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ProtocolUtils.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ProtocolUtils.java index 57f27921..a9677407 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ProtocolUtils.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ProtocolUtils.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2022 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 . + * 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 . */ package de.steamwar.techhider; @@ -58,6 +58,16 @@ public class ProtocolUtils { }; } + public static UnaryOperator shallowTypedCloneGenerator(Class clazz) { + BiConsumer filler = shallowFill(clazz); + + return source -> { + Object clone = Reflection.newInstance(clazz); + filler.accept(source, clone); + return (T) clone; + }; + } + private static BiConsumer shallowFill(Class clazz) { if(clazz == null) return (source, clone) -> {}; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ProtocolWrapper.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ProtocolWrapper.java index aab486c4..aec71941 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ProtocolWrapper.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ProtocolWrapper.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.techhider; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/TechHider.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/TechHider.java index 021d2fe4..46e53bcf 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/TechHider.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/TechHider.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2021 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 . + * 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 . */ package de.steamwar.techhider; diff --git a/SpigotCore/build.gradle.kts b/SpigotCore/build.gradle.kts index d615cfc7..22e65b20 100644 --- a/SpigotCore/build.gradle.kts +++ b/SpigotCore/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/TNTLeague/build.gradle.kts b/TNTLeague/build.gradle.kts index e8b8253a..8773671c 100644 --- a/TNTLeague/build.gradle.kts +++ b/TNTLeague/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/TNTLeague/src/de/steamwar/tntleague/TNTLeague.kt b/TNTLeague/src/de/steamwar/tntleague/TNTLeague.kt index 21616214..5de65e15 100644 --- a/TNTLeague/src/de/steamwar/tntleague/TNTLeague.kt +++ b/TNTLeague/src/de/steamwar/tntleague/TNTLeague.kt @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/TNTLeague/src/de/steamwar/tntleague/TNTLeague.properties b/TNTLeague/src/de/steamwar/tntleague/TNTLeague.properties index 73e3b416..7d1b708c 100644 --- a/TNTLeague/src/de/steamwar/tntleague/TNTLeague.properties +++ b/TNTLeague/src/de/steamwar/tntleague/TNTLeague.properties @@ -1,7 +1,7 @@ # # This file is a part of the SteamWar software. # -# Copyright (C) 2024 SteamWar.de-Serverteam +# 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 diff --git a/TNTLeague/src/de/steamwar/tntleague/TNTLeague_de.properties b/TNTLeague/src/de/steamwar/tntleague/TNTLeague_de.properties index db81812b..eab7a8a9 100644 --- a/TNTLeague/src/de/steamwar/tntleague/TNTLeague_de.properties +++ b/TNTLeague/src/de/steamwar/tntleague/TNTLeague_de.properties @@ -1,7 +1,7 @@ # # This file is a part of the SteamWar software. # -# Copyright (C) 2024 SteamWar.de-Serverteam +# 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 diff --git a/TNTLeague/src/de/steamwar/tntleague/command/AcceptCommand.kt b/TNTLeague/src/de/steamwar/tntleague/command/AcceptCommand.kt index 3606bdbd..30ee5193 100644 --- a/TNTLeague/src/de/steamwar/tntleague/command/AcceptCommand.kt +++ b/TNTLeague/src/de/steamwar/tntleague/command/AcceptCommand.kt @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/TNTLeague/src/de/steamwar/tntleague/command/InviteCommand.kt b/TNTLeague/src/de/steamwar/tntleague/command/InviteCommand.kt index e89e3443..eed42b46 100644 --- a/TNTLeague/src/de/steamwar/tntleague/command/InviteCommand.kt +++ b/TNTLeague/src/de/steamwar/tntleague/command/InviteCommand.kt @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/TNTLeague/src/de/steamwar/tntleague/command/LeaveCommand.kt b/TNTLeague/src/de/steamwar/tntleague/command/LeaveCommand.kt index 196f4312..be3198cb 100644 --- a/TNTLeague/src/de/steamwar/tntleague/command/LeaveCommand.kt +++ b/TNTLeague/src/de/steamwar/tntleague/command/LeaveCommand.kt @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/TNTLeague/src/de/steamwar/tntleague/command/RemoveCommand.kt b/TNTLeague/src/de/steamwar/tntleague/command/RemoveCommand.kt index d889f31a..068470a4 100644 --- a/TNTLeague/src/de/steamwar/tntleague/command/RemoveCommand.kt +++ b/TNTLeague/src/de/steamwar/tntleague/command/RemoveCommand.kt @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/TNTLeague/src/de/steamwar/tntleague/config/TNTLeagueConfig.kt b/TNTLeague/src/de/steamwar/tntleague/config/TNTLeagueConfig.kt index 861eff6c..3f51d535 100644 --- a/TNTLeague/src/de/steamwar/tntleague/config/TNTLeagueConfig.kt +++ b/TNTLeague/src/de/steamwar/tntleague/config/TNTLeagueConfig.kt @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/TNTLeague/src/de/steamwar/tntleague/config/TNTLeagueWorldConfig.kt b/TNTLeague/src/de/steamwar/tntleague/config/TNTLeagueWorldConfig.kt index 01667abd..253f8c95 100644 --- a/TNTLeague/src/de/steamwar/tntleague/config/TNTLeagueWorldConfig.kt +++ b/TNTLeague/src/de/steamwar/tntleague/config/TNTLeagueWorldConfig.kt @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/TNTLeague/src/de/steamwar/tntleague/events/DummyListener.kt b/TNTLeague/src/de/steamwar/tntleague/events/DummyListener.kt index 917ba5be..a857337f 100644 --- a/TNTLeague/src/de/steamwar/tntleague/events/DummyListener.kt +++ b/TNTLeague/src/de/steamwar/tntleague/events/DummyListener.kt @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/TNTLeague/src/de/steamwar/tntleague/events/GlobalListener.kt b/TNTLeague/src/de/steamwar/tntleague/events/GlobalListener.kt index 60f921fc..af1389b9 100644 --- a/TNTLeague/src/de/steamwar/tntleague/events/GlobalListener.kt +++ b/TNTLeague/src/de/steamwar/tntleague/events/GlobalListener.kt @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/TNTLeague/src/de/steamwar/tntleague/events/IngameListener.kt b/TNTLeague/src/de/steamwar/tntleague/events/IngameListener.kt index 7ae0618f..31cc4de2 100644 --- a/TNTLeague/src/de/steamwar/tntleague/events/IngameListener.kt +++ b/TNTLeague/src/de/steamwar/tntleague/events/IngameListener.kt @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/TNTLeague/src/de/steamwar/tntleague/events/LobbyListener.kt b/TNTLeague/src/de/steamwar/tntleague/events/LobbyListener.kt index d160498f..1f8beb26 100644 --- a/TNTLeague/src/de/steamwar/tntleague/events/LobbyListener.kt +++ b/TNTLeague/src/de/steamwar/tntleague/events/LobbyListener.kt @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/TNTLeague/src/de/steamwar/tntleague/game/TNTLeagueGame.kt b/TNTLeague/src/de/steamwar/tntleague/game/TNTLeagueGame.kt index 440cfa37..3d4471af 100644 --- a/TNTLeague/src/de/steamwar/tntleague/game/TNTLeagueGame.kt +++ b/TNTLeague/src/de/steamwar/tntleague/game/TNTLeagueGame.kt @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/TNTLeague/src/de/steamwar/tntleague/game/TNTLeagueTeam.kt b/TNTLeague/src/de/steamwar/tntleague/game/TNTLeagueTeam.kt index 8b452fca..5378089e 100644 --- a/TNTLeague/src/de/steamwar/tntleague/game/TNTLeagueTeam.kt +++ b/TNTLeague/src/de/steamwar/tntleague/game/TNTLeagueTeam.kt @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/TNTLeague/src/de/steamwar/tntleague/inventory/CategoryInventory.kt b/TNTLeague/src/de/steamwar/tntleague/inventory/CategoryInventory.kt index 76200073..c8ff8d46 100644 --- a/TNTLeague/src/de/steamwar/tntleague/inventory/CategoryInventory.kt +++ b/TNTLeague/src/de/steamwar/tntleague/inventory/CategoryInventory.kt @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/TNTLeague/src/de/steamwar/tntleague/inventory/DealerInventory.kt b/TNTLeague/src/de/steamwar/tntleague/inventory/DealerInventory.kt index c9bbe635..10ee5014 100644 --- a/TNTLeague/src/de/steamwar/tntleague/inventory/DealerInventory.kt +++ b/TNTLeague/src/de/steamwar/tntleague/inventory/DealerInventory.kt @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/TNTLeague/src/de/steamwar/tntleague/util/TNTLeagueScoreboard.kt b/TNTLeague/src/de/steamwar/tntleague/util/TNTLeagueScoreboard.kt index 40fb4138..847949b8 100644 --- a/TNTLeague/src/de/steamwar/tntleague/util/TNTLeagueScoreboard.kt +++ b/TNTLeague/src/de/steamwar/tntleague/util/TNTLeagueScoreboard.kt @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/Teamserver/build.gradle.kts b/Teamserver/build.gradle.kts index 44d3e49d..d4b47bbe 100644 --- a/Teamserver/build.gradle.kts +++ b/Teamserver/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -22,6 +22,8 @@ plugins { } dependencies { + compileOnly(libs.classindex) + annotationProcessor(libs.classindex) compileOnly(project(":SpigotCore", "default")) compileOnly(libs.spigotapi) diff --git a/Teamserver/src/de/steamwar/teamserver/Builder.java b/Teamserver/src/de/steamwar/teamserver/Builder.java index 94dadf8a..7a625bd5 100644 --- a/Teamserver/src/de/steamwar/teamserver/Builder.java +++ b/Teamserver/src/de/steamwar/teamserver/Builder.java @@ -1,32 +1,28 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.teamserver; -import de.steamwar.core.Core; import de.steamwar.core.WorldEditRendererCUIEditor; +import de.steamwar.linkage.AbstractLinker; +import de.steamwar.linkage.SpigotLinker; import de.steamwar.message.Message; -import de.steamwar.teamserver.command.*; -import de.steamwar.teamserver.listener.AxiomHandshakeListener; -import de.steamwar.teamserver.listener.FreezeListener; -import de.steamwar.teamserver.listener.PlayerChange; -import de.steamwar.teamserver.listener.SelectAdjacent; import org.bukkit.Bukkit; import org.bukkit.GameRule; import org.bukkit.plugin.java.JavaPlugin; @@ -45,27 +41,17 @@ public final class Builder extends JavaPlugin { MESSAGE = new Message("de.steamwar.teamserver.Teamserver", getClassLoader()); - new GamemodeCommand(); - new SpeedCommand(); - new FreezeCommand(); - new ArenaconfigCommand(); - - if (Bukkit.getPluginManager().getPlugin("AxiomPaper") != null) { - Bukkit.getPluginManager().registerEvents(new AxiomHandshakeListener(), this); + SpigotLinker spigotLinker = new SpigotLinker(this, MESSAGE); + try { + spigotLinker.link(); + } catch (AbstractLinker.LinkException e) { + e.printStackTrace(); + Bukkit.shutdown(); + return; } - Bukkit.getPluginManager().registerEvents(new PlayerChange(), this); - Bukkit.getPluginManager().registerEvents(new FreezeListener(), this); - - MaterialCommand materialCommand = new MaterialCommand(); - Bukkit.getPluginManager().registerEvents(materialCommand, this); - Bukkit.getWorlds().get(0).setGameRule(GameRule.REDUCED_DEBUG_INFO, false); new WorldEditRendererCUIEditor(); - - if (Core.getVersion() >= 20) { - Bukkit.getPluginManager().registerEvents(new SelectAdjacent(), this); - } } @Override diff --git a/Teamserver/src/de/steamwar/teamserver/Teamserver.properties b/Teamserver/src/de/steamwar/teamserver/Teamserver.properties index 29de325c..ef5fc763 100644 --- a/Teamserver/src/de/steamwar/teamserver/Teamserver.properties +++ b/Teamserver/src/de/steamwar/teamserver/Teamserver.properties @@ -1,61 +1,61 @@ # -# This file is a part of the SteamWar software. +# This file is a part of the SteamWar software. # -# Copyright (C) 2023 SteamWar.de-Serverteam +# 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 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. +# 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 . +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . # -PREFIX = §eBuilder§8» +PREFIX = §eBuilder§8§ TIME = HH:mm:ss # Freeze -REGION_FREEZE_HELP=§8/§efreeze §8- §7Toggle Freeze -REGION_FREEZE_ENABLED=§cRegion eingefroren -REGION_FREEZE_DISABLED=§aRegion aufgetaut +REGION_FREEZE_HELP=§8/§efreeze §8- §7Toggle Freeze +REGION_FREEZE_ENABLED=§cRegion eingefroren +REGION_FREEZE_DISABLED=§aRegion aufgetaut # Material -MATERIAL_INV_NAME=§eMaterial {0}/{1} -MATERIAL_SEARCH=§eSuchen -MATERIAL_BACK=§eZurück -MATERIAL_SEARCH_NAME=§eName -MATERIAL_SEARCH_TRANSPARENT=§eTransparent -MATERIAL_SEARCH_SOLID=§eSolide -MATERIAL_SEARCH_GRAVITY=§eFallend -MATERIAL_SEARCH_OCCLUDING=§eOccluding -MATERIAL_SEARCH_INTERACTEABLE=§eInterargierbar -MATERIAL_SEARCH_FLAMMABLE=§eFlammbar -MATERIAL_SEARCH_BURNABLE=§eBrennbar -MATERIAL_SEARCH_WATERLOGGABLE=§eWasserspeicherbar -MATERIAL_SEARCH_BLASTRESISTANCE=§eBlast Resistance -MATERIAL_SEARCH_BLASTRESISTANCE_MIN=§eBlast Resistance mindestens -MATERIAL_SEARCH_BLASTRESISTANCE_MAX=§eBlast Resistance maximal -MATERIAL_SEARCH_BLASTRESISTANCE_EXACT=§eBlast Resistance -MATERIAL_SEARCH_VALUE=§8: §e{0} -MATERIAL_BLAST-RESISTANCE=§8- §eBlast Resistance§8: §7{0} -MATERIAL_HARDNESS=§8- §eHärte§8: §7{0} -MATERIAL_TNT_BREAKABLE=§8- §eZerstörbar durch TNT -MATERIAL_TNT_UNBREAKABLE=§8- §eNicht Zerstörbar durch TNT -MATERIAL_TRANSPARENT=§8- §eTransparenter Block -MATERIAL_SOLID=§8- §eSolider Block -MATERIAL_GRAVITY=§8- §eFallender Block -MATERIAL_OCCLUDING=§8- §eOccluding Block -MATERIAL_INTERACT-ABLE=§8- §eInterargierbarer Block -MATERIAL_FLAMMABLE=§8- §eFlammbarer Block -MATERIAL_BURNABLE=§8- §eBrennbarer Block -MATERIAL_WATERLOGGABLE=§8- §eWasserspeicherbarer Block +MATERIAL_INV_NAME=§eMaterial {0}/{1} +MATERIAL_SEARCH=§eSuchen +MATERIAL_BACK=§eZur§ck +MATERIAL_SEARCH_NAME=§eName +MATERIAL_SEARCH_TRANSPARENT=§eTransparent +MATERIAL_SEARCH_SOLID=§eSolide +MATERIAL_SEARCH_GRAVITY=§eFallend +MATERIAL_SEARCH_OCCLUDING=§eOccluding +MATERIAL_SEARCH_INTERACTEABLE=§eInterargierbar +MATERIAL_SEARCH_FLAMMABLE=§eFlammbar +MATERIAL_SEARCH_BURNABLE=§eBrennbar +MATERIAL_SEARCH_WATERLOGGABLE=§eWasserspeicherbar +MATERIAL_SEARCH_BLASTRESISTANCE=§eBlast Resistance +MATERIAL_SEARCH_BLASTRESISTANCE_MIN=§eBlast Resistance mindestens +MATERIAL_SEARCH_BLASTRESISTANCE_MAX=§eBlast Resistance maximal +MATERIAL_SEARCH_BLASTRESISTANCE_EXACT=§eBlast Resistance +MATERIAL_SEARCH_VALUE=§8: §e{0} +MATERIAL_BLAST-RESISTANCE=§8- §eBlast Resistance§8: §7{0} +MATERIAL_HARDNESS=§8- §eH§rte§8: §7{0} +MATERIAL_TNT_BREAKABLE=§8- §eZerst§rbar durch TNT +MATERIAL_TNT_UNBREAKABLE=§8- §eNicht Zerst§rbar durch TNT +MATERIAL_TRANSPARENT=§8- §eTransparenter Block +MATERIAL_SOLID=§8- §eSolider Block +MATERIAL_GRAVITY=§8- §eFallender Block +MATERIAL_OCCLUDING=§8- §eOccluding Block +MATERIAL_INTERACT-ABLE=§8- §eInterargierbarer Block +MATERIAL_FLAMMABLE=§8- §eFlammbarer Block +MATERIAL_BURNABLE=§8- §eBrennbarer Block +MATERIAL_WATERLOGGABLE=§8- §eWasserspeicherbarer Block -ARENACONFIG_HELP=§8/§7arenaconfig §8[§eUntere Spielergrenze§8] (WE-Pos1: Kleinste blaue Schemkoordinate, WE-Pos2: Kleinste Rote Schemkoordinate) -ARENACONFIG_SELECTION=§cKeine WE-SAuswahl, \ No newline at end of file +ARENACONFIG_HELP=§8/§7arenaconfig §8[§eUntere Spielergrenze§8] (WE-Pos1: Kleinste blaue Schemkoordinate, WE-Pos2: Kleinste Rote Schemkoordinate) +ARENACONFIG_SELECTION=§cKeine WE-SAuswahl, \ No newline at end of file diff --git a/Teamserver/src/de/steamwar/teamserver/Teamserver_en.properties b/Teamserver/src/de/steamwar/teamserver/Teamserver_en.properties index e69de29b..5f2fa4f6 100644 --- a/Teamserver/src/de/steamwar/teamserver/Teamserver_en.properties +++ b/Teamserver/src/de/steamwar/teamserver/Teamserver_en.properties @@ -0,0 +1,19 @@ +# +# 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 . +# + diff --git a/Teamserver/src/de/steamwar/teamserver/command/ArenaconfigCommand.java b/Teamserver/src/de/steamwar/teamserver/command/ArenaconfigCommand.java index 6851610c..df32735e 100644 --- a/Teamserver/src/de/steamwar/teamserver/command/ArenaconfigCommand.java +++ b/Teamserver/src/de/steamwar/teamserver/command/ArenaconfigCommand.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -26,6 +26,7 @@ import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.regions.RegionSelector; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.teamserver.Builder; import org.bukkit.Bukkit; import org.bukkit.configuration.file.YamlConfiguration; @@ -34,6 +35,7 @@ import org.bukkit.entity.Player; import java.io.File; import java.io.IOException; +@Linked public class ArenaconfigCommand extends SWCommand { public ArenaconfigCommand() { diff --git a/Teamserver/src/de/steamwar/teamserver/command/FreezeCommand.java b/Teamserver/src/de/steamwar/teamserver/command/FreezeCommand.java index 814069c4..4477f5e8 100644 --- a/Teamserver/src/de/steamwar/teamserver/command/FreezeCommand.java +++ b/Teamserver/src/de/steamwar/teamserver/command/FreezeCommand.java @@ -1,31 +1,33 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.teamserver.command; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.teamserver.Builder; import de.steamwar.teamserver.listener.FreezeListener; import net.md_5.bungee.api.ChatMessageType; import org.bukkit.Bukkit; import org.bukkit.entity.Player; +@Linked public class FreezeCommand extends SWCommand { public FreezeCommand() { diff --git a/Teamserver/src/de/steamwar/teamserver/command/GamemodeCommand.java b/Teamserver/src/de/steamwar/teamserver/command/GamemodeCommand.java index ed4fc4ff..57cf6674 100644 --- a/Teamserver/src/de/steamwar/teamserver/command/GamemodeCommand.java +++ b/Teamserver/src/de/steamwar/teamserver/command/GamemodeCommand.java @@ -1,28 +1,30 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.teamserver.command; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import org.bukkit.GameMode; import org.bukkit.entity.Player; +@Linked public class GamemodeCommand extends SWCommand { public GamemodeCommand() { diff --git a/Teamserver/src/de/steamwar/teamserver/command/MaterialCommand.java b/Teamserver/src/de/steamwar/teamserver/command/MaterialCommand.java index 808a5469..920267c6 100644 --- a/Teamserver/src/de/steamwar/teamserver/command/MaterialCommand.java +++ b/Teamserver/src/de/steamwar/teamserver/command/MaterialCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.teamserver.command; @@ -25,6 +25,7 @@ import de.steamwar.inventory.SWAnvilInv; import de.steamwar.inventory.SWInventory; import de.steamwar.inventory.SWItem; import de.steamwar.inventory.SWListInv; +import de.steamwar.linkage.Linked; import de.steamwar.teamserver.Builder; import org.bukkit.Material; import org.bukkit.block.data.BlockData; @@ -41,6 +42,7 @@ import java.util.List; import java.util.Map; import java.util.regex.Pattern; +@Linked public class MaterialCommand extends SWCommand implements Listener { public MaterialCommand() { diff --git a/Teamserver/src/de/steamwar/teamserver/command/SpeedCommand.java b/Teamserver/src/de/steamwar/teamserver/command/SpeedCommand.java index 412886fd..070a9d3b 100644 --- a/Teamserver/src/de/steamwar/teamserver/command/SpeedCommand.java +++ b/Teamserver/src/de/steamwar/teamserver/command/SpeedCommand.java @@ -1,27 +1,29 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.teamserver.command; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; +@Linked public class SpeedCommand extends SWCommand { public SpeedCommand() { diff --git a/Teamserver/src/de/steamwar/teamserver/listener/AxiomHandshakeListener.java b/Teamserver/src/de/steamwar/teamserver/listener/AxiomHandshakeListener.java index b68e6fcf..218d211a 100644 --- a/Teamserver/src/de/steamwar/teamserver/listener/AxiomHandshakeListener.java +++ b/Teamserver/src/de/steamwar/teamserver/listener/AxiomHandshakeListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -20,9 +20,13 @@ package de.steamwar.teamserver.listener; import com.moulberry.axiom.event.AxiomHandshakeEvent; +import de.steamwar.linkage.Linked; +import de.steamwar.linkage.PluginCheck; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; +@Linked +@PluginCheck("AxiomPaper") public class AxiomHandshakeListener implements Listener { @EventHandler diff --git a/Teamserver/src/de/steamwar/teamserver/listener/FreezeListener.java b/Teamserver/src/de/steamwar/teamserver/listener/FreezeListener.java index 7d576d2f..d4d0f9f3 100644 --- a/Teamserver/src/de/steamwar/teamserver/listener/FreezeListener.java +++ b/Teamserver/src/de/steamwar/teamserver/listener/FreezeListener.java @@ -1,26 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.teamserver.listener; import de.steamwar.core.Core; import de.steamwar.core.TrickyTrialsWrapper; +import de.steamwar.linkage.Linked; import de.steamwar.teamserver.Builder; import net.md_5.bungee.api.ChatMessageType; import net.md_5.bungee.api.chat.BaseComponent; @@ -39,6 +40,7 @@ import org.bukkit.event.entity.EntitySpawnEvent; import org.bukkit.event.inventory.InventoryMoveItemEvent; import org.bukkit.event.player.PlayerInteractEvent; +@Linked public class FreezeListener implements Listener { public static boolean freeze = true; diff --git a/Teamserver/src/de/steamwar/teamserver/listener/PlayerChange.java b/Teamserver/src/de/steamwar/teamserver/listener/PlayerChange.java index 63016c00..06996719 100644 --- a/Teamserver/src/de/steamwar/teamserver/listener/PlayerChange.java +++ b/Teamserver/src/de/steamwar/teamserver/listener/PlayerChange.java @@ -1,30 +1,32 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.teamserver.listener; +import de.steamwar.linkage.Linked; import org.bukkit.Bukkit; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; +@Linked public class PlayerChange implements Listener { @EventHandler diff --git a/Teamserver/src/de/steamwar/teamserver/listener/SelectAdjacent.java b/Teamserver/src/de/steamwar/teamserver/listener/SelectAdjacent.java index 2fbebbf3..4a9f4d0d 100644 --- a/Teamserver/src/de/steamwar/teamserver/listener/SelectAdjacent.java +++ b/Teamserver/src/de/steamwar/teamserver/listener/SelectAdjacent.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.teamserver.listener; @@ -25,6 +25,8 @@ import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.regions.selector.CuboidRegionSelector; import com.sk89q.worldedit.world.World; import de.steamwar.core.WorldEditRenderer; +import de.steamwar.linkage.Linked; +import de.steamwar.linkage.MinVersion; import de.steamwar.teamserver.Builder; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -43,6 +45,8 @@ import org.bukkit.util.Vector; import java.util.*; import java.util.function.Predicate; +@Linked +@MinVersion(20) public class SelectAdjacent implements Listener { private Vector[] FACES = { diff --git a/TowerRun/build.gradle.kts b/TowerRun/build.gradle.kts index 8eacd66e..b8828ede 100644 --- a/TowerRun/build.gradle.kts +++ b/TowerRun/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -29,6 +29,8 @@ java { dependencies { annotationProcessor(libs.spigotannotations) compileOnly(libs.spigotannotations) + compileOnly(libs.classindex) + annotationProcessor(libs.classindex) compileOnly(project(":SpigotCore", "default")) diff --git a/TowerRun/src/TowerRun.properties b/TowerRun/src/TowerRun.properties index 0935bd83..f0da3fd0 100644 --- a/TowerRun/src/TowerRun.properties +++ b/TowerRun/src/TowerRun.properties @@ -1,7 +1,7 @@ # # This file is a part of the SteamWar software. # -# Copyright (C) 2023 SteamWar.de-Serverteam +# 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 diff --git a/TowerRun/src/TowerRun_de.properties b/TowerRun/src/TowerRun_de.properties index 82fd014b..14a87d82 100644 --- a/TowerRun/src/TowerRun_de.properties +++ b/TowerRun/src/TowerRun_de.properties @@ -1,7 +1,7 @@ # # This file is a part of the SteamWar software. # -# Copyright (C) 2023 SteamWar.de-Serverteam +# 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 diff --git a/TowerRun/src/de/steamwar/towerrun/FightInfoPacketSender.java b/TowerRun/src/de/steamwar/towerrun/FightInfoPacketSender.java index da8c913b..764e1eea 100644 --- a/TowerRun/src/de/steamwar/towerrun/FightInfoPacketSender.java +++ b/TowerRun/src/de/steamwar/towerrun/FightInfoPacketSender.java @@ -1,22 +1,20 @@ /* + * This file is a part of the SteamWar software. * - * This file is a part of the SteamWar software. + * Copyright (C) 2025 SteamWar.de-Serverteam * - * Copyright (C) 2024 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 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. * - * 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 . - * / + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.towerrun; diff --git a/TowerRun/src/de/steamwar/towerrun/TowerRun.java b/TowerRun/src/de/steamwar/towerrun/TowerRun.java index 4503c5da..357e8689 100644 --- a/TowerRun/src/de/steamwar/towerrun/TowerRun.java +++ b/TowerRun/src/de/steamwar/towerrun/TowerRun.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -19,18 +19,14 @@ package de.steamwar.towerrun; +import de.steamwar.command.SWCommand; +import de.steamwar.linkage.AbstractLinker; +import de.steamwar.linkage.LinkedInstance; +import de.steamwar.linkage.SpigotLinker; import de.steamwar.message.Message; -import de.steamwar.towerrun.commands.StartCommand; import de.steamwar.towerrun.config.WorldConfig; -import de.steamwar.towerrun.countdowns.EndCountdown; import de.steamwar.towerrun.countdowns.GameCountdown; -import de.steamwar.towerrun.countdowns.LobbyCountdown; -import de.steamwar.towerrun.game.TowerRunGame; import de.steamwar.towerrun.generator.TowerGenerator; -import de.steamwar.towerrun.listener.GlobalListener; -import de.steamwar.towerrun.listener.IngameListener; -import de.steamwar.towerrun.listener.LobbyListener; -import de.steamwar.towerrun.listener.NotLobbyListener; import lombok.Getter; import org.bukkit.Bukkit; import org.bukkit.plugin.java.JavaPlugin; @@ -58,6 +54,7 @@ public class TowerRun extends JavaPlugin { private static TowerGenerator towerGenerator = null; @Getter + @LinkedInstance private static GameCountdown gameCountdown; @@ -70,14 +67,21 @@ public class TowerRun extends JavaPlugin { towerGenerator = new TowerGenerator(WorldConfig.TOWER_GENERATOR_CONFIG); } - new LobbyListener(); - new IngameListener(); - new GlobalListener(); - new NotLobbyListener(); - final LobbyCountdown lobbyCountdown = new LobbyCountdown(); - new EndCountdown(lobbyCountdown); - new StartCommand(lobbyCountdown); - gameCountdown = new GameCountdown(); + SpigotLinker spigotLinker = new SpigotLinker(this, message) { + @Override + protected void linkObject(Object any) { + if (any instanceof SWCommand) { + ((SWCommand) any).setMessage(message); + } + } + }; + try { + spigotLinker.link(); + } catch (AbstractLinker.LinkException e) { + e.printStackTrace(); + Bukkit.shutdown(); + return; + } Bukkit.getScheduler().runTaskTimer(this, new FightInfoPacketSender(), 20, 20); } diff --git a/TowerRun/src/de/steamwar/towerrun/commands/StartCommand.java b/TowerRun/src/de/steamwar/towerrun/commands/StartCommand.java index 262ffff6..77884b37 100644 --- a/TowerRun/src/de/steamwar/towerrun/commands/StartCommand.java +++ b/TowerRun/src/de/steamwar/towerrun/commands/StartCommand.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -21,18 +21,19 @@ package de.steamwar.towerrun.commands; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeValidator; +import de.steamwar.linkage.Linked; import de.steamwar.sql.SteamwarUser; import de.steamwar.sql.UserPerm; import de.steamwar.towerrun.TowerRun; import de.steamwar.towerrun.countdowns.LobbyCountdown; import org.bukkit.entity.Player; +@Linked public class StartCommand extends SWCommand { - private final LobbyCountdown countdown; + private LobbyCountdown countdown; - public StartCommand(LobbyCountdown countdown) { + public StartCommand() { super("start", "skip"); - this.countdown = countdown; } @Register diff --git a/TowerRun/src/de/steamwar/towerrun/config/Config.java b/TowerRun/src/de/steamwar/towerrun/config/Config.java index fe6acd07..1d262066 100644 --- a/TowerRun/src/de/steamwar/towerrun/config/Config.java +++ b/TowerRun/src/de/steamwar/towerrun/config/Config.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/TowerRun/src/de/steamwar/towerrun/config/WorldConfig.java b/TowerRun/src/de/steamwar/towerrun/config/WorldConfig.java index 56e90034..e74be358 100644 --- a/TowerRun/src/de/steamwar/towerrun/config/WorldConfig.java +++ b/TowerRun/src/de/steamwar/towerrun/config/WorldConfig.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/TowerRun/src/de/steamwar/towerrun/countdowns/Countdown.java b/TowerRun/src/de/steamwar/towerrun/countdowns/Countdown.java index 727d19ea..3d1b4a06 100644 --- a/TowerRun/src/de/steamwar/towerrun/countdowns/Countdown.java +++ b/TowerRun/src/de/steamwar/towerrun/countdowns/Countdown.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/TowerRun/src/de/steamwar/towerrun/countdowns/EndCountdown.java b/TowerRun/src/de/steamwar/towerrun/countdowns/EndCountdown.java index 6d631e02..58af5a62 100644 --- a/TowerRun/src/de/steamwar/towerrun/countdowns/EndCountdown.java +++ b/TowerRun/src/de/steamwar/towerrun/countdowns/EndCountdown.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -19,6 +19,8 @@ package de.steamwar.towerrun.countdowns; +import de.steamwar.linkage.Linked; +import de.steamwar.linkage.LinkedInstance; import de.steamwar.towerrun.TowerRun; import de.steamwar.towerrun.config.Config; import de.steamwar.towerrun.game.TowerRunGame; @@ -29,15 +31,16 @@ import org.bukkit.Sound; import java.util.EnumSet; import java.util.Objects; +@Linked public class EndCountdown extends Countdown { - private final LobbyCountdown lobbyCountdown; + @LinkedInstance + private LobbyCountdown lobbyCountdown; private static final boolean RESETS = Objects.requireNonNull(Bukkit.getWorlds().get(0).getWorldFolder().list((dir, name) -> name.equals("backup"))).length > 0; - public EndCountdown(LobbyCountdown lobbyCountdown) { + public EndCountdown() { super(EnumSet.of(GameStates.END)); - this.lobbyCountdown = lobbyCountdown; } @Override diff --git a/TowerRun/src/de/steamwar/towerrun/countdowns/GameCountdown.java b/TowerRun/src/de/steamwar/towerrun/countdowns/GameCountdown.java index b1d25110..83877882 100644 --- a/TowerRun/src/de/steamwar/towerrun/countdowns/GameCountdown.java +++ b/TowerRun/src/de/steamwar/towerrun/countdowns/GameCountdown.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -19,6 +19,7 @@ package de.steamwar.towerrun.countdowns; +import de.steamwar.linkage.Linked; import de.steamwar.towerrun.TowerRun; import de.steamwar.towerrun.config.Config; import de.steamwar.towerrun.game.TowerRunGame; @@ -26,6 +27,7 @@ import de.steamwar.towerrun.state.GameStates; import java.util.EnumSet; +@Linked public class GameCountdown extends Countdown { private long startTime = 0; diff --git a/TowerRun/src/de/steamwar/towerrun/countdowns/LobbyCountdown.java b/TowerRun/src/de/steamwar/towerrun/countdowns/LobbyCountdown.java index a655c4c3..8b14b535 100644 --- a/TowerRun/src/de/steamwar/towerrun/countdowns/LobbyCountdown.java +++ b/TowerRun/src/de/steamwar/towerrun/countdowns/LobbyCountdown.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -19,6 +19,7 @@ package de.steamwar.towerrun.countdowns; +import de.steamwar.linkage.Linked; import de.steamwar.towerrun.TowerRun; import de.steamwar.towerrun.config.Config; import de.steamwar.towerrun.game.TowerRunGame; @@ -31,6 +32,7 @@ import org.bukkit.Sound; import java.util.EnumSet; @Getter +@Linked public class LobbyCountdown extends Countdown { @Setter diff --git a/TowerRun/src/de/steamwar/towerrun/game/TowerRunGame.java b/TowerRun/src/de/steamwar/towerrun/game/TowerRunGame.java index c1514db4..ba218ef0 100644 --- a/TowerRun/src/de/steamwar/towerrun/game/TowerRunGame.java +++ b/TowerRun/src/de/steamwar/towerrun/game/TowerRunGame.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/TowerRun/src/de/steamwar/towerrun/game/TowerRunPlayer.java b/TowerRun/src/de/steamwar/towerrun/game/TowerRunPlayer.java index e7b12973..bdcc2610 100644 --- a/TowerRun/src/de/steamwar/towerrun/game/TowerRunPlayer.java +++ b/TowerRun/src/de/steamwar/towerrun/game/TowerRunPlayer.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/TowerRun/src/de/steamwar/towerrun/generator/TowerGenerator.java b/TowerRun/src/de/steamwar/towerrun/generator/TowerGenerator.java index 63cd94ee..ce0a33b7 100644 --- a/TowerRun/src/de/steamwar/towerrun/generator/TowerGenerator.java +++ b/TowerRun/src/de/steamwar/towerrun/generator/TowerGenerator.java @@ -1,3 +1,22 @@ +/* + * 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 . + */ + package de.steamwar.towerrun.generator; import com.sk89q.worldedit.EditSession; diff --git a/TowerRun/src/de/steamwar/towerrun/listener/GlobalListener.java b/TowerRun/src/de/steamwar/towerrun/listener/GlobalListener.java index c20dd391..a47f0d97 100644 --- a/TowerRun/src/de/steamwar/towerrun/listener/GlobalListener.java +++ b/TowerRun/src/de/steamwar/towerrun/listener/GlobalListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -19,6 +19,7 @@ package de.steamwar.towerrun.listener; +import de.steamwar.linkage.Linked; import de.steamwar.towerrun.TowerRun; import de.steamwar.towerrun.config.WorldConfig; import de.steamwar.towerrun.game.TowerRunGame; @@ -36,6 +37,7 @@ import org.bukkit.event.player.*; import java.util.EnumSet; +@Linked public class GlobalListener extends GameStateBukkitListener implements Listener { public GlobalListener() { super(EnumSet.allOf(GameStates.class)); diff --git a/TowerRun/src/de/steamwar/towerrun/listener/IngameListener.java b/TowerRun/src/de/steamwar/towerrun/listener/IngameListener.java index bc74e57f..d85eafdf 100644 --- a/TowerRun/src/de/steamwar/towerrun/listener/IngameListener.java +++ b/TowerRun/src/de/steamwar/towerrun/listener/IngameListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -20,6 +20,7 @@ package de.steamwar.towerrun.listener; import de.steamwar.inventory.SWItem; +import de.steamwar.linkage.Linked; import de.steamwar.towerrun.TowerRun; import de.steamwar.towerrun.config.Config; import de.steamwar.towerrun.config.WorldConfig; @@ -47,6 +48,7 @@ import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; +@Linked public class IngameListener extends GameStateBukkitListener { private int time = 0; diff --git a/TowerRun/src/de/steamwar/towerrun/listener/LobbyListener.java b/TowerRun/src/de/steamwar/towerrun/listener/LobbyListener.java index 0a4e4358..22b78ba6 100644 --- a/TowerRun/src/de/steamwar/towerrun/listener/LobbyListener.java +++ b/TowerRun/src/de/steamwar/towerrun/listener/LobbyListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -19,6 +19,7 @@ package de.steamwar.towerrun.listener; +import de.steamwar.linkage.Linked; import de.steamwar.sql.SteamwarUser; import de.steamwar.towerrun.TowerRun; import de.steamwar.towerrun.config.Config; @@ -40,6 +41,7 @@ import org.bukkit.event.player.PlayerMoveEvent; import java.util.EnumSet; import java.util.HashMap; +@Linked public class LobbyListener extends GameStateBukkitListener { public LobbyListener() { super(EnumSet.of(GameStates.WAITING)); diff --git a/TowerRun/src/de/steamwar/towerrun/listener/NotLobbyListener.java b/TowerRun/src/de/steamwar/towerrun/listener/NotLobbyListener.java index 6bfb1623..a604fa43 100644 --- a/TowerRun/src/de/steamwar/towerrun/listener/NotLobbyListener.java +++ b/TowerRun/src/de/steamwar/towerrun/listener/NotLobbyListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 @@ -19,6 +19,7 @@ package de.steamwar.towerrun.listener; +import de.steamwar.linkage.Linked; import de.steamwar.towerrun.TowerRun; import de.steamwar.towerrun.config.WorldConfig; import de.steamwar.towerrun.state.GameStateBukkitListener; @@ -29,6 +30,7 @@ import org.bukkit.event.player.PlayerJoinEvent; import java.util.EnumSet; +@Linked public class NotLobbyListener extends GameStateBukkitListener { public NotLobbyListener() { super(EnumSet.complementOf(EnumSet.of(GameStates.WAITING))); diff --git a/TowerRun/src/de/steamwar/towerrun/state/GameState.java b/TowerRun/src/de/steamwar/towerrun/state/GameState.java index 46b7e93a..5f8097fe 100644 --- a/TowerRun/src/de/steamwar/towerrun/state/GameState.java +++ b/TowerRun/src/de/steamwar/towerrun/state/GameState.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/TowerRun/src/de/steamwar/towerrun/state/GameStateBukkitListener.java b/TowerRun/src/de/steamwar/towerrun/state/GameStateBukkitListener.java index bd259f63..fbd85243 100644 --- a/TowerRun/src/de/steamwar/towerrun/state/GameStateBukkitListener.java +++ b/TowerRun/src/de/steamwar/towerrun/state/GameStateBukkitListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/TowerRun/src/de/steamwar/towerrun/state/GameStateListener.java b/TowerRun/src/de/steamwar/towerrun/state/GameStateListener.java index d4dcd639..dbd9f70e 100644 --- a/TowerRun/src/de/steamwar/towerrun/state/GameStateListener.java +++ b/TowerRun/src/de/steamwar/towerrun/state/GameStateListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/TowerRun/src/de/steamwar/towerrun/state/GameStateToggleListener.java b/TowerRun/src/de/steamwar/towerrun/state/GameStateToggleListener.java index c8ba5534..baf983d6 100644 --- a/TowerRun/src/de/steamwar/towerrun/state/GameStateToggleListener.java +++ b/TowerRun/src/de/steamwar/towerrun/state/GameStateToggleListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/TowerRun/src/de/steamwar/towerrun/state/GameStates.java b/TowerRun/src/de/steamwar/towerrun/state/GameStates.java index 4fe32829..37d62fbc 100644 --- a/TowerRun/src/de/steamwar/towerrun/state/GameStates.java +++ b/TowerRun/src/de/steamwar/towerrun/state/GameStates.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/TowerRun/src/de/steamwar/towerrun/winconditions/FirstOutsideWincondition.java b/TowerRun/src/de/steamwar/towerrun/winconditions/FirstOutsideWincondition.java index f2d753fa..b62a99b8 100644 --- a/TowerRun/src/de/steamwar/towerrun/winconditions/FirstOutsideWincondition.java +++ b/TowerRun/src/de/steamwar/towerrun/winconditions/FirstOutsideWincondition.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/TowerRun/src/de/steamwar/towerrun/winconditions/LastOutsideWincondition.java b/TowerRun/src/de/steamwar/towerrun/winconditions/LastOutsideWincondition.java index 260ed0fb..d9e25f92 100644 --- a/TowerRun/src/de/steamwar/towerrun/winconditions/LastOutsideWincondition.java +++ b/TowerRun/src/de/steamwar/towerrun/winconditions/LastOutsideWincondition.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/TowerRun/src/de/steamwar/towerrun/winconditions/LastRemainingWincondition.java b/TowerRun/src/de/steamwar/towerrun/winconditions/LastRemainingWincondition.java index c66818d1..7cdbe3b4 100644 --- a/TowerRun/src/de/steamwar/towerrun/winconditions/LastRemainingWincondition.java +++ b/TowerRun/src/de/steamwar/towerrun/winconditions/LastRemainingWincondition.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/TowerRun/src/de/steamwar/towerrun/winconditions/OutsideWincondition.java b/TowerRun/src/de/steamwar/towerrun/winconditions/OutsideWincondition.java index 9419e7ee..8b241da5 100644 --- a/TowerRun/src/de/steamwar/towerrun/winconditions/OutsideWincondition.java +++ b/TowerRun/src/de/steamwar/towerrun/winconditions/OutsideWincondition.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/TowerRun/src/de/steamwar/towerrun/winconditions/WinCondition.java b/TowerRun/src/de/steamwar/towerrun/winconditions/WinCondition.java index 21e0e860..3b5c66cc 100644 --- a/TowerRun/src/de/steamwar/towerrun/winconditions/WinCondition.java +++ b/TowerRun/src/de/steamwar/towerrun/winconditions/WinCondition.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 diff --git a/VelocityCore/Dependencies/build.gradle.kts b/VelocityCore/Dependencies/build.gradle.kts index fab7a7f0..58c068f0 100644 --- a/VelocityCore/Dependencies/build.gradle.kts +++ b/VelocityCore/Dependencies/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/VelocityCore/Dependencies/src/de/steamwar/discord/Dependencies.java b/VelocityCore/Dependencies/src/de/steamwar/discord/Dependencies.java index f3b2a243..bb7bd2c3 100644 --- a/VelocityCore/Dependencies/src/de/steamwar/discord/Dependencies.java +++ b/VelocityCore/Dependencies/src/de/steamwar/discord/Dependencies.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.discord; diff --git a/VelocityCore/Persistent/build.gradle.kts b/VelocityCore/Persistent/build.gradle.kts index a65d414a..462fccfd 100644 --- a/VelocityCore/Persistent/build.gradle.kts +++ b/VelocityCore/Persistent/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/VelocityCore/Persistent/src/de/steamwar/persistent/Arenaserver.java b/VelocityCore/Persistent/src/de/steamwar/persistent/Arenaserver.java index 450d771a..8431bb9e 100644 --- a/VelocityCore/Persistent/src/de/steamwar/persistent/Arenaserver.java +++ b/VelocityCore/Persistent/src/de/steamwar/persistent/Arenaserver.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/VelocityCore/Persistent/src/de/steamwar/persistent/Bauserver.java b/VelocityCore/Persistent/src/de/steamwar/persistent/Bauserver.java index 85bf581a..ccc68e23 100644 --- a/VelocityCore/Persistent/src/de/steamwar/persistent/Bauserver.java +++ b/VelocityCore/Persistent/src/de/steamwar/persistent/Bauserver.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/VelocityCore/Persistent/src/de/steamwar/persistent/Builderserver.java b/VelocityCore/Persistent/src/de/steamwar/persistent/Builderserver.java index 4a01c7d4..021aed0e 100644 --- a/VelocityCore/Persistent/src/de/steamwar/persistent/Builderserver.java +++ b/VelocityCore/Persistent/src/de/steamwar/persistent/Builderserver.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/VelocityCore/Persistent/src/de/steamwar/persistent/Persistent.java b/VelocityCore/Persistent/src/de/steamwar/persistent/Persistent.java index 52f764f2..d5fac548 100644 --- a/VelocityCore/Persistent/src/de/steamwar/persistent/Persistent.java +++ b/VelocityCore/Persistent/src/de/steamwar/persistent/Persistent.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -122,6 +122,7 @@ public class Persistent { container = proxy.getPluginManager().getPlugin("velocitycore").orElseThrow(); plugin = (ReloadablePlugin) container.getInstance().orElseThrow(); } catch (NoSuchElementException e) { + e.printStackTrace(); logger.log(Level.WARNING, "Could not find loaded VelocityCore, continuing without unloading."); } @@ -129,6 +130,7 @@ public class Persistent { try { newContainer = prepareLoad(); } catch (Exception e) { + e.printStackTrace(); logger.log(Level.SEVERE, "Could not instantiate new VelocityCore, aborting softreload.", e); return Command.SINGLE_SUCCESS; } @@ -136,13 +138,19 @@ public class Persistent { broadcast("§eNetwork update is starting§8."); try { if(container != null && plugin != null) { + System.out.println("Proxy Shutdown Event"); plugin.onProxyShutdown(new ProxyShutdownEvent()); + System.out.println("Unloading of Container"); unload(container, plugin); } + System.out.println("Loading of new Container"); registerPlugin.invoke((VelocityPluginManager) proxy.getPluginManager(), newContainer); + System.out.println("Proxy Initialization Event"); ((ReloadablePlugin) newContainer.getInstance().orElseThrow()).onProxyInitialization(new ProxyInitializeEvent()); + System.out.println("Proxy Initialization Event finished"); } catch (Throwable t) { + t.printStackTrace(); logger.log(Level.SEVERE, "Error during softreload", t); broadcast("§cNetwork update failed§8, §cexpect network restart soon§8."); return Command.SINGLE_SUCCESS; diff --git a/VelocityCore/Persistent/src/de/steamwar/persistent/Reflection.java b/VelocityCore/Persistent/src/de/steamwar/persistent/Reflection.java index 416a3694..dcbac732 100644 --- a/VelocityCore/Persistent/src/de/steamwar/persistent/Reflection.java +++ b/VelocityCore/Persistent/src/de/steamwar/persistent/Reflection.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/VelocityCore/Persistent/src/de/steamwar/persistent/ReloadablePlugin.java b/VelocityCore/Persistent/src/de/steamwar/persistent/ReloadablePlugin.java index 95bfc4b9..9deeb653 100644 --- a/VelocityCore/Persistent/src/de/steamwar/persistent/ReloadablePlugin.java +++ b/VelocityCore/Persistent/src/de/steamwar/persistent/ReloadablePlugin.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/VelocityCore/Persistent/src/de/steamwar/persistent/Storage.java b/VelocityCore/Persistent/src/de/steamwar/persistent/Storage.java index a32a577d..1bc6bd5d 100644 --- a/VelocityCore/Persistent/src/de/steamwar/persistent/Storage.java +++ b/VelocityCore/Persistent/src/de/steamwar/persistent/Storage.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -25,10 +25,7 @@ import com.velocitypowered.proxy.protocol.packet.UpsertPlayerInfoPacket; import lombok.experimental.UtilityClass; import java.sql.Timestamp; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; +import java.util.*; @UtilityClass public class Storage { @@ -49,4 +46,6 @@ public class Storage { public static final Map teamServers = new HashMap<>(); // TeamID -> ServerInfo map public static final Map> directTabItems = new HashMap<>(); + + public static final Set streamingPlayers = new HashSet<>(); // SteamwarUser ID } diff --git a/VelocityCore/Persistent/src/de/steamwar/persistent/Subserver.java b/VelocityCore/Persistent/src/de/steamwar/persistent/Subserver.java index 7351e83a..31944c77 100644 --- a/VelocityCore/Persistent/src/de/steamwar/persistent/Subserver.java +++ b/VelocityCore/Persistent/src/de/steamwar/persistent/Subserver.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -223,6 +223,7 @@ public class Subserver { start(process.getInputStream(), line -> line.contains("Checkpoint restored")); Thread.sleep(100); } else { + sendProgress(0); start(process.getInputStream(), line -> { if (line.contains("Loading libraries, please wait")) sendProgress(2); diff --git a/VelocityCore/build.gradle.kts b/VelocityCore/build.gradle.kts index f290ed22..718b53f0 100644 --- a/VelocityCore/build.gradle.kts +++ b/VelocityCore/build.gradle.kts @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -32,6 +32,9 @@ java { } dependencies { + compileOnly(libs.classindex) + annotationProcessor(libs.classindex) + annotationProcessor(libs.velocityapi) compileOnly(libs.velocity) compileOnly(libs.viaapi) diff --git a/VelocityCore/src/de/steamwar/command/SWCommand.java b/VelocityCore/src/de/steamwar/command/SWCommand.java index 52845d2e..dc1050d3 100644 --- a/VelocityCore/src/de/steamwar/command/SWCommand.java +++ b/VelocityCore/src/de/steamwar/command/SWCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/VelocityCore/src/de/steamwar/command/TypeMapper.java b/VelocityCore/src/de/steamwar/command/TypeMapper.java index 5b592260..8cf5e371 100644 --- a/VelocityCore/src/de/steamwar/command/TypeMapper.java +++ b/VelocityCore/src/de/steamwar/command/TypeMapper.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/VelocityCore/src/de/steamwar/command/TypeUtils.java b/VelocityCore/src/de/steamwar/command/TypeUtils.java index a273cda2..468d527d 100644 --- a/VelocityCore/src/de/steamwar/command/TypeUtils.java +++ b/VelocityCore/src/de/steamwar/command/TypeUtils.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; @@ -46,7 +46,9 @@ public class TypeUtils { Player player = sender.getPlayer(); if (player != null && s.isEmpty()) { ProtocolVersion version = player.getProtocolVersion(); - if (version.greaterThan(ProtocolVersion.MINECRAFT_1_19_4)) { + if (version.greaterThan(ProtocolVersion.MINECRAFT_1_20_5)) { + return ServerVersion.PAPER_21; + } else if (version.greaterThan(ProtocolVersion.MINECRAFT_1_19_4)) { return ServerVersion.PAPER_20; } else if (version.greaterThan(ProtocolVersion.MINECRAFT_1_15_2)) { return ServerVersion.PAPER_19; diff --git a/VelocityCore/src/de/steamwar/command/TypeValidator.java b/VelocityCore/src/de/steamwar/command/TypeValidator.java index 2986b7da..41391f43 100644 --- a/VelocityCore/src/de/steamwar/command/TypeValidator.java +++ b/VelocityCore/src/de/steamwar/command/TypeValidator.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.command; diff --git a/VelocityCore/src/de/steamwar/messages/BungeeCore.properties b/VelocityCore/src/de/steamwar/messages/BungeeCore.properties index 00ddba8f..42605662 100644 --- a/VelocityCore/src/de/steamwar/messages/BungeeCore.properties +++ b/VelocityCore/src/de/steamwar/messages/BungeeCore.properties @@ -1,7 +1,7 @@ # # This file is a part of the SteamWar software. # -# Copyright (C) 2024 SteamWar.de-Serverteam +# 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 @@ -319,6 +319,7 @@ CHECK_LIST_CHECKING_HOVER=§eTo the reviewer CHECK_SCHEMATIC_ALREADY_CHECKING=§cYou are already reviewing a schematic! CHECK_SCHEMATIC_OWN=§cYou cannot review your own schematics. CHECK_SCHEMATIC_OWN_TEAM=§cYou cannot review your team schematics. +CHECK_SCHEMATIC_EVENT=§cYou cannot check the schematic for the event. CHECK_SCHEMATIC_PREVIOUS=§7{0} from {1}§8: §e{2} CHECK_INVALID_RANK=§cUnknown schematic rank. CHECK_ABORT=§aThe test operation was canceled! @@ -589,6 +590,7 @@ CHECK_CHECKING=§cYou are checking a Schematic! JOIN_ARENA=§7Click §ehere§7 to join §e{0} JOIN_ARENA_HOVER=§eJoin Arena JOIN_FIRST=§7Please greet §e{0}§7 on the server§8! +JOIN_STREAMING=§5Streaming Mode§7 is still active§8.§7 Keep in mind that you will not receive TeamChat nor ServerTeamChat messages§8. #EventModeListener EVENTMODE_KICK=§cYou are not an event participant. @@ -623,6 +625,7 @@ SERVER_WORLD_ERROR=§cCreating the world failed. WHOIS_USAGE=§c/whois [player/ID] [-a/-m] WHOIS_USERNAME=§7Username§8: §e{0} WHOIS_PREFIX=§7Chat-Prefix§8: {0} +WHOIS_STREAMING=§7Streaming§8: §e{0} WHOIS_UUID=§7UUID§8: §e{0} WHOIS_UUID_HOVER=§eCopy UUID WHOIS_ID=§7ID§8: §e{0} @@ -735,6 +738,10 @@ INV_PAGE_NEXT=§{0}Seite vor #VersionAnnouncer SERVER_VERSION=§7This server runs on Minecraft version §e{0} +#StreamingCommand +STREAMING_ENABLE=§7Streaming mode §aenabled§8. +STREAMING_DISABLE=§7Streaming mode §cdisabled§8. + #Discord DC_UNLINKED=For this action your Discord account has to be linked to your Minecraft account. To link your accounts go onto the SteamWar Discord to the `regeln-infos` Channel and click on `Minecraft Verknüpfen`. DC_TITLE_SCHEMINFO=Schematic Info diff --git a/VelocityCore/src/de/steamwar/messages/BungeeCore_de.properties b/VelocityCore/src/de/steamwar/messages/BungeeCore_de.properties index b1051f94..a79cfdf7 100644 --- a/VelocityCore/src/de/steamwar/messages/BungeeCore_de.properties +++ b/VelocityCore/src/de/steamwar/messages/BungeeCore_de.properties @@ -1,7 +1,7 @@ # # This file is a part of the SteamWar software. # -# Copyright (C) 2024 SteamWar.de-Serverteam +# 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 @@ -301,6 +301,7 @@ CHECK_LIST_CHECKING_HOVER=§eZum Prüfer CHECK_SCHEMATIC_ALREADY_CHECKING=§cDu prüfst schon eine Schematic! CHECK_SCHEMATIC_OWN=§cDu kannst nicht deine eigenen Schematics prüfen. CHECK_SCHEMATIC_OWN_TEAM=§cDu kannst nicht Schematics deines Teams prüfen. +CHECK_SCHEMATIC_EVENT=§cDu kannst die schematic für das Event nicht prüfen. CHECK_SCHEMATIC_PREVIOUS=§7{0} von {1}§8: §e{2} CHECK_INVALID_RANK=§cUnbekannter Schematicrang. CHECK_ABORT=§aDer Prüfvorgang wurde abgebrochen! @@ -563,6 +564,7 @@ CHECK_CHECKING=§cDu prüfst gerade eine Schematic! JOIN_ARENA=§7Klicke §ehier§7, um §e{0} §7beizutreten JOIN_ARENA_HOVER=§eArena beitreten JOIN_FIRST=§7Begrüßt alle mal §e{0} §7auf dem Server§8! +JOIN_STREAMING=§5Streaming-Modus§7 ist weiterhin aktiv§8.§7 Beachten Sie, dass Sie keine TeamChat- oder ServerTeamChat-Nachrichten erhalten§8. #EventModeListener EVENTMODE_KICK=§cDu bist kein Eventteilnehmer. @@ -683,6 +685,10 @@ INV_PAGE_NEXT=§{0}Next page #VersionAnnouncer SERVER_VERSION=§7Dieser Server läuft auf Minecraft-Version §e{0} +#StreamingCommand +STREAMING_ENABLE=§7Streaming Modus §aaktiviert§8. +STREAMING_DISABLE=§7Streaming Modus §cdeaktiviert§8. + #Discord DC_UNLINKED=Für diese Aktion muss dein Minecraftaccount mit deinem Discordaccount verknüpft sein, gehe dazu auf dem SteamWar-Discord in den `regeln-infos` Channel und Klicke auf `Minecraft Verknüpfen`. DC_TITLE_SCHEMINFO=Schematicinfo diff --git a/VelocityCore/src/de/steamwar/messages/Chatter.java b/VelocityCore/src/de/steamwar/messages/Chatter.java index 5de34d0c..2494287a 100644 --- a/VelocityCore/src/de/steamwar/messages/Chatter.java +++ b/VelocityCore/src/de/steamwar/messages/Chatter.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2022 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 . -*/ + * 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 . + */ package de.steamwar.messages; @@ -28,6 +28,7 @@ import de.steamwar.persistent.Subserver; import de.steamwar.sql.SteamwarUser; import de.steamwar.sql.UserPerm; import de.steamwar.velocitycore.VelocityCore; +import de.steamwar.velocitycore.commands.StreamingCommand; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.event.ClickEvent; import net.kyori.adventure.text.event.HoverEvent; @@ -68,7 +69,9 @@ public interface Chatter { } static ChatterGroup serverteam() { - return new ChatterGroup(allStream().filter(player -> player.user().hasPerm(UserPerm.TEAM))); + return new ChatterGroup(allStream() + .filter(player -> player.user().hasPerm(UserPerm.TEAM)) + .filter(StreamingCommand::isNotStreaming)); } SteamwarUser user(); diff --git a/VelocityCore/src/de/steamwar/messages/ChatterGroup.java b/VelocityCore/src/de/steamwar/messages/ChatterGroup.java index c94975d6..9ca011de 100644 --- a/VelocityCore/src/de/steamwar/messages/ChatterGroup.java +++ b/VelocityCore/src/de/steamwar/messages/ChatterGroup.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/VelocityCore/src/de/steamwar/messages/Message.java b/VelocityCore/src/de/steamwar/messages/Message.java index 3394c274..4c75d53f 100644 --- a/VelocityCore/src/de/steamwar/messages/Message.java +++ b/VelocityCore/src/de/steamwar/messages/Message.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/VelocityCore/src/de/steamwar/messages/PlayerChatter.java b/VelocityCore/src/de/steamwar/messages/PlayerChatter.java index 6febd74f..2790a925 100644 --- a/VelocityCore/src/de/steamwar/messages/PlayerChatter.java +++ b/VelocityCore/src/de/steamwar/messages/PlayerChatter.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/VelocityCore/src/de/steamwar/messages/SteamwarResourceBundle.java b/VelocityCore/src/de/steamwar/messages/SteamwarResourceBundle.java index ffb236f4..db81cf5f 100644 --- a/VelocityCore/src/de/steamwar/messages/SteamwarResourceBundle.java +++ b/VelocityCore/src/de/steamwar/messages/SteamwarResourceBundle.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2022 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 . -*/ + * 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 . + */ package de.steamwar.messages; diff --git a/VelocityCore/src/de/steamwar/sql/SQLConfigImpl.java b/VelocityCore/src/de/steamwar/sql/SQLConfigImpl.java index 199afe9f..dc01e0aa 100644 --- a/VelocityCore/src/de/steamwar/sql/SQLConfigImpl.java +++ b/VelocityCore/src/de/steamwar/sql/SQLConfigImpl.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; diff --git a/VelocityCore/src/de/steamwar/sql/SQLWrapperImpl.java b/VelocityCore/src/de/steamwar/sql/SQLWrapperImpl.java index 1ac26bd8..8e469d20 100644 --- a/VelocityCore/src/de/steamwar/sql/SQLWrapperImpl.java +++ b/VelocityCore/src/de/steamwar/sql/SQLWrapperImpl.java @@ -1,72 +1,50 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.sql; import com.velocitypowered.api.proxy.Player; import com.velocitypowered.api.proxy.server.RegisteredServer; -import de.steamwar.velocitycore.GameModeConfig; import de.steamwar.velocitycore.VelocityCore; import de.steamwar.velocitycore.commands.CheckCommand; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.io.File; -public class SQLWrapperImpl implements SQLWrapper { - private static final SimpleDateFormat deadlineFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm"); - private static Date parseDeadline(String deadline) { - if(deadline == null) - return null; +public class SQLWrapperImpl implements SQLWrapper { - try { - return deadlineFormat.parse(deadline); - } catch (ParseException e) { - throw new SecurityException(e.getMessage(), e); - } + @Override + public File getSchemTypesFolder() { + return new File(VelocityCore.get().getDataDirectory().getParent().toFile(), "FightSystem"); } @Override - public void loadSchemTypes(List tmpTypes, Map tmpFromDB) { - GameModeConfig.loadAll(GameModeConfig.class, (file, config) -> { - if(config.getSchematic() == null || tmpFromDB.containsKey(config.getSchemType().toLowerCase())) - return; + public GameModeConfig loadGameModeConfig(File file) { + return new GameModeConfig<>(file, GameModeConfig.ToString, GameModeConfig.ToString, GameModeConfig.ToInternalName, true); + } - String shortcut = config.getSchematic().getShortcut(); - String material = config.getSchematic().getMaterial(); - - SchematicType checktype = null; - if(!config.getCheckQuestions().isEmpty()) { - checktype = new SchematicType("C" + config.getSchemType(), "C" + shortcut, SchematicType.Type.CHECK_TYPE, null, material, true); - tmpTypes.add(checktype); - tmpFromDB.put(checktype.toDB(), checktype); - CheckCommand.setCheckQuestions(checktype, config.getCheckQuestions()); - } - - SchematicType current = new SchematicType(config.getSchemType(), shortcut, config.getServer() != null ? SchematicType.Type.FIGHT_TYPE : SchematicType.Type.NORMAL, checktype, material, parseDeadline(config.getDeadline()), config.getSchematic().isManualCheck()); - tmpTypes.add(current); - tmpFromDB.put(config.getSchemType().toLowerCase(), current); - if(checktype != null) - CheckCommand.addFightType(checktype, current); - }); + @Override + public void processSchematicType(GameModeConfig gameModeConfig) { + SchematicType type = gameModeConfig.Schematic.Type; + if (type.checkType() != null) { + CheckCommand.setCheckQuestions(type.checkType(), gameModeConfig.CheckQuestions); + CheckCommand.addFightType(type.checkType(), type); + } } @Override diff --git a/VelocityCore/src/de/steamwar/velocitycore/ArenaMode.java b/VelocityCore/src/de/steamwar/velocitycore/ArenaMode.java index 4490c172..48a40870 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/ArenaMode.java +++ b/VelocityCore/src/de/steamwar/velocitycore/ArenaMode.java @@ -1,39 +1,40 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore; +import de.steamwar.sql.GameModeConfig; import de.steamwar.sql.SchematicType; import lombok.Getter; +import lombok.experimental.UtilityClass; -import java.time.LocalDateTime; +import java.io.File; import java.util.*; -public class ArenaMode extends GameModeConfig { +@UtilityClass +public class ArenaMode { - private static final Random random = new Random(); - - private static final Map byChat = new HashMap<>(); - private static final Map byInternal = new HashMap<>(); - private static final Map bySchemType = new HashMap<>(); + private static final Map> byChat = new HashMap<>(); + private static final Map> byInternal = new HashMap<>(); + private static final Map> bySchemType = new HashMap<>(); @Getter - private static final List allModes = new LinkedList<>(); + private static final List> allModes = new LinkedList<>(); static { init(); @@ -45,90 +46,45 @@ public class ArenaMode extends GameModeConfig { bySchemType.clear(); allModes.clear(); - GameModeConfig.loadAll(ArenaMode.class, (file, mode) -> { - if(mode.getServer() == null) - return; + File folder = new File(VelocityCore.get().getDataDirectory().getParent().toFile(), "FightSystem"); + if(!folder.exists()) + return; - mode.config = file.getName(); - mode.internalName = file.getName().replace(".yml", ""); - mode.getMaps().forEach(map -> mode.lowerToRealMapNames.put(map.toLowerCase(), map)); - if(mode.getGameName() == null) - mode.setGameName(mode.internalName); + for(File file : Arrays.stream(folder.listFiles((file, name) -> name.endsWith(".yml") && !name.endsWith(".kits.yml"))).sorted().toList()) { + GameModeConfig gameModeConfig = new GameModeConfig<>(file, GameModeConfig.ToString, GameModeConfig.ToString, GameModeConfig.ToInternalName, false); + if (!gameModeConfig.Server.loaded) continue; - allModes.add(mode); - byInternal.put(mode.internalName, mode); - for(String name : mode.getServer().getChatNames()){ - byChat.put(name.toLowerCase(), mode); + allModes.add(gameModeConfig); + byInternal.put(file.getName().replace(".yml", ""), gameModeConfig); + for (String name : gameModeConfig.Server.ChatNames) { + byChat.put(name.toLowerCase(), gameModeConfig); } - - if(mode.getSchematic() != null && mode.getSchemType() != null) - bySchemType.put(SchematicType.fromDB(mode.getSchemType()), mode); - }); + if (gameModeConfig.Schematic.loaded && gameModeConfig.Schematic.Type != SchematicType.Normal) { + bySchemType.put(gameModeConfig.Schematic.Type, gameModeConfig); + SchematicType checkType = gameModeConfig.Schematic.Type.checkType(); + if (checkType != null) bySchemType.put(checkType, gameModeConfig); + } + } } - public static ArenaMode getByChat(String name){ + public static GameModeConfig getByChat(String name){ return byChat.get(name.toLowerCase()); } - public static ArenaMode getByInternal(String name){ + public static GameModeConfig getByInternal(String name){ return byInternal.get(name); } public static List getAllChatNames(boolean historic) { List chatNames = new LinkedList<>(); - for(ArenaMode mode : byInternal.values()){ - if(mode.isActive() && historic == mode.isHistoric()) - chatNames.addAll(mode.getServer().getChatNames()); + for(GameModeConfig mode : byInternal.values()){ + if(mode.isActive() && historic == mode.Server.Historic) + chatNames.addAll(mode.Server.ChatNames); } return chatNames; } - public static ArenaMode getBySchemType(SchematicType schemType){ + public static GameModeConfig getBySchemType(SchematicType schemType){ return bySchemType.get(schemType); } - - - private final Map lowerToRealMapNames = new HashMap<>(); - - @Getter - private String internalName; - @Getter - private String config; - - @Getter - private List ActiveMonths = Collections.emptyList(); - - public String hasMap(String map){ - for(String m : getMaps()) { - if(m.equalsIgnoreCase(map)) - return m; - } - return null; - } - - public String getRandomMap(){ - return getMaps().get(random.nextInt(getMaps().size())); - } - - public String convertToRealMapName(String map){ - return lowerToRealMapNames.get(map.toLowerCase()); - } - - public String getChatName(){ - return getServer().getChatNames().get(0); - } - - public boolean isActive() { - if (getServer().getChatNames().isEmpty()) return false; - if (ActiveMonths.isEmpty()) return true; - return ActiveMonths.contains(LocalDateTime.now().getMonth().getValue()); - } - - public String getSchemTypeOrInternalName() { - Schematic schematic = getSchematic(); - if (schematic == null) { - return internalName; - } - return schematic.getType(); - } } diff --git a/VelocityCore/src/de/steamwar/velocitycore/Broadcaster.java b/VelocityCore/src/de/steamwar/velocitycore/Broadcaster.java index f5df6d10..66ea6945 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/Broadcaster.java +++ b/VelocityCore/src/de/steamwar/velocitycore/Broadcaster.java @@ -1,35 +1,39 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore; +import de.steamwar.linkage.EventMode; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import java.util.List; import java.util.concurrent.TimeUnit; -class Broadcaster { +@Linked +@EventMode(false) +public class Broadcaster { private final List broadcasts = VelocityCore.get().getConfig().getBroadcasts(); private int lastBroadCast = 0; - Broadcaster() { + public Broadcaster() { if(!broadcasts.isEmpty()) VelocityCore.schedule(this::broadcast).repeat(10, TimeUnit.MINUTES).schedule(); } diff --git a/VelocityCore/src/de/steamwar/velocitycore/Config.java b/VelocityCore/src/de/steamwar/velocitycore/Config.java index 40de2791..276c8310 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/Config.java +++ b/VelocityCore/src/de/steamwar/velocitycore/Config.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 diff --git a/VelocityCore/src/de/steamwar/velocitycore/ErrorLogger.java b/VelocityCore/src/de/steamwar/velocitycore/ErrorLogger.java index f5b79af8..204e4917 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/ErrorLogger.java +++ b/VelocityCore/src/de/steamwar/velocitycore/ErrorLogger.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore; diff --git a/VelocityCore/src/de/steamwar/velocitycore/EventStarter.java b/VelocityCore/src/de/steamwar/velocitycore/EventStarter.java index 0b21cef1..b3419a1c 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/EventStarter.java +++ b/VelocityCore/src/de/steamwar/velocitycore/EventStarter.java @@ -1,24 +1,25 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.messages.Message; import de.steamwar.persistent.Subserver; @@ -36,6 +37,7 @@ import java.util.concurrent.TimeUnit; import static de.steamwar.persistent.Storage.eventServer; +@Linked public class EventStarter { @Getter @@ -55,7 +57,9 @@ public class EventStarter { } private void run() { - eventServer.entrySet().removeIf(entry -> Subserver.getSubserver(entry.getValue().getServer()) == null); + if (eventServer.entrySet().removeIf(entry -> Subserver.getSubserver(entry.getValue().getServer()) == null)) { + EventFight.loadAllComingFights(); + } Queue fights = EventFight.getFights(); EventFight next; diff --git a/VelocityCore/src/de/steamwar/velocitycore/GameModeConfig.java b/VelocityCore/src/de/steamwar/velocitycore/GameModeConfig.java deleted file mode 100644 index 208f6df3..00000000 --- a/VelocityCore/src/de/steamwar/velocitycore/GameModeConfig.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2024 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 . - */ - -package de.steamwar.velocitycore; - -import lombok.Getter; -import lombok.Setter; - -import java.io.File; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.function.BiConsumer; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -@Getter -public class GameModeConfig { - - private static final Pattern terminatingNumber = Pattern.compile("(\\d+)$"); - - public static void loadAll(Class config, BiConsumer consumer) { - File folder = new File(VelocityCore.get().getDataDirectory().getParent().toFile(), "FightSystem"); - if(!folder.exists()) - return; - - for(File file : Arrays.stream(folder.listFiles((file, name) -> name.endsWith(".yml") && !name.endsWith(".kits.yml"))).sorted().toList()) { - consumer.accept(file, Config.load(config, file, description -> {})); - } - } - - private Server Server = null; - private List CheckQuestions = Collections.emptyList(); - private String deadline = null; - private Schematic Schematic = null; - @Setter - private String GameName; - - @Getter - public static class Server { - private String Folder; - private List ChatNames = Collections.emptyList(); - private List Maps; - private boolean Spigot = false; - private boolean Ranked = false; - private boolean Historic = false; - } - - @Getter - public static class Schematic { - private String Type; - private String Shortcut; - private String Material; - private boolean ManualCheck = true; - } - - public ServerVersion getVersion() { - Matcher matcher = terminatingNumber.matcher(getServer().getFolder()); - matcher.find(); - return ServerVersion.valueOf((getServer().isSpigot() ? "SPIGOT_" : "PAPER_") + matcher.group(1)); - } - - public String getFolder() { - return getServer().getFolder(); - } - - public List getMaps() { - return getServer().getMaps(); - } - - public boolean isHistoric() { - return getServer().isHistoric(); - } - - public boolean isRanked() { - return getServer().isRanked(); - } - - public String getSchemType() { - return getSchematic().getType(); - } -} diff --git a/VelocityCore/src/de/steamwar/velocitycore/Node.java b/VelocityCore/src/de/steamwar/velocitycore/Node.java index 308d9938..37381235 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/Node.java +++ b/VelocityCore/src/de/steamwar/velocitycore/Node.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.velocitycore; diff --git a/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java b/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java index 058771e7..3b56256a 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java +++ b/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -22,6 +22,7 @@ package de.steamwar.velocitycore; import com.velocitypowered.api.proxy.Player; import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.velocity.platform.VelocityViaConfig; +import de.steamwar.sql.GameModeConfig; import de.steamwar.messages.Chatter; import de.steamwar.persistent.Arenaserver; import de.steamwar.persistent.Bauserver; @@ -61,7 +62,7 @@ public class ServerStarter { private String worldDir = null; private Node node = null; - private ServerVersion version = ServerVersion.PAPER_20; + private ServerVersion version = ServerVersion.PAPER_21; private Portrange portrange = BAU_PORTS; private Function serverNameProvider = port -> node.getName() + port; private BooleanSupplier startCondition = () -> true; @@ -79,16 +80,16 @@ public class ServerStarter { private final Set playersToSend = new HashSet<>(); private final Map arguments = new HashMap<>(); - public ServerStarter arena(ArenaMode mode, String map) { + public ServerStarter arena(GameModeConfig mode, String map) { portrange = ARENA_PORTS; - serverNameProvider = port -> mode.getGameName() + (port - portrange.start); - version = mode.getVersion(); + serverNameProvider = port -> mode.GameName + (port - portrange.start); + version = ServerVersion.from(mode); allowMerge = true; fightMap = map; - gameMode = mode.getInternalName(); - directory = new File(SERVER_PATH, mode.getFolder()); - arguments.put("config", mode.getConfig()); - tempWorld(SERVER_PATH + mode.getFolder() + "/arenas/" + map); + gameMode = mode.configFile.getName().replace(".yml", ""); + directory = new File(SERVER_PATH, mode.Server.Folder); + arguments.put("config", mode.configFile.getName()); + tempWorld(SERVER_PATH + mode.Server.Folder + "/arenas/" + map); startCondition = () -> { if(playersToSend.stream().anyMatch(player -> Subserver.isArena(Subserver.getSubserver(player)))) { playersToSend.forEach(player -> Chatter.of(player).system("FIGHT_IN_ARENA")); @@ -115,7 +116,7 @@ public class ServerStarter { return this; } - public ServerStarter test(ArenaMode mode, String map, Player owner) { + public ServerStarter test(GameModeConfig mode, String map, Player owner) { arena(mode, map); buildWithTemp(owner); portrange = BAU_PORTS; diff --git a/VelocityCore/src/de/steamwar/velocitycore/ServerVersion.java b/VelocityCore/src/de/steamwar/velocitycore/ServerVersion.java index 42c02fe5..5d3689f9 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/ServerVersion.java +++ b/VelocityCore/src/de/steamwar/velocitycore/ServerVersion.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -20,6 +20,8 @@ package de.steamwar.velocitycore; import com.velocitypowered.api.network.ProtocolVersion; +import de.steamwar.sql.GameModeConfig; +import de.steamwar.sql.SchematicType; import lombok.AllArgsConstructor; import lombok.Getter; @@ -27,6 +29,8 @@ import java.io.File; import java.util.HashMap; import java.util.Map; import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; @Getter @AllArgsConstructor @@ -108,4 +112,12 @@ public enum ServerVersion { public File getServerDirectory(String base) { return new File(ServerStarter.SERVER_PATH, base + versionSuffix); } + + private static final Pattern terminatingNumber = Pattern.compile("(\\d+)$"); + + public static ServerVersion from(GameModeConfig type) { + Matcher matcher = terminatingNumber.matcher(type.Server.Folder); + matcher.find(); + return ServerVersion.valueOf((type.Server.Spigot ? "SPIGOT_" : "PAPER_") + matcher.group(1)); + } } diff --git a/VelocityCore/src/de/steamwar/velocitycore/SubserverSystem.java b/VelocityCore/src/de/steamwar/velocitycore/SubserverSystem.java index 68bee31d..8428a567 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/SubserverSystem.java +++ b/VelocityCore/src/de/steamwar/velocitycore/SubserverSystem.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore; diff --git a/VelocityCore/src/de/steamwar/velocitycore/VelocityCore.java b/VelocityCore/src/de/steamwar/velocitycore/VelocityCore.java index b4bc9ccc..c8150a1b 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/VelocityCore.java +++ b/VelocityCore/src/de/steamwar/velocitycore/VelocityCore.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore; @@ -29,6 +29,9 @@ import com.velocitypowered.api.plugin.annotation.DataDirectory; import com.velocitypowered.api.proxy.ProxyServer; import com.velocitypowered.api.scheduler.Scheduler; import de.steamwar.command.*; +import de.steamwar.linkage.AbstractLinker; +import de.steamwar.linkage.EventMode; +import de.steamwar.linkage.LinkedInstance; import de.steamwar.messages.Chatter; import de.steamwar.network.packets.PacketHandler; import de.steamwar.persistent.ReloadablePlugin; @@ -37,14 +40,15 @@ import de.steamwar.sql.SteamwarUser; import de.steamwar.sql.Team; import de.steamwar.sql.UserElo; import de.steamwar.sql.internal.Statement; -import de.steamwar.velocitycore.commands.*; +import de.steamwar.velocitycore.commands.PunishmentCommand; +import de.steamwar.velocitycore.commands.ServerSwitchCommand; +import de.steamwar.velocitycore.commands.TeamCommand; import de.steamwar.velocitycore.discord.DiscordBot; import de.steamwar.velocitycore.discord.DiscordConfig; -import de.steamwar.velocitycore.listeners.*; -import de.steamwar.velocitycore.mods.*; -import de.steamwar.velocitycore.network.handlers.*; -import de.steamwar.velocitycore.tablist.TablistManager; +import de.steamwar.velocitycore.listeners.BasicListener; +import de.steamwar.velocitycore.listeners.PollSystem; import lombok.Getter; +import lombok.NonNull; import java.nio.file.Path; import java.sql.Driver; @@ -94,9 +98,9 @@ public class VelocityCore implements ReloadablePlugin { @Getter private Config config; private ErrorLogger errorLogger; - private TablistManager tablistManager; @Getter + @LinkedInstance private TeamCommand teamCommand; @Inject @@ -104,9 +108,10 @@ public class VelocityCore implements ReloadablePlugin { this.proxyServer = proxyServer; this.logger = logger; this.dataDirectory = dataDirectory; - } + private AbstractLinker linker; + @Subscribe @Override public void onProxyInitialization(ProxyInitializeEvent event) { @@ -139,64 +144,11 @@ public class VelocityCore implements ReloadablePlugin { initStaticServers(); PollSystem.init(); - new Hostname(); - new PluginMessage(); - new Schematica(); - new Badlion(); - new FabricModSender(); - new ReplayMod(); - new FML2(); - - new ConnectionListener(); - new ChatListener(); - new BanListener(); - new CheckListener(); - new IPSanitizer(); - new VersionAnnouncer(); - new TexturePackSystem(); - local = new Node.LocalNode(); if(MAIN_SERVER) { //new Node.RemoteNode("lx"); } - new TeamchatCommand(); - new MsgCommand(); - new RCommand(); - new PingCommand(); - new AlertCommand(); - new KickCommand(); - new JoinmeCommand(); - new TpCommand(); - HelpCommand helpCommand = new HelpCommand(); - teamCommand = new TeamCommand(); - new ServerTeamchatCommand(); - new DevCommand(); - new SendCommand(); - new EventCommand(); - new EventreloadCommand(); - new EventRescheduleCommand(); - new PollCommand(); - new BugCommand(); - new WhoisCommand(); - new RulesCommand(); - new IgnoreCommand(); - new UnIgnoreCommand(); - new PollresultCommand(); - new ListCommand(); - new StatCommand(); - new VerifyCommand(); - new GDPRQuery(); - new PlaytimeCommand(); - new ArenaCommand(); - new RankCommand(); - new LocalCommand(); - new SetLocaleCommand(); - new BuilderCloudCommand(); - new CheckCommand(); - - new ModCommand(); - // Punishment Commands: new PunishmentCommand("ban", Punishment.PunishmentType.Ban); new PunishmentCommand("mute", Punishment.PunishmentType.Mute); @@ -208,31 +160,37 @@ public class VelocityCore implements ReloadablePlugin { new PunishmentCommand("noteamserver", Punishment.PunishmentType.NoTeamServer); new PunishmentCommand("note", Punishment.PunishmentType.Note); - if(!config.isEventmode()){ - new BauCommand(helpCommand); - new WebpasswordCommand(); - new FightCommand(); - new ChallengeCommand(); - new HistoricCommand(); - new ReplayCommand(); + linker = new AbstractLinker<>(this) { + @Override + protected boolean eventModeCheck(@NonNull Class clazz, EventMode eventMode) { + return eventMode == null || eventMode.value() == config.isEventmode(); + } - new Broadcaster(); - new CookieEvents(); - }else{ - new EventModeListener(); + @Override + protected void linkObject(Object any) { + if (any instanceof PacketHandler) { + ((PacketHandler) any).register(); + } + } + + @Override + protected void unlinkObject(Object any) { + if (any instanceof PacketHandler) { + ((PacketHandler) any).unregister(); + } + if (any instanceof BasicListener) { + VelocityCore.getProxy().getEventManager().unregisterListener(instance, any); + } + } + }; + try { + linker.link(); + } catch (AbstractLinker.LinkException e) { + logger.log(Level.SEVERE, e.getMessage(), e); + getProxy().shutdown(); + return; } - for(PacketHandler handler : new PacketHandler[] { - new EloPlayerHandler(), new EloSchemHandler(), new ExecuteCommandHandler(), new FightInfoHandler(), - new ImALobbyHandler(), new InventoryCallbackHandler(), new PrepareSchemHandler(), new PlayerSkinHandler(), new AnvilAnswerHandler() - }) - handler.register(); - - new EventStarter(); - new SessionManager(); - tablistManager = new TablistManager(); - new SettingsChangedListener(); - schedule(() -> { SteamwarUser.clear(); UserElo.clear(); @@ -268,8 +226,7 @@ public class VelocityCore implements ReloadablePlugin { logger.log(Level.SEVERE, "Could not shutdown discord bot", e); } - if(tablistManager != null) - tablistManager.disable(); + linker.unlink(); errorLogger.unregister(); Statement.closeAll(); diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/AlertCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/AlertCommand.java index b95bbd69..087afe7c 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/AlertCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/AlertCommand.java @@ -1,29 +1,31 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; +import de.steamwar.linkage.Linked; import de.steamwar.velocitycore.discord.DiscordBot; import de.steamwar.command.SWCommand; import de.steamwar.messages.Chatter; import de.steamwar.sql.UserPerm; +@Linked public class AlertCommand extends SWCommand { public AlertCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/ArenaCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/ArenaCommand.java index cee6cb04..c02b90e5 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/ArenaCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/ArenaCommand.java @@ -1,21 +1,21 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.velocitycore.commands; @@ -23,6 +23,7 @@ import com.velocitypowered.api.proxy.server.RegisteredServer; import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeMapper; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.messages.PlayerChatter; import de.steamwar.persistent.Subserver; @@ -31,6 +32,7 @@ import de.steamwar.velocitycore.VelocityCore; import java.util.Collection; import java.util.List; +@Linked public class ArenaCommand extends SWCommand { public ArenaCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/BauCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/BauCommand.java index 710bb1be..cd23a910 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/BauCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/BauCommand.java @@ -1,34 +1,32 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; -import de.steamwar.velocitycore.*; -import de.steamwar.velocitycore.inventory.SWInventory; -import de.steamwar.velocitycore.inventory.SWItem; -import de.steamwar.velocitycore.network.NetworkSender; -import de.steamwar.velocitycore.util.BauLock; -import de.steamwar.velocitycore.util.BauLockState; import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeMapper; import de.steamwar.command.TypeValidator; +import de.steamwar.sql.GameModeConfig; +import de.steamwar.linkage.EventMode; +import de.steamwar.linkage.Linked; +import de.steamwar.linkage.LinkedInstance; import de.steamwar.messages.Chatter; import de.steamwar.messages.Message; import de.steamwar.messages.PlayerChatter; @@ -36,17 +34,25 @@ import de.steamwar.network.packets.server.BaumemberUpdatePacket; import de.steamwar.persistent.Bauserver; import de.steamwar.sql.BauweltMember; import de.steamwar.sql.SteamwarUser; +import de.steamwar.velocitycore.*; +import de.steamwar.velocitycore.inventory.SWInventory; +import de.steamwar.velocitycore.inventory.SWItem; +import de.steamwar.velocitycore.network.NetworkSender; +import de.steamwar.velocitycore.util.BauLock; +import de.steamwar.data.BauLockState; import java.util.Collection; import java.util.function.Consumer; +@Linked +@EventMode(false) public class BauCommand extends SWCommand { - private final HelpCommand command; + @LinkedInstance + private HelpCommand command; - public BauCommand(HelpCommand command) { + public BauCommand() { super("bau", "b", "build", "gs"); - this.command = command; } @Register(noTabComplete = true) @@ -211,7 +217,7 @@ public class BauCommand extends SWCommand { @Register("resetall") @Register("delete") - public void delete(PlayerChatter sender, @OptionalValue(value = "", onlyUINIG = true) ServerVersion version) { + public void delete(PlayerChatter sender, ServerVersion version) { SWInventory inventory = new SWInventory(sender, 9, new Message("BAU_DELETE_GUI_NAME")); inventory.addItem(0, new SWItem(new Message("BAU_DELETE_GUI_DELETE"), 10), click -> { String world = version.getWorldFolder(ServerStarter.WORLDS_BASE_PATH) + sender.user().getId(); @@ -233,7 +239,7 @@ public class BauCommand extends SWCommand { @Register("test") @Register("testarena") - public void testarena(PlayerChatter sender, @Mapper("nonHistoricArenaMode") @OptionalValue("") @AllowNull ArenaMode arenaMode, @Mapper("arenaMap") @OptionalValue("") @AllowNull String map) { + public void testarena(PlayerChatter sender, @Mapper("nonHistoricArenaMode") @OptionalValue("") @AllowNull GameModeConfig arenaMode, @Mapper("arenaMap") @OptionalValue("") @AllowNull String map) { FightCommand.createArena(sender, "/bau testarena ", false, arenaMode, map, false, (chatter, mode, m) -> new ServerStarter().test(mode, m, sender.getPlayer()).start() ); diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/BugCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/BugCommand.java index 088acb09..f7d51bc3 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/BugCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/BugCommand.java @@ -1,30 +1,31 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; +import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; +import de.steamwar.messages.Chatter; import de.steamwar.persistent.Subserver; import de.steamwar.sql.SWException; -import de.steamwar.command.SWCommand; -import de.steamwar.messages.Chatter; -import de.steamwar.velocitycore.SubserverSystem; +@Linked public class BugCommand extends SWCommand { public BugCommand() { super("bug"); diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/BuilderCloudCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/BuilderCloudCommand.java index 51c0f1bf..5ae01fe7 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/BuilderCloudCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/BuilderCloudCommand.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -19,6 +19,9 @@ package de.steamwar.velocitycore.commands; +import de.steamwar.sql.GameModeConfig; +import de.steamwar.linkage.Linked; +import de.steamwar.sql.SchematicType; import de.steamwar.velocitycore.ArenaMode; import de.steamwar.velocitycore.ServerStarter; import de.steamwar.velocitycore.ServerVersion; @@ -37,6 +40,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; +@Linked public class BuilderCloudCommand extends SWCommand { public BuilderCloudCommand() { @@ -83,14 +87,14 @@ public class BuilderCloudCommand extends SWCommand { } @Register(value = "deploy", description = "BUILDERCLOUD_DEPLOY_USAGE") - public void deploy(Chatter sender, @Mapper("nonHistoricArenaMode") ArenaMode arenaMode, @ErrorMessage("BUILDERCLOUD_VERSION") ServerVersion version, @Mapper("map") String map) { + public void deploy(Chatter sender, @Mapper("nonHistoricArenaMode") GameModeConfig arenaMode, @ErrorMessage("BUILDERCLOUD_VERSION") ServerVersion version, @Mapper("map") String map) { if(!mapFile(version, map).exists()) { sender.system("BUILDERCLOUD_UNKNOWN_MAP"); return; } VelocityCore.schedule(() -> { - VelocityCore.local.execute("deployarena.py", arenaMode.getConfig(), Integer.toString(version.getVersionSuffix()), map); + VelocityCore.local.execute("deployarena.py", arenaMode.configFile.getName(), Integer.toString(version.getVersionSuffix()), map); ArenaMode.init(); sender.system("BUILDERCLOUD_DEPLOY_FINISHED"); }).schedule(); diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/ChallengeCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/ChallengeCommand.java index 78ced8d1..c9ab1f84 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/ChallengeCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/ChallengeCommand.java @@ -1,33 +1,36 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; import com.velocitypowered.api.proxy.Player; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeValidator; +import de.steamwar.sql.GameModeConfig; +import de.steamwar.linkage.EventMode; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.messages.Message; import de.steamwar.messages.PlayerChatter; import de.steamwar.persistent.Subserver; import de.steamwar.sql.IgnoreSystem; -import de.steamwar.velocitycore.ArenaMode; +import de.steamwar.sql.SchematicType; import de.steamwar.velocitycore.ServerStarter; import net.kyori.adventure.text.event.ClickEvent; @@ -35,6 +38,8 @@ import java.util.LinkedList; import static de.steamwar.persistent.Storage.challenges; +@Linked +@EventMode(false) public class ChallengeCommand extends SWCommand { public ChallengeCommand() { @@ -42,7 +47,7 @@ public class ChallengeCommand extends SWCommand { } @Register(description = "CHALLENGE_USAGE") - public void challenge(@Validator("arenaPlayer") PlayerChatter sender, @Validator("target") Player target, @Mapper("nonHistoricArenaMode") @OptionalValue("") @AllowNull ArenaMode arenaMode, @Mapper("arenaMap") @OptionalValue("") @AllowNull String map) { + public void challenge(@Validator("arenaPlayer") PlayerChatter sender, @Validator("target") Player target, @Mapper("nonHistoricArenaMode") @OptionalValue("") @AllowNull GameModeConfig arenaMode, @Mapper("arenaMap") @OptionalValue("") @AllowNull String map) { FightCommand.createArena(sender, "/challenge " + target.getUsername() + " ", false, arenaMode, map, false, (chatter, mode, m) -> { Player p = sender.getPlayer(); if(challenges.containsKey(target) && challenges.get(target).contains(p)){ @@ -50,7 +55,7 @@ public class ChallengeCommand extends SWCommand { challenges.remove(p); new ServerStarter().arena(mode, map).blueLeader(sender.getPlayer()).redLeader(target).callback( - arena -> Chatter.broadcast().system("CHALLENGE_BROADCAST", new Message("CHALLENGE_BROADCAST_HOVER"), ClickEvent.runCommand("/arena " + arena.getServer().getName()), mode.getGameName(), p, target) + arena -> Chatter.broadcast().system("CHALLENGE_BROADCAST", new Message("CHALLENGE_BROADCAST_HOVER"), ClickEvent.runCommand("/arena " + arena.getServer().getName()), mode.GameName, p, target) ).start(); }else{ if(!challenges.containsKey(p)){ @@ -59,8 +64,8 @@ public class ChallengeCommand extends SWCommand { challenges.get(p).add(target); - sender.system("CHALLENGE_CHALLENGED", target, mode.getGameName()); - Chatter.of(target).system("CHALLENGE_CHALLENGED_TARGET", p, mode.getGameName(), mode.getMaps().size() != 1 ? new Message("CHALLENGE_CHALLENGED_MAP", m) : ""); + sender.system("CHALLENGE_CHALLENGED", target, mode.GameName); + Chatter.of(target).system("CHALLENGE_CHALLENGED_TARGET", p, mode.GameName, mode.Server.Maps.size() != 1 ? new Message("CHALLENGE_CHALLENGED_MAP", m) : ""); Chatter.of(target).system("CHALLENGE_ACCEPT", new Message("CHALLENGE_ACCEPT_HOVER"), ClickEvent.runCommand("/challenge " + p.getUsername() + " " + mode.getChatName() + " " + m)); } diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/CheckCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/CheckCommand.java index 8d618600..9be08fda 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/CheckCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/CheckCommand.java @@ -1,26 +1,28 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; import com.velocitypowered.api.proxy.Player; +import com.velocitypowered.api.proxy.ServerConnection; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.messages.Message; import de.steamwar.messages.PlayerChatter; @@ -38,12 +40,13 @@ import net.kyori.adventure.text.format.NamedTextColor; import java.awt.*; import java.sql.Timestamp; import java.time.Instant; -import java.util.List; import java.util.*; +import java.util.List; import java.util.concurrent.TimeUnit; import java.util.function.BooleanSupplier; import java.util.logging.Level; +@Linked public class CheckCommand extends SWCommand { private static final Map fightTypes = new HashMap<>(); private static final Map> checkQuestions = new HashMap<>(); @@ -97,17 +100,31 @@ public class CheckCommand extends SWCommand { sender.system("CHECK_LIST_HEADER", schematicList.size()); for (SchematicNode schematic : schematicList) { + GameModeConfig gameModeConfig = ArenaMode.getBySchemType(schematic.getSchemtype()); + if (gameModeConfig == null) gameModeConfig = GameModeConfig.getDefaults(); CheckSession current = currentSchems.get(schematic.getId()); + ClickEvent clickEvent = null; + Message hoverMessage = null; + if (gameModeConfig.Checkers.isEmpty() || gameModeConfig.Checkers.contains(sender.user().getId())) { + if (current == null) { + clickEvent = ClickEvent.runCommand("/check schematic " + schematic.getId()); + hoverMessage = new Message("CHECK_LIST_TO_CHECK_HOVER"); + } else { + clickEvent = ClickEvent.runCommand("/join " + current.checker.user().getUserName()); + hoverMessage = new Message("CHECK_LIST_CHECKING_HOVER"); + } + } + if (current == null) { sender.prefixless("CHECK_LIST_TO_CHECK", - new Message("CHECK_LIST_TO_CHECK_HOVER"), - ClickEvent.runCommand("/check schematic " + schematic.getId()), + hoverMessage, + clickEvent, getWaitTime(schematic), schematic.getSchemtype().getKuerzel(), SteamwarUser.get(schematic.getOwner()).getUserName(), schematic.getName()); } else { sender.prefixless("CHECK_LIST_CHECKING", - new Message("CHECK_LIST_CHECKING_HOVER"), - ClickEvent.runCommand("/join " + current.checker.user().getUserName()), + hoverMessage, + clickEvent, getWaitTime(schematic), schematic.getSchemtype().getKuerzel(), SteamwarUser.get(schematic.getOwner()).getUserName(), schematic.getName(), current.checker.user().getUserName()); } @@ -122,6 +139,11 @@ public class CheckCommand extends SWCommand { } SchematicNode schem = SchematicNode.getSchematicNode(Integer.parseInt(schemID)); + GameModeConfig gameModeConfig = ArenaMode.getBySchemType(schem.getSchemtype()); + if (!gameModeConfig.Checkers.isEmpty() && !gameModeConfig.Checkers.contains(sender.user().getId())) { + sender.system("CHECK_SCHEMATIC_EVENT"); + return; + } if(!schem.getSchemtype().check()){ VelocityCore.getLogger().log(Level.SEVERE, () -> sender.user().getUserName() + " tried to check an uncheckable schematic!"); return; @@ -131,10 +153,20 @@ public class CheckCommand extends SWCommand { } int playerTeam = sender.user().hasPerm(UserPerm.MODERATION) ? 0 : sender.user().getTeam(); - if (playerTeam != 0 && SteamwarUser.get(schem.getOwner()).getTeam() == playerTeam) { + // Ignore 795 SteamWar Team + if (playerTeam != 0 && playerTeam != 795 && SteamwarUser.get(schem.getOwner()).getTeam() == playerTeam) { sender.system("CHECK_SCHEMATIC_OWN_TEAM"); return; } + + CheckSession checkSession = currentSchems.get(schem.getId()); + if (checkSession != null) { + Optional serverConnection = checkSession.checker.getPlayer().getCurrentServer(); + if (serverConnection.isPresent()) { + sender.getPlayer().createConnectionRequest(serverConnection.get().getServer()).fireAndForget(); + return; + } + } new CheckSession(sender, schem); } @@ -218,7 +250,7 @@ public class CheckCommand extends SWCommand { this.startTime = Timestamp.from(Instant.now()); this.checkList = checkQuestions.get(schematic.getSchemtype()).listIterator(); - ArenaMode mode = ArenaMode.getBySchemType(fightTypes.get(schematic.getSchemtype())); + GameModeConfig mode = ArenaMode.getBySchemType(fightTypes.get(schematic.getSchemtype())); new ServerStarter().test(mode, mode.getRandomMap(), checker.getPlayer()).check(schematic.getId()).callback(subserver -> { currentCheckers.put(checker.user().getUUID(), this); currentSchems.put(schematic.getId(), this); diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/DevCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/DevCommand.java index 39703e36..320b5064 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/DevCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/DevCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.velocitycore.commands; @@ -27,6 +27,7 @@ import de.steamwar.command.SWCommand; import de.steamwar.command.SWCommandUtils; import de.steamwar.command.TypeMapper; import de.steamwar.command.TypeValidator; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.messages.Message; import de.steamwar.messages.PlayerChatter; @@ -43,6 +44,7 @@ import java.net.InetSocketAddress; import java.util.HashMap; import java.util.Map; +@Linked public class DevCommand extends SWCommand { private final File devServerDir = new File("/configs/DevServer"); diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/EventCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/EventCommand.java index b57d6aad..04755885 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/EventCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/EventCommand.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; @@ -23,6 +23,7 @@ import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeMapper; import de.steamwar.command.TypeValidator; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.messages.PlayerChatter; import de.steamwar.persistent.Subserver; @@ -37,6 +38,7 @@ import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; +@Linked public class EventCommand extends SWCommand { public EventCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/EventRescheduleCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/EventRescheduleCommand.java index 9660eba4..4a737cfc 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/EventRescheduleCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/EventRescheduleCommand.java @@ -1,26 +1,27 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeMapper; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.sql.Event; import de.steamwar.sql.EventFight; @@ -32,6 +33,7 @@ import java.util.Date; import java.util.List; import java.util.ListIterator; +@Linked public class EventRescheduleCommand extends SWCommand { public EventRescheduleCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/EventreloadCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/EventreloadCommand.java index 45aa61b8..9aefc3a8 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/EventreloadCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/EventreloadCommand.java @@ -1,29 +1,31 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.sql.EventFight; import de.steamwar.sql.UserPerm; +@Linked public class EventreloadCommand extends SWCommand { public EventreloadCommand() { super("eventreload", UserPerm.MODERATION); diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/FightCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/FightCommand.java index ee82988c..1c1d8bd2 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/FightCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/FightCommand.java @@ -1,31 +1,35 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; import com.velocitypowered.api.proxy.Player; import de.steamwar.command.SWCommand; +import de.steamwar.sql.GameModeConfig; +import de.steamwar.linkage.EventMode; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.messages.Message; import de.steamwar.messages.PlayerChatter; import de.steamwar.persistent.Arenaserver; import de.steamwar.persistent.Subserver; +import de.steamwar.sql.SchematicType; import de.steamwar.velocitycore.ArenaMode; import de.steamwar.velocitycore.ServerStarter; import de.steamwar.velocitycore.inventory.SWInventory; @@ -36,6 +40,8 @@ import net.kyori.adventure.text.event.HoverEvent; import net.kyori.adventure.text.format.NamedTextColor; import net.kyori.adventure.text.format.TextDecoration; +@Linked +@EventMode(false) public class FightCommand extends SWCommand { public FightCommand() { @@ -44,8 +50,8 @@ public class FightCommand extends SWCommand { private static void getModes(Chatter sender, String precommand, boolean historic){ Component start = Component.empty(); - for(ArenaMode mode : ArenaMode.getAllModes()){ - if (!mode.isActive() || mode.isHistoric() != historic) + for(GameModeConfig mode : ArenaMode.getAllModes()){ + if (!mode.isActive() || mode.Server.Historic != historic) continue; String command = precommand + mode.getChatName(); @@ -60,7 +66,7 @@ public class FightCommand extends SWCommand { sender.sendMessage(start); } - static void createArena(PlayerChatter sender, String precommand, boolean allowMerging, ArenaMode arenaMode, String map, boolean historic, FightCallback callback) { + static void createArena(PlayerChatter sender, String precommand, boolean allowMerging, GameModeConfig arenaMode, String map, boolean historic, FightCallback callback) { if (arenaMode == null) { getModes(sender, precommand, historic); return; @@ -76,12 +82,12 @@ public class FightCommand extends SWCommand { } } - private static void suggestMerging(PlayerChatter sender, ArenaMode mode, String map, FightCallback declineMerge) { + private static void suggestMerging(PlayerChatter sender, GameModeConfig mode, String map, FightCallback declineMerge) { Arenaserver mergable = null; synchronized (Subserver.getServerList()) { for (Subserver subserver : Subserver.getServerList()) { if(subserver instanceof Arenaserver arenaserver && - (mode.getInternalName().equals(arenaserver.getMode()) && arenaserver.isAllowMerge() && arenaserver.getRegisteredServer().getPlayersConnected().size() == 1)) { + (mode.configFile.getName().replace(".yml", "").equals(arenaserver.getMode()) && arenaserver.isAllowMerge() && arenaserver.getRegisteredServer().getPlayersConnected().size() == 1)) { mergable = arenaserver; break; } @@ -99,7 +105,7 @@ public class FightCommand extends SWCommand { declineMerge.run(sender, mode, map); }); Arenaserver finalMergable = mergable; - SWItem item = new SWItem(new Message("FIGHT_MERGE_INFO", mode.getGameName(), finalMergable.getMap()), 11); + SWItem item = new SWItem(new Message("FIGHT_MERGE_INFO", mode.GameName, finalMergable.getMap()), 11); item.addLore(new Message("FIGHT_MERGE_INFO_LORE_1", finalMergable.getRegisteredServer().getPlayersConnected().toArray(new Player[1])[0].getUsername())); inventory.addItem(4, item, click -> {}); inventory.addItem(8, new SWItem(new Message("FIGHT_MERGE_ACCEPT"), 10), click -> { @@ -114,15 +120,15 @@ public class FightCommand extends SWCommand { } @Register - public void fight(@Validator("arenaPlayer") PlayerChatter sender, @Mapper("nonHistoricArenaMode") @OptionalValue("") @AllowNull ArenaMode arenaMode, @Mapper("arenaMap") @OptionalValue("") @AllowNull String map) { + public void fight(@Validator("arenaPlayer") PlayerChatter sender, @Mapper("nonHistoricArenaMode") @OptionalValue("") @AllowNull GameModeConfig arenaMode, @Mapper("arenaMap") @OptionalValue("") @AllowNull String map) { createArena(sender, "/fight ", true, arenaMode, map, false, (p, mode, m) -> new ServerStarter().arena(mode, m).blueLeader(p.getPlayer()).callback( - arena -> Chatter.broadcast().system("FIGHT_BROADCAST", new Message("FIGHT_BROADCAST_HOVER", p.getPlayer().getUsername()), ClickEvent.runCommand("/arena " + arena.getServer().getName()), mode.getGameName(), p.getPlayer().getUsername()) + arena -> Chatter.broadcast().system("FIGHT_BROADCAST", new Message("FIGHT_BROADCAST_HOVER", p.getPlayer().getUsername()), ClickEvent.runCommand("/arena " + arena.getServer().getName()), mode.GameName, p.getPlayer().getUsername()) ).start() ); } public interface FightCallback { - void run(PlayerChatter player, ArenaMode mode, String map); + void run(PlayerChatter player, GameModeConfig mode, String map); } } diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/GDPRQuery.java b/VelocityCore/src/de/steamwar/velocitycore/commands/GDPRQuery.java index e54a7ffa..d5756890 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/GDPRQuery.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/GDPRQuery.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -19,6 +19,7 @@ package de.steamwar.velocitycore.commands; +import de.steamwar.linkage.Linked; import de.steamwar.velocitycore.VelocityCore; import de.steamwar.command.SWCommand; import de.steamwar.messages.Chatter; @@ -31,6 +32,7 @@ import java.io.*; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; +@Linked public class GDPRQuery extends SWCommand { public GDPRQuery() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/HelpCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/HelpCommand.java index 33e595d0..00243eae 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/HelpCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/HelpCommand.java @@ -1,31 +1,33 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.messages.Message; import net.kyori.adventure.text.event.ClickEvent; import java.util.function.Function; +@Linked public class HelpCommand extends SWCommand { public HelpCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/HistoricCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/HistoricCommand.java index 395eff33..639b25f5 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/HistoricCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/HistoricCommand.java @@ -1,41 +1,46 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; import de.steamwar.command.SWCommand; +import de.steamwar.sql.GameModeConfig; +import de.steamwar.linkage.EventMode; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.messages.Message; import de.steamwar.messages.PlayerChatter; -import de.steamwar.velocitycore.ArenaMode; +import de.steamwar.sql.SchematicType; import de.steamwar.velocitycore.ServerStarter; import net.kyori.adventure.text.event.ClickEvent; +@Linked +@EventMode(false) public class HistoricCommand extends SWCommand { public HistoricCommand() { super("historic"); } @Register - public void historic(@Validator("arenaPlayer") PlayerChatter player, @Mapper("historicArenaMode") @OptionalValue("") @AllowNull ArenaMode arenaMode, @Mapper("arenaMap") @OptionalValue("") @AllowNull String map) { + public void historic(@Validator("arenaPlayer") PlayerChatter player, @Mapper("historicArenaMode") @OptionalValue("") @AllowNull GameModeConfig arenaMode, @Mapper("arenaMap") @OptionalValue("") @AllowNull String map) { FightCommand.createArena(player, "/historic ", true, arenaMode, map, true, (p, mode, m) -> new ServerStarter().arena(mode, m).blueLeader(p.getPlayer()).callback( - arena -> Chatter.broadcast().system("HISTORIC_BROADCAST", new Message("HISTORIC_BROADCAST_HOVER", p), ClickEvent.runCommand("/arena " + arena.getServer().getName()), mode.getGameName(), p.getPlayer()) + arena -> Chatter.broadcast().system("HISTORIC_BROADCAST", new Message("HISTORIC_BROADCAST_HOVER", p), ClickEvent.runCommand("/arena " + arena.getServer().getName()), mode.GameName, p.getPlayer()) ).start()); } } diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/IgnoreCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/IgnoreCommand.java index 684ab5a6..7b11a08c 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/IgnoreCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/IgnoreCommand.java @@ -1,29 +1,31 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.sql.IgnoreSystem; import de.steamwar.sql.SteamwarUser; +@Linked public class IgnoreCommand extends SWCommand { public IgnoreCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/JoinmeCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/JoinmeCommand.java index 4bab8d11..b0d70616 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/JoinmeCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/JoinmeCommand.java @@ -1,31 +1,33 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.messages.Message; import de.steamwar.messages.PlayerChatter; import de.steamwar.sql.UserPerm; import net.kyori.adventure.text.event.ClickEvent; +@Linked public class JoinmeCommand extends SWCommand { public JoinmeCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/KickCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/KickCommand.java index 4bbd8bef..3b6376a6 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/KickCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/KickCommand.java @@ -1,29 +1,31 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; import com.velocitypowered.api.proxy.Player; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.sql.UserPerm; +@Linked public class KickCommand extends SWCommand { public KickCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/ListCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/ListCommand.java index dab59005..16505ee5 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/ListCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/ListCommand.java @@ -1,20 +1,20 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.velocitycore.commands; @@ -22,6 +22,7 @@ package de.steamwar.velocitycore.commands; import com.velocitypowered.api.proxy.Player; import com.velocitypowered.api.proxy.ServerConnection; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.persistent.Subserver; import de.steamwar.velocitycore.VelocityCore; @@ -32,6 +33,7 @@ import java.util.SortedMap; import java.util.TreeMap; import java.util.stream.Collectors; +@Linked public class ListCommand extends SWCommand { public ListCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/LocalCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/LocalCommand.java index d53afdb7..86a971aa 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/LocalCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/LocalCommand.java @@ -1,28 +1,30 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2022 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 . -*/ + * 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 . + */ package de.steamwar.velocitycore.commands; +import de.steamwar.linkage.Linked; import de.steamwar.velocitycore.listeners.ChatListener; import de.steamwar.command.SWCommand; import de.steamwar.messages.PlayerChatter; +@Linked public class LocalCommand extends SWCommand { public LocalCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/ModCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/ModCommand.java index c37a3e7c..3978370a 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/ModCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/ModCommand.java @@ -1,24 +1,25 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2023 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 . -*/ + * 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 . + */ package de.steamwar.velocitycore.commands; +import de.steamwar.linkage.Linked; import de.steamwar.velocitycore.inventory.SWInventory; import de.steamwar.velocitycore.inventory.SWItem; import de.steamwar.velocitycore.inventory.SWListInv; @@ -35,6 +36,7 @@ import java.util.Map; import java.util.UUID; import java.util.function.Consumer; +@Linked public class ModCommand extends SWCommand { public ModCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/MsgCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/MsgCommand.java index 5300909d..5e91d4fa 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/MsgCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/MsgCommand.java @@ -1,36 +1,37 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; import com.velocitypowered.api.proxy.Player; -import com.velocitypowered.proxy.Velocity; -import de.steamwar.velocitycore.VelocityCore; -import de.steamwar.velocitycore.listeners.ChatListener; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.messages.ChatterGroup; import de.steamwar.messages.PlayerChatter; import de.steamwar.sql.IgnoreSystem; +import de.steamwar.velocitycore.VelocityCore; +import de.steamwar.velocitycore.listeners.ChatListener; import static de.steamwar.persistent.Storage.lastChats; +@Linked public class MsgCommand extends SWCommand { public MsgCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/PingCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/PingCommand.java index 583f263a..91ca39bf 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/PingCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/PingCommand.java @@ -1,27 +1,29 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.messages.PlayerChatter; +@Linked public class PingCommand extends SWCommand { public PingCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/PlaytimeCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/PlaytimeCommand.java index bf04c28a..1448217e 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/PlaytimeCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/PlaytimeCommand.java @@ -1,30 +1,32 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.velocitycore.commands; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.sql.SteamwarUser; import java.text.NumberFormat; +@Linked public class PlaytimeCommand extends SWCommand { public PlaytimeCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/PollCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/PollCommand.java index 72646164..58b9c4ef 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/PollCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/PollCommand.java @@ -1,30 +1,32 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; +import de.steamwar.linkage.Linked; import de.steamwar.velocitycore.listeners.PollSystem; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeValidator; import de.steamwar.messages.Chatter; import de.steamwar.sql.PollAnswer; +@Linked public class PollCommand extends SWCommand { public PollCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/PollresultCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/PollresultCommand.java index 611fd7ed..6e685ef3 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/PollresultCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/PollresultCommand.java @@ -1,24 +1,25 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . + * 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 . */ package de.steamwar.velocitycore.commands; +import de.steamwar.linkage.Linked; import de.steamwar.velocitycore.listeners.PollSystem; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeValidator; @@ -28,6 +29,7 @@ import de.steamwar.sql.UserPerm; import java.util.Map; +@Linked public class PollresultCommand extends SWCommand { public PollresultCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/PunishmentCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/PunishmentCommand.java index 4932de02..24abde90 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/PunishmentCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/PunishmentCommand.java @@ -1,28 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.velocitycore.commands; import com.google.gson.JsonParser; import com.velocitypowered.api.proxy.Player; -import de.steamwar.velocitycore.VelocityCore; -import de.steamwar.velocitycore.listeners.IPSanitizer; import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeMapper; @@ -32,6 +30,8 @@ import de.steamwar.sql.BannedUserIPs; import de.steamwar.sql.Punishment; import de.steamwar.sql.SteamwarUser; import de.steamwar.sql.UserPerm; +import de.steamwar.velocitycore.VelocityCore; +import de.steamwar.velocitycore.listeners.IPSanitizer; import java.io.IOException; import java.net.URL; @@ -97,7 +97,9 @@ public class PunishmentCommand { bannedUser.punish(Punishment.PunishmentType.Ban, time, banReason, punisher.getId(), perma); } } - BannedUserIPs.banIP(user.getId(), ip); + if (!player.getUsername().startsWith(".")) { + BannedUserIPs.banIP(user.getId(), ip); + } } } @@ -179,7 +181,7 @@ public class PunishmentCommand { private final Punishment.PunishmentType punishmentType; private PunishCommand(String command, Punishment.PunishmentType punishmentType) { - super(command, UserPerm.TEAM); + super(command, punishmentType.getUserPerm()); this.command = command; this.punishmentType = punishmentType; } @@ -194,7 +196,7 @@ public class PunishmentCommand { @Register public void genericCommand(Chatter sender, @Mapper("toPunish") String toPunish, String date, @ErrorMessage(allowEAs = false, value = "PUNISHMENT_USAGE_REASON") String... message) { SteamwarUser punisher = sender.user(); - if (punishmentType.isNeedsAdmin() && !punisher.hasPerm(UserPerm.MODERATION)) + if (!punisher.hasPerm(punishmentType.getUserPerm())) return; SteamwarUser target = unsafeUser(sender, toPunish); @@ -244,14 +246,15 @@ public class PunishmentCommand { private final Punishment.PunishmentType punishmentType; private UnpunishCommand(String command, Punishment.PunishmentType punishmentType) { - super(command, UserPerm.TEAM); + super(command, punishmentType.getUserPerm()); this.command = command; this.punishmentType = punishmentType; } @Register public void genericCommand(Chatter sender, @ErrorMessage("UNKNOWN_PLAYER") SteamwarUser target) { - if (punishmentType.isNeedsAdmin() && !sender.user().hasPerm(UserPerm.MODERATION)) + SteamwarUser punisher = sender.user(); + if (!punisher.hasPerm(punishmentType.getUserPerm())) return; if (!target.isPunished(punishmentType)) { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/RCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/RCommand.java index 8ed4a38b..ae86f249 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/RCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/RCommand.java @@ -1,29 +1,31 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.messages.PlayerChatter; import static de.steamwar.persistent.Storage.lastChats; +@Linked public class RCommand extends SWCommand { public RCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/RankCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/RankCommand.java index 4d68f07b..b0b3e944 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/RankCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/RankCommand.java @@ -1,33 +1,37 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.velocitycore.commands; import de.steamwar.command.SWCommand; +import de.steamwar.sql.GameModeConfig; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.messages.Message; +import de.steamwar.sql.SchematicType; import de.steamwar.sql.SteamwarUser; import de.steamwar.sql.UserElo; import de.steamwar.velocitycore.ArenaMode; import java.util.Optional; +@Linked public class RankCommand extends SWCommand { public RankCommand() { @@ -44,8 +48,8 @@ public class RankCommand extends SWCommand { if (!sender.user().equals(user)) sender.prefixless("RANK_PLAYER_FOUND", user); - for(ArenaMode mode : ArenaMode.getAllModes()) { - if (!mode.isRanked()) + for(GameModeConfig mode : ArenaMode.getAllModes()) { + if (!mode.Server.Ranked) continue; Optional elo = UserElo.getElo(user.getId(), mode.getSchemTypeOrInternalName()); diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/ReplayCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/ReplayCommand.java index fe8d9af1..e4d8b3e0 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/ReplayCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/ReplayCommand.java @@ -1,37 +1,42 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2022 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.velocitycore.commands; -import de.steamwar.velocitycore.ArenaMode; +import de.steamwar.command.SWCommand; +import de.steamwar.sql.GameModeConfig; +import de.steamwar.linkage.EventMode; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Message; +import de.steamwar.messages.PlayerChatter; +import de.steamwar.sql.*; +import de.steamwar.velocitycore.ArenaMode; import de.steamwar.velocitycore.ServerStarter; import de.steamwar.velocitycore.inventory.SWItem; import de.steamwar.velocitycore.inventory.SWListInv; import de.steamwar.velocitycore.inventory.SWStreamInv; -import de.steamwar.command.SWCommand; -import de.steamwar.messages.PlayerChatter; -import de.steamwar.sql.*; import java.util.ArrayList; import java.util.List; +@Linked +@EventMode(false) public class ReplayCommand extends SWCommand { public ReplayCommand() { @@ -64,7 +69,7 @@ public class ReplayCommand extends SWCommand { if (PunishmentCommand.isPunishedWithMessage(sender, Punishment.PunishmentType.NoFightServer)) return; - ArenaMode mode = ArenaMode.getBySchemType(fight.getSchemType()); + GameModeConfig mode = ArenaMode.getBySchemType(fight.getSchemType()); ServerStarter starter = new ServerStarter().replay(fight.getFightID()).blueLeader(sender.getPlayer()); String map = mode.getRandomMap(); diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/RulesCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/RulesCommand.java index e379d6b1..2a60ab18 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/RulesCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/RulesCommand.java @@ -1,31 +1,33 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.messages.Message; import net.kyori.adventure.text.event.ClickEvent; import java.util.Arrays; +@Linked public class RulesCommand extends SWCommand { public RulesCommand() { super("rules", "regeln"); diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/SendCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/SendCommand.java index f1590957..57fd836d 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/SendCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/SendCommand.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2024 SteamWar.de-Serverteam + * 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 @@ -26,6 +26,7 @@ import com.velocitypowered.api.proxy.server.ServerInfo; import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeMapper; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.messages.Message; import de.steamwar.persistent.Subserver; @@ -38,6 +39,7 @@ import java.util.Collection; import java.util.List; import java.util.stream.Collectors; +@Linked public class SendCommand extends SWCommand { // /send [] diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/ServerSwitchCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/ServerSwitchCommand.java index 3586f150..6778c563 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/ServerSwitchCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/ServerSwitchCommand.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/ServerTeamchatCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/ServerTeamchatCommand.java index 927644ab..7dbede8b 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/ServerTeamchatCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/ServerTeamchatCommand.java @@ -1,29 +1,31 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; +import de.steamwar.linkage.Linked; import de.steamwar.velocitycore.listeners.ChatListener; import de.steamwar.command.SWCommand; import de.steamwar.messages.Chatter; import de.steamwar.sql.UserPerm; +@Linked public class ServerTeamchatCommand extends SWCommand { public ServerTeamchatCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/SetLocaleCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/SetLocaleCommand.java index a2e66b6b..34eefff7 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/SetLocaleCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/SetLocaleCommand.java @@ -1,29 +1,31 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.velocitycore.commands; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.messages.PlayerChatter; import de.steamwar.network.packets.server.LocaleInvalidationPacket; import de.steamwar.velocitycore.network.NetworkSender; +@Linked public class SetLocaleCommand extends SWCommand { public SetLocaleCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/StatCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/StatCommand.java index d9694d6c..8b8f4526 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/StatCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/StatCommand.java @@ -1,24 +1,25 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ + * 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 . + */ package de.steamwar.velocitycore.commands; +import de.steamwar.linkage.Linked; import de.steamwar.velocitycore.Node; import de.steamwar.command.SWCommand; import de.steamwar.messages.Chatter; @@ -29,6 +30,7 @@ import java.io.InputStreamReader; import java.util.HashMap; import java.util.Map; +@Linked public class StatCommand extends SWCommand { public StatCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/StreamingCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/StreamingCommand.java new file mode 100644 index 00000000..2e8f2078 --- /dev/null +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/StreamingCommand.java @@ -0,0 +1,57 @@ +/* + * 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 . + */ + +package de.steamwar.velocitycore.commands; + +import de.steamwar.command.SWCommand; +import de.steamwar.linkage.EventMode; +import de.steamwar.linkage.Linked; +import de.steamwar.messages.Chatter; +import de.steamwar.persistent.Storage; +import de.steamwar.sql.SteamwarUser; +import de.steamwar.sql.UserPerm; + +@Linked +@EventMode(false) +public class StreamingCommand extends SWCommand { + + public static boolean isNotStreaming(Chatter sender) { + return isNotStreaming(sender.user()); + } + + public static boolean isNotStreaming(SteamwarUser user) { + return !Storage.streamingPlayers.contains(user.getId()); + } + + public StreamingCommand() { + super("streaming", UserPerm.TEAM); + } + + @Register + public void toggleStreamingMode(Chatter sender) { + int userId = sender.user().getId(); + if (Storage.streamingPlayers.contains(userId)) { + Storage.streamingPlayers.remove(userId); + sender.system("STREAMING_DISABLE"); + } else { + Storage.streamingPlayers.add(userId); + sender.system("STREAMING_ENABLE"); + } + } +} diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/TeamCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/TeamCommand.java index fa396cc0..59ba800d 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/TeamCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/TeamCommand.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; @@ -29,6 +29,7 @@ import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeMapper; import de.steamwar.command.TypeValidator; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.messages.Message; import de.steamwar.messages.PlayerChatter; @@ -52,6 +53,7 @@ import java.util.stream.Stream; import static de.steamwar.persistent.Storage.teamInvitations; +@Linked public class TeamCommand extends SWCommand { public TeamCommand() { @@ -312,7 +314,20 @@ public class TeamCommand extends SWCommand { private String getMemberList(List users, boolean leaders) { return users.stream() .filter(user -> user.isLeader() == leaders) - .map(user -> (VelocityCore.getProxy().getPlayer(user.getUUID()).isPresent() ? "§a" : "§e") + user.getUserName()) + .map(user -> { + StringBuilder st = new StringBuilder(); + if (VelocityCore.getProxy().getPlayer(user.getUUID()).isPresent()) { + if (!StreamingCommand.isNotStreaming(user)) { + st.append("§5"); + } else { + st.append("§a"); + } + } else { + st.append("§e"); + } + st.append(user.getUserName()); + return st.toString(); + }) .collect(Collectors.joining(" ")); } diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/TeamchatCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/TeamchatCommand.java index 6e9eb8e7..38f63ce2 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/TeamchatCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/TeamchatCommand.java @@ -1,30 +1,32 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; +import de.steamwar.linkage.Linked; import de.steamwar.velocitycore.listeners.ChatListener; import de.steamwar.command.SWCommand; import de.steamwar.messages.Chatter; import de.steamwar.messages.ChatterGroup; import de.steamwar.sql.SteamwarUser; +@Linked public class TeamchatCommand extends SWCommand { public TeamchatCommand() { @@ -40,6 +42,6 @@ public class TeamchatCommand extends SWCommand { return; } - ChatListener.sendChat(sender, new ChatterGroup(Chatter.allStream().filter(p -> p.user().getTeam() == user.getTeam())), "CHAT_TEAM", null, String.join(" ", args)); + ChatListener.sendChat(sender, new ChatterGroup(Chatter.allStream().filter(p -> p.user().getTeam() == user.getTeam()).filter(StreamingCommand::isNotStreaming)), "CHAT_TEAM", null, String.join(" ", args)); } } diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/TpCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/TpCommand.java index 2292c258..ea42b271 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/TpCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/TpCommand.java @@ -1,27 +1,28 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; import com.velocitypowered.api.proxy.Player; import com.velocitypowered.api.proxy.ServerConnection; import com.velocitypowered.api.proxy.server.RegisteredServer; +import de.steamwar.linkage.Linked; import de.steamwar.velocitycore.*; import de.steamwar.velocitycore.util.BauLock; import de.steamwar.command.PreviousArguments; @@ -39,6 +40,7 @@ import java.util.Collection; import java.util.Collections; import java.util.List; +@Linked public class TpCommand extends SWCommand { public TpCommand(){ diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/TypeMappers.java b/VelocityCore/src/de/steamwar/velocitycore/commands/TypeMappers.java index e2c1176a..94c7f085 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/TypeMappers.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/TypeMappers.java @@ -1,32 +1,34 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2020 SteamWar.de-Serverteam + * 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 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. + * 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 . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package de.steamwar.velocitycore.commands; -import de.steamwar.velocitycore.ArenaMode; import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommandUtils; import de.steamwar.command.TypeMapper; import de.steamwar.command.TypeValidator; +import de.steamwar.sql.GameModeConfig; import de.steamwar.messages.Chatter; import de.steamwar.messages.PlayerChatter; import de.steamwar.sql.Punishment; +import de.steamwar.sql.SchematicType; +import de.steamwar.velocitycore.ArenaMode; import lombok.experimental.UtilityClass; import java.util.Collection; @@ -45,13 +47,13 @@ public class TypeMappers { return (sender, player, messageSender) -> !PunishmentCommand.isPunishedWithMessage(player, Punishment.PunishmentType.NoFightServer); } - private static TypeMapper arenaModeTypeMapper(boolean historic) { + private static TypeMapper> arenaModeTypeMapper(boolean historic) { return new TypeMapper<>() { @Override - public ArenaMode map(Chatter sender, PreviousArguments previousArguments, String s) { - ArenaMode arenaMode = ArenaMode.getByChat(s); + public GameModeConfig map(Chatter sender, PreviousArguments previousArguments, String s) { + GameModeConfig arenaMode = ArenaMode.getByChat(s); if (arenaMode == null) return null; - if (arenaMode.isHistoric() != historic) return null; + if (arenaMode.Server.Historic != historic) return null; if (!arenaMode.isActive()) return null; return arenaMode; } @@ -74,9 +76,9 @@ public class TypeMappers { @Override public Collection tabCompletes(Chatter sender, PreviousArguments previousArguments, String s) { if (previousArguments.userArgs.length == 0) return null; - ArenaMode arenaMode = ArenaMode.getByChat(previousArguments.userArgs[previousArguments.userArgs.length - 1]); + GameModeConfig arenaMode = ArenaMode.getByChat(previousArguments.userArgs[previousArguments.userArgs.length - 1]); if (arenaMode == null) return null; - return arenaMode.getMaps(); + return arenaMode.Server.Maps; } }; } diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/UnIgnoreCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/UnIgnoreCommand.java index 7f1a5de0..02535d38 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/UnIgnoreCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/UnIgnoreCommand.java @@ -1,29 +1,31 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.sql.IgnoreSystem; import de.steamwar.sql.SteamwarUser; +@Linked public class UnIgnoreCommand extends SWCommand { public UnIgnoreCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/VerifyCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/VerifyCommand.java index 96324de2..9624123b 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/VerifyCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/VerifyCommand.java @@ -1,24 +1,25 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . + * 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 . */ package de.steamwar.velocitycore.commands; +import de.steamwar.linkage.Linked; import de.steamwar.velocitycore.VelocityCore; import de.steamwar.velocitycore.discord.util.AuthManager; import de.steamwar.command.SWCommand; @@ -28,6 +29,7 @@ import net.dv8tion.jda.api.entities.User; import java.util.Base64; import java.util.logging.Level; +@Linked public class VerifyCommand extends SWCommand { public VerifyCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/WebpasswordCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/WebpasswordCommand.java index d19dedd0..f4c639a3 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/WebpasswordCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/WebpasswordCommand.java @@ -1,28 +1,32 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; import de.steamwar.command.SWCommand; +import de.steamwar.linkage.EventMode; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.sql.SteamwarUser; +@Linked +@EventMode(false) public class WebpasswordCommand extends SWCommand { public WebpasswordCommand() { diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/WhoisCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/WhoisCommand.java index babf8262..24b7fd12 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/WhoisCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/WhoisCommand.java @@ -1,21 +1,21 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . -*/ +/* + * 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 . + */ package de.steamwar.velocitycore.commands; @@ -23,6 +23,7 @@ import com.velocitypowered.api.proxy.Player; import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeMapper; +import de.steamwar.linkage.Linked; import de.steamwar.messages.Chatter; import de.steamwar.messages.Message; import de.steamwar.persistent.Storage; @@ -41,7 +42,7 @@ import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; - +@Linked public class WhoisCommand extends SWCommand { public WhoisCommand() { super("whois"); @@ -71,6 +72,7 @@ public class WhoisCommand extends SWCommand { if (!sender.user().hasPerm(UserPerm.TEAM)) return; + sender.system("WHOIS_STREAMING", !StreamingCommand.isNotStreaming(user)); if (sender.user().hasPerm(UserPerm.MODERATION) || sender.user().hasPerm(UserPerm.PREFIX_DEVELOPER)) { sender.system("WHOIS_ID", user.getId()); sender.system("WHOIS_UUID", new Message("WHOIS_UUID_HOVER"), ClickEvent.copyToClipboard(user.getUUID().toString()), user.getUUID().toString()); diff --git a/VelocityCore/src/de/steamwar/velocitycore/discord/DiscordBot.java b/VelocityCore/src/de/steamwar/velocitycore/discord/DiscordBot.java index 28cd0c22..40dee4b1 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/discord/DiscordBot.java +++ b/VelocityCore/src/de/steamwar/velocitycore/discord/DiscordBot.java @@ -1,20 +1,20 @@ /* - This file is a part of the SteamWar software. - - Copyright (C) 2020 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 . + * 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 . */ package de.steamwar.velocitycore.discord; @@ -41,7 +41,6 @@ import net.dv8tion.jda.api.entities.Role; import net.dv8tion.jda.api.entities.emoji.Emoji; import net.dv8tion.jda.api.events.message.MessageReceivedEvent; import net.dv8tion.jda.api.exceptions.ErrorResponseException; -import net.dv8tion.jda.api.interactions.commands.Command; import net.dv8tion.jda.api.interactions.commands.OptionType; import net.dv8tion.jda.api.interactions.commands.build.CommandData; import net.dv8tion.jda.api.interactions.commands.build.Commands; @@ -49,13 +48,14 @@ import net.dv8tion.jda.api.interactions.commands.build.OptionData; import net.dv8tion.jda.api.interactions.components.ActionRow; import net.dv8tion.jda.api.interactions.components.buttons.Button; import net.dv8tion.jda.api.requests.GatewayIntent; -import net.dv8tion.jda.api.requests.restaction.CommandListUpdateAction; import net.dv8tion.jda.api.utils.MemberCachePolicy; import net.dv8tion.jda.api.utils.messages.MessageCreateBuilder; import java.awt.*; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; -import java.util.*; +import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.function.Consumer; @@ -67,9 +67,10 @@ public class DiscordBot { @Getter private static final Map commands = new HashMap<>(); + private final OptionData commandArgument = new OptionData(OptionType.STRING, ARGUMENT_NAME, "Command arguments", false); public static void withBot(Consumer consumer) { - if(instance != null) + if (instance != null) consumer.accept(instance); } @@ -130,6 +131,7 @@ public class DiscordBot { reply.system("DC_ROLE_ADDED", role.getAsMention()); } })); + new StaticMessageChannel(config.channel("rules"), () -> new MessageCreateBuilder() .setEmbeds(new EmbedBuilder() .setDescription(String.join("\n", config.getRules())) @@ -141,9 +143,10 @@ public class DiscordBot { ActionRow.of(Button.link("https://steamwar.de", "Website"), Button.link("https://steamwar.de/youtube", "YouTube")), ActionRow.of(Button.primary("auth", Emoji.fromUnicode("U+2705")).withLabel("Minecraft verknüpfen")) ), event -> { - if(event.getComponentId().equals("auth")) + if (event.getComponentId().equals("auth")) event.reply("Gebe innerhalb der nächsten 10 Minuten ``/verify " + AuthManager.createDiscordAuthToken(event.getUser()) + "`` auf dem Minecraft Server ein").setEphemeral(true).queue(); }); + List actionRows = new ArrayList<>(); List