1
0
mirror of https://e.coding.net/circlecloud/Residence.git synced 2025-11-24 21:46:16 +00:00

fix resload command ...

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092
2015-10-03 12:12:01 +08:00
parent 5eab6a07e7
commit 30a1573b66
2 changed files with 8 additions and 1 deletions

View File

@@ -551,6 +551,12 @@ public class ResidenceMain extends JavaPlugin {
@Override @Override
public void reloadConfig() { public void reloadConfig() {
config.reload(); config.reload();
gmanager = new PermissionManager(this);
imanager = new WorldItemManager(this.getConfig());
wmanager = new WorldFlagManager(this);
entitymanager = new EntityManager(this);
chatmanager = new ChatManager(this);
rentmanager = new RentManager(this);
} }
public void reloadPlugin() { public void reloadPlugin() {

View File

@@ -17,7 +17,7 @@ public class CommandResLoad extends BaseCommand {
ResidenceMain plugin; ResidenceMain plugin;
public CommandResLoad(final ResidenceMain plugin) { public CommandResLoad(final ResidenceMain plugin) {
super("resreload"); super("resload");
this.plugin = plugin; this.plugin = plugin;
} }
@@ -25,6 +25,7 @@ public class CommandResLoad extends BaseCommand {
public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException { public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException {
if (!(sender instanceof Player) || plugin.getPermissionManager().isResidenceAdmin((Player) sender)) { if (!(sender instanceof Player) || plugin.getPermissionManager().isResidenceAdmin((Player) sender)) {
try { try {
plugin.reloadConfig();
plugin.loadYml(); plugin.loadYml();
sender.sendMessage(ChatColor.GREEN + "[Residence] 从配置保存文件重新载入数据..."); sender.sendMessage(ChatColor.GREEN + "[Residence] 从配置保存文件重新载入数据...");
} catch (final Exception ex) { } catch (final Exception ex) {