Signed-off-by: Chaoscaot <chaoscaot444@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
884125a62e
Commit
1e04cca2f8
@ -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<SteamwarUser> 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;
|
||||
|
@ -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;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren