WebChat enhancement and fixes
Added Spam Message config Internal server now replies a spam message Fixed getting webchat-interval to get int rather than double then cast Fixed holding down "enter" on the empty chat line would spam chat attempts Fixed so jsonip.appspot query is only done once
This commit is contained in:
parent
62023f1d31
commit
9c799c71a2
6 changed files with 48 additions and 30 deletions
|
|
@ -145,7 +145,8 @@ public class DynmapPlugin extends JavaPlugin {
|
|||
|
||||
if (configuration.getNode("web").getBoolean("allowwebchat", false)) {
|
||||
SendMessageHandler messageHandler = new SendMessageHandler() {{
|
||||
maximumMessageInterval = (int)(configuration.getNode("web").getDouble("webchat-interval", 1.0) * 1000);
|
||||
maximumMessageInterval = (configuration.getNode("web").getInt("webchat-interval", 1) * 1000);
|
||||
spamMessage = "\""+configuration.getNode("web").getString("spammessage", "You may only chat once every %interval% seconds.")+"\"";
|
||||
onMessageReceived.addListener(new Listener<SendMessageHandler.Message>() {
|
||||
@Override
|
||||
public void triggered(Message t) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue