Testing autoupdate improvements
This commit is contained in:
parent
7aeff53967
commit
7d813e8d59
2 changed files with 8 additions and 1 deletions
|
@ -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, DiscordSender> UnconnectedSenders = new HashMap<>();
|
||||||
public static final HashMap<String, DiscordPlayerSender> ConnectedSenders = new HashMap<>();
|
public static final HashMap<String, DiscordPlayerSender> ConnectedSenders = new HashMap<>();
|
||||||
|
public static short ListC = 0;
|
||||||
|
|
||||||
public static void resetLastMessage() {
|
public static void resetLastMessage() {
|
||||||
lastmessage = null;
|
lastmessage = null;
|
||||||
|
@ -114,7 +115,12 @@ public class MCChatListener implements Listener, IListener<MessageReceivedEvent>
|
||||||
+ DiscordPlugin.botchannel.mention());
|
+ DiscordPlugin.botchannel.mention());
|
||||||
return;
|
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
|
} else
|
||||||
TBMCChatAPI.SendChatMessage(Channel.GlobalChat, dsender,
|
TBMCChatAPI.SendChatMessage(Channel.GlobalChat, dsender,
|
||||||
dmessage + (event.getMessage().getAttachments().size() > 0 ? "\n" + event.getMessage()
|
dmessage + (event.getMessage().getAttachments().size() > 0 ? "\n" + event.getMessage()
|
||||||
|
|
|
@ -29,6 +29,7 @@ public class MCListener implements Listener {
|
||||||
}
|
}
|
||||||
DiscordPlugin.sendMessageToChannel(DiscordPlugin.chatchannel,
|
DiscordPlugin.sendMessageToChannel(DiscordPlugin.chatchannel,
|
||||||
e.GetPlayer().getPlayerName() + " joined the game");
|
e.GetPlayer().getPlayerName() + " joined the game");
|
||||||
|
MCChatListener.ListC = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
|
Loading…
Reference in a new issue