mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-18 08:35:44 +01:00
Allow bans on players who have never connected.
This commit is contained in:
parent
3e06c06827
commit
cdf2c8beed
@ -2,6 +2,7 @@ package com.earth2me.essentials.commands;
|
||||
|
||||
import com.earth2me.essentials.Console;
|
||||
import static com.earth2me.essentials.I18n._;
|
||||
import com.earth2me.essentials.OfflinePlayer;
|
||||
import com.earth2me.essentials.User;
|
||||
import java.util.logging.Level;
|
||||
import org.bukkit.Server;
|
||||
@ -23,7 +24,15 @@ public class Commandban extends EssentialsCommand
|
||||
{
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
final User user = getPlayer(server, args, 0, true);
|
||||
User user;
|
||||
try
|
||||
{
|
||||
user = getPlayer(server, args, 0, true);
|
||||
}
|
||||
catch (NoSuchFieldException e)
|
||||
{
|
||||
user = ess.getUser(new OfflinePlayer(args[0], ess));
|
||||
}
|
||||
if (!user.isOnline())
|
||||
{
|
||||
if (sender instanceof Player
|
||||
|
Loading…
Reference in New Issue
Block a user