Added removing obfuscated chars from names, delivered reactions are more reliable, added linking to the PR on plugin autoupdate, a fix #24

Merged
NorbiPeti merged 6 commits from dev into master 2016-12-31 17:51:53 +00:00
2 changed files with 8 additions and 1 deletions
Showing only changes of commit 7d813e8d59 - Show all commits

View file

@ -60,6 +60,7 @@ public class MCChatListener implements Listener, IListener<MessageReceivedEvent>
public static final HashMap<String, DiscordSender> UnconnectedSenders = new HashMap<>();
public static final HashMap<String, DiscordPlayerSender> ConnectedSenders = new HashMap<>();
public static short ListC = 0;
public static void resetLastMessage() {
lastmessage = null;
@ -114,7 +115,12 @@ public class MCChatListener implements Listener, IListener<MessageReceivedEvent>
+ DiscordPlugin.botchannel.mention());
return;
}
Bukkit.dispatchCommand(dsender, cmd);
if (cmd.equals("list") && Bukkit.getOnlinePlayers().size() == 0 && ListC++ > 2) // Lowered already
{
dsender.sendMessage("Stop it. You know the answer.");
ListC = 0;
} else
Bukkit.dispatchCommand(dsender, cmd);
} else
TBMCChatAPI.SendChatMessage(Channel.GlobalChat, dsender,
dmessage + (event.getMessage().getAttachments().size() > 0 ? "\n" + event.getMessage()

View file

@ -29,6 +29,7 @@ public class MCListener implements Listener {
}
DiscordPlugin.sendMessageToChannel(DiscordPlugin.chatchannel,
e.GetPlayer().getPlayerName() + " joined the game");
MCChatListener.ListC = 0;
}
@EventHandler