Dieser Commit ist enthalten in:
Ursprung
84aa126f38
Commit
5e8dbdc55c
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* 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
|
||||
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.autostart;
|
||||
package de.steamwar.bausystem.autostart;
|
||||
|
||||
import de.steamwar.bausystem.Permission;
|
||||
import de.steamwar.bausystem.linkage.specific.BauGuiItem;
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* 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
|
||||
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.autostart;
|
||||
package de.steamwar.bausystem.autostart;
|
||||
|
||||
import de.steamwar.bausystem.BauSystem;
|
||||
import de.steamwar.bausystem.Permission;
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* 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
|
||||
@ -17,21 +17,16 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* 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
|
||||
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.detonator;
|
||||
package de.steamwar.bausystem.detonator;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* 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
|
||||
@ -17,14 +17,14 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* 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
|
||||
@ -17,13 +17,13 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* 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
|
||||
@ -17,13 +17,13 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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<Location> getLocations();
|
||||
|
||||
void removeLocation(Location location);
|
||||
|
||||
void clear();
|
||||
|
||||
void write();
|
||||
|
||||
Player getPlayer();
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* 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
|
||||
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.detonator.storage;
|
||||
package de.steamwar.bausystem.detonator.storage;
|
||||
|
||||
import de.steamwar.bausystem.SWUtils;
|
||||
import lombok.Getter;
|
@ -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,14 +17,14 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.loader;
|
||||
package de.steamwar.bausystem.loader;
|
||||
|
||||
import de.steamwar.bausystem.BauSystem;
|
||||
import de.steamwar.bausystem.utils.BauMemberUpdateEvent;
|
@ -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,14 +17,15 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.loader;
|
||||
package de.steamwar.bausystem.loader;
|
||||
|
||||
import de.steamwar.bausystem.BauSystem;
|
||||
import de.steamwar.bausystem.Permission;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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<Long> delay);
|
||||
void click(Player player, Runnable backAction);
|
||||
}
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.loader.elements;
|
||||
package de.steamwar.bausystem.loader.elements;
|
||||
|
||||
import de.steamwar.bausystem.BauSystem;
|
||||
import de.steamwar.inventory.SWAnvilInv;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.loader.elements;
|
||||
package de.steamwar.bausystem.loader.elements;
|
||||
|
||||
import de.steamwar.bausystem.BauSystem;
|
||||
import de.steamwar.inventory.SWItem;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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<Location> getLocations();
|
||||
|
||||
void removeLocation(Location location);
|
||||
|
||||
void clear();
|
||||
|
||||
void write();
|
||||
|
||||
Player getPlayer();
|
||||
}
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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<Long> delay);
|
||||
void click(Player player, Runnable backAction);
|
||||
}
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.shieldprinting;
|
||||
|
||||
public enum ShieldPrintingState {
|
||||
|
||||
START,
|
||||
COPY,
|
||||
APPLY
|
||||
}
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.script;
|
||||
package de.steamwar.bausystem.script;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.script;
|
||||
package de.steamwar.bausystem.script;
|
||||
|
||||
import de.steamwar.command.SWCommand;
|
||||
import de.steamwar.linkage.Linked;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.script;
|
||||
package de.steamwar.bausystem.script;
|
||||
|
||||
import de.steamwar.sql.Script;
|
||||
import de.steamwar.sql.SteamwarUser;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.script;
|
||||
package de.steamwar.bausystem.script;
|
||||
|
||||
import de.steamwar.bausystem.Permission;
|
||||
import de.steamwar.bausystem.utils.BauMemberUpdateEvent;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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);
|
||||
}
|
||||
});
|
||||
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.script;
|
||||
package de.steamwar.bausystem.script;
|
||||
|
||||
import de.steamwar.bausystem.utils.FlatteningWrapper;
|
||||
import de.steamwar.command.SWCommand;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.script.lua;
|
||||
package de.steamwar.bausystem.script.lua;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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 {
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.script.lua;
|
||||
package de.steamwar.bausystem.script.lua;
|
||||
|
||||
import de.steamwar.bausystem.BauSystem;
|
||||
import org.bukkit.entity.Player;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.script.lua.libs;
|
||||
package de.steamwar.bausystem.script.lua.libs;
|
||||
|
||||
import de.steamwar.linkage.Linked;
|
||||
import org.bukkit.Bukkit;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
};
|
||||
}
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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<String, LuaValue> 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<String, LuaValue> 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;
|
||||
}
|
||||
}
|
||||
};
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.shieldprinting;
|
||||
package de.steamwar.bausystem.shieldprinting;
|
||||
|
||||
import de.steamwar.inventory.SWItem;
|
||||
import org.bukkit.block.data.BlockData;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
||||
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.shieldprinting;
|
||||
package de.steamwar.bausystem.shieldprinting;
|
||||
|
||||
import de.steamwar.bausystem.BauSystem;
|
||||
import de.steamwar.bausystem.Permission;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.shieldprinting;
|
||||
|
||||
public enum ShieldPrintingState {
|
||||
|
||||
START,
|
||||
COPY,
|
||||
APPLY
|
||||
}
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
||||
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
In neuem Issue referenzieren
Einen Benutzer sperren