mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-05 20:12:54 +00:00
Reduce calls to bukkit getPlayer();
This commit is contained in:
parent
0bc33554f3
commit
48d04216a7
4 changed files with 17 additions and 64 deletions
|
@ -8,7 +8,6 @@ import com.earth2me.essentials.Util;
|
|||
import java.io.File;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -72,17 +71,7 @@ public final class Economy
|
|||
{
|
||||
throw new RuntimeException(noCallBeforeLoad);
|
||||
}
|
||||
User user;
|
||||
Player player = ess.getServer().getPlayer(name);
|
||||
if (player != null)
|
||||
{
|
||||
user = ess.getUser(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
user = ess.getOfflineUser(name);
|
||||
}
|
||||
return user;
|
||||
return ess.getUser(name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue