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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user