mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-29 12:14:43 +02:00
Well this should fix the issues with config, but I hate it.
This commit is contained in:
@ -18,8 +18,8 @@ public class McmmoCommand implements CommandExecutor {
|
||||
String[] mcSplit = description.split(",");
|
||||
sender.sendMessage(mcSplit);
|
||||
|
||||
if (Config.getDonateMessageEnabled()) {
|
||||
if (Config.spoutEnabled && sender instanceof SpoutPlayer) {
|
||||
if (Config.getInstance().getDonateMessageEnabled()) {
|
||||
if (Config.getInstance().spoutEnabled && sender instanceof SpoutPlayer) {
|
||||
SpoutPlayer sPlayer = (SpoutPlayer) sender;
|
||||
|
||||
sPlayer.sendNotification(ChatColor.YELLOW + "[mcMMO]" + ChatColor.GOLD + " Donate!", ChatColor.GREEN + "nossr50@gmail.com", Material.DIAMOND);
|
||||
|
@ -27,8 +27,8 @@ public class McremoveCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
String playerName;
|
||||
String tablePrefix = Config.getMySQLTablePrefix();
|
||||
String databaseName = Config.getMySQLDatabaseName();
|
||||
String tablePrefix = Config.getInstance().getMySQLTablePrefix();
|
||||
String databaseName = Config.getInstance().getMySQLDatabaseName();
|
||||
String usage = ChatColor.RED + "Proper usage is /mcremove <player>"; //TODO: Needs more locale.
|
||||
String success;
|
||||
|
||||
@ -48,7 +48,7 @@ public class McremoveCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
/* MySQL */
|
||||
if (Config.getUseMySQL()) {
|
||||
if (Config.getInstance().getUseMySQL()) {
|
||||
int userId = 0;
|
||||
userId = mcMMO.database.getInt("SELECT id FROM " + tablePrefix + "users WHERE user = '" + playerName + "'");
|
||||
|
||||
|
@ -20,7 +20,7 @@ public class MctopCommand implements CommandExecutor {
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
String usage = ChatColor.RED + "Proper usage is /mctop [skill] [page]"; //TODO: Needs more locale.
|
||||
|
||||
if (!Config.getUseMySQL()) {
|
||||
if (!Config.getInstance().getUseMySQL()) {
|
||||
|
||||
switch (args.length) {
|
||||
case 0:
|
||||
@ -132,7 +132,7 @@ public class MctopCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
private void sqlDisplay(int page, String query, CommandSender sender) {
|
||||
String tablePrefix = Config.getMySQLTablePrefix();
|
||||
String tablePrefix = Config.getInstance().getMySQLTablePrefix();
|
||||
HashMap<Integer, ArrayList<String>> userslist = mcMMO.database.read("SELECT " + query + ", user_id FROM " + tablePrefix + "skills WHERE " + query + " > 0 ORDER BY " + query + " DESC ");
|
||||
|
||||
if (query == "taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing") {
|
||||
|
Reference in New Issue
Block a user