From 02ff4a4acba0080e555da5e49d951df630a7262f Mon Sep 17 00:00:00 2001 From: Luck Date: Tue, 29 Nov 2016 23:35:25 +0000 Subject: [PATCH] cleanup --- .../lucko/luckperms/bukkit/BukkitListener.java | 2 +- .../common/core/model/ImmutableNode.java | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitListener.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitListener.java index 4caeda7a..ed531f3b 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitListener.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitListener.java @@ -46,7 +46,7 @@ class BukkitListener extends AbstractListener implements Listener { super(plugin); this.plugin = plugin; } - + @EventHandler(priority = EventPriority.LOW) public void onPlayerPreLogin(AsyncPlayerPreLoginEvent e) { if (!plugin.isStarted() || !plugin.getStorage().isAcceptingLogins()) { diff --git a/common/src/main/java/me/lucko/luckperms/common/core/model/ImmutableNode.java b/common/src/main/java/me/lucko/luckperms/common/core/model/ImmutableNode.java index 5711e9b8..eb21cc4a 100644 --- a/common/src/main/java/me/lucko/luckperms/common/core/model/ImmutableNode.java +++ b/common/src/main/java/me/lucko/luckperms/common/core/model/ImmutableNode.java @@ -290,21 +290,21 @@ public class ImmutableNode implements Node { return isWorldSpecific() ? shouldApply(world, applyRegex, this.world) : includeGlobal; } - private static boolean shouldApply(String world, boolean applyRegex, String thisWorld) { - if (world.toLowerCase().startsWith("r=") && applyRegex) { - Pattern p = Patterns.compile(world.substring(2)); + private static boolean shouldApply(String str, boolean applyRegex, String thisStr) { + if (str.toLowerCase().startsWith("r=") && applyRegex) { + Pattern p = Patterns.compile(str.substring(2)); if (p == null) { return false; } - return p.matcher(thisWorld).matches(); + return p.matcher(thisStr).matches(); } - if (world.startsWith("(") && world.endsWith(")") && world.contains("|")) { - final String bits = world.substring(1, world.length() - 1); + if (str.startsWith("(") && str.endsWith(")") && str.contains("|")) { + final String bits = str.substring(1, str.length() - 1); Iterable parts = Splitter.on('|').split(bits); for (String s : parts) { - if (s.equalsIgnoreCase(thisWorld)) { + if (s.equalsIgnoreCase(thisStr)) { return true; } } @@ -312,7 +312,7 @@ public class ImmutableNode implements Node { return false; } - return thisWorld.equalsIgnoreCase(world); + return thisStr.equalsIgnoreCase(str); } @Override