mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Command format & permission changes, other minor cleanup.
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user