diff --git a/TheButtonAutoFlair.jar b/TheButtonAutoFlair.jar index 8aed419..aa587e2 100644 Binary files a/TheButtonAutoFlair.jar and b/TheButtonAutoFlair.jar differ diff --git a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java index e286ef4..3a046e8 100644 --- a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java +++ b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java @@ -137,6 +137,8 @@ public class PlayerListener implements Listener { // 2015.07.16. public static boolean ShowRPTag = false; private Essentials essentials = null; + private final String[] LaughStrings = new String[] { "xd", "lel", "lawl", + "kek" }; @EventHandler public void onPlayerChat(AsyncPlayerChatEvent event) { @@ -160,10 +162,15 @@ public class PlayerListener implements Listener { // 2015.07.16. Commands.Lastlol = MaybeOfflinePlayer.AllPlayers.get(event .getPlayer().getUniqueId()); Commands.Lastlolornot = true; - } else if (msg.contains("xd") || msg.contains("lel")) { - Commands.Lastlol = MaybeOfflinePlayer.AllPlayers.get(event - .getPlayer().getUniqueId()); - Commands.Lastlolornot = false; + } else { + for (int i = 0; i < LaughStrings.length; i++) { + if (msg.contains(LaughStrings[i])) { + Commands.Lastlol = MaybeOfflinePlayer.AllPlayers.get(event + .getPlayer().getUniqueId()); + Commands.Lastlolornot = false; + break; + } + } } MaybeOfflinePlayer player = MaybeOfflinePlayer.AllPlayers.get(event @@ -272,7 +279,8 @@ public class PlayerListener implements Listener { // 2015.07.16. json.append(String .format("{\"text\":\"[%s]%s\",\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"Copy message\",\"color\":\"blue\"}},clickEvent:{\"action\":\"suggest_command\",\"value\":\"%s\"}},", player.CurrentChannel.DisplayName, - (!player.RPMode ? "[OOC]" : ""), event.getMessage().replace("\"", "\\\""))); + (!player.RPMode ? "[OOC]" : ""), event.getMessage() + .replace("\"", "\\\""))); json.append("{\"text\":\" <\"},"); json.append(String.format("{\"text\":\"%s%s\",", event.getPlayer() .getDisplayName(), player.GetFormattedFlair())); diff --git a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PluginMain.java b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PluginMain.java index c2b650a..ac6c190 100644 --- a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PluginMain.java +++ b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PluginMain.java @@ -82,6 +82,7 @@ public class PluginMain extends JavaPlugin { // Translated to Java: 2015.07.15. this.getCommand("ooc").setUsage( this.getCommand("ooc").getUsage().replace('&', '§')); this.getCommand("unlol").setExecutor(comm); + this.getCommand("unlaugh").setExecutor(comm); Instance = this; // 2015.08.08. Console = this.getServer().getConsoleSender(); // 2015.08.12. LoadFiles(false); // 2015.08.09. diff --git a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener$2.class b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener$2.class index 508dc64..8c04fdb 100644 Binary files a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener$2.class and b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener$2.class differ diff --git a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener.class b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener.class index 7e471ee..ad814bc 100644 Binary files a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener.class and b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PlayerListener.class differ diff --git a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PluginMain$1.class b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PluginMain$1.class index 8eb29e8..5d9c002 100644 Binary files a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PluginMain$1.class and b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PluginMain$1.class differ diff --git a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PluginMain$2.class b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PluginMain$2.class index c13d878..96c364d 100644 Binary files a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PluginMain$2.class and b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PluginMain$2.class differ diff --git a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PluginMain.class b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PluginMain.class index a2886c4..2fdfb55 100644 Binary files a/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PluginMain.class and b/TheButtonAutoFlair/target/classes/tk/sznp/thebuttonautoflair/PluginMain.class differ