mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-11 18:27:47 +01:00
Add method to DataManager to retrieve data for a Player instance.
This commit is contained in:
parent
53f027c3a3
commit
2d07fa1b5a
@ -482,6 +482,15 @@ public class DataManager implements Listener, INotifyReload, INeedConfig, Compon
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience method, also hiding how player data is stored for a Player instance - always creates a PlayerData instance, if not already present.
|
||||
* @param player
|
||||
* @return
|
||||
*/
|
||||
public static PlayerData getPlayerData(final Player player) {
|
||||
return getPlayerData(player.getName(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param playerName
|
||||
|
Loading…
Reference in New Issue
Block a user