diff --git a/TheButtonAutoFlair.jar b/TheButtonAutoFlair.jar index edc5990..2a9f1c3 100644 Binary files a/TheButtonAutoFlair.jar and b/TheButtonAutoFlair.jar differ diff --git a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/Commands.java b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/Commands.java index 35b76e6..1b69d2b 100644 --- a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/Commands.java +++ b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/Commands.java @@ -111,21 +111,24 @@ public class Commands implements CommandExecutor { break; } case "ignore": { - if (p.FlairState.equals(FlairStates.NoComment)) { - player.sendMessage("§cError: You need to write your username to the reddit thread at /r/TheButtonMinecraft§r"); - return true; - } - if (p.FlairState.equals(FlairStates.Commented)) { - player.sendMessage("Sorry, but your flair isn't recorded. Please ask a mod to set it for you."); - return true; - } - if (!p.FlairState.equals(FlairStates.Ignored)) { - p.FlairState = FlairStates.Ignored; - p.SetFlairTime(""); - p.UserName = ""; - player.sendMessage("§bYou have removed your flair. You can still use /u accept to get one.§r"); - } else - player.sendMessage("§cYou already removed your flair.§r"); + /* + * if (p.FlairState.equals(FlairStates.NoComment)) { + * player.sendMessage( + * "§cError: You need to write your username to the reddit thread at /r/TheButtonMinecraft§r" + * ); return true; } if + * (p.FlairState.equals(FlairStates.Commented)) { + * player.sendMessage( + * "Sorry, but your flair isn't recorded. Please ask a mod to set it for you." + * ); return true; } if + * (!p.FlairState.equals(FlairStates.Ignored)) { + * p.FlairState = FlairStates.Ignored; p.SetFlairTime(""); + * p.UserName = ""; player.sendMessage( + * "§bYou have removed your flair. You can still use /u accept to get one.§r" + * ); } else + * player.sendMessage("§cYou already removed your flair.§r" + * ); + */ + player.sendMessage("§cSorry, but ignoring the flair is no longer possible. As with the original Button, you can't undo what already happened."); break; } case "admin": // 2015.08.09. @@ -365,12 +368,21 @@ public class Commands implements CommandExecutor { private static void SetPlayerFlair(Player player, MaybeOfflinePlayer targetplayer, short flaircolor, String flairtime) { - targetplayer.SetFlair(flaircolor, flairtime); - targetplayer.FlairState = FlairStates.Accepted; - targetplayer.UserName = ""; - SendMessage(player, - "§bThe flair has been set. Player: " + targetplayer.PlayerName - + " Flair: " + targetplayer.GetFormattedFlair() + "§r"); + if (targetplayer.GetFlairColor() == 0x00 || flairtime.length() > 0) { + targetplayer.SetFlair(flaircolor, flairtime); + targetplayer.FlairState = FlairStates.Accepted; + targetplayer.UserName = ""; + SendMessage(player, + "§bThe flair has been set. Player: " + + targetplayer.PlayerName + " Flair: " + + targetplayer.GetFormattedFlair() + "§r"); + } else { + SendMessage( + player, + "§cSorry, but you can't change an existing flair. (Use -- as time to set non-presser or can't press)"); + SendMessage(Bukkit.getPlayer(targetplayer.UUID), + "§cYour flair cannot be changed."); + } } private static void DoSetFlair(Player player, String[] args) { diff --git a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java index bb53e55..4f86cd8 100644 --- a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java +++ b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java @@ -201,7 +201,7 @@ public class PlayerListener implements Listener { // 2015.07.16. color = String.format( "§%x", (mp.GetFlairColor() == 0x00 ? 0xb : mp - .GetFlairColor())); // TODO: Quiz queue + .GetFlairColor())); } message = message.replaceAll( diff --git a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/Commands$2.class b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/Commands$2.class index 3446fc8..54f0041 100644 Binary files a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/Commands$2.class and b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/Commands$2.class differ diff --git a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/Commands.class b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/Commands.class index 902f455..6a96d2c 100644 Binary files a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/Commands.class and b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/Commands.class differ