diff --git a/api/pom.xml b/api/pom.xml index 960bb7188..8ffa848ad 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -84,6 +84,7 @@ 19.0 provided + com.google.code.findbugs jsr305 diff --git a/api/src/main/java/me/lucko/luckperms/api/Contexts.java b/api/src/main/java/me/lucko/luckperms/api/Contexts.java index 0665819f4..1979efdeb 100644 --- a/api/src/main/java/me/lucko/luckperms/api/Contexts.java +++ b/api/src/main/java/me/lucko/luckperms/api/Contexts.java @@ -242,7 +242,16 @@ public class Contexts { } private int calculateHashCode() { - return Objects.hash(this.context, this.op, this.includeGlobal, this.includeGlobalWorld, this.applyGroups, this.applyGlobalGroups, this.applyGlobalWorldGroups); + final int PRIME = 59; + int result = 1; + result = result * PRIME + this.context.hashCode(); + result = result * PRIME + (this.op ? 79 : 97); + result = result * PRIME + (this.includeGlobal ? 79 : 97); + result = result * PRIME + (this.includeGlobalWorld ? 79 : 97); + result = result * PRIME + (this.applyGroups ? 79 : 97); + result = result * PRIME + (this.applyGlobalGroups ? 79 : 97); + result = result * PRIME + (this.applyGlobalWorldGroups ? 79 : 97); + return result; } @Override diff --git a/bukkit-legacy/pom.xml b/bukkit-legacy/pom.xml deleted file mode 100644 index bb841f158..000000000 --- a/bukkit-legacy/pom.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - luckperms - me.lucko.luckperms - 4.0-SNAPSHOT - - 4.0.0 - - luckperms-bukkit-legacy - - - clean package - LuckPerms-Bukkit-Legacy-${full.version} - - - org.apache.maven.plugins - maven-compiler-plugin - ${compiler.version} - - 1.8 - 1.8 - - - - org.apache.maven.plugins - maven-shade-plugin - ${shade.version} - - - package - - shade - - - false - false - - - com.google.common - me.lucko.luckperms.lib.guava - - - com.google.gson - me.lucko.luckperms.lib.gson - - - net.kyori.text - me.lucko.luckperms.lib.text - - - - - - - - - - - - sign - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.6 - - - sign-artifacts - verify - - sign - - - - - - - - - - - - - me.lucko.luckperms - luckperms-bukkit - ${project.version} - compile - - - me.lucko.luckperms - luckperms-common - - - me.lucko.luckperms - luckperms-api - - - - - - - - com.google.code.gson - gson - 2.7 - compile - - - - com.google.guava - guava - 19.0 - compile - - - - diff --git a/bukkit/pom.xml b/bukkit/pom.xml index 8aadaa670..8dd5d34a2 100644 --- a/bukkit/pom.xml +++ b/bukkit/pom.xml @@ -58,13 +58,31 @@ - + + + me.lucko.luckperms + luckperms-common + ${project.version} + compile + + + + + com.google.code.findbugs + jsr305 + 3.0.2 + provided + + + org.spigotmc spigot-api 1.12.2-R0.1-SNAPSHOT provided + + net.milkbowl.vault @@ -78,26 +96,6 @@ - - - me.lucko.luckperms - luckperms-common - ${project.version} - compile - - - - me.lucko.luckperms - luckperms-api - ${project.version} - compile - - - com.google.code.findbugs - jsr305 - 3.0.2 - provided - lilypad.client.connect @@ -105,7 +103,6 @@ 0.0.1-SNAPSHOT provided - org.tyrannyofheaven.bukkit diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/LPBukkitPlugin.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/LPBukkitPlugin.java index 95e2d8545..dcd973ef1 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/LPBukkitPlugin.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/LPBukkitPlugin.java @@ -140,9 +140,12 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin { private LogDispatcher logDispatcher; private Set uniqueConnections = ConcurrentHashMap.newKeySet(); + private boolean invalidVersion = false; + @Override public void onLoad() { if (checkInvalidVersion()) { + this.invalidVersion = true; return; } @@ -158,7 +161,7 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin { @Override public void onEnable() { - if (checkInvalidVersion()) { + if (this.invalidVersion) { getLogger().severe("----------------------------------------------------------------------"); getLogger().severe("Your server version is not compatible with this build of LuckPerms. :("); getLogger().severe(""); @@ -332,7 +335,7 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin { @Override public void onDisable() { - if (checkInvalidVersion()) { + if (this.invalidVersion) { return; } diff --git a/bungee/pom.xml b/bungee/pom.xml index 4b7328ba5..1e2b1508d 100644 --- a/bungee/pom.xml +++ b/bungee/pom.xml @@ -58,6 +58,22 @@ + + + me.lucko.luckperms + luckperms-common + ${project.version} + compile + + + + + com.google.code.findbugs + jsr305 + 3.0.2 + provided + + net.md-5 @@ -65,26 +81,8 @@ 1.12-SNAPSHOT provided - - - me.lucko.luckperms - luckperms-common - ${project.version} - compile - - - - me.lucko.luckperms - luckperms-api - ${project.version} - compile - - - com.google.code.findbugs - jsr305 - 3.0.2 - provided - + + com.imaginarycode.minecraft @@ -92,8 +90,6 @@ 0.4 provided - - net.alpenblock diff --git a/common/pom.xml b/common/pom.xml index 00c2468bc..30379d12c 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -28,13 +28,22 @@ - + me.lucko.luckperms luckperms-api ${project.version} + compile + + + + + com.google.code.findbugs + jsr305 + 3.0.2 provided + net.kyori @@ -60,13 +69,37 @@ + + + + + com.google.code.gson + gson + 2.7 + provided + + + + com.google.guava + guava + 19.0 + provided + + + + com.github.ben-manes.caffeine + caffeine + 2.6.0 + provided + + + ninja.leaping.configurate configurate-core 3.3 - compile - true + provided com.google.guava @@ -74,6 +107,7 @@ + ninja.leaping.configurate configurate-yaml @@ -86,6 +120,7 @@ + ninja.leaping.configurate configurate-gson @@ -98,6 +133,7 @@ + ninja.leaping.configurate configurate-hocon @@ -132,33 +168,6 @@ 1.14 provided - - - com.google.code.gson - gson - 2.7 - provided - - - - com.google.guava - guava - 19.0 - provided - - - - com.github.ben-manes.caffeine - caffeine - 2.6.0 - provided - - - com.google.code.findbugs - jsr305 - 3.0.2 - provided - diff --git a/pom.xml b/pom.xml index d923db069..a1721b844 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,6 @@ api common bukkit - bukkit-legacy bungee sponge/sponge-service sponge/sponge-service-api6 diff --git a/sponge/pom.xml b/sponge/pom.xml index 184ba2cff..ad2ef43d8 100644 --- a/sponge/pom.xml +++ b/sponge/pom.xml @@ -71,48 +71,43 @@ - - - me.lucko.luckperms - luckperms-sponge-service - ${project.version} - compile - - - - me.lucko.luckperms - luckperms-sponge-service-api6 - ${project.version} - compile - - - - me.lucko.luckperms - luckperms-sponge-service-api7 - ${project.version} - compile - - - - org.spongepowered - spongeapi - 6.0.0 - provided - - + me.lucko.luckperms luckperms-common ${project.version} compile - + + me.lucko.luckperms - luckperms-api + luckperms-sponge-service ${project.version} compile + + + me.lucko.luckperms + luckperms-sponge-service-api6 + ${project.version} + compile + + + + me.lucko.luckperms + luckperms-sponge-service-api7 + ${project.version} + compile + + + + + org.spongepowered + spongeapi + 6.0.0 + provided + diff --git a/sponge/sponge-service-api6/pom.xml b/sponge/sponge-service-api6/pom.xml index 9d1b58ee4..7a0350242 100644 --- a/sponge/sponge-service-api6/pom.xml +++ b/sponge/sponge-service-api6/pom.xml @@ -29,28 +29,23 @@ - - - me.lucko.luckperms - luckperms-sponge-service - ${project.version} - provided - - + me.lucko.luckperms luckperms-common ${project.version} provided - + + me.lucko.luckperms - luckperms-api + luckperms-sponge-service ${project.version} provided - + + org.spongepowered spongeapi diff --git a/sponge/sponge-service-api7/pom.xml b/sponge/sponge-service-api7/pom.xml index f9e8f4c97..7b60fbaeb 100644 --- a/sponge/sponge-service-api7/pom.xml +++ b/sponge/sponge-service-api7/pom.xml @@ -29,32 +29,27 @@ - - - me.lucko.luckperms - luckperms-sponge-service - ${project.version} - provided - - + me.lucko.luckperms luckperms-common ${project.version} provided - + + me.lucko.luckperms - luckperms-api + luckperms-sponge-service ${project.version} provided - + + org.spongepowered spongeapi - 7.0.0-SNAPSHOT + 7.0.0 provided diff --git a/sponge/sponge-service/pom.xml b/sponge/sponge-service/pom.xml index 4ca070942..8cea30fba 100644 --- a/sponge/sponge-service/pom.xml +++ b/sponge/sponge-service/pom.xml @@ -29,28 +29,23 @@ - - - org.spongepowered - spongeapi - 7.0.0-SNAPSHOT - provided - true - - + me.lucko.luckperms luckperms-common ${project.version} provided - + + - me.lucko.luckperms - luckperms-api - ${project.version} + org.spongepowered + spongeapi + 7.0.0 provided + true + com.google.guava