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

23 lines
537 B
Java
Raw Normal View History

package com.gmail.nossr50.runnables;
import org.bukkit.entity.Player;
import com.gmail.nossr50.mcMMO;
2012-04-27 11:47:11 +02:00
import com.gmail.nossr50.util.Users;
2012-04-27 11:47:11 +02:00
public class SaveTimer implements Runnable {
private final mcMMO plugin;
2012-04-01 06:11:57 +02:00
2012-04-27 11:47:11 +02:00
public SaveTimer(final mcMMO plugin) {
this.plugin = plugin;
}
2012-04-01 06:11:57 +02:00
@Override
2012-04-01 06:11:57 +02:00
public void run() {
2012-02-09 17:26:57 +01:00
//All player data will be saved periodically through this
2012-04-01 06:11:57 +02:00
for (Player player : plugin.getServer().getOnlinePlayers()) {
2012-02-09 17:26:57 +01:00
Users.getProfile(player).save();
}
}
2012-04-01 06:11:57 +02:00
}