mirror of
https://github.com/essentials/Essentials.git
synced 2025-10-02 00:56:55 +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:
@@ -36,6 +36,19 @@ public class UserManager implements IConf
|
||||
{
|
||||
return users.getString(username.toLowerCase() + "." + ADDRESS, null);
|
||||
}
|
||||
|
||||
public final String getUserByAddress(final String search)
|
||||
{
|
||||
final List<String> usernames = users.getKeys(null);
|
||||
for (String username : usernames)
|
||||
{
|
||||
final String address = users.getString(username + "." + ADDRESS, null);
|
||||
if (address != null && search.equalsIgnoreCase(address)) {
|
||||
return username;
|
||||
}
|
||||
}
|
||||
return search;
|
||||
}
|
||||
|
||||
public void setAddress(final String username, final String address)
|
||||
{
|
||||
|
Reference in New Issue
Block a user