13
0

Add Schem Download to Punishments
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Chaoscaot <chaoscaot444@gmail.com>
Dieser Commit ist enthalten in:
Chaoscaot 2022-01-04 14:15:28 +01:00
Ursprung 7a6b22d832
Commit e58ad971f6

Datei anzeigen

@ -311,6 +311,11 @@ public class SchematicCommandUtils {
public static void download(Player player, SchematicNode node) { public static void download(Player player, SchematicNode node) {
SteamwarUser user = getUser(player); 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()) { if (node.getOwner() != user.getId()) {
player.sendMessage("§cDu darfst nur deine eigenen Schematics herunterladen!"); player.sendMessage("§cDu darfst nur deine eigenen Schematics herunterladen!");
return; return;