mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-13 11:41:24 +01:00
Merge branch 'master' of github.com:essentials/Essentials
This commit is contained in:
commit
dab37c7b5b
@ -33,7 +33,9 @@ public class Commandxmpp extends EssentialsCommand
|
||||
final String message = getFinalArg(args, 1);
|
||||
final String senderName = sender instanceof Player ? ess.getUser(sender).getDisplayName() : Console.NAME;
|
||||
sender.sendMessage("[" + senderName + ">" + address + "] " + message);
|
||||
EssentialsXMPP.getInstance().sendMessage(address, "[" + senderName + "] " + message);
|
||||
if (!EssentialsXMPP.getInstance().sendMessage(address, "[" + senderName + "] " + message)) {
|
||||
sender.sendMessage("§cError sending message.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -103,15 +103,15 @@ public class EssentialsXMPP extends JavaPlugin implements IEssentialsXMPP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMessage(final Player user, final String message)
|
||||
public boolean sendMessage(final Player user, final String message)
|
||||
{
|
||||
instance.xmpp.sendMessage(instance.users.getAddress(user.getName()), message);
|
||||
return instance.xmpp.sendMessage(instance.users.getAddress(user.getName()), message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMessage(final String address, final String message)
|
||||
public boolean sendMessage(final String address, final String message)
|
||||
{
|
||||
instance.xmpp.sendMessage(address, message);
|
||||
return instance.xmpp.sendMessage(address, message);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -15,9 +15,9 @@ public interface IEssentialsXMPP
|
||||
|
||||
String getUserByAddress(final String address);
|
||||
|
||||
void sendMessage(final Player user, final String message);
|
||||
boolean sendMessage(final Player user, final String message);
|
||||
|
||||
void sendMessage(final String address, final String message);
|
||||
boolean sendMessage(final String address, final String message);
|
||||
|
||||
void setAddress(final Player user, final String address);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user