mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-10-05 16:24:47 +00:00
Make sure player is online when sending a /reply.
This commit is contained in:
parent
8f0350570e
commit
735f9ce212
|
@ -53,7 +53,7 @@ public class Commandr extends EssentialsCommand
|
||||||
final CommandSender target = replyTo.getReplyTo();
|
final CommandSender target = replyTo.getReplyTo();
|
||||||
final String targetName = target instanceof Player ? ((Player)target).getDisplayName() : Console.NAME;
|
final String targetName = target instanceof Player ? ((Player)target).getDisplayName() : Console.NAME;
|
||||||
|
|
||||||
if (target == null)
|
if (target == null || ((target instanceof Player) && ((Player)target).isOnline()))
|
||||||
{
|
{
|
||||||
throw new Exception(_("foreverAlone"));
|
throw new Exception(_("foreverAlone"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue