mirror of
https://github.com/xHyroM/lighteco.git
synced 2024-11-10 01:18:07 +01:00
feat: saveInternal in config
This commit is contained in:
parent
63dc921539
commit
0c35ff18b0
3 changed files with 4 additions and 12 deletions
|
@ -17,6 +17,9 @@ public class Config extends OkaeriConfig {
|
|||
@Comment("Storage settings.")
|
||||
public StorageConfig storage = new StorageConfig();
|
||||
|
||||
@Comment("Save interval to storage in seconds.")
|
||||
public long saveInterval = 5L;
|
||||
|
||||
@Comment("Messages")
|
||||
public MessageConfig messages = new MessageConfig();
|
||||
}
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
package dev.xhyrom.lighteco.common.model.currency;
|
||||
|
||||
import dev.xhyrom.lighteco.common.model.user.User;
|
||||
import dev.xhyrom.lighteco.common.plugin.LightEcoPlugin;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public class Currency {
|
||||
private final LightEcoPlugin plugin;
|
||||
|
@ -39,11 +35,4 @@ public class Currency {
|
|||
public int fractionalDigits() {
|
||||
return proxy.fractionalDigits();
|
||||
}
|
||||
|
||||
public List<User> getTopUsers(int length) {
|
||||
List<User> users = new ArrayList<>();
|
||||
users.add(new User(plugin, new UUID(0, 0)));
|
||||
|
||||
return users;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public abstract class AbstractLightEcoPlugin implements LightEcoPlugin {
|
|||
LightEcoProvider.set(this.api);
|
||||
this.registerApiOnPlatform(this.api);
|
||||
|
||||
this.getBootstrap().getScheduler().asyncRepeating(new UserSaveTask(this), 3, TimeUnit.SECONDS);
|
||||
this.getBootstrap().getScheduler().asyncRepeating(new UserSaveTask(this), this.config.saveInterval, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
public final void disable() {
|
||||
|
|
Loading…
Reference in a new issue