From e58ad971f6090636034d6ff9dcb3b1cc55a35d03 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Tue, 4 Jan 2022 14:15:28 +0100 Subject: [PATCH] Add Schem Download to Punishments Signed-off-by: Chaoscaot --- .../schematicsystem/commands/SchematicCommandUtils.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommandUtils.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommandUtils.java index 9cc41f7..ad71001 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommandUtils.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommandUtils.java @@ -311,6 +311,11 @@ public class SchematicCommandUtils { public static void download(Player player, SchematicNode node) { SteamwarUser user = getUser(player); + if(Punishment.isPunished(user, Punishment.PunishmentType.NoSchemSharing, punishment -> { + player.sendMessage(SchematicSystem.PREFIX + "§cDu darf keine Schematics Downloaden: §f§l" + punishment.getReason()); + })) { + return; + } if (node.getOwner() != user.getId()) { player.sendMessage("§cDu darfst nur deine eigenen Schematics herunterladen!"); return;