mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-16 20:44:43 +02:00
Abstract our database operations into a single class.
This allows the logic between SQL and Flatfile to remain more hidden in most cases and makes the code easier to read.
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
package com.gmail.nossr50.runnables.player;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
@ -19,8 +20,10 @@ public class PlayerProfileSaveTask extends BukkitRunnable {
|
||||
public void run() {
|
||||
playerProfile.save();
|
||||
|
||||
if (!mcMMOPlayer.getPlayer().isOnline()) {
|
||||
UserManager.remove(playerProfile.getPlayerName());
|
||||
Player player = mcMMOPlayer.getPlayer();
|
||||
|
||||
if (!player.isOnline()) {
|
||||
UserManager.remove(player.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user