remove #childInit

This commit is contained in:
Luck 2016-09-02 19:19:22 +01:00
parent 5dec5a54cb
commit 861c1ddd69
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
3 changed files with 1 additions and 21 deletions

View File

@ -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();

View File

@ -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);

View File

@ -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);