From f768a458b8e193e9537976f5572a6b5da768e2b0 Mon Sep 17 00:00:00 2001 From: Leo Garbe Date: Thu, 26 Mar 2020 19:33:38 +0100 Subject: [PATCH] Command usage and message fixes --- src/main/java/me/leoko/advancedban/utils/Command.java | 6 +++--- .../advancedban/utils/commands/RevokeByIdProcessor.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/me/leoko/advancedban/utils/Command.java b/src/main/java/me/leoko/advancedban/utils/Command.java index f67c999a..c314efce 100644 --- a/src/main/java/me/leoko/advancedban/utils/Command.java +++ b/src/main/java/me/leoko/advancedban/utils/Command.java @@ -30,7 +30,7 @@ public enum Command { TEMP_BAN( PunishmentType.TEMP_BAN.getPerms(), - "\\S+ [1-9][0-9]*([wdhms]|mo)( .*)?", + "\\S+ ([1-9][0-9]*([wdhms]|mo)|#.+)( .*)?", new PunishmentProcessor(PunishmentType.TEMP_BAN), PunishmentType.TEMP_BAN.getConfSection("Usage"), "tempban"), @@ -51,7 +51,7 @@ public enum Command { TEMP_MUTE( PunishmentType.TEMP_MUTE.getPerms(), - "\\S+ [1-9][0-9]*([wdhms]|mo)( .*)?", + "\\S+ ([1-9][0-9]*([wdhms]|mo)|#.+)( .*)?", new PunishmentProcessor(PunishmentType.TEMP_MUTE), PunishmentType.TEMP_MUTE.getConfSection("Usage"), "tempmute"), @@ -65,7 +65,7 @@ public enum Command { TEMP_WARN( PunishmentType.TEMP_WARNING.getPerms(), - "\\S+ [1-9][0-9]*([wdhms]|mo)( .*)?", + "\\S+ ([1-9][0-9]*([wdhms]|mo)|#.+)( .*)?", new PunishmentProcessor(PunishmentType.TEMP_WARNING), PunishmentType.TEMP_WARNING.getConfSection("Usage"), "tempwarn"), diff --git a/src/main/java/me/leoko/advancedban/utils/commands/RevokeByIdProcessor.java b/src/main/java/me/leoko/advancedban/utils/commands/RevokeByIdProcessor.java index 5136ba94..ce0654e2 100644 --- a/src/main/java/me/leoko/advancedban/utils/commands/RevokeByIdProcessor.java +++ b/src/main/java/me/leoko/advancedban/utils/commands/RevokeByIdProcessor.java @@ -23,7 +23,7 @@ public void accept(Command.CommandInput input) { Punishment punishment = resolver.apply(id); if (punishment == null) { - MessageManager.sendMessage(input.getSender(), path + ".NotPunished", + MessageManager.sendMessage(input.getSender(), path + ".NotFound", true, "ID", id + ""); return; }