mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 14:38:45 +00:00
Various java compliance & rule fixes. More of this and optimization tomorrow.
This commit is contained in:
1 parent
6b2835b018
commit
39db8afe81
10 files changed
+94
-143
No files matched your search
@@ -33,14 +33,13 @@ import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
public class Configuration
|
||||
{
|
||||
private AnticheatManager micromanage = null; //like a boss!
|
||||
private AnticheatManager micromanage = null;
|
||||
private File configFile = null;
|
||||
private File levelFile = null;
|
||||
private File langFile = null;
|
||||
private File magicFile = null;
|
||||
private CommentedConfiguration config;
|
||||
private FileConfiguration level;
|
||||
private FileConfiguration lang;
|
||||
private FileConfiguration magic;
|
||||
private boolean logConsole;
|
||||
private boolean logXRay;
|
||||
@@ -185,9 +184,8 @@ public class Configuration
|
||||
micromanage.getPlugin().checkConfigs();
|
||||
config = CommentedConfiguration.loadConfig(configFile);
|
||||
level = YamlConfiguration.loadConfiguration(levelFile);
|
||||
lang = YamlConfiguration.loadConfiguration(langFile);
|
||||
magic = YamlConfiguration.loadConfiguration(magicFile);
|
||||
language = new Language(lang, langFile);
|
||||
language = new Language(YamlConfiguration.loadConfiguration(langFile), langFile);
|
||||
updateFolder = Bukkit.getUpdateFolder();
|
||||
|
||||
// Begin pulling values from config.
|
||||
|
||||
@@ -26,13 +26,13 @@ import java.util.logging.LogRecord;
|
||||
|
||||
public class FileFormatter extends Formatter
|
||||
{
|
||||
private static final DateFormat format = new SimpleDateFormat("h:mm:ss");
|
||||
private static final String lineSep = System.getProperty("line.separator");
|
||||
private static final DateFormat FORMAT = new SimpleDateFormat("h:mm:ss");
|
||||
private static final String LINE_SEP = System.getProperty("line.separator");
|
||||
|
||||
@Override
|
||||
public String format(LogRecord record)
|
||||
{
|
||||
StringBuilder output = new StringBuilder().append("[").append(record.getLevel()).append('|').append(format.format(new Date(record.getMillis()))).append("]: ").append(record.getMessage()).append(' ').append(lineSep);
|
||||
StringBuilder output = new StringBuilder().append("[").append(record.getLevel()).append('|').append(FORMAT.format(new Date(record.getMillis()))).append("]: ").append(record.getMessage()).append(' ').append(LINE_SEP);
|
||||
return output.toString();
|
||||
}
|
||||
}
|
||||
@@ -56,8 +56,6 @@ public class PastebinReport
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
//e.printStackTrace();
|
||||
}
|
||||
postReport();
|
||||
}
|
||||
@@ -70,14 +68,16 @@ public class PastebinReport
|
||||
private void appendPermissionsTester(Player player)
|
||||
{
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
// alrighty then noobs.
|
||||
for(Permission node : Permission.values())
|
||||
{
|
||||
report.append(player.getName() + ": " + node.toString() + " " + node.get(player) + '\n');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void createReport(Player player)
|
||||
|
||||
Reference in new issue
Block a user