= Cleaned up warnings and added config header
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
[CommandEnabler]
|
||||
indicator=1
|
||||
boop=1
|
||||
tony, stark, dontfeelgood, dontfeelsogood=1
|
||||
|
||||
@@ -18,6 +18,7 @@ import utils.LogFilter;
|
||||
public class CommandEnabler
|
||||
{
|
||||
// Config/const variables
|
||||
public static final String header = "[CommandEnabler]"; // For consistency in files
|
||||
public static final String filename = "commands.config";
|
||||
public static final String pairSplit = "=";
|
||||
public static final char pairSeparator = '\n';
|
||||
@@ -51,6 +52,9 @@ public class CommandEnabler
|
||||
|
||||
for(int i = 0; i < lines.length; ++i)
|
||||
{
|
||||
if(lines[i].contains(header))
|
||||
continue;
|
||||
|
||||
String[] pair = lines[i].split(pairSplit);
|
||||
|
||||
if(pair.length < 2)
|
||||
@@ -92,6 +96,7 @@ public class CommandEnabler
|
||||
try
|
||||
{
|
||||
String outString = "";
|
||||
outString += header + pairSeparator;
|
||||
for(int i = 0; i < keyList.size(); ++i)
|
||||
{
|
||||
String key = keyList.get(i);
|
||||
|
||||
@@ -7,8 +7,6 @@ import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
|
||||
import jdk.nashorn.internal.runtime.logging.DebugLogger;
|
||||
import utils.GlobalLog;
|
||||
import utils.LogFilter;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user