mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Fix banning random player (and all other commands where a empty player is given)
This commit is contained in:
parent
b21b7b7e15
commit
c70700f7b8
1 changed files with 4 additions and 0 deletions
|
@ -47,6 +47,10 @@ public abstract class EssentialsCommand implements IEssentialsCommand
|
||||||
{
|
{
|
||||||
throw new NotEnoughArgumentsException();
|
throw new NotEnoughArgumentsException();
|
||||||
}
|
}
|
||||||
|
if (args[0].isEmpty())
|
||||||
|
{
|
||||||
|
throw new NoSuchFieldException(_("playerNotFound"));
|
||||||
|
}
|
||||||
final User user = ess.getUser(args[pos]);
|
final User user = ess.getUser(args[pos]);
|
||||||
if (user != null)
|
if (user != null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue