mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-29 19:41:50 +01:00
Fix save task
This commit is contained in:
parent
a3bf2d4e51
commit
d74ce4ae81
@ -330,13 +330,13 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void scheduleSaveTask(int delay) {
|
private void scheduleSaveTask(int delay) {
|
||||||
Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
|
Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
storeNPCs();
|
storeNPCs();
|
||||||
saves.saveToDisk();
|
saves.saveToDisk();
|
||||||
}
|
}
|
||||||
});
|
}, delay, delay);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupEconomy() {
|
private void setupEconomy() {
|
||||||
@ -418,9 +418,10 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
|
|||||||
boolean async = args.hasFlag('a');
|
boolean async = args.hasFlag('a');
|
||||||
if (async) {
|
if (async) {
|
||||||
saves.saveToDisk();
|
saves.saveToDisk();
|
||||||
} else
|
} else {
|
||||||
saves.saveToDiskImmediate();
|
saves.saveToDiskImmediate();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private boolean suggestClosestModifier(CommandSender sender, String command, String modifier) {
|
private boolean suggestClosestModifier(CommandSender sender, String command, String modifier) {
|
||||||
String closest = commands.getClosestCommandModifier(command, modifier);
|
String closest = commands.getClosestCommandModifier(command, modifier);
|
||||||
|
Loading…
Reference in New Issue
Block a user