From 46800a95e890da00a7c1e724e2bccd81f81c6caa Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 25 May 2024 10:33:57 +0200 Subject: [PATCH] Move and update things --- BauSystem_BuilderUtilities/build.gradle | 63 +++++++++++++++++++ .../AttributeRemoveCommand.java | 27 ++++---- .../attributescopy/AttributeUtils.java | 26 ++++---- .../attributescopy/AttributesCopyCommand.java | 26 ++++---- .../AttributesPlaceListener.java | 26 ++++---- .../bausystem}/countingwand/Countingwand.java | 26 ++++---- .../countingwand/CountingwandCommand.java | 39 ++++++++++++ .../countingwand/CountingwandGuiItem.java | 53 ++++++++++++++++ .../countingwand/CountingwandListener.java | 26 ++++---- .../smartplace/SmartPlaceCommand.java | 26 ++++---- .../smartplace/SmartPlaceListener.java | 6 +- .../worldedit/ColorReplaceCommand.java | 28 ++++----- .../worldedit/TypeReplaceCommand.java | 28 ++++----- .../worldedit/mask/above/AboveMask.java | 49 +++++++++++++++ .../mask/above/FAWEAboveMaskParser.java | 29 +++++---- .../worldedit/mask/below/BelowMask.java | 49 +++++++++++++++ .../mask/below/FAWEBelowMaskParser.java | 29 +++++---- .../checkerboard3d/Checkerboard3DMask.java | 26 ++++---- .../FAWECheckerboard3DMaskParser.java | 29 +++++---- .../FAWECheckerboardMaskParser.java | 28 ++++----- .../mask/grid/FAWEGridMaskParser.java | 29 +++++---- .../worldedit/mask/grid/GridMask.java | 52 +++++++++++++++ .../gradient/FAWEGradientPatternParser.java | 28 ++++----- .../pattern/gradient/GradientPattern.java | 26 ++++---- .../worldedit/utils/FAWEMaskParser.java | 32 ++++++++++ .../worldedit/utils/FAWEPatternParser.java | 32 ++++++++++ .../worldedit/utils/SpecialReplace.java | 26 ++++---- BauSystem_BuilderUtilities/src/plugin.yml | 12 ++++ .../itemutilities}/PistonCalculator.java | 33 +++++----- .../PistonCalculatorCommand.java | 40 ++++++++++++ .../itemutilities/StructureVoidCommand.java | 40 ++++++++++++ .../types/ScoreboardElement_GENERIC.java | 40 ------------ .../countingwand/CountingwandCommand.java | 39 ------------ .../countingwand/CountingwandGuiItem.java | 53 ---------------- .../features/region/TNTListener.java | 1 - .../script/lua/libs/ScoreboardLib.java | 2 - .../features/tpslimit/TPSLimitUtils.java | 3 - .../util/PistonCalculatorCommand.java | 40 ------------ .../features/util/StructureVoidCommand.java | 40 ------------ .../worldedit/mask/above/AboveMask.java | 49 --------------- .../worldedit/mask/below/BelowMask.java | 49 --------------- .../worldedit/mask/grid/GridMask.java | 52 --------------- .../worldedit/utils/FAWEMaskParser.java | 33 ---------- .../worldedit/utils/FAWEPatternParser.java | 33 ---------- .../linkage/specific/ScoreboardItem.java | 37 ----------- .../bausystem/utils/ScoreboardElement.java | 37 ----------- BauSystem_Scoreboard/build.gradle | 63 +++++++++++++++++++ .../linkage/specific/ScoreboardElement.java | 38 +++++++++++ .../types/ScoreboardElement_GENERIC.java | 40 ++++++++++++ .../bausystem/scoreboard}/BauScoreboard.java | 25 ++++++-- BauSystem_Tracer/src/plugin.yml | 11 ++++ 51 files changed, 895 insertions(+), 779 deletions(-) create mode 100644 BauSystem_BuilderUtilities/build.gradle rename {BauSystem_Main/src/de/steamwar/bausystem/features => BauSystem_BuilderUtilities/src/de/steamwar/bausystem}/attributescopy/AttributeRemoveCommand.java (80%) rename {BauSystem_Main/src/de/steamwar/bausystem/features => BauSystem_BuilderUtilities/src/de/steamwar/bausystem}/attributescopy/AttributeUtils.java (84%) rename {BauSystem_Main/src/de/steamwar/bausystem/features => BauSystem_BuilderUtilities/src/de/steamwar/bausystem}/attributescopy/AttributesCopyCommand.java (80%) rename {BauSystem_Main/src/de/steamwar/bausystem/features => BauSystem_BuilderUtilities/src/de/steamwar/bausystem}/attributescopy/AttributesPlaceListener.java (77%) rename {BauSystem_Main/src/de/steamwar/bausystem/features => BauSystem_BuilderUtilities/src/de/steamwar/bausystem}/countingwand/Countingwand.java (80%) create mode 100644 BauSystem_BuilderUtilities/src/de/steamwar/bausystem/countingwand/CountingwandCommand.java create mode 100644 BauSystem_BuilderUtilities/src/de/steamwar/bausystem/countingwand/CountingwandGuiItem.java rename {BauSystem_Main/src/de/steamwar/bausystem/features => BauSystem_BuilderUtilities/src/de/steamwar/bausystem}/countingwand/CountingwandListener.java (68%) rename {BauSystem_Main/src/de/steamwar/bausystem/features => BauSystem_BuilderUtilities/src/de/steamwar/bausystem}/smartplace/SmartPlaceCommand.java (54%) rename {BauSystem_Main/src/de/steamwar/bausystem/features => BauSystem_BuilderUtilities/src/de/steamwar/bausystem}/smartplace/SmartPlaceListener.java (98%) rename {BauSystem_Main/src/de/steamwar/bausystem/features => BauSystem_BuilderUtilities/src/de/steamwar/bausystem}/worldedit/ColorReplaceCommand.java (83%) rename {BauSystem_Main/src/de/steamwar/bausystem/features => BauSystem_BuilderUtilities/src/de/steamwar/bausystem}/worldedit/TypeReplaceCommand.java (95%) create mode 100644 BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/above/AboveMask.java rename {BauSystem_Main/src/de/steamwar/bausystem/features => BauSystem_BuilderUtilities/src/de/steamwar/bausystem}/worldedit/mask/above/FAWEAboveMaskParser.java (62%) create mode 100644 BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/below/BelowMask.java rename {BauSystem_Main/src/de/steamwar/bausystem/features => BauSystem_BuilderUtilities/src/de/steamwar/bausystem}/worldedit/mask/below/FAWEBelowMaskParser.java (62%) rename {BauSystem_Main/src/de/steamwar/bausystem/features => BauSystem_BuilderUtilities/src/de/steamwar/bausystem}/worldedit/mask/checkerboard3d/Checkerboard3DMask.java (57%) rename {BauSystem_Main/src/de/steamwar/bausystem/features => BauSystem_BuilderUtilities/src/de/steamwar/bausystem}/worldedit/mask/checkerboard3d/FAWECheckerboard3DMaskParser.java (65%) rename {BauSystem_Main/src/de/steamwar/bausystem/features => BauSystem_BuilderUtilities/src/de/steamwar/bausystem}/worldedit/mask/checkerboard3d/FAWECheckerboardMaskParser.java (55%) rename {BauSystem_Main/src/de/steamwar/bausystem/features => BauSystem_BuilderUtilities/src/de/steamwar/bausystem}/worldedit/mask/grid/FAWEGridMaskParser.java (66%) create mode 100644 BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/grid/GridMask.java rename {BauSystem_Main/src/de/steamwar/bausystem/features => BauSystem_BuilderUtilities/src/de/steamwar/bausystem}/worldedit/pattern/gradient/FAWEGradientPatternParser.java (71%) rename {BauSystem_Main/src/de/steamwar/bausystem/features => BauSystem_BuilderUtilities/src/de/steamwar/bausystem}/worldedit/pattern/gradient/GradientPattern.java (63%) create mode 100644 BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/utils/FAWEMaskParser.java create mode 100644 BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/utils/FAWEPatternParser.java rename {BauSystem_Main/src/de/steamwar/bausystem/features => BauSystem_BuilderUtilities/src/de/steamwar/bausystem}/worldedit/utils/SpecialReplace.java (80%) create mode 100644 BauSystem_BuilderUtilities/src/plugin.yml rename {BauSystem_Main/src/de/steamwar/bausystem/features/util => BauSystem_ItemUtilities/src/de/steamwar/bausystem/itemutilities}/PistonCalculator.java (87%) create mode 100644 BauSystem_ItemUtilities/src/de/steamwar/bausystem/itemutilities/PistonCalculatorCommand.java create mode 100644 BauSystem_ItemUtilities/src/de/steamwar/bausystem/itemutilities/StructureVoidCommand.java delete mode 100644 BauSystem_Linkage/src/de/steamwar/linkage/types/ScoreboardElement_GENERIC.java delete mode 100644 BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandCommand.java delete mode 100644 BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandGuiItem.java delete mode 100644 BauSystem_Main/src/de/steamwar/bausystem/features/util/PistonCalculatorCommand.java delete mode 100644 BauSystem_Main/src/de/steamwar/bausystem/features/util/StructureVoidCommand.java delete mode 100644 BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/above/AboveMask.java delete mode 100644 BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/below/BelowMask.java delete mode 100644 BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/grid/GridMask.java delete mode 100644 BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/FAWEMaskParser.java delete mode 100644 BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/FAWEPatternParser.java delete mode 100644 BauSystem_Main/src/de/steamwar/bausystem/linkage/specific/ScoreboardItem.java delete mode 100644 BauSystem_Main/src/de/steamwar/bausystem/utils/ScoreboardElement.java create mode 100644 BauSystem_Scoreboard/build.gradle create mode 100644 BauSystem_Scoreboard/src/de/steamwar/bausystem/linkage/specific/ScoreboardElement.java create mode 100644 BauSystem_Scoreboard/src/de/steamwar/bausystem/linkage/types/ScoreboardElement_GENERIC.java rename {BauSystem_Main/src/de/steamwar/bausystem/features/world => BauSystem_Scoreboard/src/de/steamwar/bausystem/scoreboard}/BauScoreboard.java (84%) create mode 100644 BauSystem_Tracer/src/plugin.yml diff --git a/BauSystem_BuilderUtilities/build.gradle b/BauSystem_BuilderUtilities/build.gradle new file mode 100644 index 00000000..dd0a66df --- /dev/null +++ b/BauSystem_BuilderUtilities/build.gradle @@ -0,0 +1,63 @@ +/* + * 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 . + */ + +plugins { + id 'base' + id 'java' +} + +group 'steamwar' +version '1.0' + +compileJava.options.encoding = 'UTF-8' + +sourceCompatibility = 17 +targetCompatibility = 17 + +sourceSets { + main { + java { + srcDirs = ['src/', 'build/generated/sources/annotationProcessor/java/main/'] + } + resources { + srcDirs = ['src/'] + exclude '**/*.java', '**/*.kt' + } + } +} + +dependencies { + implementation project(":BauSystem_PluginBase") + + compileOnly 'org.projectlombok:lombok:1.18.22' + annotationProcessor 'org.projectlombok:lombok:1.18.22' + + compileOnly 'org.spigotmc:spigot-api:1.20-R0.1-SNAPSHOT' + // compileOnly 'com.mojang:authlib:1.5.25' + // compileOnly 'io.netty:netty-all:4.1.68.Final' + + compileOnly swdep('Spigot-1.20') + compileOnly swdep('SpigotCore') + annotationProcessor swdep('SpigotCore') + + compileOnly swdep('FastAsyncWorldEdit-1.18') + // compileOnly swdep('AxiomPaper') + + // implementation 'org.luaj:luaj-jse:3.0.1' +} \ No newline at end of file diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributeRemoveCommand.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/attributescopy/AttributeRemoveCommand.java similarity index 80% rename from BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributeRemoveCommand.java rename to BauSystem_BuilderUtilities/src/de/steamwar/bausystem/attributescopy/AttributeRemoveCommand.java index 689be980..116c7e01 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributeRemoveCommand.java +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/attributescopy/AttributeRemoveCommand.java @@ -1,30 +1,29 @@ /* - * 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) 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.bausystem.features.attributescopy; +package de.steamwar.bausystem.attributescopy; import de.steamwar.bausystem.BauSystem; 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_Main/src/de/steamwar/bausystem/features/attributescopy/AttributeUtils.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/attributescopy/AttributeUtils.java similarity index 84% rename from BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributeUtils.java rename to BauSystem_BuilderUtilities/src/de/steamwar/bausystem/attributescopy/AttributeUtils.java index 246e4ab9..8355e1bf 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributeUtils.java +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/attributescopy/AttributeUtils.java @@ -1,23 +1,23 @@ /* - * 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) 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.bausystem.features.attributescopy; +package de.steamwar.bausystem.attributescopy; import lombok.experimental.UtilityClass; import org.bukkit.block.data.BlockData; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributesCopyCommand.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/attributescopy/AttributesCopyCommand.java similarity index 80% rename from BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributesCopyCommand.java rename to BauSystem_BuilderUtilities/src/de/steamwar/bausystem/attributescopy/AttributesCopyCommand.java index 808ca339..41ef0d45 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributesCopyCommand.java +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/attributescopy/AttributesCopyCommand.java @@ -1,23 +1,23 @@ /* - * 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) 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.bausystem.features.attributescopy; +package de.steamwar.bausystem.attributescopy; import de.steamwar.bausystem.BauSystem; import de.steamwar.command.SWCommand; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributesPlaceListener.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/attributescopy/AttributesPlaceListener.java similarity index 77% rename from BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributesPlaceListener.java rename to BauSystem_BuilderUtilities/src/de/steamwar/bausystem/attributescopy/AttributesPlaceListener.java index 965d8bad..91f0be07 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributesPlaceListener.java +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/attributescopy/AttributesPlaceListener.java @@ -1,23 +1,23 @@ /* - * 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) 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.bausystem.features.attributescopy; +package de.steamwar.bausystem.attributescopy; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/Countingwand.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/countingwand/Countingwand.java similarity index 80% rename from BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/Countingwand.java rename to BauSystem_BuilderUtilities/src/de/steamwar/bausystem/countingwand/Countingwand.java index fb9316b9..ca7bde1f 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/Countingwand.java +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/countingwand/Countingwand.java @@ -1,23 +1,23 @@ /* - * 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) 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.bausystem.features.countingwand; +package de.steamwar.bausystem.countingwand; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.region.Point; diff --git a/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/countingwand/CountingwandCommand.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/countingwand/CountingwandCommand.java new file mode 100644 index 00000000..266d1c85 --- /dev/null +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/countingwand/CountingwandCommand.java @@ -0,0 +1,39 @@ +/* + * 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.bausystem.countingwand; + +import de.steamwar.bausystem.SWUtils; +import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; +import org.bukkit.entity.Player; + + +@Linked +public class CountingwandCommand extends SWCommand { + + public CountingwandCommand() { + super("countingwand", "/countingwand", "cwand", "/cwand", "zollstock", "/zollstock"); + } + + @Register(description = "COUNTINGWAND_COMMAND_HELP") + public void genericCommand(final Player p) { + SWUtils.giveItemToPlayer(p, Countingwand.getWandItem(p)); + } +} \ No newline at end of file diff --git a/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/countingwand/CountingwandGuiItem.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/countingwand/CountingwandGuiItem.java new file mode 100644 index 00000000..33b9711d --- /dev/null +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/countingwand/CountingwandGuiItem.java @@ -0,0 +1,53 @@ +/* + * 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.bausystem.countingwand; + +import de.steamwar.bausystem.Permission; +import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.linkage.Linked; +import org.bukkit.entity.Player; +import org.bukkit.event.inventory.ClickType; +import org.bukkit.inventory.ItemStack; + + +@Linked +public class CountingwandGuiItem extends BauGuiItem { + + public CountingwandGuiItem() { + super(22); + } + + @Override + public ItemStack getItem(Player player) { + return Countingwand.getWandItem(player); + } + + @Override + public boolean click(ClickType click, Player p) { + p.closeInventory(); + p.performCommand("countingwand"); + return false; + } + + @Override + public Permission permission() { + return Permission.MEMBER; + } +} \ No newline at end of file diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandListener.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/countingwand/CountingwandListener.java similarity index 68% rename from BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandListener.java rename to BauSystem_BuilderUtilities/src/de/steamwar/bausystem/countingwand/CountingwandListener.java index 7233670a..e552d14c 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandListener.java +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/countingwand/CountingwandListener.java @@ -1,23 +1,23 @@ /* - * 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) 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.bausystem.features.countingwand; +package de.steamwar.bausystem.countingwand; import de.steamwar.bausystem.region.Point; import de.steamwar.linkage.Linked; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/SmartPlaceCommand.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/smartplace/SmartPlaceCommand.java similarity index 54% rename from BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/SmartPlaceCommand.java rename to BauSystem_BuilderUtilities/src/de/steamwar/bausystem/smartplace/SmartPlaceCommand.java index 526e59e6..9a7018e7 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/SmartPlaceCommand.java +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/smartplace/SmartPlaceCommand.java @@ -1,23 +1,23 @@ /* - * 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) 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.bausystem.features.smartplace; +package de.steamwar.bausystem.smartplace; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.SWUtils; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/SmartPlaceListener.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/smartplace/SmartPlaceListener.java similarity index 98% rename from BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/SmartPlaceListener.java rename to BauSystem_BuilderUtilities/src/de/steamwar/bausystem/smartplace/SmartPlaceListener.java index de40c6c7..37fe8aed 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/SmartPlaceListener.java +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/smartplace/SmartPlaceListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 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 @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package de.steamwar.bausystem.features.smartplace; +package de.steamwar.bausystem.smartplace; import com.comphenix.tinyprotocol.Reflection; import com.comphenix.tinyprotocol.TinyProtocol; @@ -42,8 +42,6 @@ import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.inventory.ItemStack; -import java.io.OutputStream; -import java.io.PrintStream; import java.util.HashSet; import java.util.List; import java.util.Set; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/ColorReplaceCommand.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/ColorReplaceCommand.java similarity index 83% rename from BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/ColorReplaceCommand.java rename to BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/ColorReplaceCommand.java index 6b6659ba..9408e61c 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/ColorReplaceCommand.java +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/ColorReplaceCommand.java @@ -1,23 +1,23 @@ /* - * 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) 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.bausystem.features.worldedit; +package de.steamwar.bausystem.worldedit; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.IncompleteRegionException; @@ -27,10 +27,10 @@ import com.sk89q.worldedit.util.formatting.text.Component; 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.shared.Pair; import de.steamwar.bausystem.utils.WorldEditUtils; +import de.steamwar.bausystem.worldedit.utils.SpecialReplace; import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeMapper; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/TypeReplaceCommand.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/TypeReplaceCommand.java similarity index 95% rename from BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/TypeReplaceCommand.java rename to BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/TypeReplaceCommand.java index 8013c92b..e0527b6f 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/TypeReplaceCommand.java +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/TypeReplaceCommand.java @@ -1,23 +1,23 @@ /* - * 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) 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.bausystem.features.worldedit; +package de.steamwar.bausystem.worldedit; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.IncompleteRegionException; @@ -27,9 +27,9 @@ import com.sk89q.worldedit.util.formatting.text.Component; 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.shared.Pair; import de.steamwar.bausystem.utils.WorldEditUtils; +import de.steamwar.bausystem.worldedit.utils.SpecialReplace; import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeMapper; diff --git a/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/above/AboveMask.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/above/AboveMask.java new file mode 100644 index 00000000..fee8da73 --- /dev/null +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/above/AboveMask.java @@ -0,0 +1,49 @@ +/* + * 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.bausystem.worldedit.mask.above; + +import com.sk89q.worldedit.function.mask.Mask; +import com.sk89q.worldedit.math.BlockVector3; + +public class AboveMask implements Mask { + + private Mask mask; + private int distance; + + public AboveMask(Mask mask, int distance) { + this.mask = mask; + this.distance = distance; + } + + @Override + public boolean test(BlockVector3 vector) { + for (int i = 1; i <= distance; i++) { + if (mask.test(vector.subtract(0, i, 0))) { + return true; + } + } + return false; + } + + @Override + public Mask copy() { + return new AboveMask(mask, distance); + } +} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/above/FAWEAboveMaskParser.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/above/FAWEAboveMaskParser.java similarity index 62% rename from BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/above/FAWEAboveMaskParser.java rename to BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/above/FAWEAboveMaskParser.java index d25dcdeb..df7efe64 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/above/FAWEAboveMaskParser.java +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/above/FAWEAboveMaskParser.java @@ -1,32 +1,31 @@ /* - * 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) 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.bausystem.features.worldedit.mask.above; +package de.steamwar.bausystem.worldedit.mask.above; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.command.util.SuggestionHelper; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.function.mask.Mask; -import de.steamwar.bausystem.features.worldedit.utils.FAWEMaskParser; +import de.steamwar.bausystem.worldedit.utils.FAWEMaskParser; import de.steamwar.linkage.Linked; -import de.steamwar.linkage.PluginCheck; import javax.annotation.Nonnull; import java.util.stream.Stream; diff --git a/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/below/BelowMask.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/below/BelowMask.java new file mode 100644 index 00000000..db731d45 --- /dev/null +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/below/BelowMask.java @@ -0,0 +1,49 @@ +/* + * 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.bausystem.worldedit.mask.below; + +import com.sk89q.worldedit.function.mask.Mask; +import com.sk89q.worldedit.math.BlockVector3; + +public class BelowMask implements Mask { + + private Mask mask; + private int distance; + + public BelowMask(Mask mask, int distance) { + this.mask = mask; + this.distance = distance; + } + + @Override + public boolean test(BlockVector3 vector) { + for (int i = 1; i <= distance; i++) { + if (mask.test(vector.add(0, i, 0))) { + return true; + } + } + return false; + } + + @Override + public Mask copy() { + return new BelowMask(mask, distance); + } +} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/below/FAWEBelowMaskParser.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/below/FAWEBelowMaskParser.java similarity index 62% rename from BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/below/FAWEBelowMaskParser.java rename to BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/below/FAWEBelowMaskParser.java index bc7cb34c..83cbb57e 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/below/FAWEBelowMaskParser.java +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/below/FAWEBelowMaskParser.java @@ -1,32 +1,31 @@ /* - * 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) 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.bausystem.features.worldedit.mask.below; +package de.steamwar.bausystem.worldedit.mask.below; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.command.util.SuggestionHelper; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.function.mask.Mask; -import de.steamwar.bausystem.features.worldedit.utils.FAWEMaskParser; +import de.steamwar.bausystem.worldedit.utils.FAWEMaskParser; import de.steamwar.linkage.Linked; -import de.steamwar.linkage.PluginCheck; import javax.annotation.Nonnull; import java.util.stream.Stream; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/Checkerboard3DMask.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/checkerboard3d/Checkerboard3DMask.java similarity index 57% rename from BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/Checkerboard3DMask.java rename to BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/checkerboard3d/Checkerboard3DMask.java index cc52b9cc..7ab973c4 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/Checkerboard3DMask.java +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/checkerboard3d/Checkerboard3DMask.java @@ -1,23 +1,23 @@ /* - * 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) 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.bausystem.features.worldedit.mask.checkerboard3d; +package de.steamwar.bausystem.worldedit.mask.checkerboard3d; import com.sk89q.worldedit.function.mask.Mask; import com.sk89q.worldedit.math.BlockVector3; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/FAWECheckerboard3DMaskParser.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/checkerboard3d/FAWECheckerboard3DMaskParser.java similarity index 65% rename from BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/FAWECheckerboard3DMaskParser.java rename to BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/checkerboard3d/FAWECheckerboard3DMaskParser.java index cb943408..13b73eb1 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/FAWECheckerboard3DMaskParser.java +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/checkerboard3d/FAWECheckerboard3DMaskParser.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) 2022 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.bausystem.features.worldedit.mask.checkerboard3d; +package de.steamwar.bausystem.worldedit.mask.checkerboard3d; import com.sk89q.worldedit.command.util.SuggestionHelper; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.function.mask.Mask; -import de.steamwar.bausystem.features.worldedit.utils.FAWEMaskParser; +import de.steamwar.bausystem.worldedit.utils.FAWEMaskParser; import de.steamwar.linkage.Linked; -import de.steamwar.linkage.PluginCheck; import javax.annotation.Nonnull; import java.util.stream.Stream; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/FAWECheckerboardMaskParser.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/checkerboard3d/FAWECheckerboardMaskParser.java similarity index 55% rename from BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/FAWECheckerboardMaskParser.java rename to BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/checkerboard3d/FAWECheckerboardMaskParser.java index 1bfa6fb9..84522997 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/checkerboard3d/FAWECheckerboardMaskParser.java +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/checkerboard3d/FAWECheckerboardMaskParser.java @@ -1,29 +1,29 @@ /* - * 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) 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.bausystem.features.worldedit.mask.checkerboard3d; +package de.steamwar.bausystem.worldedit.mask.checkerboard3d; import com.sk89q.worldedit.command.util.SuggestionHelper; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.function.mask.Mask; -import de.steamwar.bausystem.features.worldedit.utils.FAWEMaskParser; +import de.steamwar.bausystem.worldedit.utils.FAWEMaskParser; import de.steamwar.linkage.Linked; import javax.annotation.Nonnull; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/grid/FAWEGridMaskParser.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/grid/FAWEGridMaskParser.java similarity index 66% rename from BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/grid/FAWEGridMaskParser.java rename to BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/grid/FAWEGridMaskParser.java index f0d4a867..c433bb16 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/grid/FAWEGridMaskParser.java +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/grid/FAWEGridMaskParser.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) 2022 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.bausystem.features.worldedit.mask.grid; +package de.steamwar.bausystem.worldedit.mask.grid; import com.sk89q.worldedit.command.util.SuggestionHelper; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.function.mask.Mask; -import de.steamwar.bausystem.features.worldedit.utils.FAWEMaskParser; +import de.steamwar.bausystem.worldedit.utils.FAWEMaskParser; import de.steamwar.linkage.Linked; -import de.steamwar.linkage.PluginCheck; import javax.annotation.Nonnull; import java.util.stream.Stream; diff --git a/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/grid/GridMask.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/grid/GridMask.java new file mode 100644 index 00000000..779c5e95 --- /dev/null +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/mask/grid/GridMask.java @@ -0,0 +1,52 @@ +/* + * 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.bausystem.worldedit.mask.grid; + +import com.sk89q.worldedit.function.mask.Mask; +import com.sk89q.worldedit.math.BlockVector3; + +public class GridMask implements Mask { + + private int x; + private int y; + private int z; + private boolean and; + + public GridMask(int x, int y, int z, boolean and) { + this.x = x; + this.y = y; + this.z = z; + this.and = and; + } + + @Override + public boolean test(BlockVector3 vector) { + if (and) { + return vector.getBlockX() % x == 0 && vector.getBlockY() % y == 0 && vector.getBlockZ() % z == 0; + } else { + return vector.getBlockX() % x == 0 || vector.getBlockY() % y == 0 || vector.getBlockZ() % z == 0; + } + } + + @Override + public Mask copy() { + return new GridMask(x, y, z, and); + } +} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/pattern/gradient/FAWEGradientPatternParser.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/pattern/gradient/FAWEGradientPatternParser.java similarity index 71% rename from BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/pattern/gradient/FAWEGradientPatternParser.java rename to BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/pattern/gradient/FAWEGradientPatternParser.java index 15b311e5..9f1f69cf 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/pattern/gradient/FAWEGradientPatternParser.java +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/pattern/gradient/FAWEGradientPatternParser.java @@ -1,31 +1,31 @@ /* - * 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) 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.bausystem.features.worldedit.pattern.gradient; +package de.steamwar.bausystem.worldedit.pattern.gradient; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.regions.Region; -import de.steamwar.bausystem.features.worldedit.utils.FAWEPatternParser; import de.steamwar.bausystem.utils.WorldEditUtils; +import de.steamwar.bausystem.worldedit.utils.FAWEPatternParser; import de.steamwar.linkage.Linked; import org.bukkit.Axis; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/pattern/gradient/GradientPattern.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/pattern/gradient/GradientPattern.java similarity index 63% rename from BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/pattern/gradient/GradientPattern.java rename to BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/pattern/gradient/GradientPattern.java index c712cf38..abc999a3 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/pattern/gradient/GradientPattern.java +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/pattern/gradient/GradientPattern.java @@ -1,23 +1,23 @@ /* - * 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) 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.bausystem.features.worldedit.pattern.gradient; +package de.steamwar.bausystem.worldedit.pattern.gradient; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.math.BlockVector3; diff --git a/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/utils/FAWEMaskParser.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/utils/FAWEMaskParser.java new file mode 100644 index 00000000..ac1949e6 --- /dev/null +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/utils/FAWEMaskParser.java @@ -0,0 +1,32 @@ +/* + * 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.bausystem.worldedit.utils; + +import com.fastasyncworldedit.core.extension.factory.parser.RichParser; +import com.sk89q.worldedit.WorldEdit; +import com.sk89q.worldedit.function.mask.Mask; + +public abstract class FAWEMaskParser extends RichParser { + + protected FAWEMaskParser(String... aliases) { + super(WorldEdit.getInstance(), aliases); + WorldEdit.getInstance().getMaskFactory().register(this); + } +} diff --git a/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/utils/FAWEPatternParser.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/utils/FAWEPatternParser.java new file mode 100644 index 00000000..0953aecc --- /dev/null +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/utils/FAWEPatternParser.java @@ -0,0 +1,32 @@ +/* + * 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.bausystem.worldedit.utils; + +import com.fastasyncworldedit.core.extension.factory.parser.RichParser; +import com.sk89q.worldedit.WorldEdit; +import com.sk89q.worldedit.function.pattern.Pattern; + +public abstract class FAWEPatternParser extends RichParser { + + protected FAWEPatternParser(String... aliases) { + super(WorldEdit.getInstance(), aliases); + WorldEdit.getInstance().getPatternFactory().register(this); + } +} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/SpecialReplace.java b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/utils/SpecialReplace.java similarity index 80% rename from BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/SpecialReplace.java rename to BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/utils/SpecialReplace.java index e665d1af..deeb71a2 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/SpecialReplace.java +++ b/BauSystem_BuilderUtilities/src/de/steamwar/bausystem/worldedit/utils/SpecialReplace.java @@ -1,23 +1,23 @@ /* - * 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) 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.bausystem.features.worldedit.utils; +package de.steamwar.bausystem.worldedit.utils; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.blocks.SignBlock; diff --git a/BauSystem_BuilderUtilities/src/plugin.yml b/BauSystem_BuilderUtilities/src/plugin.yml new file mode 100644 index 00000000..219c80ef --- /dev/null +++ b/BauSystem_BuilderUtilities/src/plugin.yml @@ -0,0 +1,12 @@ +name: BauSystem_GUI +authors: [ Lixfel, YoyoNow, Chaoscaot, Zeanon, D4rkr34lm ] +version: "2.0" +depend: [ WorldEdit, SpigotCore ] +softdepend: [ ] +load: POSTWORLD +main: de.steamwar.bausystem.BauSystemPlugin +api-version: "1.13" +website: "https://steamwar.de" +description: "So unseriƶs wie wir sind: BauSystem nur besser." + +commands: diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/PistonCalculator.java b/BauSystem_ItemUtilities/src/de/steamwar/bausystem/itemutilities/PistonCalculator.java similarity index 87% rename from BauSystem_Main/src/de/steamwar/bausystem/features/util/PistonCalculator.java rename to BauSystem_ItemUtilities/src/de/steamwar/bausystem/itemutilities/PistonCalculator.java index de9ea34a..d969f10f 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/PistonCalculator.java +++ b/BauSystem_ItemUtilities/src/de/steamwar/bausystem/itemutilities/PistonCalculator.java @@ -1,23 +1,23 @@ /* - * 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) 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.bausystem.features.util; +package de.steamwar.bausystem.itemutilities; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; @@ -26,7 +26,6 @@ import de.steamwar.entity.RFallingBlockEntity; import de.steamwar.linkage.Linked; import lombok.AllArgsConstructor; import lombok.Getter; -import lombok.ToString; import net.md_5.bungee.api.ChatMessageType; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -42,8 +41,10 @@ import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.player.PlayerInteractEvent; -import java.util.*; -import java.util.concurrent.atomic.AtomicBoolean; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Set; @Linked public class PistonCalculator implements Listener { diff --git a/BauSystem_ItemUtilities/src/de/steamwar/bausystem/itemutilities/PistonCalculatorCommand.java b/BauSystem_ItemUtilities/src/de/steamwar/bausystem/itemutilities/PistonCalculatorCommand.java new file mode 100644 index 00000000..95e5d4f4 --- /dev/null +++ b/BauSystem_ItemUtilities/src/de/steamwar/bausystem/itemutilities/PistonCalculatorCommand.java @@ -0,0 +1,40 @@ +/* + * 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.bausystem.itemutilities; + +import de.steamwar.bausystem.BauSystem; +import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; +import org.bukkit.entity.Player; + +@Linked +public class PistonCalculatorCommand extends SWCommand { + + 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); + } +} diff --git a/BauSystem_ItemUtilities/src/de/steamwar/bausystem/itemutilities/StructureVoidCommand.java b/BauSystem_ItemUtilities/src/de/steamwar/bausystem/itemutilities/StructureVoidCommand.java new file mode 100644 index 00000000..9da855f8 --- /dev/null +++ b/BauSystem_ItemUtilities/src/de/steamwar/bausystem/itemutilities/StructureVoidCommand.java @@ -0,0 +1,40 @@ +/* + * 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.bausystem.itemutilities; + +import de.steamwar.bausystem.SWUtils; +import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; + +@Linked +public class StructureVoidCommand extends SWCommand { + + public StructureVoidCommand() { + super("structureVoid", "structure", "void", "structurevoid"); + } + + @Register(description = "STRUCTURE_VOID_COMMAND_HELP") + public void genericCommand(@Validator Player p) { + SWUtils.giveItemToPlayer(p, new ItemStack(Material.STRUCTURE_VOID, 1)); + } +} diff --git a/BauSystem_Linkage/src/de/steamwar/linkage/types/ScoreboardElement_GENERIC.java b/BauSystem_Linkage/src/de/steamwar/linkage/types/ScoreboardElement_GENERIC.java deleted file mode 100644 index ffd6382f..00000000 --- a/BauSystem_Linkage/src/de/steamwar/linkage/types/ScoreboardElement_GENERIC.java +++ /dev/null @@ -1,40 +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.linkage.types; - -import de.steamwar.linkage.LinkageType; -import de.steamwar.linkage.plan.BuildPlan; -import de.steamwar.linkage.plan.MethodBuilder; - -import javax.lang.model.element.TypeElement; - -public class ScoreboardElement_GENERIC implements LinkageType { - - @Override - public String method() { - return "link"; - } - - @Override - public void generateCode(BuildPlan buildPlan, MethodBuilder methodBuilder, String s, TypeElement typeElement) { - buildPlan.addImport("de.steamwar.bausystem.features.world.BauScoreboard"); - methodBuilder.addLine("BauScoreboard.addElement(" + s + ");"); - } -} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandCommand.java deleted file mode 100644 index c7d9b270..00000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandCommand.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.features.countingwand; - -import de.steamwar.bausystem.SWUtils; -import de.steamwar.command.SWCommand; -import de.steamwar.linkage.Linked; -import org.bukkit.entity.Player; - - -@Linked -public class CountingwandCommand extends SWCommand { - - public CountingwandCommand() { - super("countingwand", "/countingwand", "cwand", "/cwand", "zollstock", "/zollstock"); - } - - @Register(description = "COUNTINGWAND_COMMAND_HELP") - public void genericCommand(final Player p) { - SWUtils.giveItemToPlayer(p, Countingwand.getWandItem(p)); - } -} \ No newline at end of file diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandGuiItem.java deleted file mode 100644 index dbeae70d..00000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandGuiItem.java +++ /dev/null @@ -1,53 +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.features.countingwand; - -import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; -import de.steamwar.linkage.Linked; -import org.bukkit.entity.Player; -import org.bukkit.event.inventory.ClickType; -import org.bukkit.inventory.ItemStack; - - -@Linked -public class CountingwandGuiItem extends BauGuiItem { - - public CountingwandGuiItem() { - super(22); - } - - @Override - public ItemStack getItem(Player player) { - return Countingwand.getWandItem(player); - } - - @Override - public boolean click(ClickType click, Player p) { - p.closeInventory(); - p.performCommand("countingwand"); - return false; - } - - @Override - public Permission permission() { - return Permission.MEMBER; - } -} \ No newline at end of file diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/region/TNTListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/region/TNTListener.java index a8d34de5..acbb7ecd 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/region/TNTListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/region/TNTListener.java @@ -37,7 +37,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 { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/ScoreboardLib.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/ScoreboardLib.java index af9c67ae..ff09ac9a 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/ScoreboardLib.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/ScoreboardLib.java @@ -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_Main/src/de/steamwar/bausystem/features/tpslimit/TPSLimitUtils.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSLimitUtils.java index cdc38f2d..cc1abda2 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSLimitUtils.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSLimitUtils.java @@ -21,13 +21,10 @@ package de.steamwar.bausystem.features.tpslimit; import com.comphenix.tinyprotocol.Reflection; import com.comphenix.tinyprotocol.TinyProtocol; -import de.steamwar.bausystem.SWUtils; import de.steamwar.bausystem.utils.PlayerMovementWrapper; import de.steamwar.core.Core; -import de.steamwar.core.TPSWatcher; import lombok.experimental.UtilityClass; import org.bukkit.Bukkit; -import org.bukkit.World; import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitTask; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/PistonCalculatorCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/PistonCalculatorCommand.java deleted file mode 100644 index 71fefaa4..00000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/PistonCalculatorCommand.java +++ /dev/null @@ -1,40 +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.bausystem.features.util; - -import de.steamwar.bausystem.BauSystem; -import de.steamwar.command.SWCommand; -import de.steamwar.linkage.Linked; -import org.bukkit.entity.Player; - -@Linked -public class PistonCalculatorCommand extends SWCommand { - - 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); - } -} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/StructureVoidCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/StructureVoidCommand.java deleted file mode 100644 index 44bae130..00000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/StructureVoidCommand.java +++ /dev/null @@ -1,40 +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.features.util; - -import de.steamwar.bausystem.SWUtils; -import de.steamwar.command.SWCommand; -import de.steamwar.linkage.Linked; -import org.bukkit.Material; -import org.bukkit.entity.Player; -import org.bukkit.inventory.ItemStack; - -@Linked -public class StructureVoidCommand extends SWCommand { - - public StructureVoidCommand() { - super("structureVoid", "structure", "void", "structurevoid"); - } - - @Register(description = "STRUCTURE_VOID_COMMAND_HELP") - public void genericCommand(@Validator Player p) { - SWUtils.giveItemToPlayer(p, new ItemStack(Material.STRUCTURE_VOID, 1)); - } -} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/above/AboveMask.java b/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/above/AboveMask.java deleted file mode 100644 index 34a5a4c1..00000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/above/AboveMask.java +++ /dev/null @@ -1,49 +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.bausystem.features.worldedit.mask.above; - -import com.sk89q.worldedit.function.mask.Mask; -import com.sk89q.worldedit.math.BlockVector3; - -public class AboveMask implements Mask { - - private Mask mask; - private int distance; - - public AboveMask(Mask mask, int distance) { - this.mask = mask; - this.distance = distance; - } - - @Override - public boolean test(BlockVector3 vector) { - for (int i = 1; i <= distance; i++) { - if (mask.test(vector.subtract(0, i, 0))) { - return true; - } - } - return false; - } - - @Override - public Mask copy() { - return new AboveMask(mask, distance); - } -} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/below/BelowMask.java b/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/below/BelowMask.java deleted file mode 100644 index 7407b51a..00000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/below/BelowMask.java +++ /dev/null @@ -1,49 +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.bausystem.features.worldedit.mask.below; - -import com.sk89q.worldedit.function.mask.Mask; -import com.sk89q.worldedit.math.BlockVector3; - -public class BelowMask implements Mask { - - private Mask mask; - private int distance; - - public BelowMask(Mask mask, int distance) { - this.mask = mask; - this.distance = distance; - } - - @Override - public boolean test(BlockVector3 vector) { - for (int i = 1; i <= distance; i++) { - if (mask.test(vector.add(0, i, 0))) { - return true; - } - } - return false; - } - - @Override - public Mask copy() { - return new BelowMask(mask, distance); - } -} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/grid/GridMask.java b/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/grid/GridMask.java deleted file mode 100644 index 4e6570ec..00000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/mask/grid/GridMask.java +++ /dev/null @@ -1,52 +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.bausystem.features.worldedit.mask.grid; - -import com.sk89q.worldedit.function.mask.Mask; -import com.sk89q.worldedit.math.BlockVector3; - -public class GridMask implements Mask { - - private int x; - private int y; - private int z; - private boolean and; - - public GridMask(int x, int y, int z, boolean and) { - this.x = x; - this.y = y; - this.z = z; - this.and = and; - } - - @Override - public boolean test(BlockVector3 vector) { - if (and) { - return vector.getBlockX() % x == 0 && vector.getBlockY() % y == 0 && vector.getBlockZ() % z == 0; - } else { - return vector.getBlockX() % x == 0 || vector.getBlockY() % y == 0 || vector.getBlockZ() % z == 0; - } - } - - @Override - public Mask copy() { - return new GridMask(x, y, z, and); - } -} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/FAWEMaskParser.java b/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/FAWEMaskParser.java deleted file mode 100644 index 1a2f54ee..00000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/FAWEMaskParser.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.bausystem.features.worldedit.utils; - -import com.fastasyncworldedit.core.extension.factory.parser.RichParser; -import com.sk89q.worldedit.WorldEdit; -import com.sk89q.worldedit.function.mask.Mask; -import de.steamwar.bausystem.utils.WorldEditUtils; - -public abstract class FAWEMaskParser extends RichParser { - - protected FAWEMaskParser(String... aliases) { - super(WorldEdit.getInstance(), aliases); - WorldEditUtils.addMaskParser(this); - } -} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/FAWEPatternParser.java b/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/FAWEPatternParser.java deleted file mode 100644 index 9894933c..00000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/worldedit/utils/FAWEPatternParser.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.bausystem.features.worldedit.utils; - -import com.fastasyncworldedit.core.extension.factory.parser.RichParser; -import com.sk89q.worldedit.WorldEdit; -import com.sk89q.worldedit.function.pattern.Pattern; -import de.steamwar.bausystem.utils.WorldEditUtils; - -public abstract class FAWEPatternParser extends RichParser { - - protected FAWEPatternParser(String... aliases) { - super(WorldEdit.getInstance(), aliases); - WorldEditUtils.addPatternParser(this); - } -} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/linkage/specific/ScoreboardItem.java b/BauSystem_Main/src/de/steamwar/bausystem/linkage/specific/ScoreboardItem.java deleted file mode 100644 index 6a5dad27..00000000 --- a/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_Main/src/de/steamwar/bausystem/utils/ScoreboardElement.java b/BauSystem_Main/src/de/steamwar/bausystem/utils/ScoreboardElement.java deleted file mode 100644 index 5f573322..00000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/utils/ScoreboardElement.java +++ /dev/null @@ -1,37 +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.bausystem.utils; - -import de.steamwar.bausystem.region.Region; -import org.bukkit.entity.Player; - -public interface ScoreboardElement { - ScoreboardGroup getGroup(); - int order(); - - String get(Region region, Player p); - - enum ScoreboardGroup { - HEADER, - REGION, - OTHER, - FOOTER - } -} diff --git a/BauSystem_Scoreboard/build.gradle b/BauSystem_Scoreboard/build.gradle new file mode 100644 index 00000000..dd0a66df --- /dev/null +++ b/BauSystem_Scoreboard/build.gradle @@ -0,0 +1,63 @@ +/* + * 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 . + */ + +plugins { + id 'base' + id 'java' +} + +group 'steamwar' +version '1.0' + +compileJava.options.encoding = 'UTF-8' + +sourceCompatibility = 17 +targetCompatibility = 17 + +sourceSets { + main { + java { + srcDirs = ['src/', 'build/generated/sources/annotationProcessor/java/main/'] + } + resources { + srcDirs = ['src/'] + exclude '**/*.java', '**/*.kt' + } + } +} + +dependencies { + implementation project(":BauSystem_PluginBase") + + compileOnly 'org.projectlombok:lombok:1.18.22' + annotationProcessor 'org.projectlombok:lombok:1.18.22' + + compileOnly 'org.spigotmc:spigot-api:1.20-R0.1-SNAPSHOT' + // compileOnly 'com.mojang:authlib:1.5.25' + // compileOnly 'io.netty:netty-all:4.1.68.Final' + + compileOnly swdep('Spigot-1.20') + compileOnly swdep('SpigotCore') + annotationProcessor swdep('SpigotCore') + + compileOnly swdep('FastAsyncWorldEdit-1.18') + // compileOnly swdep('AxiomPaper') + + // implementation 'org.luaj:luaj-jse:3.0.1' +} \ No newline at end of file diff --git a/BauSystem_Scoreboard/src/de/steamwar/bausystem/linkage/specific/ScoreboardElement.java b/BauSystem_Scoreboard/src/de/steamwar/bausystem/linkage/specific/ScoreboardElement.java new file mode 100644 index 00000000..8bf67b3d --- /dev/null +++ b/BauSystem_Scoreboard/src/de/steamwar/bausystem/linkage/specific/ScoreboardElement.java @@ -0,0 +1,38 @@ +/* + * 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.bausystem.linkage.specific; + +import de.steamwar.bausystem.region.Region; +import org.bukkit.entity.Player; + +public interface ScoreboardElement { + ScoreboardGroup getGroup(); + + int order(); + + String get(Region region, Player p); + + enum ScoreboardGroup { + HEADER, + REGION, + OTHER, + FOOTER + } +} diff --git a/BauSystem_Scoreboard/src/de/steamwar/bausystem/linkage/types/ScoreboardElement_GENERIC.java b/BauSystem_Scoreboard/src/de/steamwar/bausystem/linkage/types/ScoreboardElement_GENERIC.java new file mode 100644 index 00000000..2a186a9b --- /dev/null +++ b/BauSystem_Scoreboard/src/de/steamwar/bausystem/linkage/types/ScoreboardElement_GENERIC.java @@ -0,0 +1,40 @@ +/* + * 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.bausystem.linkage.types; + +import de.steamwar.linkage.LinkageType; +import de.steamwar.linkage.plan.BuildPlan; +import de.steamwar.linkage.plan.MethodBuilder; + +import javax.lang.model.element.TypeElement; + +public class ScoreboardElement_GENERIC implements LinkageType { + + @Override + public String method() { + return "link"; + } + + @Override + public void generateCode(BuildPlan buildPlan, MethodBuilder methodBuilder, String s, TypeElement typeElement) { + buildPlan.addImport("de.steamwar.bausystem.features.world.BauScoreboard"); + methodBuilder.addLine("BauScoreboard.addElement(" + s + ");"); + } +} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauScoreboard.java b/BauSystem_Scoreboard/src/de/steamwar/bausystem/scoreboard/BauScoreboard.java similarity index 84% rename from BauSystem_Main/src/de/steamwar/bausystem/features/world/BauScoreboard.java rename to BauSystem_Scoreboard/src/de/steamwar/bausystem/scoreboard/BauScoreboard.java index 74098b1b..a73d6aa4 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauScoreboard.java +++ b/BauSystem_Scoreboard/src/de/steamwar/bausystem/scoreboard/BauScoreboard.java @@ -1,16 +1,33 @@ -package de.steamwar.bausystem.features.world; +/* + * 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.bausystem.scoreboard; import de.steamwar.bausystem.BauSystem; +import de.steamwar.bausystem.linkage.specific.ScoreboardElement; import de.steamwar.bausystem.region.GlobalRegion; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.shared.Pair; -import de.steamwar.bausystem.utils.ScoreboardElement; import de.steamwar.linkage.Linked; import de.steamwar.scoreboard.SWScoreboard; import de.steamwar.scoreboard.ScoreboardCallback; import org.apache.commons.lang3.tuple.MutableTriple; -import org.apache.commons.lang3.tuple.Triple; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; diff --git a/BauSystem_Tracer/src/plugin.yml b/BauSystem_Tracer/src/plugin.yml new file mode 100644 index 00000000..cf7115ba --- /dev/null +++ b/BauSystem_Tracer/src/plugin.yml @@ -0,0 +1,11 @@ +name: BauSystem +authors: [ Lixfel, YoyoNow, Chaoscaot, Zeanon, D4rkr34lm ] +version: "2.0" +depend: [ WorldEdit, SpigotCore ] +load: POSTWORLD +main: de.steamwar.bausystem.BauSystemPlugin +api-version: "1.13" +website: "https://steamwar.de" +description: "So unseriƶs wie wir sind: BauSystem nur besser." + +commands: