mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-30 22:53:27 +01:00
remove #childInit
This commit is contained in:
parent
5dec5a54cb
commit
861c1ddd69
@ -81,18 +81,9 @@ abstract class FlatfileDatastore extends Datastore {
|
||||
}
|
||||
|
||||
cleanupUsers();
|
||||
|
||||
try {
|
||||
childInit();
|
||||
} catch (Exception e) {
|
||||
return;
|
||||
}
|
||||
|
||||
setAcceptingLogins(true);
|
||||
}
|
||||
|
||||
protected abstract void childInit() throws Exception;
|
||||
|
||||
private void makeFiles() throws IOException {
|
||||
File data = new File(pluginDir, "data");
|
||||
data.mkdirs();
|
||||
|
@ -78,11 +78,6 @@ public class JSONDatastore extends FlatfileDatastore {
|
||||
return success;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void childInit() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean loadUser(UUID uuid, String username) {
|
||||
User user = plugin.getUserManager().make(uuid, username);
|
||||
|
@ -30,7 +30,6 @@ import me.lucko.luckperms.users.User;
|
||||
import me.lucko.luckperms.utils.Node;
|
||||
import org.yaml.snakeyaml.DumperOptions;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
import org.yaml.snakeyaml.constructor.BaseConstructor;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
@ -44,7 +43,7 @@ public class YAMLDatastore extends FlatfileDatastore {
|
||||
super(plugin, "Flatfile - YAML", pluginDir);
|
||||
}
|
||||
|
||||
private Yaml getYaml() {
|
||||
private static Yaml getYaml() {
|
||||
DumperOptions options = new DumperOptions();
|
||||
options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
||||
return new Yaml(options);
|
||||
@ -75,11 +74,6 @@ public class YAMLDatastore extends FlatfileDatastore {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void childInit() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean loadUser(UUID uuid, String username) {
|
||||
User user = plugin.getUserManager().make(uuid, username);
|
||||
|
Loading…
Reference in New Issue
Block a user