2.4.3 #5

Merged
JaTiTV merged 4 commits from customCommands-fix into main 2022-11-02 18:01:27 +00:00
7 changed files with 79 additions and 86 deletions
Showing only changes of commit d66f6d0f59 - Show all commits

View File

@ -23,7 +23,7 @@ public class CmdExecuter implements CommandExecutor, TabCompleter {
if (args.length == 0) { if (args.length == 0) {
Commands.mainCommand(sender); Commands.mainCommand(sender);
} else { } else {
if (SelectConfig.OnlyOPcanUseThePlugin) { if (SelectConfig.onlyOpCanUseThePlugin) {
if (!sender.isOp()) { if (!sender.isOp()) {
sender.sendMessage(Util.getPrefix() + "§cOnly OPs can use OPSecurity!"); sender.sendMessage(Util.getPrefix() + "§cOnly OPs can use OPSecurity!");
return false; return false;

View File

@ -15,7 +15,7 @@ import org.bukkit.entity.Player;
public class Commands { public class Commands {
public static void mainCommand(CommandSender sender) { public static void mainCommand(CommandSender sender) {
if (SelectConfig.OnlyOPcanUseThePlugin) { if (SelectConfig.onlyOpCanUseThePlugin) {
if (!sender.isOp()) { if (!sender.isOp()) {
sender.sendMessage(Util.getPrefix() + "§cOnly OPs can use OPSecurity!"); sender.sendMessage(Util.getPrefix() + "§cOnly OPs can use OPSecurity!");
return; return;

View File

@ -19,47 +19,43 @@ public class SelectConfig {
// Config // Config
public static Integer ConfigVersion; public static Integer configVersion;
public static Boolean UpdateCheckOnJoin; public static Boolean updateCheckOnJoin;
public static String language; public static String language;
public static Boolean OnlyOPcanUseThePlugin; public static Boolean onlyOpCanUseThePlugin;
public static Boolean CheckOnJoin; public static Boolean checkOnJoin;
public static Boolean CheckOnInteract; public static Boolean checkOnInteract;
public static Boolean CheckOnCommand; public static Boolean checkOnCommand;
public static Boolean CheckOnChat; public static Boolean checkOnChat;
public static String KickCommand; public static String kickCommand;
public static Boolean Notify_Warn; public static Boolean notifyWarn;
public static Boolean Notify_Sound_Enable; public static Boolean notifySoundEnable;
public static Sound Notify_Sound; public static Sound notifySound;
public static String Notify_Sound_input; public static String notifySoundInput;
public static Boolean Timer_Enable; public static Boolean timerEnable;
public static int RefreshTime; public static int refreshTime;
public static Boolean OP_Whitelist_Enable; public static Boolean opWhitelistEnable;
public static Boolean PlayerMustBeOnlineToOp; public static Boolean playerMustBeOnlineToOp;
public static Boolean no_OP_Player_deop; public static Boolean noOPPlayerDeop;
public static Boolean sendPlayerDEOPmsg; public static Boolean sendPlayerDEOPmsg;
public static Boolean no_OP_Player_kick; public static Boolean noOpPlayerKick;
public static Boolean customCommand_Enable; public static Boolean customCommandEnable;
public static List<String> customKickCommand; public static List<String> customKickCommand;
public static Boolean Permission_Whitelist_Enable; public static Boolean permissionWhitelistEnable;
public static List<String> permissions; public static List<String> permissions;
public static Boolean PlayerWhithPermission_kick; public static Boolean playerWhithPermissionKick;
public static Boolean Perm_Command_enable; public static Boolean permCommandEnable;
public static List<String> Perm_Command; public static List<String> permCommand;
public static Boolean LP_Enable;
public static Boolean LP_AllowFromConsole;
public static List<String> LP_Whitelist;
//help //help
@ -85,25 +81,25 @@ public class SelectConfig {
Main.getOpHashMap().clear(); Main.getOpHashMap().clear();
Main.getPermissionHashMap().clear(); Main.getPermissionHashMap().clear();
ConfigVersion = yamlConfiguration.getInt("ConfigVersion"); configVersion = yamlConfiguration.getInt("ConfigVersion");
UpdateCheckOnJoin = yamlConfiguration.getBoolean("Plugin.UpdateCheckOnJoin"); updateCheckOnJoin = yamlConfiguration.getBoolean("Plugin.UpdateCheckOnJoin");
language = yamlConfiguration.getString("Plugin.language"); language = yamlConfiguration.getString("Plugin.language");
OnlyOPcanUseThePlugin = yamlConfiguration.getBoolean("Plugin.OnlyOPcanUseThePlugin"); onlyOpCanUseThePlugin = yamlConfiguration.getBoolean("Plugin.OnlyOPcanUseThePlugin");
CheckOnJoin = yamlConfiguration.getBoolean("Check.OnJoin"); checkOnJoin = yamlConfiguration.getBoolean("Check.OnJoin");
CheckOnInteract = yamlConfiguration.getBoolean("Check.OnInteract"); checkOnInteract = yamlConfiguration.getBoolean("Check.OnInteract");
CheckOnCommand = yamlConfiguration.getBoolean("Check.OnCommand"); checkOnCommand = yamlConfiguration.getBoolean("Check.OnCommand");
CheckOnChat = yamlConfiguration.getBoolean("Check.OnChat"); checkOnChat = yamlConfiguration.getBoolean("Check.OnChat");
Timer_Enable = yamlConfiguration.getBoolean("Check.Timer.Enable"); timerEnable = yamlConfiguration.getBoolean("Check.Timer.Enable");
RefreshTime = yamlConfiguration.getInt("Check.Timer.RefreshTime_inSec"); refreshTime = yamlConfiguration.getInt("Check.Timer.RefreshTime_inSec");
KickCommand = yamlConfiguration.getString("Kick.Command"); kickCommand = yamlConfiguration.getString("Kick.Command");
Notify_Warn = yamlConfiguration.getBoolean("Notify.JoinWarn.Enable"); notifyWarn = yamlConfiguration.getBoolean("Notify.JoinWarn.Enable");
Notify_Sound_Enable = yamlConfiguration.getBoolean("Notify.Sound.Enable"); notifySoundEnable = yamlConfiguration.getBoolean("Notify.Sound.Enable");
Notify_Sound_input = yamlConfiguration.getString("Notify.Sound.Sound"); notifySoundInput = yamlConfiguration.getString("Notify.Sound.Sound");
OP_Whitelist_Enable = yamlConfiguration.getBoolean("OP_Whitelist.Enable"); opWhitelistEnable = yamlConfiguration.getBoolean("OP_Whitelist.Enable");
PlayerMustBeOnlineToOp = yamlConfiguration.getBoolean("OP_Whitelist.PlayerMustBeOnlineToOp"); playerMustBeOnlineToOp = yamlConfiguration.getBoolean("OP_Whitelist.PlayerMustBeOnlineToOp");
ArrayList<PlayerObject> opWhitelist = new ArrayList<>(); ArrayList<PlayerObject> opWhitelist = new ArrayList<>();
for (String key : yamlConfiguration.getConfigurationSection("OP_Whitelist.Whitelist").getKeys(false)) { for (String key : yamlConfiguration.getConfigurationSection("OP_Whitelist.Whitelist").getKeys(false)) {
@ -113,12 +109,12 @@ public class SelectConfig {
Main.getOpHashMap().put(key.toLowerCase(), player); Main.getOpHashMap().put(key.toLowerCase(), player);
} }
no_OP_Player_deop = yamlConfiguration.getBoolean("OP_Whitelist.noOpPlayerDeop.Enable"); noOPPlayerDeop = yamlConfiguration.getBoolean("OP_Whitelist.noOpPlayerDeop.Enable");
sendPlayerDEOPmsg = yamlConfiguration.getBoolean("OP_Whitelist.noOpPlayerDeop.PlayerSendMessage"); sendPlayerDEOPmsg = yamlConfiguration.getBoolean("OP_Whitelist.noOpPlayerDeop.PlayerSendMessage");
no_OP_Player_kick = yamlConfiguration.getBoolean("OP_Whitelist.noOpPlayerKick.Enable"); noOpPlayerKick = yamlConfiguration.getBoolean("OP_Whitelist.noOpPlayerKick.Enable");
customCommand_Enable = yamlConfiguration.getBoolean("OP_Whitelist.customCommands.Enable"); customCommandEnable = yamlConfiguration.getBoolean("OP_Whitelist.customCommands.Enable");
customKickCommand = yamlConfiguration.getStringList("OP_Whitelist.customCommands.Commands"); customKickCommand = yamlConfiguration.getStringList("OP_Whitelist.customCommands.Commands");
Permission_Whitelist_Enable = yamlConfiguration.getBoolean("Permission_Whitelist.Enable"); permissionWhitelistEnable = yamlConfiguration.getBoolean("Permission_Whitelist.Enable");
permissions = yamlConfiguration.getStringList("Permission_Whitelist.Permissions"); permissions = yamlConfiguration.getStringList("Permission_Whitelist.Permissions");
ArrayList<PlayerObject> permWhitelist = new ArrayList<>(); ArrayList<PlayerObject> permWhitelist = new ArrayList<>();
@ -129,15 +125,12 @@ public class SelectConfig {
Main.getPermissionHashMap().put(key.toLowerCase(), player); Main.getPermissionHashMap().put(key.toLowerCase(), player);
} }
PlayerWhithPermission_kick = yamlConfiguration.getBoolean("Permission_Whitelist.PlayerWhithPermission_kick"); playerWhithPermissionKick = yamlConfiguration.getBoolean("Permission_Whitelist.PlayerWhithPermission_kick");
Perm_Command_enable = yamlConfiguration.getBoolean("Permission_Whitelist.customCommands.Enable"); permCommandEnable = yamlConfiguration.getBoolean("Permission_Whitelist.customCommands.Enable");
Perm_Command = yamlConfiguration.getStringList("Permission_Whitelist.customCommands.Commands"); permCommand = yamlConfiguration.getStringList("Permission_Whitelist.customCommands.Commands");
LP_Enable = yamlConfiguration.getBoolean("LuckPerms_Whitelist.Enable");
LP_AllowFromConsole = yamlConfiguration.getBoolean("LuckPerms_Whitelist.AllowFromConsole");
LP_Whitelist = yamlConfiguration.getStringList("LuckPerms_Whitelist.Whitelist");
} }
public static void sound() { public static void sound() {
Notify_Sound = T2Cconfig.checkSound(CreateConfig.Notify_Sound_1_8, CreateConfig.Notify_Sound_1_9_to_1_12, CreateConfig.Notify_Sound_from_1_13, Notify_Sound_input, Util.getPrefix()); notifySound = T2Cconfig.checkSound(CreateConfig.Notify_Sound_1_8, CreateConfig.Notify_Sound_1_9_to_1_12, CreateConfig.Notify_Sound_from_1_13, notifySoundInput, Util.getPrefix());
} }
} }

View File

@ -14,7 +14,7 @@ import org.bukkit.scheduler.BukkitRunnable;
public class Check { public class Check {
public static Boolean onCheck(Player player, Boolean join) { public static Boolean onCheck(Player player, Boolean join) {
if (SelectConfig.OP_Whitelist_Enable) { if (SelectConfig.opWhitelistEnable) {
if (player.isOp()) { if (player.isOp()) {
if (opWhitelist(player)) { if (opWhitelist(player)) {
return false; return false;
@ -24,27 +24,27 @@ public class Check {
T2Csend.console(T2Creplace.replace(Util.getPrefix(), SelectMessages.OP_consoleOnJoin.replace("[player]", player.getName()))); T2Csend.console(T2Creplace.replace(Util.getPrefix(), SelectMessages.OP_consoleOnJoin.replace("[player]", player.getName())));
} }
if (SelectConfig.Notify_Warn) { if (SelectConfig.notifyWarn) {
for (Player notifyperm : Bukkit.getOnlinePlayers()) { for (Player notifyperm : Bukkit.getOnlinePlayers()) {
if (notifyperm.hasPermission(Permissions.notify)) { if (notifyperm.hasPermission(Permissions.notify)) {
if (join) { if (join) {
notifyperm.sendMessage(T2Creplace.replace(Util.getPrefix(), SelectMessages.OP_consoleOnJoin.replace("[player]", player.getName()))); notifyperm.sendMessage(T2Creplace.replace(Util.getPrefix(), SelectMessages.OP_consoleOnJoin.replace("[player]", player.getName())));
} else notifyperm.sendMessage(T2Creplace.replace(Util.getPrefix(), SelectMessages.OP_consoleKick.replace("[player]", player.getName()))); } else notifyperm.sendMessage(T2Creplace.replace(Util.getPrefix(), SelectMessages.OP_consoleKick.replace("[player]", player.getName())));
if (SelectConfig.Notify_Sound_Enable) { if (SelectConfig.notifySoundEnable) {
notifyperm.playSound(player.getLocation(), SelectConfig.Notify_Sound, 3, 1); notifyperm.playSound(player.getLocation(), SelectConfig.notifySound, 3, 1);
} }
} }
} }
} }
if (SelectConfig.no_OP_Player_kick && SelectConfig.no_OP_Player_deop) { if (SelectConfig.noOpPlayerKick && SelectConfig.noOPPlayerDeop) {
player.setOp(false); player.setOp(false);
T2Ccmd.console(SelectConfig.KickCommand.replace("[player]", player.getName()) T2Ccmd.console(SelectConfig.kickCommand.replace("[player]", player.getName())
.replace("[reason]", T2Creplace.replace(Util.getPrefix(), SelectMessages.OP_kick + "\n" + "\n" + SelectMessages.OP_deop))); .replace("[reason]", T2Creplace.replace(Util.getPrefix(), SelectMessages.OP_kick + "\n" + "\n" + SelectMessages.OP_deop)));
T2Csend.console(T2Creplace.replace(Util.getPrefix(), SelectMessages.OP_consoleKick.replace("[player]", player.getName()))); T2Csend.console(T2Creplace.replace(Util.getPrefix(), SelectMessages.OP_consoleKick.replace("[player]", player.getName())));
} else { } else {
if (SelectConfig.no_OP_Player_kick) { if (SelectConfig.noOpPlayerKick) {
T2Ccmd.console(SelectConfig.KickCommand.replace("[player]", player.getName()).replace("[reason]", T2Creplace.replace(Util.getPrefix(), SelectMessages.OP_kick))); T2Ccmd.console(SelectConfig.kickCommand.replace("[player]", player.getName()).replace("[reason]", T2Creplace.replace(Util.getPrefix(), SelectMessages.OP_kick)));
T2Csend.console(T2Creplace.replace(Util.getPrefix(), SelectMessages.OP_consoleKick.replace("[player]", player.getName()))); T2Csend.console(T2Creplace.replace(Util.getPrefix(), SelectMessages.OP_consoleKick.replace("[player]", player.getName())));
for (Player notifyperm : Bukkit.getOnlinePlayers()) { for (Player notifyperm : Bukkit.getOnlinePlayers()) {
if (notifyperm.hasPermission(Permissions.notify)) { if (notifyperm.hasPermission(Permissions.notify)) {
@ -53,7 +53,7 @@ public class Check {
} }
} }
} }
if (SelectConfig.no_OP_Player_deop) { if (SelectConfig.noOPPlayerDeop) {
player.setOp(false); player.setOp(false);
if (SelectConfig.sendPlayerDEOPmsg) { if (SelectConfig.sendPlayerDEOPmsg) {
new BukkitRunnable() { new BukkitRunnable() {
@ -73,7 +73,7 @@ public class Check {
} }
} }
if (SelectConfig.customCommand_Enable) { if (SelectConfig.customCommandEnable) {
for (String cmd : SelectConfig.customKickCommand) { for (String cmd : SelectConfig.customKickCommand) {
T2Ccmd.console(T2Creplace.replace(Util.getPrefix(), cmd.replace("[player]", player.getName()))); T2Ccmd.console(T2Creplace.replace(Util.getPrefix(), cmd.replace("[player]", player.getName())));
@ -83,14 +83,14 @@ public class Check {
} }
} }
if (SelectConfig.Permission_Whitelist_Enable) { if (SelectConfig.permissionWhitelistEnable) {
for (String s : SelectConfig.permissions) { for (String s : SelectConfig.permissions) {
if (player.hasPermission(s)) { if (player.hasPermission(s)) {
if (!permWhitelist(player)) { if (!permWhitelist(player)) {
if (join) { if (join) {
T2Csend.console(T2Creplace.replace(Util.getPrefix(), SelectMessages.Perm_consoleOnJoin.replace("[player]", player.getName()).replace("[perm]", s))); T2Csend.console(T2Creplace.replace(Util.getPrefix(), SelectMessages.Perm_consoleOnJoin.replace("[player]", player.getName()).replace("[perm]", s)));
} }
if (SelectConfig.Notify_Warn) { if (SelectConfig.notifyWarn) {
for (Player notifyperm : Bukkit.getOnlinePlayers()) { for (Player notifyperm : Bukkit.getOnlinePlayers()) {
if (notifyperm.hasPermission(Permissions.notify)) { if (notifyperm.hasPermission(Permissions.notify)) {
if (join) { if (join) {
@ -98,27 +98,27 @@ public class Check {
player.getName()).replace("[perm]", s))); player.getName()).replace("[perm]", s)));
} else notifyperm.sendMessage(T2Creplace.replace(Util.getPrefix(), SelectMessages.Perm_consoleKick.replace("[player]", } else notifyperm.sendMessage(T2Creplace.replace(Util.getPrefix(), SelectMessages.Perm_consoleKick.replace("[player]",
player.getName()).replace("[perm]", s))); player.getName()).replace("[perm]", s)));
if (SelectConfig.Notify_Sound_Enable) { if (SelectConfig.notifySoundEnable) {
notifyperm.playSound(player.getLocation(), SelectConfig.Notify_Sound, 3, 1); notifyperm.playSound(player.getLocation(), SelectConfig.notifySound, 3, 1);
} }
} }
} }
} }
if (SelectConfig.PlayerWhithPermission_kick && SelectConfig.Perm_Command_enable) { if (SelectConfig.playerWhithPermissionKick && SelectConfig.permCommandEnable) {
T2Ccmd.console(SelectConfig.KickCommand.replace("[player]", player.getName()).replace("[reason]", T2Creplace.replace(Util.getPrefix(), SelectMessages.Perm_kick))); T2Ccmd.console(SelectConfig.kickCommand.replace("[player]", player.getName()).replace("[reason]", T2Creplace.replace(Util.getPrefix(), SelectMessages.Perm_kick)));
T2Csend.console(T2Creplace.replace(Util.getPrefix(), SelectMessages.Perm_consoleKick.replace("[player]", T2Csend.console(T2Creplace.replace(Util.getPrefix(), SelectMessages.Perm_consoleKick.replace("[player]",
player.getName()).replace("[perm]", s))); player.getName()).replace("[perm]", s)));
for (String cmd : SelectConfig.Perm_Command) { for (String cmd : SelectConfig.permCommand) {
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), cmd.replace("[player]", player.getName()).replace("[perm]", s)); Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), cmd.replace("[player]", player.getName()).replace("[perm]", s));
} }
} }
if (SelectConfig.PlayerWhithPermission_kick) { if (SelectConfig.playerWhithPermissionKick) {
T2Ccmd.console(SelectConfig.KickCommand.replace("[player]", player.getName()).replace("[reason]", T2Creplace.replace(Util.getPrefix(), SelectMessages.Perm_kick))); T2Ccmd.console(SelectConfig.kickCommand.replace("[player]", player.getName()).replace("[reason]", T2Creplace.replace(Util.getPrefix(), SelectMessages.Perm_kick)));
T2Csend.console(T2Creplace.replace(Util.getPrefix(), SelectMessages.Perm_consoleKick.replace("[player]", T2Csend.console(T2Creplace.replace(Util.getPrefix(), SelectMessages.Perm_consoleKick.replace("[player]",
player.getName()).replace("[perm]", s))); player.getName()).replace("[perm]", s)));
} }
if (SelectConfig.Perm_Command_enable) { if (SelectConfig.permCommandEnable) {
for (String cmd : SelectConfig.Perm_Command) { for (String cmd : SelectConfig.permCommand) {
T2Ccmd.console(cmd.replace("[player]", player.getName()).replace("[perm]", s)); T2Ccmd.console(cmd.replace("[player]", player.getName()).replace("[perm]", s));
} }
} }

View File

@ -15,7 +15,7 @@ public class Events implements org.bukkit.event.Listener {
@EventHandler @EventHandler
public void CommandSendEvent(PlayerCommandPreprocessEvent event) { public void CommandSendEvent(PlayerCommandPreprocessEvent event) {
if (SelectConfig.CheckOnCommand) { if (SelectConfig.checkOnCommand) {
Player player = event.getPlayer(); Player player = event.getPlayer();
if (Check.onCheck(player, false)) { if (Check.onCheck(player, false)) {
if (event.isCancelled()) return; if (event.isCancelled()) return;
@ -26,7 +26,7 @@ public class Events implements org.bukkit.event.Listener {
@EventHandler @EventHandler
public void PlayerChatEvent(PlayerChatEvent event) { public void PlayerChatEvent(PlayerChatEvent event) {
if (SelectConfig.CheckOnChat) { if (SelectConfig.checkOnChat) {
Player player = event.getPlayer(); Player player = event.getPlayer();
if (Check.onCheck(player, false)) { if (Check.onCheck(player, false)) {
if (event.isCancelled()) return; if (event.isCancelled()) return;
@ -37,7 +37,7 @@ public class Events implements org.bukkit.event.Listener {
@EventHandler @EventHandler
public void onInteract(PlayerInteractEvent event) { public void onInteract(PlayerInteractEvent event) {
if (SelectConfig.CheckOnInteract) { if (SelectConfig.checkOnInteract) {
Player player = event.getPlayer(); Player player = event.getPlayer();
new BukkitRunnable() { new BukkitRunnable() {
@Override @Override
@ -50,7 +50,7 @@ public class Events implements org.bukkit.event.Listener {
@EventHandler @EventHandler
public void onJoinCheck(PlayerJoinEvent event) { public void onJoinCheck(PlayerJoinEvent event) {
if (SelectConfig.CheckOnJoin) { if (SelectConfig.checkOnJoin) {
Player player = event.getPlayer(); Player player = event.getPlayer();
new BukkitRunnable() { new BukkitRunnable() {
@Override @Override

View File

@ -24,7 +24,7 @@ public class OPCommand implements Listener {
@EventHandler @EventHandler
public void onOPServer(ServerCommandEvent event) { public void onOPServer(ServerCommandEvent event) {
if ((event.getCommand().toLowerCase().startsWith("op ") || event.getCommand().toLowerCase().startsWith("minecraft:op ")) && SelectConfig.OP_Whitelist_Enable) { if ((event.getCommand().toLowerCase().startsWith("op ") || event.getCommand().toLowerCase().startsWith("minecraft:op ")) && SelectConfig.opWhitelistEnable) {
switch (this.isNotOPWTL(event.getCommand())) { switch (this.isNotOPWTL(event.getCommand())) {
case 1: case 1:
T2Csend.sender(event.getSender(), Util.getPrefix() + " " + SelectMessages.PlayerMustBeOnlineToOp); T2Csend.sender(event.getSender(), Util.getPrefix() + " " + SelectMessages.PlayerMustBeOnlineToOp);
@ -41,7 +41,7 @@ public class OPCommand implements Listener {
@EventHandler @EventHandler
public void onOpPlayer(PlayerCommandPreprocessEvent event) { public void onOpPlayer(PlayerCommandPreprocessEvent event) {
if (SelectConfig.OP_Whitelist_Enable) { if (SelectConfig.opWhitelistEnable) {
if ((event.getMessage().toLowerCase().startsWith("/op ") || event.getMessage().toLowerCase().startsWith("/minecraft:op "))) { if ((event.getMessage().toLowerCase().startsWith("/op ") || event.getMessage().toLowerCase().startsWith("/minecraft:op "))) {
switch (this.isNotOPWTL(event.getMessage())) { switch (this.isNotOPWTL(event.getMessage())) {
case 1: case 1:
@ -62,7 +62,7 @@ public class OPCommand implements Listener {
if (command.charAt(0) == '/') command = command.replaceFirst("/", ""); if (command.charAt(0) == '/') command = command.replaceFirst("/", "");
String arg = command.replace("op ", ""); String arg = command.replace("op ", "");
if (SelectConfig.PlayerMustBeOnlineToOp) { if (SelectConfig.playerMustBeOnlineToOp) {
if (Main.getOpHashMap().containsKey(arg.toLowerCase())) { if (Main.getOpHashMap().containsKey(arg.toLowerCase())) {
Player target = Bukkit.getPlayer(arg); Player target = Bukkit.getPlayer(arg);
if (target == null) { if (target == null) {

View File

@ -11,8 +11,8 @@ import org.bukkit.entity.Player;
public class Timer { public class Timer {
public static void RefreshTimer() { public static void RefreshTimer() {
if (SelectConfig.OP_Whitelist_Enable || SelectConfig.Permission_Whitelist_Enable) { if (SelectConfig.opWhitelistEnable || SelectConfig.permissionWhitelistEnable) {
if (SelectConfig.Timer_Enable) { if (SelectConfig.timerEnable) {
int Count = Bukkit.getScheduler().scheduleSyncRepeatingTask(Main.getPlugin(), new Runnable() { int Count = Bukkit.getScheduler().scheduleSyncRepeatingTask(Main.getPlugin(), new Runnable() {
@Override @Override
public void run() { public void run() {
@ -20,7 +20,7 @@ public class Timer {
Check.onCheck(player, false); Check.onCheck(player, false);
} }
} }
}, 0, SelectConfig.RefreshTime * 20L); }, 0, SelectConfig.refreshTime * 20L);
} }
} }
} }