mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Made things cleaner
This commit is contained in:
@ -3,7 +3,6 @@ package com.gmail.nossr50.runnables;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.util.Database;
|
||||
import com.gmail.nossr50.util.Users;
|
||||
|
||||
@ -19,11 +18,9 @@ public class SQLReconnect implements Runnable {
|
||||
if (!Database.isConnected()) {
|
||||
Database.connect();
|
||||
if (Database.isConnected()) {
|
||||
for (PlayerProfile playerProfile : Users.getProfiles().values()) {
|
||||
playerProfile.save(); //Save all profiles
|
||||
}
|
||||
Users.saveAll(); //Save all profiles
|
||||
Users.clearAll(); //Clear the profiles
|
||||
|
||||
Users.clearUsers(); //Clear the profiles
|
||||
for (Player player : plugin.getServer().getOnlinePlayers()) {
|
||||
Users.addUser(player); //Add in new profiles, forcing them to 'load' again from MySQL
|
||||
}
|
||||
|
Reference in New Issue
Block a user