Command format & permission changes, other minor cleanup.

This commit is contained in:
GJ
2012-04-29 22:58:54 -04:00
parent 67de70432c
commit 064fc0a8e2
11 changed files with 113 additions and 63 deletions

View File

@ -5,16 +5,15 @@ import org.bukkit.entity.Player;
import com.gmail.nossr50.util.Users;
public class ProfileSaveTask implements Runnable {
Player player = null;
public ProfileSaveTask(Player player) {
this.player = player;
}
@Override
public void run() {
if(player != null) {
if (player != null) {
Users.getProfileByName(player.getName()).save();
}
}

View File

@ -1,10 +1,8 @@
package com.gmail.nossr50.runnables;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.util.Users;
public class SaveTimer implements Runnable {
private final mcMMO plugin;
@ -17,8 +15,9 @@ public class SaveTimer implements Runnable {
public void run() {
//All player data will be saved periodically through this
int count = 1;
for (Player player : plugin.getServer().getOnlinePlayers()) {
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new ProfileSaveTask(player), count);
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new ProfileSaveTask(player), count);
count++;
}
}