mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Minor Database refactoring.
This commit is contained in:
parent
3efc2138d6
commit
ba7ebe1319
@ -10,10 +10,10 @@ import org.bukkit.command.CommandSender;
|
|||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.database.Database;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.SkillType;
|
import com.gmail.nossr50.skills.SkillType;
|
||||||
import com.gmail.nossr50.skills.Skills;
|
import com.gmail.nossr50.skills.Skills;
|
||||||
import com.gmail.nossr50.util.Database;
|
|
||||||
import com.gmail.nossr50.util.Leaderboard;
|
import com.gmail.nossr50.util.Leaderboard;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.gmail.nossr50.util;
|
package com.gmail.nossr50.database;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.DriverManager;
|
import java.sql.DriverManager;
|
||||||
@ -21,6 +21,7 @@ import com.gmail.nossr50.runnables.SQLReconnect;
|
|||||||
import com.gmail.nossr50.skills.SkillType;
|
import com.gmail.nossr50.skills.SkillType;
|
||||||
import com.gmail.nossr50.spout.SpoutStuff;
|
import com.gmail.nossr50.spout.SpoutStuff;
|
||||||
import com.gmail.nossr50.spout.huds.SpoutHud;
|
import com.gmail.nossr50.spout.huds.SpoutHud;
|
||||||
|
import com.gmail.nossr50.util.Users;
|
||||||
|
|
||||||
public class Database {
|
public class Database {
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.gmail.nossr50.commands.mc;
|
package com.gmail.nossr50.database.commands;
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
@ -7,8 +7,8 @@ import org.bukkit.command.CommandSender;
|
|||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.commands.CommandHelper;
|
import com.gmail.nossr50.commands.CommandHelper;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.database.Database;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.Database;
|
|
||||||
|
|
||||||
public class McpurgeCommand implements CommandExecutor{
|
public class McpurgeCommand implements CommandExecutor{
|
||||||
private Database database = mcMMO.getPlayerDatabase();
|
private Database database = mcMMO.getPlayerDatabase();
|
@ -1,4 +1,4 @@
|
|||||||
package com.gmail.nossr50.commands.mc;
|
package com.gmail.nossr50.database.commands;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.FileReader;
|
import java.io.FileReader;
|
||||||
@ -12,8 +12,8 @@ import org.bukkit.command.CommandSender;
|
|||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.commands.CommandHelper;
|
import com.gmail.nossr50.commands.CommandHelper;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.database.Database;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.Database;
|
|
||||||
|
|
||||||
public class McremoveCommand implements CommandExecutor {
|
public class McremoveCommand implements CommandExecutor {
|
||||||
private final String location;
|
private final String location;
|
@ -1,4 +1,4 @@
|
|||||||
package com.gmail.nossr50.commands.general;
|
package com.gmail.nossr50.database.commands;
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
@ -9,6 +9,7 @@ import java.util.HashMap;
|
|||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.database.Database;
|
||||||
import com.gmail.nossr50.party.Party;
|
import com.gmail.nossr50.party.Party;
|
||||||
import com.gmail.nossr50.party.PartyManager;
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
import com.gmail.nossr50.skills.AbilityType;
|
import com.gmail.nossr50.skills.AbilityType;
|
||||||
@ -17,7 +18,6 @@ import com.gmail.nossr50.skills.ToolType;
|
|||||||
import com.gmail.nossr50.spout.SpoutConfig;
|
import com.gmail.nossr50.spout.SpoutConfig;
|
||||||
import com.gmail.nossr50.spout.huds.HudType;
|
import com.gmail.nossr50.spout.huds.HudType;
|
||||||
import com.gmail.nossr50.spout.huds.SpoutHud;
|
import com.gmail.nossr50.spout.huds.SpoutHud;
|
||||||
import com.gmail.nossr50.util.Database;
|
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
|
||||||
public class PlayerProfile {
|
public class PlayerProfile {
|
||||||
|
@ -21,17 +21,14 @@ import com.gmail.nossr50.commands.general.AddxpCommand;
|
|||||||
import com.gmail.nossr50.commands.general.InspectCommand;
|
import com.gmail.nossr50.commands.general.InspectCommand;
|
||||||
import com.gmail.nossr50.commands.general.McstatsCommand;
|
import com.gmail.nossr50.commands.general.McstatsCommand;
|
||||||
import com.gmail.nossr50.commands.general.MmoeditCommand;
|
import com.gmail.nossr50.commands.general.MmoeditCommand;
|
||||||
import com.gmail.nossr50.commands.general.MmoupdateCommand;
|
|
||||||
import com.gmail.nossr50.commands.general.SkillResetCommand;
|
import com.gmail.nossr50.commands.general.SkillResetCommand;
|
||||||
import com.gmail.nossr50.commands.general.XprateCommand;
|
import com.gmail.nossr50.commands.general.XprateCommand;
|
||||||
import com.gmail.nossr50.commands.mc.McabilityCommand;
|
import com.gmail.nossr50.commands.mc.McabilityCommand;
|
||||||
import com.gmail.nossr50.commands.mc.MccCommand;
|
import com.gmail.nossr50.commands.mc.MccCommand;
|
||||||
import com.gmail.nossr50.commands.mc.McgodCommand;
|
import com.gmail.nossr50.commands.mc.McgodCommand;
|
||||||
import com.gmail.nossr50.commands.mc.McmmoCommand;
|
import com.gmail.nossr50.commands.mc.McmmoCommand;
|
||||||
import com.gmail.nossr50.commands.mc.McpurgeCommand;
|
|
||||||
import com.gmail.nossr50.commands.mc.McrankCommand;
|
import com.gmail.nossr50.commands.mc.McrankCommand;
|
||||||
import com.gmail.nossr50.commands.mc.McrefreshCommand;
|
import com.gmail.nossr50.commands.mc.McrefreshCommand;
|
||||||
import com.gmail.nossr50.commands.mc.McremoveCommand;
|
|
||||||
import com.gmail.nossr50.commands.mc.MctopCommand;
|
import com.gmail.nossr50.commands.mc.MctopCommand;
|
||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
@ -40,6 +37,10 @@ import com.gmail.nossr50.config.TreasuresConfig;
|
|||||||
import com.gmail.nossr50.config.mods.CustomArmorConfig;
|
import com.gmail.nossr50.config.mods.CustomArmorConfig;
|
||||||
import com.gmail.nossr50.config.mods.CustomBlocksConfig;
|
import com.gmail.nossr50.config.mods.CustomBlocksConfig;
|
||||||
import com.gmail.nossr50.config.mods.CustomToolsConfig;
|
import com.gmail.nossr50.config.mods.CustomToolsConfig;
|
||||||
|
import com.gmail.nossr50.database.Database;
|
||||||
|
import com.gmail.nossr50.database.commands.McpurgeCommand;
|
||||||
|
import com.gmail.nossr50.database.commands.McremoveCommand;
|
||||||
|
import com.gmail.nossr50.database.commands.MmoupdateCommand;
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||||
import com.gmail.nossr50.listeners.BlockListener;
|
import com.gmail.nossr50.listeners.BlockListener;
|
||||||
import com.gmail.nossr50.listeners.EntityListener;
|
import com.gmail.nossr50.listeners.EntityListener;
|
||||||
@ -81,7 +82,6 @@ import com.gmail.nossr50.spout.SpoutStart;
|
|||||||
import com.gmail.nossr50.spout.commands.MchudCommand;
|
import com.gmail.nossr50.spout.commands.MchudCommand;
|
||||||
import com.gmail.nossr50.spout.commands.XplockCommand;
|
import com.gmail.nossr50.spout.commands.XplockCommand;
|
||||||
import com.gmail.nossr50.util.Anniversary;
|
import com.gmail.nossr50.util.Anniversary;
|
||||||
import com.gmail.nossr50.util.Database;
|
|
||||||
import com.gmail.nossr50.util.Leaderboard;
|
import com.gmail.nossr50.util.Leaderboard;
|
||||||
import com.gmail.nossr50.util.Metrics;
|
import com.gmail.nossr50.util.Metrics;
|
||||||
import com.gmail.nossr50.util.Metrics.Graph;
|
import com.gmail.nossr50.util.Metrics.Graph;
|
||||||
|
@ -6,10 +6,10 @@ import org.bukkit.Bukkit;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.database.Database;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.SkillType;
|
import com.gmail.nossr50.skills.SkillType;
|
||||||
import com.gmail.nossr50.skills.Skills;
|
import com.gmail.nossr50.skills.Skills;
|
||||||
import com.gmail.nossr50.util.Database;
|
|
||||||
|
|
||||||
public class McRankAsync implements Runnable {
|
public class McRankAsync implements Runnable {
|
||||||
private Database database = mcMMO.getPlayerDatabase();
|
private Database database = mcMMO.getPlayerDatabase();
|
||||||
|
@ -5,7 +5,7 @@ import java.io.FileReader;
|
|||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.util.Database;
|
import com.gmail.nossr50.database.Database;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
|
||||||
public class SQLConversionTask implements Runnable {
|
public class SQLConversionTask implements Runnable {
|
||||||
|
@ -3,7 +3,7 @@ package com.gmail.nossr50.runnables;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.util.Database;
|
import com.gmail.nossr50.database.Database;
|
||||||
import com.gmail.nossr50.util.Users;
|
import com.gmail.nossr50.util.Users;
|
||||||
|
|
||||||
public class SQLReconnect implements Runnable {
|
public class SQLReconnect implements Runnable {
|
||||||
|
@ -2,7 +2,7 @@ package com.gmail.nossr50.runnables;
|
|||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.util.Database;
|
import com.gmail.nossr50.database.Database;
|
||||||
|
|
||||||
public class UserPurgeTask implements Runnable {
|
public class UserPurgeTask implements Runnable {
|
||||||
private Database database = mcMMO.getPlayerDatabase();
|
private Database database = mcMMO.getPlayerDatabase();
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
package com.gmail.nossr50.util;
|
package com.gmail.nossr50.skills;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.SkillType;
|
import com.gmail.nossr50.util.Misc;
|
||||||
import com.gmail.nossr50.skills.Skills;
|
|
||||||
|
|
||||||
public class Page {
|
public class Page {
|
||||||
|
|
@ -11,7 +11,6 @@ import com.gmail.nossr50.commands.CommandHelper;
|
|||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
import com.gmail.nossr50.util.Page;
|
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.Users;
|
import com.gmail.nossr50.util.Users;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user