mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-06 05:51:35 +00:00
Add yet another way to get a user from our users list, Don't teleport an offline player when jailed
Added playerjoin to jaillistener to teleport a player on login
This commit is contained in:
parent
7aea8a3fce
commit
81cc5b1f28
6 changed files with 38 additions and 4 deletions
|
@ -41,6 +41,15 @@ public abstract class EssentialsCommand implements IEssentialsCommand
|
|||
protected User getPlayer(Server server, String[] args, int pos, boolean getOffline) throws NoSuchFieldException, NotEnoughArgumentsException
|
||||
{
|
||||
if (args.length <= pos) throw new NotEnoughArgumentsException();
|
||||
User user = ess.getAllUsers().get(args[pos]);
|
||||
if (user != null)
|
||||
{
|
||||
if(user.isHidden())
|
||||
{
|
||||
throw new NoSuchFieldException(Util.i18n("playerNotFound"));
|
||||
}
|
||||
return user;
|
||||
}
|
||||
List<Player> matches = server.matchPlayer(args[pos]);
|
||||
|
||||
if (matches.size() < 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue