From 08906f6004bcb58365502e45c523de072f0fdf37 Mon Sep 17 00:00:00 2001 From: Tobias Ottenweller Date: Sat, 23 Feb 2013 19:53:05 +0100 Subject: [PATCH] Fixed Vault permissions setup. --- src/de/craftinc/gates/Plugin.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/de/craftinc/gates/Plugin.java b/src/de/craftinc/gates/Plugin.java index b70e0fd..d8669b5 100644 --- a/src/de/craftinc/gates/Plugin.java +++ b/src/de/craftinc/gates/Plugin.java @@ -63,7 +63,6 @@ public class Plugin extends JavaPlugin @Override public void onLoad() { - setupPermissions(); ConfigurationSerialization.registerClass(Gate.class); } @@ -73,13 +72,18 @@ public class Plugin extends JavaPlugin if (getServer().getPluginManager().getPlugin("Vault") == null) { return; } - + RegisteredServiceProvider rsp = getServer().getServicesManager().getRegistration(Permission.class); if (rsp != null) { + log("Using permission provider provided by Vault."); permission = rsp.getProvider(); } + else + { + log("Not using setup permission provider provided by Vault."); + } } @@ -95,6 +99,9 @@ public class Plugin extends JavaPlugin @Override public void onEnable() { + // Setup permissions + setupPermissions(); + // Add the commands commands.add(new CommandHelp()); commands.add(new CommandCreate());