From b7a27928d8f118eea5a063be483e26e33cd51dc8 Mon Sep 17 00:00:00 2001 From: MoBrot <90271578+MoBrot@users.noreply.github.com> Date: Tue, 30 May 2023 01:46:50 +0200 Subject: [PATCH] NoSchemSharing bug fix --- BauSystem_Main/src/BauSystem.properties | 2 ++ BauSystem_Main/src/BauSystem_de.properties | 1 + .../steamwar/bausystem/features/region/TestblockCommand.java | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 448fd952..0900dca1 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -1118,6 +1118,7 @@ REGION_TB_DONE=§7Dummy reset REGION_TB_ERROR=§cError resetting the dummy REGION_TB_NO_PERMS=§cYou are not allowed to reset the dummy here REGION_TB_NO_REGION=§cYou are currently not in any region +REGION_TB_NOSCHEMSHARING=&cYou currently have a NoSchemSharing ban REGION_TNT_HELP=§8/§etnt §8- §7Change the TNT behaviour REGION_TNT_HELP_MODE=§8/§etnt §8[§7Mode§8] §8- §7Set TNT behaviour to a given mode REGION_TNT_ON=§aTNT-Damage activated @@ -1125,6 +1126,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! diff --git a/BauSystem_Main/src/BauSystem_de.properties b/BauSystem_Main/src/BauSystem_de.properties index 804afa46..83eb053e 100644 --- a/BauSystem_Main/src/BauSystem_de.properties +++ b/BauSystem_Main/src/BauSystem_de.properties @@ -1086,6 +1086,7 @@ REGION_TB_DONE=§7Testblock zurückgesetzt REGION_TB_ERROR=§cFehler beim Zurücksetzen des Testblocks REGION_TB_NO_PERMS=§cDu darfst hier nicht den Testblock zurücksetzen REGION_TB_NO_REGION=§cDu befindest dich derzeit in keiner Region +REGION_TB_NOSCHEMSHARING=§cDu hast aktuel einen NoSchemSharing bann REGION_TNT_HELP=§8/§etnt §8- §7Ändere das TNT verhalten REGION_TNT_HELP_MODE=§8/§etnt §8[§7Mode§8] §8- §7Setzte das TNT verhalten auf einen Modus REGION_TNT_ON=§aTNT-Schaden aktiviert diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java index a677e4df..6a1df080 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java @@ -27,6 +27,7 @@ import de.steamwar.bausystem.region.utils.RegionExtensionType; import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.command.*; import de.steamwar.linkage.Linked; +import de.steamwar.sql.Punishment; import de.steamwar.sql.SchematicNode; import de.steamwar.sql.SteamwarUser; import org.bukkit.Bukkit; @@ -85,6 +86,10 @@ public class TestblockCommand extends SWCommand { return; } + if(Punishment.isPunished(SteamwarUser.get(p.getUniqueId()), Punishment.PunishmentType.NoSchemSharing, punishment -> + BauSystem.MESSAGE.send("REGION_TB_NOSCHEMSHARING", p))) + return; + try { region.reset(node, RegionType.TESTBLOCK, regionExtensionType); RegionUtils.message(region, "REGION_TB_DONE");