mcMMO/src/main/java/com/gmail/nossr50/runnables/ProfileSaveTask.java

22 lines
525 B
Java
Raw Normal View History

package com.gmail.nossr50.runnables;
import com.gmail.nossr50.datatypes.PlayerProfile;
import com.gmail.nossr50.util.Users;
public class ProfileSaveTask implements Runnable {
private PlayerProfile playerProfile;
public ProfileSaveTask(PlayerProfile playerProfile) {
this.playerProfile = playerProfile;
}
@Override
public void run() {
playerProfile.save();
if (!playerProfile.getPlayer().isOnline()) {
2012-06-25 14:36:02 +02:00
Users.remove(playerProfile.getPlayerName());
}
}
}