From e659eca5be0f6658239f2e97333500eed332c959 Mon Sep 17 00:00:00 2001 From: cnaude Date: Thu, 27 Jun 2013 21:44:07 -0700 Subject: [PATCH] Fix reload command. --- src/com/cnaude/chairs/Chairs.java | 8 +++++--- src/com/cnaude/chairs/ChairsCommand.java | 2 +- src/plugin.yml | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/com/cnaude/chairs/Chairs.java b/src/com/cnaude/chairs/Chairs.java index aaa8e69..9e89d21 100644 --- a/src/com/cnaude/chairs/Chairs.java +++ b/src/com/cnaude/chairs/Chairs.java @@ -26,8 +26,8 @@ import org.bukkit.plugin.java.JavaPlugin; public class Chairs extends JavaPlugin { private static Chairs instance = null; public static ChairEffects chairEffects; - public List allowedBlocks = new ArrayList(); - public List validSigns = new ArrayList(); + public List allowedBlocks; + public List validSigns; public boolean sneaking, autoRotate, signCheck, permissions, notifyplayer, opsOverridePerms; public boolean invertedStairCheck, seatOccupiedCheck, invertedStepCheck, perItemPerms, ignoreIfBlockInHand; public boolean sitEffectsEnabled; @@ -57,7 +57,7 @@ public class Chairs extends JavaPlugin { pluginFolder = getDataFolder(); configFile = new File(pluginFolder, "config.yml"); createConfig(); - this.getConfig().options().copyDefaults(true); + getConfig().options().copyDefaults(true); saveConfig(); loadConfig(); getServer().getPluginManager().registerEvents(new EventListener(this, ignoreList), this); @@ -149,6 +149,7 @@ public class Chairs extends JavaPlugin { msgDisabled = ChatColor.translateAlternateColorCodes('&',getConfig().getString("messages.disabled")); msgReloaded = ChatColor.translateAlternateColorCodes('&',getConfig().getString("messages.reloaded")); + allowedBlocks = new ArrayList(); for (String s : getConfig().getStringList("allowed-blocks")) { String type; double sh = sittingHeight; @@ -184,6 +185,7 @@ public class Chairs extends JavaPlugin { } } + validSigns = new ArrayList(); for (String type : getConfig().getStringList("valid-signs")) { try { if (type.matches("\\d+")) { diff --git a/src/com/cnaude/chairs/ChairsCommand.java b/src/com/cnaude/chairs/ChairsCommand.java index b851f44..850460d 100644 --- a/src/com/cnaude/chairs/ChairsCommand.java +++ b/src/com/cnaude/chairs/ChairsCommand.java @@ -30,7 +30,7 @@ public class ChairsCommand implements CommandExecutor { } if (args[0].equalsIgnoreCase("reload")) { if (sender.hasPermission("chairs.reload") || !(sender instanceof Player)) { - plugin.reloadConfig(); + //plugin.reloadConfig(); plugin.loadConfig(); plugin.restartEffectsTask(); if (!plugin.msgReloaded.isEmpty()) { diff --git a/src/plugin.yml b/src/plugin.yml index 0b55000..a32f929 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,5 +1,5 @@ name: Chairs -version: 2.1.3 +version: 2.1.4 description: Let players sit on blocks. website: http://dev.bukkit.org/bukkit-plugins/chairsreloaded/ authors: