Added laughs to /unlaugh and fixed it
This commit is contained in:
parent
3c3637f6ff
commit
5bbe8e12d5
8 changed files with 14 additions and 5 deletions
Binary file not shown.
|
@ -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")) {
|
||||
} 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()));
|
||||
|
|
|
@ -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.
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue