Code clean up

This commit is contained in:
tastybento 2018-06-23 19:25:39 -07:00
parent dec162744c
commit 617fc712aa
2 changed files with 5 additions and 1 deletions

View File

@ -33,6 +33,8 @@ public class Util {
private static String serverVersion = null;
private static BSkyBlock plugin = BSkyBlock.getInstance();
private Util() {}
public static void setPlugin(BSkyBlock p) {
plugin = p;
}

View File

@ -13,6 +13,8 @@ import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.bukkit.Bukkit;
/**
* A very simplistic yml parser, that only do the following:
* <ol>
@ -21,7 +23,7 @@ import java.util.regex.Pattern;
* </ol>
*/
public class YmlCommentParser {
private static final Logger log = Logger.getLogger(YmlCommentParser.class.getName());
private static final Logger log = Bukkit.getLogger();
private static final Pattern SECTION_PATTERN = Pattern.compile("^(?<indent>\\s*)(?<name>[^ \\-][^:]*):(?<value>[^#]*)?(?<comment>#.*)?");
private static final Pattern COMMENT_PATTERN = Pattern.compile("^(?<indent>\\s*)(?<comment>#.*)");
private Map<String, String> commentMap = new HashMap<>();