0

Changed error outputs to use Utils class

This commit is contained in:
Pepich
2017-02-02 20:03:02 +01:00
parent e44654c8f0
commit 2562896d26
2 changed files with 10 additions and 7 deletions

View File

@@ -11,7 +11,6 @@ import java.util.Map;
import java.util.Scanner;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
import org.bukkit.event.Listener;
@@ -32,7 +31,7 @@ import com.redstoner.misc.mysql.elements.MysqlDatabase;
import com.redstoner.misc.mysql.elements.MysqlTable;
import com.redstoner.modules.Module;
@Version(major = 1, minor = 0, revision = 0, compatible = 1)
@Version(major = 1, minor = 0, revision = 1, compatible = 1)
public class Check implements Module, Listener
{
private boolean enabled = false;
@@ -44,7 +43,7 @@ public class Check implements Module, Listener
Map<Serializable, Serializable> config = JSONManager.getConfiguration("Check.json");
if (config == null || !config.containsKey("database") || !config.containsKey("table"))
{
Bukkit.getConsoleSender().sendMessage(ChatColor.RED + "Could not load the Check config file, disabling!");
Utils.sendErrorMessage(Bukkit.getConsoleSender(), null, "Could not load the Check config file, disabling!");
enabled = false;
return;
}
@@ -55,7 +54,7 @@ public class Check implements Module, Listener
}
catch (NullPointerException e)
{
Bukkit.getConsoleSender().sendMessage(ChatColor.RED + "Could not use the Check config, disabling!");
Utils.sendErrorMessage(Bukkit.getConsoleSender(), null, "Could not use the Check config, disabling!");
enabled = false;
return;
}