mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2024-12-04 14:03:24 +01:00
Implement getMinepacksPlayerLoadedOnly
This commit is contained in:
parent
deb5232edb
commit
e7d324537d
@ -182,6 +182,11 @@ public void onPlayerLoginEvent(final @NotNull PlayerJoinEvent event)
|
||||
return player;
|
||||
}
|
||||
|
||||
public @Nullable MinepacksPlayerExtended getPlayerCached(final @NotNull OfflinePlayer offlinePlayer)
|
||||
{
|
||||
return cache.getCachedPlayer(offlinePlayer.getUniqueId());
|
||||
}
|
||||
|
||||
// DB Functions
|
||||
public void saveBackpack(final @NotNull Backpack backpack)
|
||||
{
|
||||
|
@ -331,7 +331,9 @@ public void getMinepacksPlayer(final @NotNull OfflinePlayer player, final @NotNu
|
||||
|
||||
@Override
|
||||
public @Nullable MinepacksPlayerExtended getMinepacksPlayerLoadedOnly(@NotNull OfflinePlayer player)
|
||||
{//TODO
|
||||
{
|
||||
MinepacksPlayerExtended mpPlayer = database.getPlayerCached(player);
|
||||
if(mpPlayer != null && mpPlayer.isLoaded()) return mpPlayer;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user