mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-01-03 06:37:47 +01:00
New util method
This commit is contained in:
parent
9ffb28d69c
commit
1fc3c4a638
@ -366,14 +366,17 @@ public class PlayerData extends SynchronizedDataHolder implements Closeable {
|
||||
return mmoData.getCooldownMap().getInfo(ref).getRemaining() / 1000d;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static PlayerData get(@NotNull MMOPlayerData playerData) {
|
||||
return get(playerData.getPlayer());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static PlayerData get(@NotNull OfflinePlayer player) {
|
||||
return get(player.getUniqueId());
|
||||
}
|
||||
|
||||
/**
|
||||
* See {@link #has(UUID)}
|
||||
*
|
||||
* @return If player data is loaded for a player
|
||||
*/
|
||||
public static boolean has(Player player) {
|
||||
|
Loading…
Reference in New Issue
Block a user