forked from Upstream/mmocore
!Made important method private to avoid confusion
This commit is contained in:
parent
51e2bdea06
commit
280b48b857
@ -305,7 +305,7 @@ public class MMOCore extends JavaPlugin {
|
||||
* the player datas can't recognize what profess the player has and
|
||||
* professes will be lost
|
||||
*/
|
||||
Bukkit.getOnlinePlayers().forEach(player -> PlayerData.setup(player).setPlayer(player));
|
||||
Bukkit.getOnlinePlayers().forEach(player -> PlayerData.setup(player));
|
||||
|
||||
// commands
|
||||
try {
|
||||
|
@ -232,7 +232,7 @@ public class PlayerData {
|
||||
public static PlayerData setup(Player player) {
|
||||
if (!playerData.containsKey(player.getUniqueId()))
|
||||
playerData.put(player.getUniqueId(), new PlayerData(player).load(new ConfigFile(player).getConfig()));
|
||||
return get(player);
|
||||
return get(player).setPlayer(player);
|
||||
}
|
||||
|
||||
public static boolean isLoaded(UUID uuid) {
|
||||
@ -281,7 +281,7 @@ public class PlayerData {
|
||||
* END OF EXPERIMENTAL CODE
|
||||
*/
|
||||
|
||||
public PlayerData setPlayer(Player player) {
|
||||
private PlayerData setPlayer(Player player) {
|
||||
this.player = player;
|
||||
this.lastLogin = System.currentTimeMillis();
|
||||
return this;
|
||||
|
@ -32,7 +32,7 @@ public class PlayerListener implements Listener {
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void a(PlayerJoinEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
PlayerData pd = PlayerData.setup(player).setPlayer(player); pd.getStats().updateAll();
|
||||
PlayerData.setup(player).getStats().updateAll();
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user