Cleanup code

This commit is contained in:
business-goose 2022-03-21 17:11:24 +00:00
parent ef4d2c46d8
commit 846c4350e7
36 changed files with 86 additions and 128 deletions

View file

@ -107,10 +107,7 @@ public class Admin
public void removeIp(String ip)
{
if (ips.contains(ip))
{
ips.remove(ip);
}
ips.remove(ip);
}
public void clearIPs()

View file

@ -153,7 +153,7 @@ public class AdminList
adminList.remove(oldUuid);
final Configuration config = new Configuration(TotalFreedomMod.plugin, TotalFreedomMod.SUPERADMIN_FILENAME, true);
config.load();
config.set("admins." + oldUuid.toString(), null);
config.set("admins." + oldUuid, null);
config.save();
}
@ -433,12 +433,7 @@ public class AdminList
return true;
}
if (Bukkit.getOnlineMode() && superUUIDs.contains(UUIDManager.getUniqueId(player)))
{
return true;
}
return false;
return Bukkit.getOnlineMode() && superUUIDs.contains(UUIDManager.getUniqueId(player));
}
public static boolean isTelnetAdmin(CommandSender sender, boolean verifySuperadmin)

View file

@ -12,7 +12,7 @@ import java.util.regex.Pattern;
public class Ban
{
public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd \'at\' HH:mm:ss z");
public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd 'at' HH:mm:ss z");
public static final Pattern IP_BAN_REGEX;
public static final Pattern UUID_BAN_REGEX;
@ -93,10 +93,10 @@ public class Ban
complete = true;
}
public static enum BanType
public enum BanType
{
IP,
UUID;
UUID
}
public BanType getType()
@ -191,12 +191,7 @@ public class Ban
return false;
}
if (!getSubject().equals(ban.getSubject()))
{
return false;
}
return true;
return getSubject().equals(ban.getSubject());
}
@Override

View file

@ -165,7 +165,7 @@ public class CommandBlocker
return true;
}
public static enum CommandBlockerRank
public enum CommandBlockerRank
{
ANYONE("a", 0),
OP("o", 1),
@ -177,7 +177,7 @@ public class CommandBlocker
private final String token;
private final int level;
private CommandBlockerRank(String token, int level)
CommandBlockerRank(String token, int level)
{
this.token = token;
this.level = level;
@ -231,14 +231,14 @@ public class CommandBlocker
}
}
public static enum CommandBlockerAction
public enum CommandBlockerAction
{
BLOCK("b"),
BLOCK_AND_EJECT("a"),
BLOCK_UNKNOWN("u");
private final String token;
private CommandBlockerAction(String token)
CommandBlockerAction(String token)
{
this.token = token;
}

View file

@ -5,7 +5,7 @@ public enum AdminLevel {
//
private final String friendlyName;
private AdminLevel(String friendlyName) {
AdminLevel(String friendlyName) {
this.friendlyName = friendlyName;
}

View file

@ -11,7 +11,7 @@ import org.bukkit.entity.Player;
@CommandPermissions(level = AdminLevel.OP, source = SourceType.BOTH)
public class Command_adminworld extends FreedomCommand {
private enum CommandMode {
TELEPORT, GUEST, TIME, WEATHER;
TELEPORT, GUEST, TIME, WEATHER
}
@Override

View file

@ -72,7 +72,7 @@ public class Command_cbtool extends FreedomCommand {
return SubCommand.getByName(args[0]).getExecutable().execute(ArrayUtils.remove(args, 0));
}
private static enum SubCommand
private enum SubCommand
{
PLAYER_DETECT("playerdetect", new SubCommandExecutable()
{
@ -160,7 +160,7 @@ public class Command_cbtool extends FreedomCommand {
private final String name;
private final SubCommandExecutable executable;
private SubCommand(String subCommandName, SubCommandExecutable subCommandImpl)
SubCommand(String subCommandName, SubCommandExecutable subCommandImpl)
{
this.name = subCommandName;
this.executable = subCommandImpl;
@ -192,7 +192,7 @@ public class Command_cbtool extends FreedomCommand {
private interface SubCommandExecutable
{
public String execute(String[] args) throws SubCommandFailureException;
String execute(String[] args) throws SubCommandFailureException;
}
private static class SubCommandFailureException extends Exception

View file

@ -21,13 +21,13 @@ public class Command_cmdlist extends FreedomCommand {
for (Plugin targetPlugin : server.getPluginManager().getPlugins()) {
try {
PluginDescriptionFile desc = targetPlugin.getDescription();
Map<String, Map<String, Object>> map = (Map<String, Map<String, Object>>) desc.getCommands();
Map<String, Map<String, Object>> map = desc.getCommands();
if (map != null)
{
for (Entry<String, Map<String, Object>> entry : map.entrySet())
{
String command_name = (String) entry.getKey();
String command_name = entry.getKey();
commands.add(command_name);
}
}

View file

@ -41,7 +41,7 @@ public class Command_fr extends FreedomCommand {
}
else
{
if (args[0].toLowerCase().equals("purge"))
if (args[0].equalsIgnoreCase("purge"))
{
setAllFrozen(false);
Utilities.adminAction(sender.getName(), "Unfreezing all players", false);

View file

@ -31,10 +31,7 @@ public class Command_fuckoff extends FreedomCommand {
}
}
if (TotalFreedomMod.fuckoffEnabledFor.containsKey(sender_p))
{
TotalFreedomMod.fuckoffEnabledFor.remove(sender_p);
}
TotalFreedomMod.fuckoffEnabledFor.remove(sender_p);
if (fuckoff_enabled)
{

View file

@ -26,7 +26,7 @@ public class Command_gadmin extends FreedomCommand {
SMITE("smite");
private final String modeName;
private GadminMode(String command)
GadminMode(String command)
{
this.modeName = command;
}

View file

@ -73,7 +73,7 @@ public class Command_jumppads extends FreedomCommand {
return true;
}
Utilities.adminAction(sender.getName(), "Setting Jumppads strength to: " + String.valueOf(strength), false);
Utilities.adminAction(sender.getName(), "Setting Jumppads strength to: " + strength, false);
JumpPads.setStrength((strength / 10) + 0.1F);
}
else

View file

@ -14,10 +14,10 @@ import java.util.List;
@CommandPermissions(level = AdminLevel.ALL, source = SourceType.BOTH)
public class Command_list extends FreedomCommand {
private static enum ListFilter {
private enum ListFilter {
ALL,
ADMINS,
IMPOSTORS;
IMPOSTORS
}
@Override

View file

@ -76,7 +76,7 @@ public class Command_logs extends FreedomCommand {
{
if (responseCode == 200)
{
sender.sendMessage(ChatColor.GREEN + "Registration " + mode.toString() + "d.");
sender.sendMessage(ChatColor.GREEN + "Registration " + mode + "d.");
}
else
{
@ -105,12 +105,12 @@ public class Command_logs extends FreedomCommand {
return true;
}
public static enum LogsRegistrationMode
public enum LogsRegistrationMode
{
UPDATE("update"), DELETE("delete");
private final String mode;
private LogsRegistrationMode(String mode)
LogsRegistrationMode(String mode)
{
this.mode = mode;
}

View file

@ -23,7 +23,7 @@ public class Command_nf extends FreedomCommand {
final List<String> outputCommand = new ArrayList<String>();
if (args.length >= 1) {
final List<String> argsList = Arrays.asList(args);
final String[] argsList = args;
for (String arg : argsList) {
Player player = null;

View file

@ -60,7 +60,7 @@ public class Command_nicknyan extends FreedomCommand {
EssentialsBridge.setNickname(sender.getName(), newNick.toString());
playerMsg(sender, "Your nickname is now: " + newNick.toString());
playerMsg(sender, "Your nickname is now: " + newNick);
return true;
}

View file

@ -187,7 +187,7 @@ public class Command_saconfig extends FreedomCommand {
return true;
}
private static enum SAConfigMode {
private enum SAConfigMode {
LIST("list", AdminLevel.OP, SourceType.BOTH, 1, 1),
CLEAN("clean", AdminLevel.SENIOR, SourceType.BOTH, 1, 1),
CLEARME("clearme", AdminLevel.SUPER, SourceType.ONLY_IN_GAME, 1, 2),
@ -200,7 +200,7 @@ public class Command_saconfig extends FreedomCommand {
private final int minArgs;
private final int maxArgs;
private SAConfigMode(String modeName, AdminLevel adminLevel, SourceType sourceType, int minArgs, int maxArgs) {
SAConfigMode(String modeName, AdminLevel adminLevel, SourceType sourceType, int minArgs, int maxArgs) {
this.modeName = modeName;
this.adminLevel = adminLevel;
this.sourceType = sourceType;
@ -216,7 +216,7 @@ public class Command_saconfig extends FreedomCommand {
}
boolean isSuperAdmin = AdminList.isSuperAdmin(sender);
boolean isSeniorAdmin = isSuperAdmin ? AdminList.isSeniorAdmin(sender, false) : false;
boolean isSeniorAdmin = isSuperAdmin && AdminList.isSeniorAdmin(sender, false);
for (final SAConfigMode mode : values())
{

View file

@ -34,7 +34,7 @@ public class Command_setlevel extends FreedomCommand {
sender_p.setLevel(new_level);
playerMsg(sender, "You have been set to level " + Integer.toString(new_level), ChatColor.AQUA);
playerMsg(sender, "You have been set to level " + new_level, ChatColor.AQUA);
return true;
}

View file

@ -14,10 +14,7 @@ import java.util.List;
@CommandPermissions(level = AdminLevel.OP, source = SourceType.BOTH)
public class Command_tag extends FreedomCommand {
public static final List<String> FORBIDDEN_WORDS = Arrays.asList(new String[]
{
"admin", "owner", "moderator", "developer", "console"
});
public static final List<String> FORBIDDEN_WORDS = Arrays.asList("admin", "owner", "moderator", "developer", "console");
@Override
public boolean run(CommandSender sender, org.bukkit.entity.Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) {

View file

@ -16,7 +16,7 @@ import java.util.Date;
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH)
public class Command_tempban extends FreedomCommand {
private static final SimpleDateFormat date_format = new SimpleDateFormat("yyyy-MM-dd \'at\' HH:mm:ss z");
private static final SimpleDateFormat date_format = new SimpleDateFormat("yyyy-MM-dd 'at' HH:mm:ss z");
@Override
public boolean run(CommandSender sender, org.bukkit.entity.Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) {
@ -67,7 +67,7 @@ public class Command_tempban extends FreedomCommand {
BanManager.addIpBan(new Ban(Utilities.getIp(player), player.getName(), sender.getName(), expires, reason));
BanManager.addUuidBan(new Ban(UUIDManager.getUniqueId(player), player.getName(), sender.getName(), expires, reason));
player.kickPlayer(sender.getName() + " - " + message.toString());
player.kickPlayer(sender.getName() + " - " + message);
return true;
}

View file

@ -73,7 +73,7 @@ public class Command_tossmob extends FreedomCommand {
playerData.enableMobThrower(creature, speed);
playerMsg(sender, "MobThrower is enabled. Creature: " + creature + " - Speed: " + speed + ".", ChatColor.GREEN);
playerMsg(sender, "Left click while holding a " + Material.BONE.toString() + " to throw mobs!", ChatColor.GREEN);
playerMsg(sender, "Left click while holding a " + Material.BONE + " to throw mobs!", ChatColor.GREEN);
playerMsg(sender, "Type '/tossmob off' to disable. -By Madgeek1450", ChatColor.GREEN);
sender_p.setItemInHand(new ItemStack(Material.BONE, 1));

View file

@ -100,12 +100,7 @@ public abstract class FreedomCommand implements CommandExecutor {
return false;
}
if (blockHostConsole && Utilities.isFromHostConsole(commandSender.getName()))
{
return false;
}
return true;
return !blockHostConsole || !Utilities.isFromHostConsole(commandSender.getName());
}
final Player senderPlayer = (Player) commandSender;
@ -120,22 +115,14 @@ public abstract class FreedomCommand implements CommandExecutor {
return false;
}
if (!PlayerData.getPlayerData(senderPlayer).isSuperadminIdVerified()) {
return false;
}
return true;
return PlayerData.getPlayerData(senderPlayer).isSuperadminIdVerified();
}
if (level == AdminLevel.SUPER && !isSuper) {
return false;
}
if (level == AdminLevel.OP && !senderPlayer.isOp()) {
return false;
}
return true;
return level != AdminLevel.OP || senderPlayer.isOp();
}
public Player getPlayer(final String partialName)

View file

@ -2,5 +2,5 @@ package me.StevenLawson.TotalFreedomMod.commands;
public enum SourceType
{
ONLY_IN_GAME, ONLY_CONSOLE, BOTH;
ONLY_IN_GAME, ONLY_CONSOLE, BOTH
}

View file

@ -100,7 +100,7 @@ public enum ConfigurationEntry
private final Class<?> type;
private final String configName;
private ConfigurationEntry(Class<?> type, String configName) {
ConfigurationEntry(Class<?> type, String configName) {
this.type = type;
this.configName = configName;
}

View file

@ -115,12 +115,12 @@ public class JumpPads
JumpPads.strength = strength;
}
public static enum JumpPadMode
public enum JumpPadMode
{
OFF(false), NORMAL(true), NORMAL_AND_SIDEWAYS(true), MADGEEK(true);
private boolean on;
private final boolean on;
private JumpPadMode(boolean on)
JumpPadMode(boolean on)
{
this.on = on;
}

View file

@ -74,7 +74,7 @@ public class GameRuleHandler
private final String gameRuleName;
private final TFM_GameRule_Value defaultValue;
private TFM_GameRule(String gameRuleName, TFM_GameRule_Value defaultValue)
TFM_GameRule(String gameRuleName, TFM_GameRule_Value defaultValue)
{
this.gameRuleName = gameRuleName;
this.defaultValue = defaultValue;
@ -96,7 +96,7 @@ public class GameRuleHandler
TRUE("true"), FALSE("false");
private final String value;
private TFM_GameRule_Value(String value)
TFM_GameRule_Value(String value)
{
this.value = value;
}
@ -109,7 +109,7 @@ public class GameRuleHandler
public boolean toBoolean()
{
return (this.value.equals(TFM_GameRule_Value.TRUE.value) ? true : false);
return (this.value.equals(TFM_GameRule_Value.TRUE.value));
}
public static TFM_GameRule_Value fromBoolean(boolean in)

View file

@ -129,7 +129,7 @@ public class HTTPDManager {
}
}
private static enum ModuleType {
private enum ModuleType {
DUMP(new ModuleExecutable(false, "dump") {
@Override
public Response getResponse(HTTPSession session) {
@ -187,7 +187,7 @@ public class HTTPDManager {
//
private final ModuleExecutable moduleExecutable;
private ModuleType(ModuleExecutable moduleExecutable)
ModuleType(ModuleExecutable moduleExecutable)
{
this.moduleExecutable = moduleExecutable;
}

View file

@ -261,7 +261,7 @@ public class HTTPDSchematicModule extends HTTPDModule {
return (out == null ? null : (out.trim().isEmpty() ? null : out.trim()));
}
private static enum ModuleMode
private enum ModuleMode
{
LIST("list"),
UPLOAD("upload"),
@ -270,7 +270,7 @@ public class HTTPDSchematicModule extends HTTPDModule {
//
private final String modeName;
private ModuleMode(String modeName)
ModuleMode(String modeName)
{
this.modeName = modeName;
}

View file

@ -21,6 +21,7 @@ import java.net.SocketException;
import java.net.URLDecoder;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
@ -563,8 +564,8 @@ public abstract class NanoHTTPD
*/
public static class DefaultTempFile implements TempFile
{
private File file;
private OutputStream fstream;
private final File file;
private final OutputStream fstream;
public DefaultTempFile(String tempdir) throws IOException
{
@ -612,7 +613,7 @@ public abstract class NanoHTTPD
/**
* Headers for the HTTP response. Use addHeader() to add lines.
*/
private Map<String, String> header = new HashMap<String, String>();
private final Map<String, String> header = new HashMap<String, String>();
/**
* The request method that spawned this response.
*/
@ -647,14 +648,7 @@ public abstract class NanoHTTPD
{
this.status = status;
this.mimeType = mimeType;
try
{
this.data = txt != null ? new ByteArrayInputStream(txt.getBytes("UTF-8")) : null;
}
catch (java.io.UnsupportedEncodingException uee)
{
Log.severe(uee);
}
this.data = txt != null ? new ByteArrayInputStream(txt.getBytes(StandardCharsets.UTF_8)) : null;
}
/**
@ -1063,7 +1057,7 @@ public abstract class NanoHTTPD
String boundaryStartString = "boundary=";
int boundaryContentStart = contentTypeHeader.indexOf(boundaryStartString) + boundaryStartString.length();
String boundary = contentTypeHeader.substring(boundaryContentStart, contentTypeHeader.length());
String boundary = contentTypeHeader.substring(boundaryContentStart);
if (boundary.startsWith("\"") && boundary.endsWith("\""))
{
boundary = boundary.substring(1, boundary.length() - 1);
@ -1075,7 +1069,7 @@ public abstract class NanoHTTPD
{
// Handle application/x-www-form-urlencoded
String postLine = "";
char pbuf[] = new char[512];
char[] pbuf = new char[512];
int read = in.read(pbuf);
while (read >= 0 && !postLine.endsWith("\r\n"))
{
@ -1448,7 +1442,9 @@ public abstract class NanoHTTPD
public static class Cookie
{
private String n, v, e;
private final String n;
private final String v;
private final String e;
public Cookie(String name, String value, String expires)
{
@ -1494,8 +1490,8 @@ public abstract class NanoHTTPD
*/
public class CookieHandler implements Iterable<String>
{
private HashMap<String, String> cookies = new HashMap<String, String>();
private ArrayList<Cookie> queue = new ArrayList<Cookie>();
private final HashMap<String, String> cookies = new HashMap<String, String>();
private final ArrayList<Cookie> queue = new ArrayList<Cookie>();
public CookieHandler(Map<String, String> httpHeaders)
{

View file

@ -742,10 +742,7 @@ public class PlayerListener implements Listener {
private void playerLeave(org.bukkit.entity.Player player)
{
if (TotalFreedomMod.fuckoffEnabledFor.containsKey(player))
{
TotalFreedomMod.fuckoffEnabledFor.remove(player);
}
TotalFreedomMod.fuckoffEnabledFor.remove(player);
final PlayerData playerdata = PlayerData.getPlayerData(player);

View file

@ -79,7 +79,7 @@ public class PlayerData {
private int freecamPlaceCount = 0;
private boolean isCaged = false;
private Location cagePosition;
private List<TFM_BlockData> cageHistory = new ArrayList<TFM_BlockData>();
private final List<TFM_BlockData> cageHistory = new ArrayList<TFM_BlockData>();
private Material cageOuterMaterial = Material.GLASS;
private Material cageInnerMatterial = Material.AIR;
private boolean isOrbiting = false;
@ -87,7 +87,7 @@ public class PlayerData {
private boolean mobThrowerEnabled = false;
private EntityType mobThrowerEntity = EntityType.PIG;
private double mobThrowerSpeed = 4.0;
private List<LivingEntity> mobThrowerQueue = new ArrayList<LivingEntity>();
private final List<LivingEntity> mobThrowerQueue = new ArrayList<LivingEntity>();
private BukkitTask mp44ScheduleTask = null;
private boolean mp44Armed = false;
private boolean mp44Firing = false;
@ -568,7 +568,7 @@ public class PlayerData {
private class ArrowShooter extends BukkitRunnable
{
private Player player;
private final Player player;
private ArrowShooter(Player player)
{

View file

@ -453,7 +453,7 @@ public class Utilities
method = EjectMethod.STRIKE_THREE;
}
Log.info("AutoEject -> name: " + player.getName() + " - player ip: " + ip + " - method: " + method.toString());
Log.info("AutoEject -> name: " + player.getName() + " - player ip: " + ip + " - method: " + method);
player.setOp(false);
player.setGameMode(GameMode.SURVIVAL);
@ -782,7 +782,7 @@ public class Utilities
@SuppressWarnings("unchecked")
public static boolean isFromHostConsole(String senderName)
{
return ((List<String>) ConfigurationEntry.HOST_SENDER_NAMES.getList()).contains(senderName.toLowerCase());
return ConfigurationEntry.HOST_SENDER_NAMES.getList().contains(senderName.toLowerCase());
}
public static List<String> removeDuplicates(List<String> oldList)
@ -890,7 +890,7 @@ public class Utilities
if (verbose)
{
Log.info("Downloaded " + url + " to " + output.toString() + ".");
Log.info("Downloaded " + url + " to " + output + ".");
}
}
@ -1060,9 +1060,9 @@ public class Utilities
}
}
public static enum EjectMethod
public enum EjectMethod
{
STRIKE_ONE, STRIKE_TWO, STRIKE_THREE;
STRIKE_ONE, STRIKE_TWO, STRIKE_THREE
}
public static class MethodTimer

View file

@ -28,7 +28,7 @@ public final class AdminWorld extends CustomWorld
private final Map<CommandSender, Boolean> accessCache = new HashMap<CommandSender, Boolean>();
//
private Long cacheLastCleared = null;
private Map<Player, Player> guestList = new HashMap<Player, Player>(); // Guest, Supervisor
private final Map<Player, Player> guestList = new HashMap<Player, Player>(); // Guest, Supervisor
private WeatherMode weatherMode = WeatherMode.OFF;
private TimeOfDay timeOfDay = TimeOfDay.INHERIT;
@ -215,7 +215,7 @@ public final class AdminWorld extends CustomWorld
return cached;
}
public static enum WeatherMode
public enum WeatherMode
{
OFF("off"),
RAIN("rain"),
@ -223,7 +223,7 @@ public final class AdminWorld extends CustomWorld
//
private final List<String> aliases;
private WeatherMode(String aliases)
WeatherMode(String aliases)
{
this.aliases = Arrays.asList(StringUtils.split(aliases, ","));
}
@ -251,7 +251,7 @@ public final class AdminWorld extends CustomWorld
}
}
public static enum TimeOfDay
public enum TimeOfDay
{
INHERIT(),
SUNRISE("sunrise,morning", 0),
@ -262,13 +262,13 @@ public final class AdminWorld extends CustomWorld
private final int timeTicks;
private final List<String> aliases;
private TimeOfDay()
TimeOfDay()
{
this.timeTicks = 0;
this.aliases = null;
}
private TimeOfDay(String aliases, int timeTicks)
TimeOfDay(String aliases, int timeTicks)
{
this.timeTicks = timeTicks;
this.aliases = Arrays.asList(StringUtils.split(aliases, ","));

View file

@ -64,7 +64,7 @@ public class CleanroomChunkGenerator extends ChunkGenerator
if (id.length() > 0)
{
String tokens[] = id.split("[,]");
String[] tokens = id.split("[,]");
if ((tokens.length % 2) != 0)
{
@ -80,7 +80,7 @@ public class CleanroomChunkGenerator extends ChunkGenerator
height = 64;
}
String materialTokens[] = tokens[i + 1].split("[:]", 2);
String[] materialTokens = tokens[i + 1].split("[:]", 2);
byte dataValue = 0;
if (materialTokens.length == 2)
{
@ -163,7 +163,7 @@ public class CleanroomChunkGenerator extends ChunkGenerator
}
catch (Exception e)
{
log.severe("[CleanroomGenerator] Error parsing CleanroomGenerator ID '" + id + "'. using defaults '64,1': " + e.toString());
log.severe("[CleanroomGenerator] Error parsing CleanroomGenerator ID '" + id + "'. using defaults '64,1': " + e);
e.printStackTrace();
layerDataValues = null;
layer = new short[65];
@ -209,7 +209,7 @@ public class CleanroomChunkGenerator extends ChunkGenerator
{
if (layerDataValues != null)
{
return Arrays.asList((BlockPopulator) new CleanroomBlockPopulator(layerDataValues));
return Arrays.asList(new CleanroomBlockPopulator(layerDataValues));
}
else
{

View file

@ -168,10 +168,7 @@ public class RollbackManager
}
}
if (REMOVE_ROLLBACK_HISTORY.contains(playerName.toLowerCase()))
{
REMOVE_ROLLBACK_HISTORY.remove(playerName.toLowerCase());
}
REMOVE_ROLLBACK_HISTORY.remove(playerName.toLowerCase());
return count;
}
@ -216,7 +213,7 @@ public class RollbackManager
BLOCK_BREAK("broke");
private final String action;
private EntryType(String action)
EntryType(String action)
{
this.action = action;
}

View file

@ -52,7 +52,7 @@ public class SQLite extends Database
try
{
Class.forName("org.sqlite.JDBC");
connection = DriverManager.getConnection("jdbc:sqlite:" + plugin.getDataFolder().toPath().toString() + "/" + dbLocation);
connection = DriverManager.getConnection("jdbc:sqlite:" + plugin.getDataFolder().toPath() + "/" + dbLocation);
}
catch (SQLException e)
{