Fix vault lookups with a specified world

This commit is contained in:
Luck 2017-07-02 10:49:07 +01:00
parent 770db2fee0
commit 7083d55a9b
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -151,7 +151,7 @@ public class VaultPermissionHook extends Permission {
public Contexts createContextForWorldSet(String world) {
MutableContextSet context = MutableContextSet.create();
if (world != null && !world.equals("") && !world.equalsIgnoreCase("global")) {
context.add("world", world);
context.add("world", world.toLowerCase());
}
context.add("server", getServer());
return new Contexts(context, isIncludeGlobal(), true, true, true, true, false);
@ -160,7 +160,7 @@ public class VaultPermissionHook extends Permission {
public Contexts createContextForWorldLookup(String world) {
MutableContextSet context = MutableContextSet.create();
if (world != null && !world.equals("") && !world.equalsIgnoreCase("global")) {
context.add("world", world);
context.add("world", world.toLowerCase());
}
context.add("server", getServer());
context.addAll(plugin.getConfiguration().getContextsFile().getStaticContexts());
@ -185,7 +185,7 @@ public class VaultPermissionHook extends Permission {
// add the vault settings
if (world != null && !world.equals("") && !world.equalsIgnoreCase("global")) {
context.add("world", world);
context.add("world", world.toLowerCase());
}
context.add("server", getServer());