From 213667541c2517803ef0d7898f5048f1cfec8140 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Fri, 25 Aug 2023 21:50:02 +0200 Subject: [PATCH] Remove LockSchemCommand Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 7 +- BauSystem_Main/src/BauSystem_de.properties | 6 -- .../features/team/LockSchemCommand.java | 89 ------------------- 3 files changed, 1 insertion(+), 101 deletions(-) delete mode 100644 BauSystem_Main/src/de/steamwar/bausystem/features/team/LockSchemCommand.java diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index b75ada62..55524339 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -857,12 +857,7 @@ REGION_TNT_OFF=§cTNT-Damage deactivated REGION_TNT_TB=§aTNT-Damage activated outside the building area REGION_TNT_NO_PERMS=§cYou are not allowed to toggle tnt damage here REGION_TNT_BUILD=§cAn explosion would have destroyed blocks in the building area -# Team -LOCK_SCHEM_NO_USER=§7This player does not exist! -LOCK_SCHEM_NO_SCHEM=§7This player does not have a schem with that name! -LOCK_SCHEM_DIR=§7The given schem is a directory -LOCK_SCHEM_LOCKED=§e{0} §7by §e{1} §7was reset from §e{2} §7to §eNORMAL §7. -LOCK_SCHEM_HELP=§8/§eschemlock §8[§7Owner§8] [§7Schematic§8] - §7Lock a schematic (Notify user about locking reason!) + AFK_KICK_MESSAGE=§cNothing happened on this server for 5 minutes. AFK_WARNING_MESSAGE=§cThis server will stop in one minute if you remain inactive diff --git a/BauSystem_Main/src/BauSystem_de.properties b/BauSystem_Main/src/BauSystem_de.properties index cb1184a8..1a9d86ec 100644 --- a/BauSystem_Main/src/BauSystem_de.properties +++ b/BauSystem_Main/src/BauSystem_de.properties @@ -820,12 +820,6 @@ REGION_TNT_OFF=§cTNT-Schaden deaktiviert REGION_TNT_TB=§aTNT-Schaden außerhalb Baurahmen aktiviert REGION_TNT_NO_PERMS=§cDu darfst hier nicht TNT-Schaden (de-)aktivieren REGION_TNT_BUILD=§cEine Explosion hätte Blöcke im Baubereich zerstört -# Team -LOCK_SCHEM_NO_USER=§7Dieser Spieler existiert nicht! -LOCK_SCHEM_NO_SCHEM=§7Dieser Spieler besitzt keine Schematic mit diesem Namen! -LOCK_SCHEM_DIR=§7Die angegebene Schematic ist ein Ordner -LOCK_SCHEM_LOCKED=§e{0} §7von §e{1} §7wurde von §e{2} §7auf §eNORMAL §7zurück gesetzt. -LOCK_SCHEM_HELP=§8/§eschemlock §8[§7Owner§8] [§7Schematic§8] - §7Sperre eine Schematic (Nutzer über Sperrungsgrund informieren!) AFK_KICK_MESSAGE=§cAuf diesem Server ist seit 5 Minuten nichts passiert. AFK_WARNING_MESSAGE=§cDieser Server wird bei weiterer Inaktivität in einer Minute gestoppt diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/team/LockSchemCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/team/LockSchemCommand.java deleted file mode 100644 index 05e0c408..00000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/team/LockSchemCommand.java +++ /dev/null @@ -1,89 +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.team; - -import de.steamwar.bausystem.BauSystem; -import de.steamwar.command.SWCommand; -import de.steamwar.linkage.Linked; -import de.steamwar.sql.SchematicNode; -import de.steamwar.sql.SchematicType; -import de.steamwar.sql.SteamwarUser; -import de.steamwar.sql.UserGroup; -import org.bukkit.entity.Player; - -@Linked -public class LockSchemCommand extends SWCommand { - - public LockSchemCommand() { - super("lockschem", "schemlock"); - } - - @Register(help = true) - public void genericHelp(Player p, String... args) { - SteamwarUser steamwarUser = SteamwarUser.get(p.getUniqueId()); - UserGroup userGroup = steamwarUser.getUserGroup(); - - if (userGroup != UserGroup.Admin && - userGroup != UserGroup.Developer && - userGroup != UserGroup.Moderator && - userGroup != UserGroup.Supporter) { - return; - } - - sendHelp(p); - } - - @Register - public void genericCommand(Player p, String owner, String schematicName) { - SteamwarUser steamwarUser = SteamwarUser.get(p.getUniqueId()); - UserGroup userGroup = steamwarUser.getUserGroup(); - - if (userGroup != UserGroup.Admin && - userGroup != UserGroup.Developer && - userGroup != UserGroup.Moderator && - userGroup != UserGroup.Supporter) { - return; - } - - SteamwarUser schemOwner = SteamwarUser.get(owner); - if (schemOwner == null) { - BauSystem.MESSAGE.send("LOCK_SCHEM_NO_USER", p); - return; - } - SchematicNode schematic = SchematicNode.getNodeFromPath(schemOwner, schematicName); - if (schematic == null) { - BauSystem.MESSAGE.send("LOCK_SCHEM_NO_SCHEM", p); - return; - } - - if(schematic.isDir()) { - BauSystem.MESSAGE.send("LOCK_SCHEM_DIR", p); - return; - } - - BauSystem.MESSAGE.send("LOCK_SCHEM_LOCKED", p, schematic.getName(), schemOwner.getUserName(), schematic.getSchemtype().name()); - schematic.setSchemtype(SchematicType.Normal); - } - - private void sendHelp(Player player) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", player, "Lock Schem"); - BauSystem.MESSAGE.sendPrefixless("LOCK_SCHEM_HELP", player); - } -} \ No newline at end of file