1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-09-29 23:59:06 +02:00

Prevent that hidden players broadcast afk messages

Prevent that moving players triggers unafk too early, they can now move within a radius of 3 blocks from the position where they went afk.
This commit is contained in:
snowleo
2011-09-02 16:15:57 +02:00
parent 1b3698283e
commit fb211d722c
15 changed files with 62 additions and 28 deletions

View File

@@ -3,6 +3,7 @@ package com.earth2me.essentials.xmpp;
import com.earth2me.essentials.Console;
import com.earth2me.essentials.EssentialsConf;
import com.earth2me.essentials.IConf;
import com.earth2me.essentials.IUser;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
@@ -101,8 +102,8 @@ public class XMPPManager extends Handler implements MessageListener, ChatManager
sendCommand(chat, message);
break;
default:
final String name = parent.getUserByAddress(StringUtils.parseBareAddress(chat.getParticipant()));
parent.broadcastMessage(name, "="+name+": "+ message);
final IUser sender = parent.getUserByAddress(StringUtils.parseBareAddress(chat.getParticipant()));
parent.broadcastMessage(sender, "="+sender.getDisplayName()+": "+ message);
}
}
}