diff --git a/BauSystem_Autostart/src/de/steamwar/bausystem/autostart/AutoStartCommand.java b/BauSystem_Autostart/src/de/steamwar/bausystem/autostart/AutoStartCommand.java new file mode 100644 index 00000000..1fd943d3 --- /dev/null +++ b/BauSystem_Autostart/src/de/steamwar/bausystem/autostart/AutoStartCommand.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.autostart; + +import de.steamwar.bausystem.SWUtils; +import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; +import org.bukkit.entity.Player; + +@Linked +public class AutoStartCommand extends SWCommand { + + public AutoStartCommand() { + super("timer", "autostarttimer", "at", "autostart"); + } + + @Register(description = "AUTOSTART_COMMAND_HELP") + public void genericCommand(@Validator Player p) { + SWUtils.giveItemToPlayer(p, AutostartListener.getWandItem(p)); + } +} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutoStartGuiItem.java b/BauSystem_Autostart/src/de/steamwar/bausystem/autostart/AutoStartGuiItem.java similarity index 51% rename from BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutoStartGuiItem.java rename to BauSystem_Autostart/src/de/steamwar/bausystem/autostart/AutoStartGuiItem.java index f622d70b..865a32ab 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutoStartGuiItem.java +++ b/BauSystem_Autostart/src/de/steamwar/bausystem/autostart/AutoStartGuiItem.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.autostart; +package de.steamwar.bausystem.autostart; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.linkage.specific.BauGuiItem; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutostartListener.java b/BauSystem_Autostart/src/de/steamwar/bausystem/autostart/AutostartListener.java similarity index 86% rename from BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutostartListener.java rename to BauSystem_Autostart/src/de/steamwar/bausystem/autostart/AutostartListener.java index 9588e688..dca62e62 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutostartListener.java +++ b/BauSystem_Autostart/src/de/steamwar/bausystem/autostart/AutostartListener.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.autostart; +package de.steamwar.bausystem.autostart; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/backup/BackupCommand.java b/BauSystem_Backup/src/de/steamwar/bausystem/backup/BackupCommand.java similarity index 82% rename from BauSystem_Main/src/de/steamwar/bausystem/features/backup/BackupCommand.java rename to BauSystem_Backup/src/de/steamwar/bausystem/backup/BackupCommand.java index b7911275..8ecae11c 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/backup/BackupCommand.java +++ b/BauSystem_Backup/src/de/steamwar/bausystem/backup/BackupCommand.java @@ -1,37 +1,32 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * Copyright (C) 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.backup; +package de.steamwar.bausystem.backup; import com.sk89q.worldedit.EditSession; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.region.Color; import de.steamwar.bausystem.region.Region; -import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.flagvalues.ColorMode; import de.steamwar.bausystem.region.tags.Tag; import de.steamwar.bausystem.utils.PasteBuilder; import de.steamwar.command.SWCommand; import de.steamwar.command.SWCommandUtils; import de.steamwar.command.TypeMapper; -import de.steamwar.command.TypeValidator; import de.steamwar.inventory.SWItem; import de.steamwar.inventory.SWListInv; import de.steamwar.linkage.Linked; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detoblock.java b/BauSystem_Detonator/src/de/steamwar/bausystem/detonator/Detoblock.java similarity index 50% rename from BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detoblock.java rename to BauSystem_Detonator/src/de/steamwar/bausystem/detonator/Detoblock.java index 85facc7a..68a239c0 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detoblock.java +++ b/BauSystem_Detonator/src/de/steamwar/bausystem/detonator/Detoblock.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.detonator; +package de.steamwar.bausystem.detonator; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detonator.java b/BauSystem_Detonator/src/de/steamwar/bausystem/detonator/Detonator.java similarity index 89% rename from BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detonator.java rename to BauSystem_Detonator/src/de/steamwar/bausystem/detonator/Detonator.java index 80d5b33b..775d71ac 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detonator.java +++ b/BauSystem_Detonator/src/de/steamwar/bausystem/detonator/Detonator.java @@ -1,30 +1,30 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2021 SteamWar.de-Serverteam + * Copyright (C) 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.detonator; +package de.steamwar.bausystem.detonator; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.SWUtils; import de.steamwar.bausystem.configplayer.Config; +import de.steamwar.bausystem.detonator.storage.DetonatorStorage; +import de.steamwar.bausystem.detonator.storage.ItemStorage; import de.steamwar.bausystem.features.autostart.AutostartListener; -import de.steamwar.bausystem.features.detonator.storage.DetonatorStorage; -import de.steamwar.bausystem.features.detonator.storage.ItemStorage; import de.steamwar.entity.REntityServer; import de.steamwar.entity.RFallingBlockEntity; import lombok.experimental.UtilityClass; diff --git a/BauSystem_Detonator/src/de/steamwar/bausystem/detonator/DetonatorBauGuiItem.java b/BauSystem_Detonator/src/de/steamwar/bausystem/detonator/DetonatorBauGuiItem.java new file mode 100644 index 00000000..d3a9a291 --- /dev/null +++ b/BauSystem_Detonator/src/de/steamwar/bausystem/detonator/DetonatorBauGuiItem.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.detonator; + +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 DetonatorBauGuiItem extends BauGuiItem { + + public DetonatorBauGuiItem() { + super(8); + } + + @Override + public ItemStack getItem(Player player) { + return DetonatorCommand.getWAND(player); + } + + @Override + public boolean click(ClickType click, Player p) { + p.closeInventory(); + p.performCommand("detonator wand"); + return false; + } + + @Override + public Permission permission() { + return Permission.BUILD; + } +} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorCommand.java b/BauSystem_Detonator/src/de/steamwar/bausystem/detonator/DetonatorCommand.java similarity index 71% rename from BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorCommand.java rename to BauSystem_Detonator/src/de/steamwar/bausystem/detonator/DetonatorCommand.java index c8d493bd..29797787 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorCommand.java +++ b/BauSystem_Detonator/src/de/steamwar/bausystem/detonator/DetonatorCommand.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) 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.detonator; +package de.steamwar.bausystem.detonator; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.SWUtils; import de.steamwar.bausystem.configplayer.Config; -import de.steamwar.bausystem.features.detonator.storage.DetonatorStorage; -import de.steamwar.bausystem.features.detonator.storage.ItemStorage; +import de.steamwar.bausystem.detonator.storage.DetonatorStorage; +import de.steamwar.bausystem.detonator.storage.ItemStorage; import de.steamwar.bausystem.utils.ItemUtils; import de.steamwar.command.SWCommand; import de.steamwar.linkage.Linked; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorListener.java b/BauSystem_Detonator/src/de/steamwar/bausystem/detonator/DetonatorListener.java similarity index 82% rename from BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorListener.java rename to BauSystem_Detonator/src/de/steamwar/bausystem/detonator/DetonatorListener.java index cabe00c6..bf02aa67 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorListener.java +++ b/BauSystem_Detonator/src/de/steamwar/bausystem/detonator/DetonatorListener.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) 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.detonator; +package de.steamwar.bausystem.detonator; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.SWUtils; -import de.steamwar.bausystem.features.detonator.storage.DetonatorStorage; -import de.steamwar.bausystem.features.detonator.storage.ItemStorage; +import de.steamwar.bausystem.detonator.storage.DetonatorStorage; +import de.steamwar.bausystem.detonator.storage.ItemStorage; import de.steamwar.linkage.Linked; import org.bukkit.Location; import org.bukkit.entity.Player; diff --git a/BauSystem_Detonator/src/de/steamwar/bausystem/detonator/storage/DetonatorStorage.java b/BauSystem_Detonator/src/de/steamwar/bausystem/detonator/storage/DetonatorStorage.java new file mode 100644 index 00000000..05683028 --- /dev/null +++ b/BauSystem_Detonator/src/de/steamwar/bausystem/detonator/storage/DetonatorStorage.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.detonator.storage; + +import org.bukkit.Location; +import org.bukkit.entity.Player; + +import java.util.List; + +public interface DetonatorStorage { + + void addLocation(Location location); + + List getLocations(); + + void removeLocation(Location location); + + void clear(); + + void write(); + + Player getPlayer(); +} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/storage/ItemStorage.java b/BauSystem_Detonator/src/de/steamwar/bausystem/detonator/storage/ItemStorage.java similarity index 86% rename from BauSystem_Main/src/de/steamwar/bausystem/features/detonator/storage/ItemStorage.java rename to BauSystem_Detonator/src/de/steamwar/bausystem/detonator/storage/ItemStorage.java index 71b6edb4..57b5d83f 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/storage/ItemStorage.java +++ b/BauSystem_Detonator/src/de/steamwar/bausystem/detonator/storage/ItemStorage.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.detonator.storage; +package de.steamwar.bausystem.detonator.storage; import de.steamwar.bausystem.SWUtils; import lombok.Getter; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java b/BauSystem_Loader/src/de/steamwar/bausystem/loader/Loader.java similarity index 91% rename from BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java rename to BauSystem_Loader/src/de/steamwar/bausystem/loader/Loader.java index d8489a0f..eae0cf3b 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java +++ b/BauSystem_Loader/src/de/steamwar/bausystem/loader/Loader.java @@ -1,30 +1,30 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 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.loader; +package de.steamwar.bausystem.loader; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.features.loader.elements.LoaderElement; -import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement; -import de.steamwar.bausystem.features.loader.elements.impl.LoaderTNT; -import de.steamwar.bausystem.features.loader.elements.impl.LoaderWait; +import de.steamwar.bausystem.loader.elements.LoaderElement; +import de.steamwar.bausystem.loader.elements.LoaderInteractionElement; +import de.steamwar.bausystem.loader.elements.impl.LoaderTNT; +import de.steamwar.bausystem.loader.elements.impl.LoaderWait; import de.steamwar.bausystem.shared.EnumDisplay; import de.steamwar.inventory.SWAnvilInv; import de.steamwar.inventory.SWItem; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderCommand.java b/BauSystem_Loader/src/de/steamwar/bausystem/loader/LoaderCommand.java similarity index 82% rename from BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderCommand.java rename to BauSystem_Loader/src/de/steamwar/bausystem/loader/LoaderCommand.java index 021ad330..36a70f5f 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderCommand.java +++ b/BauSystem_Loader/src/de/steamwar/bausystem/loader/LoaderCommand.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.loader; +package de.steamwar.bausystem.loader; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.utils.BauMemberUpdateEvent; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderRecorder.java b/BauSystem_Loader/src/de/steamwar/bausystem/loader/LoaderRecorder.java similarity index 89% rename from BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderRecorder.java rename to BauSystem_Loader/src/de/steamwar/bausystem/loader/LoaderRecorder.java index d3e2fcfb..5b1e26e0 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderRecorder.java +++ b/BauSystem_Loader/src/de/steamwar/bausystem/loader/LoaderRecorder.java @@ -1,30 +1,31 @@ /* - * 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.loader; +package de.steamwar.bausystem.loader; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.SWUtils; -import de.steamwar.bausystem.features.loader.elements.LoaderElement; -import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement; import de.steamwar.bausystem.features.loader.elements.impl.*; import de.steamwar.bausystem.features.tpslimit.TPSUtils; +import de.steamwar.bausystem.loader.elements.LoaderElement; +import de.steamwar.bausystem.loader.elements.LoaderInteractionElement; +import de.steamwar.bausystem.loader.elements.impl.*; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderScoreboardElement.java b/BauSystem_Loader/src/de/steamwar/bausystem/loader/LoaderScoreboardElement.java similarity index 60% rename from BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderScoreboardElement.java rename to BauSystem_Loader/src/de/steamwar/bausystem/loader/LoaderScoreboardElement.java index fdcda57a..97e48dba 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderScoreboardElement.java +++ b/BauSystem_Loader/src/de/steamwar/bausystem/loader/LoaderScoreboardElement.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.loader; +package de.steamwar.bausystem.loader; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; diff --git a/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/LoaderElement.java b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/LoaderElement.java new file mode 100644 index 00000000..8fb0b174 --- /dev/null +++ b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/LoaderElement.java @@ -0,0 +1,31 @@ +/* + * 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.loader.elements; + +import de.steamwar.inventory.SWItem; +import org.bukkit.entity.Player; + +import java.util.function.Consumer; + +public interface LoaderElement { + SWItem menu(Player player); + void execute(Consumer delay); + void click(Player player, Runnable backAction); +} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderInteractionElement.java b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/LoaderInteractionElement.java similarity index 94% rename from BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderInteractionElement.java rename to BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/LoaderInteractionElement.java index 67539fd8..ef0ec68d 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderInteractionElement.java +++ b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/LoaderInteractionElement.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.loader.elements; +package de.steamwar.bausystem.loader.elements; import de.steamwar.bausystem.BauSystem; import de.steamwar.inventory.SWAnvilInv; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderSettingsEnum.java b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/LoaderSettingsEnum.java similarity index 94% rename from BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderSettingsEnum.java rename to BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/LoaderSettingsEnum.java index f1e628d0..f954522e 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderSettingsEnum.java +++ b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/LoaderSettingsEnum.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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.loader.elements; +package de.steamwar.bausystem.loader.elements; import de.steamwar.bausystem.BauSystem; import de.steamwar.inventory.SWItem; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderComparator.java b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderComparator.java similarity index 79% rename from BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderComparator.java rename to BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderComparator.java index fa7a032e..732a2fb0 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderComparator.java +++ b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderComparator.java @@ -1,26 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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.loader.elements.impl; +package de.steamwar.bausystem.loader.elements.impl; -import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement; -import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum; +import de.steamwar.bausystem.loader.elements.LoaderInteractionElement; +import de.steamwar.bausystem.loader.elements.LoaderSettingsEnum; import de.steamwar.inventory.SWItem; import org.bukkit.Location; import org.bukkit.Material; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderDaylightDetector.java b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderDaylightDetector.java similarity index 80% rename from BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderDaylightDetector.java rename to BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderDaylightDetector.java index caacd6b0..6c385b36 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderDaylightDetector.java +++ b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderDaylightDetector.java @@ -1,26 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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.loader.elements.impl; +package de.steamwar.bausystem.loader.elements.impl; -import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement; -import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum; +import de.steamwar.bausystem.loader.elements.LoaderInteractionElement; +import de.steamwar.bausystem.loader.elements.LoaderSettingsEnum; import de.steamwar.inventory.SWItem; import org.bukkit.Location; import org.bukkit.Material; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderLectern.java b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderLectern.java similarity index 95% rename from BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderLectern.java rename to BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderLectern.java index 8282cf69..604da597 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderLectern.java +++ b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderLectern.java @@ -1,26 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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.loader.elements.impl; +package de.steamwar.bausystem.loader.elements.impl; -import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement; -import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum; +import de.steamwar.bausystem.loader.elements.LoaderInteractionElement; +import de.steamwar.bausystem.loader.elements.LoaderSettingsEnum; import de.steamwar.inventory.SWItem; import org.bukkit.Location; import org.bukkit.Material; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderLever.java b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderLever.java similarity index 77% rename from BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderLever.java rename to BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderLever.java index c77d914d..0a2c0532 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderLever.java +++ b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderLever.java @@ -1,26 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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.loader.elements.impl; +package de.steamwar.bausystem.loader.elements.impl; -import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement; -import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum; +import de.steamwar.bausystem.loader.elements.LoaderInteractionElement; +import de.steamwar.bausystem.loader.elements.LoaderSettingsEnum; import de.steamwar.inventory.SWItem; import org.bukkit.Location; import org.bukkit.Material; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderMovement.java b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderMovement.java similarity index 84% rename from BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderMovement.java rename to BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderMovement.java index 3fc89e5d..0b7373a7 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderMovement.java +++ b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderMovement.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 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.loader.elements.impl; +package de.steamwar.bausystem.loader.elements.impl; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement; -import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum; +import de.steamwar.bausystem.loader.elements.LoaderInteractionElement; +import de.steamwar.bausystem.loader.elements.LoaderSettingsEnum; import de.steamwar.inventory.SWItem; import org.bukkit.Location; import org.bukkit.Material; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderNoteBlock.java b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderNoteBlock.java similarity index 70% rename from BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderNoteBlock.java rename to BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderNoteBlock.java index 042243e0..4f90c163 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderNoteBlock.java +++ b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderNoteBlock.java @@ -1,26 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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.loader.elements.impl; +package de.steamwar.bausystem.loader.elements.impl; -import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement; -import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum; +import de.steamwar.bausystem.loader.elements.LoaderInteractionElement; +import de.steamwar.bausystem.loader.elements.LoaderSettingsEnum; import de.steamwar.inventory.SWItem; import org.bukkit.Instrument; import org.bukkit.Location; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderOpenable.java b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderOpenable.java similarity index 78% rename from BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderOpenable.java rename to BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderOpenable.java index 46197b00..dde7d088 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderOpenable.java +++ b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderOpenable.java @@ -1,26 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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.loader.elements.impl; +package de.steamwar.bausystem.loader.elements.impl; -import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement; -import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum; +import de.steamwar.bausystem.loader.elements.LoaderInteractionElement; +import de.steamwar.bausystem.loader.elements.LoaderSettingsEnum; import de.steamwar.inventory.SWItem; import org.bukkit.Location; import org.bukkit.Material; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderRepeater.java b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderRepeater.java similarity index 84% rename from BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderRepeater.java rename to BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderRepeater.java index d40e4211..36d85860 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderRepeater.java +++ b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderRepeater.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 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.loader.elements.impl; +package de.steamwar.bausystem.loader.elements.impl; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement; -import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum; +import de.steamwar.bausystem.loader.elements.LoaderInteractionElement; +import de.steamwar.bausystem.loader.elements.LoaderSettingsEnum; import de.steamwar.inventory.SWItem; import org.bukkit.Location; import org.bukkit.Material; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderTNT.java b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderTNT.java similarity index 73% rename from BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderTNT.java rename to BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderTNT.java index f0ee034e..fa0020ae 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderTNT.java +++ b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderTNT.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 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.loader.elements.impl; +package de.steamwar.bausystem.loader.elements.impl; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement; -import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum; +import de.steamwar.bausystem.loader.elements.LoaderInteractionElement; +import de.steamwar.bausystem.loader.elements.LoaderSettingsEnum; import de.steamwar.inventory.SWItem; import org.bukkit.Location; import org.bukkit.Material; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderTicks.java b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderTicks.java similarity index 77% rename from BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderTicks.java rename to BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderTicks.java index 32e65f61..c79649c6 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderTicks.java +++ b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderTicks.java @@ -1,27 +1,27 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 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.loader.elements.impl; +package de.steamwar.bausystem.loader.elements.impl; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement; -import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum; +import de.steamwar.bausystem.loader.elements.LoaderInteractionElement; +import de.steamwar.bausystem.loader.elements.LoaderSettingsEnum; import de.steamwar.inventory.SWItem; import org.bukkit.Location; import org.bukkit.Material; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderWait.java b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderWait.java similarity index 76% rename from BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderWait.java rename to BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderWait.java index 41fcb977..e5e5ccc2 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/impl/LoaderWait.java +++ b/BauSystem_Loader/src/de/steamwar/bausystem/loader/elements/impl/LoaderWait.java @@ -1,26 +1,26 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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.loader.elements.impl; +package de.steamwar.bausystem.loader.elements.impl; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.features.loader.elements.LoaderElement; +import de.steamwar.bausystem.loader.elements.LoaderElement; import de.steamwar.inventory.SWAnvilInv; import de.steamwar.inventory.SWInventory; import de.steamwar.inventory.SWItem; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutoStartCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutoStartCommand.java deleted file mode 100644 index 3401267e..00000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutoStartCommand.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2021 SteamWar.de-Serverteam - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -package de.steamwar.bausystem.features.autostart; - -import de.steamwar.bausystem.SWUtils; -import de.steamwar.command.SWCommand; -import de.steamwar.linkage.Linked; -import org.bukkit.entity.Player; - -@Linked -public class AutoStartCommand extends SWCommand { - - public AutoStartCommand() { - super("timer", "autostarttimer", "at", "autostart"); - } - - @Register(description = "AUTOSTART_COMMAND_HELP") - public void genericCommand(@Validator Player p) { - SWUtils.giveItemToPlayer(p, AutostartListener.getWandItem(p)); - } -} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorBauGuiItem.java deleted file mode 100644 index 3f633663..00000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorBauGuiItem.java +++ /dev/null @@ -1,52 +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.detonator; - -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 DetonatorBauGuiItem extends BauGuiItem { - - public DetonatorBauGuiItem() { - super(8); - } - - @Override - public ItemStack getItem(Player player) { - return DetonatorCommand.getWAND(player); - } - - @Override - public boolean click(ClickType click, Player p) { - p.closeInventory(); - p.performCommand("detonator wand"); - return false; - } - - @Override - public Permission permission() { - return Permission.BUILD; - } -} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/storage/DetonatorStorage.java b/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/storage/DetonatorStorage.java deleted file mode 100644 index 104abf29..00000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/storage/DetonatorStorage.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.detonator.storage; - -import org.bukkit.Location; -import org.bukkit.entity.Player; - -import java.util.List; - -public interface DetonatorStorage { - - void addLocation(Location location); - - List getLocations(); - - void removeLocation(Location location); - - void clear(); - - void write(); - - Player getPlayer(); -} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderElement.java b/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderElement.java deleted file mode 100644 index 658a9f8d..00000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/elements/LoaderElement.java +++ /dev/null @@ -1,31 +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.features.loader.elements; - -import de.steamwar.inventory.SWItem; -import org.bukkit.entity.Player; - -import java.util.function.Consumer; - -public interface LoaderElement { - SWItem menu(Player player); - void execute(Consumer delay); - void click(Player player, Runnable backAction); -} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrintingState.java b/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrintingState.java deleted file mode 100644 index 0f782f67..00000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrintingState.java +++ /dev/null @@ -1,27 +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.features.shieldprinting; - -public enum ShieldPrintingState { - - START, - COPY, - APPLY -} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/Hotkey.java b/BauSystem_Script/src/de/steamwar/bausystem/script/Hotkey.java similarity index 96% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/Hotkey.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/Hotkey.java index d149eedd..026e0fca 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/Hotkey.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/Hotkey.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.script; +package de.steamwar.bausystem.script; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptCommand.java b/BauSystem_Script/src/de/steamwar/bausystem/script/ScriptCommand.java similarity index 91% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptCommand.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/ScriptCommand.java index 0194514f..4b87d5dd 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptCommand.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/ScriptCommand.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.script; +package de.steamwar.bausystem.script; import de.steamwar.command.SWCommand; import de.steamwar.linkage.Linked; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptGUI.java b/BauSystem_Script/src/de/steamwar/bausystem/script/ScriptGUI.java similarity index 96% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptGUI.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/ScriptGUI.java index add7ad81..7e8d4702 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptGUI.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/ScriptGUI.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,12 +17,11 @@ * along with this program. If not, see . */ -package de.steamwar.bausystem.features.script; +package de.steamwar.bausystem.script; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.SWUtils; -import de.steamwar.bausystem.features.script.lua.SteamWarPlatform; -import de.steamwar.bausystem.utils.ItemUtils; +import de.steamwar.bausystem.script.lua.SteamWarPlatform; import de.steamwar.inventory.SWAnvilInv; import de.steamwar.inventory.SWItem; import de.steamwar.inventory.SWListInv; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptHelper.java b/BauSystem_Script/src/de/steamwar/bausystem/script/ScriptHelper.java similarity index 95% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptHelper.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/ScriptHelper.java index 8f99b390..18d47f4b 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptHelper.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/ScriptHelper.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.script; +package de.steamwar.bausystem.script; import de.steamwar.sql.Script; import de.steamwar.sql.SteamwarUser; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptListener.java b/BauSystem_Script/src/de/steamwar/bausystem/script/ScriptListener.java similarity index 96% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptListener.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/ScriptListener.java index 14f8d983..1c5383d3 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptListener.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/ScriptListener.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.script; +package de.steamwar.bausystem.script; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.utils.BauMemberUpdateEvent; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptRunner.java b/BauSystem_Script/src/de/steamwar/bausystem/script/ScriptRunner.java similarity index 94% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptRunner.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/ScriptRunner.java index 7ee93eb3..0247a67d 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptRunner.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/ScriptRunner.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,19 +17,18 @@ * along with this program. If not, see . */ -package de.steamwar.bausystem.features.script; +package de.steamwar.bausystem.script; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.features.script.lua.CommandRegister; -import de.steamwar.bausystem.features.script.lua.SteamWarGlobalLuaPlugin; -import de.steamwar.bausystem.features.script.lua.SteamWarPlatform; +import de.steamwar.bausystem.script.lua.CommandRegister; +import de.steamwar.bausystem.script.lua.SteamWarGlobalLuaPlugin; +import de.steamwar.bausystem.script.lua.SteamWarPlatform; import de.steamwar.sql.Script; import de.steamwar.sql.SteamwarUser; import lombok.experimental.UtilityClass; import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; import org.bukkit.event.Event; -import org.luaj.vm2.*; import org.luaj.vm2.lib.OneArgFunction; import java.util.*; @@ -100,7 +99,7 @@ public class ScriptRunner { @Override public LuaValue call(LuaValue arg) { cancelled.set(arg.checkboolean()); - return valueOf(cancelled.get()); + return LuaValue.valueOf(cancelled.get()); } }); } else { @@ -152,7 +151,7 @@ public class ScriptRunner { break; } } - return valueOf(hasFlag); + return LuaValue.valueOf(hasFlag); } }); @@ -178,7 +177,7 @@ public class ScriptRunner { break; } } - return valueOf(hasFlag); + return LuaValue.valueOf(hasFlag); } }); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/UnsignCommand.java b/BauSystem_Script/src/de/steamwar/bausystem/script/UnsignCommand.java similarity index 94% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/UnsignCommand.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/UnsignCommand.java index c1a048cc..4b0bfc8d 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/UnsignCommand.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/UnsignCommand.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.script; +package de.steamwar.bausystem.script; import de.steamwar.bausystem.utils.FlatteningWrapper; import de.steamwar.command.SWCommand; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/CommandListener.java b/BauSystem_Script/src/de/steamwar/bausystem/script/event/CommandListener.java similarity index 92% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/event/CommandListener.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/event/CommandListener.java index da5f1f21..37716a7e 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/CommandListener.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/event/CommandListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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,10 +17,10 @@ * along with this program. If not, see . */ -package de.steamwar.bausystem.features.script.event; +package de.steamwar.bausystem.script.event; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.features.script.ScriptRunner; +import de.steamwar.bausystem.script.ScriptRunner; import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -28,7 +28,6 @@ import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerCommandPreprocessEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; -import org.luaj.vm2.LuaValue; import java.util.HashMap; import java.util.HashSet; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/EventListener.java b/BauSystem_Script/src/de/steamwar/bausystem/script/event/EventListener.java similarity index 96% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/event/EventListener.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/event/EventListener.java index c32b0231..43041e2f 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/EventListener.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/event/EventListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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,17 +17,16 @@ * along with this program. If not, see . */ -package de.steamwar.bausystem.features.script.event; +package de.steamwar.bausystem.script.event; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.features.script.ScriptRunner; -import de.steamwar.bausystem.features.script.lua.SteamWarGlobalLuaPlugin; -import de.steamwar.bausystem.features.script.lua.libs.StorageLib; -import de.steamwar.bausystem.features.tpslimit.TPSUtils; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.utils.RegionExtensionType; import de.steamwar.bausystem.region.utils.RegionType; +import de.steamwar.bausystem.script.ScriptRunner; +import de.steamwar.bausystem.script.lua.SteamWarGlobalLuaPlugin; +import de.steamwar.bausystem.script.lua.libs.StorageLib; import de.steamwar.linkage.Linked; import org.bukkit.Bukkit; import org.bukkit.Material; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/HotkeyListener.java b/BauSystem_Script/src/de/steamwar/bausystem/script/event/HotkeyListener.java similarity index 93% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/event/HotkeyListener.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/event/HotkeyListener.java index 52843f79..91550658 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/HotkeyListener.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/event/HotkeyListener.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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,11 +17,11 @@ * along with this program. If not, see . */ -package de.steamwar.bausystem.features.script.event; +package de.steamwar.bausystem.script.event; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.features.script.ScriptRunner; +import de.steamwar.bausystem.script.ScriptRunner; import de.steamwar.linkage.Linked; import de.steamwar.linkage.api.Plain; import org.bukkit.Bukkit; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/CommandRegister.java b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/CommandRegister.java similarity index 90% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/CommandRegister.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/lua/CommandRegister.java index 3c3332a0..a8b6ad1b 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/CommandRegister.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/CommandRegister.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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.script.lua; +package de.steamwar.bausystem.script.lua; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarGlobalLuaPlugin.java b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/SteamWarGlobalLuaPlugin.java similarity index 94% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarGlobalLuaPlugin.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/lua/SteamWarGlobalLuaPlugin.java index 0bec9864..8b3f6aa9 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarGlobalLuaPlugin.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/SteamWarGlobalLuaPlugin.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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.script.lua; +package de.steamwar.bausystem.script.lua; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; @@ -38,7 +38,7 @@ public class SteamWarGlobalLuaPlugin extends TwoArgFunction { @Override public LuaValue call(LuaValue modname, LuaValue env) { - LuaValue types = tableOf(); + LuaValue types = LuaValue.tableOf(); for (EventType value : EventType.values()) { types.set(value.name(), value.ordinal()); } @@ -54,7 +54,7 @@ public class SteamWarGlobalLuaPlugin extends TwoArgFunction { commandRegisterConsumer.accept(new CommandRegister(command.tojstring().toLowerCase(), function)); - return NIL; + return LuaValue.NIL; } }); env.set("hotkey", new TwoArgFunction() { @@ -68,7 +68,7 @@ public class SteamWarGlobalLuaPlugin extends TwoArgFunction { return null; } }); - return NIL; + return LuaValue.NIL; } class On extends TwoArgFunction { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarLuaPlugin.java b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/SteamWarLuaPlugin.java similarity index 89% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarLuaPlugin.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/lua/SteamWarLuaPlugin.java index c047531c..0fa55d1c 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarLuaPlugin.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/SteamWarLuaPlugin.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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,24 +17,19 @@ * along with this program. If not, see . */ -package de.steamwar.bausystem.features.script.lua; +package de.steamwar.bausystem.script.lua; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.bukkit.BukkitAdapter; -import com.sk89q.worldedit.bukkit.BukkitPlayer; -import com.sk89q.worldedit.bukkit.WorldEditPlugin; import com.sk89q.worldedit.event.platform.CommandEvent; import com.sk89q.worldedit.extension.platform.Actor; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.configplayer.Config; -import de.steamwar.bausystem.features.script.ScriptRunner; -import de.steamwar.bausystem.features.script.lua.libs.LuaLib; import de.steamwar.bausystem.features.world.WorldEditListener; +import de.steamwar.bausystem.script.ScriptRunner; +import de.steamwar.bausystem.script.lua.libs.LuaLib; import de.steamwar.bausystem.utils.WorldEditUtils; import de.steamwar.inventory.SWAnvilInv; -import net.md_5.bungee.api.ChatMessageType; -import net.md_5.bungee.api.chat.BaseComponent; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Location; @@ -45,10 +40,7 @@ import org.luaj.vm2.LuaFunction; import org.luaj.vm2.LuaTable; import org.luaj.vm2.LuaValue; import org.luaj.vm2.Varargs; -import org.luaj.vm2.lib.*; -import java.lang.reflect.Proxy; -import java.net.InetSocketAddress; import java.util.*; import java.util.logging.Level; @@ -70,9 +62,9 @@ public class SteamWarLuaPlugin extends TwoArgFunction { @Override public LuaValue call(LuaValue modname, LuaValue env) { - LuaValue materialLib = tableOf(); + LuaValue materialLib = LuaValue.tableOf(); for (Material mat : Material.values()) { - materialLib.set(mat.name().toLowerCase(), valueOf(mat.name())); + materialLib.set(mat.name().toLowerCase(), LuaValue.valueOf(mat.name())); } initialize(env, null); @@ -85,7 +77,7 @@ public class SteamWarLuaPlugin extends TwoArgFunction { LuaFunction callback = arg2.checkfunction(); SWAnvilInv inv = new SWAnvilInv(player, message); - inv.setCallback(s -> ScriptRunner.catchScript("SCRIPT_ERROR_CLICK", player, () -> callback.call(valueOf(s)))); + inv.setCallback(s -> ScriptRunner.catchScript("SCRIPT_ERROR_CLICK", player, () -> callback.call(LuaValue.valueOf(s)))); inv.open(); return LuaValue.NIL; @@ -152,20 +144,20 @@ public class SteamWarLuaPlugin extends TwoArgFunction { if (builder.length() != 0) builder.append(separator); builder.append(table.get(i).tojstring()); } - return valueOf(builder.toString()); + return LuaValue.valueOf(builder.toString()); } }); - env.set("collectgarbage", NIL); - env.set("dofile", NIL); - env.set("load", NIL); - env.set("loadfile", NIL); - env.set("pcall", NIL); - env.set("rawequal", NIL); - env.set("rawget", NIL); - env.set("rawlen", NIL); - env.set("rawset", NIL); - env.set("xpcall", NIL); + env.set("collectgarbage", LuaValue.NIL); + env.set("dofile", LuaValue.NIL); + env.set("load", LuaValue.NIL); + env.set("loadfile", LuaValue.NIL); + env.set("pcall", LuaValue.NIL); + env.set("rawequal", LuaValue.NIL); + env.set("rawget", LuaValue.NIL); + env.set("rawlen", LuaValue.NIL); + env.set("rawset", LuaValue.NIL); + env.set("xpcall", LuaValue.NIL); return null; } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarPlatform.java b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/SteamWarPlatform.java similarity index 96% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarPlatform.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/lua/SteamWarPlatform.java index a35ede6e..bae0fdd6 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/SteamWarPlatform.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/SteamWarPlatform.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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.script.lua; +package de.steamwar.bausystem.script.lua; import de.steamwar.bausystem.BauSystem; import org.bukkit.entity.Player; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/BossbarLib.java b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/BossbarLib.java similarity index 97% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/BossbarLib.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/BossbarLib.java index adbb334e..1cddd89b 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/BossbarLib.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/BossbarLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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.script.lua.libs; +package de.steamwar.bausystem.script.lua.libs; import de.steamwar.linkage.Linked; import org.bukkit.Bukkit; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/InventoryLib.java b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/InventoryLib.java similarity index 98% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/InventoryLib.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/InventoryLib.java index 1d14b305..d21e7409 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/InventoryLib.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/InventoryLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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.script.lua.libs; +package de.steamwar.bausystem.script.lua.libs; import de.steamwar.bausystem.BauSystem; import de.steamwar.inventory.SWInventory; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/LuaLib.java b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/LuaLib.java similarity index 89% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/LuaLib.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/LuaLib.java index a4af0d3a..52090541 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/LuaLib.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/LuaLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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,12 +17,12 @@ * along with this program. If not, see . */ -package de.steamwar.bausystem.features.script.lua.libs; +package de.steamwar.bausystem.script.lua.libs; import de.steamwar.bausystem.region.Point; +import de.steamwar.bausystem.script.lua.SteamWarLuaPlugin; import lombok.AllArgsConstructor; import org.bukkit.entity.Player; -import org.luaj.vm2.*; import org.luaj.vm2.lib.VarArgFunction; import org.luaj.vm2.lib.ZeroArgFunction; @@ -67,7 +67,7 @@ public interface LuaLib { } default String varArgsToString(Varargs varargs) { - return de.steamwar.bausystem.features.script.lua.SteamWarLuaPlugin.varArgsToString(varargs); + return SteamWarLuaPlugin.varArgsToString(varargs); } default LuaTable toPos(Point point) { @@ -102,34 +102,34 @@ public interface LuaLib { try { try { consumer.accept(luaValue.toboolean()); - return NIL; + return LuaValue.NIL; } catch (Exception ingored) {} try { consumer.accept((long) luaValue.toint()); - return NIL; + return LuaValue.NIL; } catch (Exception ignored) {} try { consumer.accept(luaValue.toint()); - return NIL; + return LuaValue.NIL; } catch (Exception ignored) {} try { consumer.accept(luaValue.todouble()); - return NIL; + return LuaValue.NIL; } catch (Exception ignored) {} try { consumer.accept((float) luaValue.todouble()); - return NIL; + return LuaValue.NIL; } catch (Exception ignored) {} try { consumer.accept(luaValue.toString()); - return NIL; + return LuaValue.NIL; } catch (Exception ignored) {} throw new LuaError("Invalid lua type: " + luaValue.typename()); } catch (Throwable throwable) { throw new LuaError("Error in '" + name + "' " + throwable.getMessage()); } } - return NIL; + return LuaValue.NIL; } } } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/PlayerLib.java b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/PlayerLib.java similarity index 96% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/PlayerLib.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/PlayerLib.java index d8576f81..54a5b6a8 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/PlayerLib.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/PlayerLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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,9 +17,9 @@ * along with this program. If not, see . */ -package de.steamwar.bausystem.features.script.lua.libs; +package de.steamwar.bausystem.script.lua.libs; -import de.steamwar.bausystem.features.script.lua.SteamWarLuaPlugin; +import de.steamwar.bausystem.script.lua.SteamWarLuaPlugin; import de.steamwar.linkage.Linked; import net.md_5.bungee.api.ChatMessageType; import net.md_5.bungee.api.chat.TextComponent; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/RandomLib.java b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/RandomLib.java similarity index 96% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/RandomLib.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/RandomLib.java index 87a4dddc..3ef0ace3 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/RandomLib.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/RandomLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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.script.lua.libs; +package de.steamwar.bausystem.script.lua.libs; import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/RegionLib.java b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/RegionLib.java similarity index 98% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/RegionLib.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/RegionLib.java index f615dad3..55046b2b 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/RegionLib.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/RegionLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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.script.lua.libs; +package de.steamwar.bausystem.script.lua.libs; import de.steamwar.bausystem.features.loader.Loader; import de.steamwar.bausystem.region.GlobalRegion; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/ScoreboardLib.java b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/ScoreboardLib.java similarity index 95% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/ScoreboardLib.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/ScoreboardLib.java index ff09ac9a..3cbf1409 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/ScoreboardLib.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/ScoreboardLib.java @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package de.steamwar.bausystem.features.script.lua.libs; +package de.steamwar.bausystem.script.lua.libs; import de.steamwar.bausystem.features.world.BauScoreboard; import de.steamwar.bausystem.utils.ScoreboardElement; @@ -49,7 +49,7 @@ public class ScoreboardLib implements LuaLib { @Override public Varargs invoke(Varargs varargs) { if (varargs.narg() < 2) { - return NIL; + return LuaValue.NIL; } String elementKey = varargs.arg(1).checkjstring(); ScoreboardElement.ScoreboardGroup elementGroup = ScoreboardElement.ScoreboardGroup.values()[varargs.arg(2).checkint()]; @@ -63,7 +63,7 @@ public class ScoreboardLib implements LuaLib { } else { BauScoreboard.setAdditionalElement(player, elementKey, elementGroup, priority, args.arg1().checkjstring()); } - return NIL; + return LuaValue.NIL; } }; } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/ServerLib.java b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/ServerLib.java similarity index 90% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/ServerLib.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/ServerLib.java index 039b849f..9a1c8917 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/ServerLib.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/ServerLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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.script.lua.libs; +package de.steamwar.bausystem.script.lua.libs; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; @@ -58,7 +58,7 @@ public class ServerLib implements LuaLib { return LuaValue.NIL; } LuaTable pos = arg1.checktable(); - return valueOf(player.getWorld().getBlockAt(pos.get("x").checkint(), pos.get("y").checkint(), pos.get("z").checkint()).getType().name()); + return LuaValue.valueOf(player.getWorld().getBlockAt(pos.get("x").checkint(), pos.get("y").checkint(), pos.get("z").checkint()).getType().name()); } }); serverLib.set("setBlockAt", new TwoArgFunction() { @@ -71,10 +71,10 @@ public class ServerLib implements LuaLib { LuaString material = arg2.checkstring(); Material mat = SWItem.getMaterial(material.tojstring()); if (mat == null) { - return NIL; + return LuaValue.NIL; } player.getWorld().getBlockAt(pos.get("x").checkint(), pos.get("y").checkint(), pos.get("z").checkint()).setType(mat); - return NIL; + return LuaValue.NIL; } }); serverLib.set("interactAt", new OneArgFunction() { @@ -87,7 +87,7 @@ public class ServerLib implements LuaLib { // Ignore }); }); - return NIL; + return LuaValue.NIL; } }); return serverLib; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/StorageLib.java b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/StorageLib.java similarity index 95% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/StorageLib.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/StorageLib.java index 898b68a7..80d7c756 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/StorageLib.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/StorageLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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.script.lua.libs; +package de.steamwar.bausystem.script.lua.libs; import com.google.gson.*; import de.steamwar.bausystem.region.Region; @@ -215,7 +215,7 @@ public class StorageLib implements LuaLib, Enable, Disable { global.set("get", new OneArgFunction() { @Override public LuaValue call(LuaValue arg) { - return GLOBAL_STORAGE.getOrDefault(arg.checkjstring(), NIL); + return GLOBAL_STORAGE.getOrDefault(arg.checkjstring(), LuaValue.NIL); } }); global.set("set", new TwoArgFunction() { @@ -227,7 +227,7 @@ public class StorageLib implements LuaLib, Enable, Disable { global.set("has", new OneArgFunction() { @Override public LuaValue call(LuaValue arg) { - return valueOf(GLOBAL_STORAGE.containsKey(arg.checkjstring())); + return LuaValue.valueOf(GLOBAL_STORAGE.containsKey(arg.checkjstring())); } }); global.set("remove", new OneArgFunction() { @@ -244,10 +244,10 @@ public class StorageLib implements LuaLib, Enable, Disable { @Override public Varargs invoke(Varargs args) { if (args.narg() == 0) { - return GLOBAL_STORAGE.getOrDefault(key, NIL); + return GLOBAL_STORAGE.getOrDefault(key, LuaValue.NIL); } else { GLOBAL_STORAGE.put(key, args.arg(1)); - return NIL; + return LuaValue.NIL; } } }; @@ -260,7 +260,7 @@ public class StorageLib implements LuaLib, Enable, Disable { playerStorage.set("get", new OneArgFunction() { @Override public LuaValue call(LuaValue arg) { - return playerStorageMap.getOrDefault(arg.checkjstring(), NIL); + return playerStorageMap.getOrDefault(arg.checkjstring(), LuaValue.NIL); } }); playerStorage.set("set", new TwoArgFunction() { @@ -272,7 +272,7 @@ public class StorageLib implements LuaLib, Enable, Disable { playerStorage.set("has", new OneArgFunction() { @Override public LuaValue call(LuaValue arg) { - return valueOf(playerStorageMap.containsKey(arg.checkjstring())); + return LuaValue.valueOf(playerStorageMap.containsKey(arg.checkjstring())); } }); playerStorage.set("remove", new OneArgFunction() { @@ -289,10 +289,10 @@ public class StorageLib implements LuaLib, Enable, Disable { @Override public Varargs invoke(Varargs args) { if (args.narg() == 0) { - return playerStorageMap.getOrDefault(key, NIL); + return playerStorageMap.getOrDefault(key, LuaValue.NIL); } else { playerStorageMap.put(key, args.arg(1)); - return NIL; + return LuaValue.NIL; } } }; @@ -305,7 +305,7 @@ public class StorageLib implements LuaLib, Enable, Disable { @Override public LuaValue call(LuaValue arg) { HashMap regionStorageMap = REGION_STORAGE.computeIfAbsent(Region.getRegion(player.getLocation()), k -> new HashMap<>()); - return regionStorageMap.getOrDefault(arg.checkjstring(), NIL); + return regionStorageMap.getOrDefault(arg.checkjstring(), LuaValue.NIL); } }); regionStorage.set("set", new TwoArgFunction() { @@ -319,7 +319,7 @@ public class StorageLib implements LuaLib, Enable, Disable { @Override public LuaValue call(LuaValue arg) { HashMap regionStorageMap = REGION_STORAGE.computeIfAbsent(Region.getRegion(player.getLocation()), k -> new HashMap<>()); - return valueOf(regionStorageMap.containsKey(arg.checkjstring())); + return LuaValue.valueOf(regionStorageMap.containsKey(arg.checkjstring())); } }); regionStorage.set("remove", new OneArgFunction() { @@ -338,10 +338,10 @@ public class StorageLib implements LuaLib, Enable, Disable { @Override public Varargs invoke(Varargs args) { if (args.narg() == 0) { - return regionStorageMap.getOrDefault(key, NIL); + return regionStorageMap.getOrDefault(key, LuaValue.NIL); } else { regionStorageMap.put(key, args.arg(1)); - return NIL; + return LuaValue.NIL; } } }; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/TpsLib.java b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/TpsLib.java similarity index 97% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/TpsLib.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/TpsLib.java index 1435aa44..ffaaa5e2 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/TpsLib.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/TpsLib.java @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package de.steamwar.bausystem.features.script.lua.libs; +package de.steamwar.bausystem.script.lua.libs; import de.steamwar.bausystem.features.tpslimit.TPSSystem; import de.steamwar.core.TPSWatcher; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/WorldEditLib.java b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/WorldEditLib.java similarity index 96% rename from BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/WorldEditLib.java rename to BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/WorldEditLib.java index 87d1f9fb..1737eacc 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/WorldEditLib.java +++ b/BauSystem_Script/src/de/steamwar/bausystem/script/lua/libs/WorldEditLib.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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.script.lua.libs; +package de.steamwar.bausystem.script.lua.libs; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.bukkit.BukkitPlayer; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/BlockDataConfiguration.java b/BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/BlockDataConfiguration.java similarity index 91% rename from BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/BlockDataConfiguration.java rename to BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/BlockDataConfiguration.java index e4b6d102..7a2d8fa6 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/BlockDataConfiguration.java +++ b/BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/BlockDataConfiguration.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.shieldprinting; +package de.steamwar.bausystem.shieldprinting; import de.steamwar.inventory.SWItem; import org.bukkit.block.data.BlockData; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrinting.java b/BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/ShieldPrinting.java similarity index 92% rename from BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrinting.java rename to BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/ShieldPrinting.java index 1aa4149a..9e7ae09b 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrinting.java +++ b/BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/ShieldPrinting.java @@ -1,28 +1,28 @@ /* - * This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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.shieldprinting; +package de.steamwar.bausystem.shieldprinting; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.features.shieldprinting.impl.*; import de.steamwar.bausystem.region.Region; +import de.steamwar.bausystem.shieldprinting.impl.*; import de.steamwar.bausystem.utils.BauMemberUpdateEvent; import de.steamwar.bausystem.utils.bossbar.BauSystemBossbar; import de.steamwar.bausystem.utils.bossbar.BossBarService; @@ -45,12 +45,10 @@ import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.HandlerList; import org.bukkit.event.Listener; -import org.bukkit.event.block.BlockCanBuildEvent; import org.bukkit.event.block.BlockPistonExtendEvent; import org.bukkit.event.block.BlockPistonRetractEvent; import org.bukkit.event.entity.EntityChangeBlockEvent; import org.bukkit.event.entity.EntitySpawnEvent; -import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.util.Vector; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrintingCommand.java b/BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/ShieldPrintingCommand.java similarity index 82% rename from BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrintingCommand.java rename to BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/ShieldPrintingCommand.java index 5bb60219..441ff221 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrintingCommand.java +++ b/BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/ShieldPrintingCommand.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.shieldprinting; +package de.steamwar.bausystem.shieldprinting; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; diff --git a/BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/ShieldPrintingState.java b/BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/ShieldPrintingState.java new file mode 100644 index 00000000..9ca6e236 --- /dev/null +++ b/BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/ShieldPrintingState.java @@ -0,0 +1,27 @@ +/* + * 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.shieldprinting; + +public enum ShieldPrintingState { + + START, + COPY, + APPLY +} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/FenceConfiguration.java b/BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/impl/FenceConfiguration.java similarity index 94% rename from BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/FenceConfiguration.java rename to BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/impl/FenceConfiguration.java index c45ede3a..2228b7d5 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/FenceConfiguration.java +++ b/BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/impl/FenceConfiguration.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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,10 +17,10 @@ * along with this program. If not, see . */ -package de.steamwar.bausystem.features.shieldprinting.impl; +package de.steamwar.bausystem.shieldprinting.impl; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.features.shieldprinting.BlockDataConfiguration; +import de.steamwar.bausystem.shieldprinting.BlockDataConfiguration; import de.steamwar.inventory.SWItem; import org.bukkit.Material; import org.bukkit.block.BlockFace; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/OpenableConfiguration.java b/BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/impl/OpenableConfiguration.java similarity index 95% rename from BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/OpenableConfiguration.java rename to BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/impl/OpenableConfiguration.java index 2b444883..6691abbd 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/OpenableConfiguration.java +++ b/BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/impl/OpenableConfiguration.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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,10 +17,10 @@ * along with this program. If not, see . */ -package de.steamwar.bausystem.features.shieldprinting.impl; +package de.steamwar.bausystem.shieldprinting.impl; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.features.shieldprinting.BlockDataConfiguration; +import de.steamwar.bausystem.shieldprinting.BlockDataConfiguration; import de.steamwar.inventory.SWItem; import org.bukkit.Material; import org.bukkit.block.data.Openable; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/PistonConfiguration.java b/BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/impl/PistonConfiguration.java similarity index 92% rename from BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/PistonConfiguration.java rename to BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/impl/PistonConfiguration.java index dab77b8e..7b888623 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/PistonConfiguration.java +++ b/BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/impl/PistonConfiguration.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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,13 +17,12 @@ * along with this program. If not, see . */ -package de.steamwar.bausystem.features.shieldprinting.impl; +package de.steamwar.bausystem.shieldprinting.impl; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.features.shieldprinting.BlockDataConfiguration; +import de.steamwar.bausystem.shieldprinting.BlockDataConfiguration; import de.steamwar.inventory.SWItem; import org.bukkit.Material; -import org.bukkit.block.data.BlockData; import org.bukkit.block.data.type.Piston; import org.bukkit.entity.Player; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/PowerableConfiguration.java b/BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/impl/PowerableConfiguration.java similarity index 95% rename from BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/PowerableConfiguration.java rename to BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/impl/PowerableConfiguration.java index 3fa84f18..c78754f0 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/PowerableConfiguration.java +++ b/BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/impl/PowerableConfiguration.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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,10 +17,10 @@ * along with this program. If not, see . */ -package de.steamwar.bausystem.features.shieldprinting.impl; +package de.steamwar.bausystem.shieldprinting.impl; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.features.shieldprinting.BlockDataConfiguration; +import de.steamwar.bausystem.shieldprinting.BlockDataConfiguration; import de.steamwar.inventory.SWItem; import org.bukkit.Material; import org.bukkit.block.data.Powerable; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/WallConfiguration.java b/BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/impl/WallConfiguration.java similarity index 94% rename from BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/WallConfiguration.java rename to BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/impl/WallConfiguration.java index 00b57f92..1c60e581 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/impl/WallConfiguration.java +++ b/BauSystem_Shieldprinting/src/de/steamwar/bausystem/shieldprinting/impl/WallConfiguration.java @@ -1,7 +1,7 @@ /* * This file is a part of the SteamWar software. * - * Copyright (C) 2023 SteamWar.de-Serverteam + * Copyright (C) 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,10 +17,10 @@ * along with this program. If not, see . */ -package de.steamwar.bausystem.features.shieldprinting.impl; +package de.steamwar.bausystem.shieldprinting.impl; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.features.shieldprinting.BlockDataConfiguration; +import de.steamwar.bausystem.shieldprinting.BlockDataConfiguration; import de.steamwar.inventory.SWItem; import org.bukkit.Material; import org.bukkit.block.BlockFace;