From 116094ea967a62f7f96f8f7c8c7d7c06352de190 Mon Sep 17 00:00:00 2001 From: Luck Date: Sun, 11 Sep 2016 14:34:38 +0100 Subject: [PATCH] Maybe fix an issue with per-server prefixes/suffixes --- .../luckperms/api/vault/VaultChatHook.java | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/bukkit/src/main/java/me/lucko/luckperms/api/vault/VaultChatHook.java b/bukkit/src/main/java/me/lucko/luckperms/api/vault/VaultChatHook.java index c0d94c26..8e6395e9 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/api/vault/VaultChatHook.java +++ b/bukkit/src/main/java/me/lucko/luckperms/api/vault/VaultChatHook.java @@ -118,10 +118,8 @@ public class VaultChatHook extends Chat { continue; } - if (!perms.getServer().equalsIgnoreCase("global")) { - if (!n.shouldApplyOnServer(perms.getServer(), perms.isIncludeGlobal(), false)) { - continue; - } + if (!n.shouldApplyOnServer(perms.getServer(), perms.isIncludeGlobal(), false)) { + continue; } if (!n.shouldApplyOnWorld(world, perms.isIncludeGlobal(), false)) { @@ -169,17 +167,15 @@ public class VaultChatHook extends Chat { continue; } - if (!perms.getServer().equalsIgnoreCase("global")) { - if (!n.shouldApplyOnServer(perms.getServer(), perms.isIncludeGlobal(), false)) { - continue; - } - } - - if (!n.shouldApplyOnWorld(world, perms.isIncludeGlobal(), false)) { + if (prefix ? !n.isPrefix() : !n.isSuffix()) { continue; } - if (prefix ? !n.isPrefix() : !n.isSuffix()) { + if (!n.shouldApplyOnServer(perms.getServer(), perms.isIncludeGlobal(), false)) { + continue; + } + + if (!n.shouldApplyOnWorld(world, perms.isIncludeGlobal(), false)) { continue; }