Commit 9aef4301 authored by Amosar's avatar Amosar

Correct error when the console send a command

Signed-off-by: Amosar's avatarAmosar <maxi.cass11@gmail.com>
parent 75a25a95
......@@ -12,7 +12,6 @@ import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import org.yaml.snakeyaml.error.YAMLException;
......@@ -28,7 +27,7 @@ public class Main extends JavaPlugin{
private int delay;
private boolean notifyAdmin;
private boolean DropItems;
private boolean automaticallyBreakDetectedClock;
private boolean automaticallyBreakDetectedClock;
private String line1;
private String line2;
private String line3;
......@@ -114,7 +113,7 @@ public class Main extends JavaPlugin{
if(cmd.getName().equalsIgnoreCase("antiredstoneclock")){
if(sender.isOp() || sender.hasPermission("antiRedstoneClock.Admin")){
if(args.length == 0){
CustomConfig.getHelp((Player) sender);
CustomConfig.getHelp(sender);
return false;
}
if(args[0].equalsIgnoreCase("Reload")){
......@@ -130,7 +129,7 @@ public class Main extends JavaPlugin{
} else if (args[0].equalsIgnoreCase("AutoRemoveDetectedClock")) {
AutoRemoveDetectedClock.getInstance().performCMD(sender, args);
}else{
CustomConfig.getHelp((Player) sender);
CustomConfig.getHelp(sender);
}
}else{
sender.sendMessage(CustomConfig.unknownCmd.toString());
......
......@@ -27,7 +27,7 @@ public class Reload {
if(sender instanceof Player){
sender.sendMessage(CustomConfig.ERROR +"An error as occurred in the config.yml please check the log!");
}
Main.getInstance().getLogger().warning("An error as occurred in the config.yml please fix it!");
Main.getInstance().getLogger().severe("An error as occurred in the config.yml please fix it!");
e.printStackTrace();
}
}
......
package com.trafalcraft.antiRedstoneClock.util;
import com.trafalcraft.antiRedstoneClock.Main;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.Arrays;
......@@ -26,7 +26,7 @@ public enum CustomConfig {
static final JavaPlugin plugin = Main.getInstance();
public static void getHelp(Player sender) {
public static void getHelp(CommandSender sender) {
sender.sendMessage("");
sender.sendMessage("§3§l-------------AntiRedstoneClock-------------");
sender.sendMessage("§3/arc checkList <Page number> §b- display the active redstoneclock.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment