diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java index be665e4..31bc672 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java @@ -181,12 +181,21 @@ public class SchematicCommand extends SWCommand { @Register("addmember") public void addMember(Player player, SchematicNode node, SteamwarUser... targets) { SteamwarUser user = getUser(player); + if(Punishment.isPunished(user, Punishment.PunishmentType.NoSchemSharing, punishment -> player.sendMessage(SchematicSystem.PREFIX + "§cDu darfst niemanden auf deine Schematics hinzufügen: §f§l" + punishment.getReason()))) { + return; + } if (node.getOwner() != user.getId()) { player.sendMessage(SchematicSystem.PREFIX + "§cDu kannst nur auf deine eigenen Sachen jemanden hinzufügen."); return; } List added = new ArrayList<>(); for (SteamwarUser target: targets) { + if(Punishment.isPunished(target, + Punishment.PunishmentType.NoSchemReceiving, + punishment -> player.sendMessage(SchematicSystem.PREFIX + "§c" + target.getUserName() + " darf nicht auf Schematics hinzugefügt werden."))) { + continue; + } + if (user.getId() == target.getId()) { player.sendMessage(SchematicSystem.PREFIX + "§cAlso bitte: Das ist deine eigene Schematic!"); continue; diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommandUtils.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommandUtils.java index 8b4e551..9cc41f7 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommandUtils.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommandUtils.java @@ -322,6 +322,11 @@ public class SchematicCommandUtils { public static void changeType(Player player, SchematicNode node, SchematicType type, SchematicCommand.Extend extend) { SteamwarUser user = getUser(player); + if(Punishment.isPunished(user, + Punishment.PunishmentType.NoSchemSubmitting, + punishment -> player.sendMessage(SchematicSystem.PREFIX + "§cDu darf keine Schematics einsenden: §f§l: " + punishment.getReason()))) { + return; + } if (node.getOwner() != user.getId()) { player.sendMessage(SchematicSystem.PREFIX + "§cDu kannst nur deine eigenen Schematics einsenden."); return;