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