From f71904c52214808f1794c34b6c7a9d61812454c9 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Sun, 24 Apr 2016 19:53:49 +0200 Subject: [PATCH] Added another way to set non-presser or can't press flairs --- src/tk/sznp/thebuttonautoflair/Commands.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/tk/sznp/thebuttonautoflair/Commands.java b/src/tk/sznp/thebuttonautoflair/Commands.java index ecec4de..9d1d179 100644 --- a/src/tk/sznp/thebuttonautoflair/Commands.java +++ b/src/tk/sznp/thebuttonautoflair/Commands.java @@ -507,12 +507,19 @@ public class Commands implements CommandExecutor { return; } short flairtime = 0x00; - try { - flairtime = Short.parseShort(args[3]); - } catch (Exception e) { - SendMessage(player, "§cFlairtime must be a number."); - return; - } + if (args[3].equalsIgnoreCase("non-presser")) + flairtime = MaybeOfflinePlayer.FlairTimeNonPresser; + else if (args[3].equalsIgnoreCase("cant-press")) + flairtime = MaybeOfflinePlayer.FlairTimeCantPress; + else { + try { + flairtime = Short.parseShort(args[3]); + } catch (Exception e) { + SendMessage(player, + "§cFlairtime must be a number or \"non-presser\", \"cant-press\"."); + return; + } + } //TODO: Split config to per-player boolean cheater = false; if (args[4].equalsIgnoreCase("true")) cheater = true;