mirror of
https://github.com/essentials/Essentials.git
synced 2025-09-29 23:59:06 +02:00
Fixes for XMPP: display minecraft username for players that have set their address using /setxmpp, others will have the jabber address next to the message
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1576 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
@@ -85,7 +85,7 @@ public class XMPPManager extends Handler implements MessageListener, ChatManager
|
||||
sendCommand(chat, message);
|
||||
break;
|
||||
default:
|
||||
parent.getServer().broadcastMessage("<XMPP:" + StringUtils.parseBareAddress(chat.getParticipant()) + "> " + message);
|
||||
parent.getServer().broadcastMessage("<X:" + EssentialsXMPP.getInstance().getUserByAddress(StringUtils.parseBareAddress(chat.getParticipant())) + "> " + message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -258,10 +258,10 @@ public class XMPPManager extends Handler implements MessageListener, ChatManager
|
||||
}
|
||||
else
|
||||
{
|
||||
final String from = "[X:" + EssentialsXMPP.getInstance().getUserByAddress(StringUtils.parseBareAddress(chat.getParticipant())) + ">";
|
||||
for (Player p : matches)
|
||||
{
|
||||
|
||||
p.sendMessage("[" +StringUtils.parseBareAddress(chat.getParticipant()) + ">" + p.getDisplayName() + "] " + message);
|
||||
p.sendMessage(from + p.getDisplayName() + "] " + message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user