Fixed Vault permissions setup.
This commit is contained in:
parent
e54914bd22
commit
08906f6004
@ -63,7 +63,6 @@ public class Plugin extends JavaPlugin
|
|||||||
@Override
|
@Override
|
||||||
public void onLoad()
|
public void onLoad()
|
||||||
{
|
{
|
||||||
setupPermissions();
|
|
||||||
ConfigurationSerialization.registerClass(Gate.class);
|
ConfigurationSerialization.registerClass(Gate.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,13 +72,18 @@ public class Plugin extends JavaPlugin
|
|||||||
if (getServer().getPluginManager().getPlugin("Vault") == null) {
|
if (getServer().getPluginManager().getPlugin("Vault") == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RegisteredServiceProvider<Permission> rsp = getServer().getServicesManager().getRegistration(Permission.class);
|
RegisteredServiceProvider<Permission> rsp = getServer().getServicesManager().getRegistration(Permission.class);
|
||||||
|
|
||||||
if (rsp != null)
|
if (rsp != null)
|
||||||
{
|
{
|
||||||
|
log("Using permission provider provided by Vault.");
|
||||||
permission = rsp.getProvider();
|
permission = rsp.getProvider();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
log("Not using setup permission provider provided by Vault.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -95,6 +99,9 @@ public class Plugin extends JavaPlugin
|
|||||||
@Override
|
@Override
|
||||||
public void onEnable()
|
public void onEnable()
|
||||||
{
|
{
|
||||||
|
// Setup permissions
|
||||||
|
setupPermissions();
|
||||||
|
|
||||||
// Add the commands
|
// Add the commands
|
||||||
commands.add(new CommandHelp());
|
commands.add(new CommandHelp());
|
||||||
commands.add(new CommandCreate());
|
commands.add(new CommandCreate());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user