Allow world rewrite options to apply in (some) Vault lookups (#990)
This commit is contained in:
parent
20f992110d
commit
1e73986c60
@ -345,9 +345,11 @@ public class VaultPermissionHook extends AbstractVaultPermission {
|
|||||||
context = this.plugin.getContextManager().getStaticContext().mutableCopy();
|
context = this.plugin.getContextManager().getStaticContext().mutableCopy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String playerWorld = player == null ? null : player.getWorld().getName();
|
||||||
|
|
||||||
// if world is null, we want to do a lookup in the players current context
|
// if world is null, we want to do a lookup in the players current context
|
||||||
// if world is not null, we want to do a lookup in that specific world
|
// if world is not null, we want to do a lookup in that specific world
|
||||||
if (world != null && !world.isEmpty()) {
|
if (world != null && !world.isEmpty() && !world.equalsIgnoreCase(playerWorld)) {
|
||||||
// remove already accumulated worlds
|
// remove already accumulated worlds
|
||||||
context.removeAll(Contexts.WORLD_KEY);
|
context.removeAll(Contexts.WORLD_KEY);
|
||||||
// add the vault world
|
// add the vault world
|
||||||
|
Loading…
Reference in New Issue
Block a user