1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-30 09:49:51 +02:00

Some user matching updates

This commit is contained in:
ementalo
2012-07-20 12:12:21 +01:00
parent ea1cce76f9
commit 26e5b52c26
60 changed files with 172 additions and 201 deletions

View File

@@ -24,7 +24,7 @@ public class Commandxmpp extends EssentialsCommand
else
{
final String message = getFinalArg(args, 1);
final String senderName = sender instanceof Player ? ess.getUser((Player)sender).getDisplayName() : Console.NAME;
final String senderName = sender instanceof Player ? ess.getUserMap().getUser((Player)sender).getDisplayName() : Console.NAME;
sender.sendMessage("[" + senderName + ">" + address + "] " + message);
if (!EssentialsXMPP.getInstance().sendMessage(address, "[" + senderName + "] " + message))
{

View File

@@ -92,7 +92,7 @@ public class EssentialsXMPP extends JavaPlugin implements IEssentialsXMPP
public IUser getUserByAddress(final String address)
{
String username = instance.users.getUserByAddress(address);
return username == null ? null : ess.getUser(username);
return username == null ? null : ess.getUserMap().getUser(username);
}
@Override

View File

@@ -23,21 +23,21 @@ class EssentialsXMPPPlayerListener implements Listener
@EventHandler(priority= EventPriority.MONITOR)
public void onPlayerJoin(final PlayerJoinEvent event)
{
final IUser user = ess.getUser(event.getPlayer());
final IUser user = ess.getUserMap().getUser(event.getPlayer());
sendMessageToSpyUsers("Player " + user.getDisplayName() + " joined the game");
}
@EventHandler(priority= EventPriority.MONITOR)
public void onPlayerChat(final PlayerChatEvent event)
{
final IUser user = ess.getUser(event.getPlayer());
final IUser user = ess.getUserMap().getUser(event.getPlayer());
sendMessageToSpyUsers(String.format(event.getFormat(), user.getDisplayName(), event.getMessage()));
}
@EventHandler(priority= EventPriority.MONITOR)
public void onPlayerQuit(final PlayerQuitEvent event)
{
final IUser user = ess.getUser(event.getPlayer());
final IUser user = ess.getUserMap().getUser(event.getPlayer());
sendMessageToSpyUsers("Player " + user.getDisplayName() + " left the game");
}