mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-02-26 09:11:39 +01:00
Code clean up
This commit is contained in:
parent
dec162744c
commit
617fc712aa
@ -33,6 +33,8 @@ public class Util {
|
|||||||
private static String serverVersion = null;
|
private static String serverVersion = null;
|
||||||
private static BSkyBlock plugin = BSkyBlock.getInstance();
|
private static BSkyBlock plugin = BSkyBlock.getInstance();
|
||||||
|
|
||||||
|
private Util() {}
|
||||||
|
|
||||||
public static void setPlugin(BSkyBlock p) {
|
public static void setPlugin(BSkyBlock p) {
|
||||||
plugin = p;
|
plugin = p;
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,8 @@ import java.util.logging.Logger;
|
|||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A very simplistic yml parser, that only do the following:
|
* A very simplistic yml parser, that only do the following:
|
||||||
* <ol>
|
* <ol>
|
||||||
@ -21,7 +23,7 @@ import java.util.regex.Pattern;
|
|||||||
* </ol>
|
* </ol>
|
||||||
*/
|
*/
|
||||||
public class YmlCommentParser {
|
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 SECTION_PATTERN = Pattern.compile("^(?<indent>\\s*)(?<name>[^ \\-][^:]*):(?<value>[^#]*)?(?<comment>#.*)?");
|
||||||
private static final Pattern COMMENT_PATTERN = Pattern.compile("^(?<indent>\\s*)(?<comment>#.*)");
|
private static final Pattern COMMENT_PATTERN = Pattern.compile("^(?<indent>\\s*)(?<comment>#.*)");
|
||||||
private Map<String, String> commentMap = new HashMap<>();
|
private Map<String, String> commentMap = new HashMap<>();
|
||||||
|
Loading…
Reference in New Issue
Block a user