Bump sponge API version, cleanup

This commit is contained in:
Luck 2017-05-09 12:55:45 +01:00
parent 030fb1262e
commit 6817945e12
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
7 changed files with 14 additions and 6 deletions

View File

@ -10,6 +10,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>luckperms-api</artifactId> <artifactId>luckperms-api</artifactId>
<build> <build>
<finalName>LuckPerms-API-${release.version}</finalName> <finalName>LuckPerms-API-${release.version}</finalName>
<resources> <resources>

View File

@ -10,6 +10,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>luckperms-bukkit-legacy</artifactId> <artifactId>luckperms-bukkit-legacy</artifactId>
<build> <build>
<defaultGoal>clean package</defaultGoal> <defaultGoal>clean package</defaultGoal>
<finalName>LuckPerms-Bukkit-Legacy-${full.version}</finalName> <finalName>LuckPerms-Bukkit-Legacy-${full.version}</finalName>

View File

@ -1,5 +1,5 @@
name: LuckPerms name: LuckPerms
version: ${release.version}.${patch.version} version: ${full.version}
description: A permissions plugin description: A permissions plugin
author: Luck author: Luck
website: https://github.com/lucko/LuckPerms website: https://github.com/lucko/LuckPerms

View File

@ -1,5 +1,5 @@
name: LuckPerms name: LuckPerms
version: ${release.version}.${patch.version} version: ${full.version}
description: A permissions plugin description: A permissions plugin
author: Luck author: Luck
main: me.lucko.luckperms.bungee.LPBungeePlugin main: me.lucko.luckperms.bungee.LPBungeePlugin

View File

@ -7,6 +7,7 @@
<groupId>me.lucko.luckperms</groupId> <groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms</artifactId> <artifactId>luckperms</artifactId>
<version>3.1-SNAPSHOT</version> <version>3.1-SNAPSHOT</version>
<modules> <modules>
<module>api</module> <module>api</module>
<module>common</module> <module>common</module>

View File

@ -75,7 +75,7 @@
<dependency> <dependency>
<groupId>org.spongepowered</groupId> <groupId>org.spongepowered</groupId>
<artifactId>spongeapi</artifactId> <artifactId>spongeapi</artifactId>
<version>5.1.0</version> <version>6.0.0</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- LuckPerms Common --> <!-- LuckPerms Common -->

View File

@ -40,10 +40,10 @@ import me.lucko.luckperms.api.HeldPermission;
import me.lucko.luckperms.api.Tristate; import me.lucko.luckperms.api.Tristate;
import me.lucko.luckperms.api.context.ImmutableContextSet; import me.lucko.luckperms.api.context.ImmutableContextSet;
import me.lucko.luckperms.api.event.cause.CreationCause; import me.lucko.luckperms.api.event.cause.CreationCause;
import me.lucko.luckperms.common.constants.DataConstraints;
import me.lucko.luckperms.common.core.model.Group; import me.lucko.luckperms.common.core.model.Group;
import me.lucko.luckperms.common.managers.GroupManager; import me.lucko.luckperms.common.managers.GroupManager;
import me.lucko.luckperms.common.utils.ImmutableCollectors; import me.lucko.luckperms.common.utils.ImmutableCollectors;
import me.lucko.luckperms.common.utils.Predicates;
import me.lucko.luckperms.sponge.LPSpongePlugin; import me.lucko.luckperms.sponge.LPSpongePlugin;
import me.lucko.luckperms.sponge.model.SpongeGroup; import me.lucko.luckperms.sponge.model.SpongeGroup;
import me.lucko.luckperms.sponge.service.LuckPermsService; import me.lucko.luckperms.sponge.service.LuckPermsService;
@ -184,12 +184,17 @@ public class SpongeGroupManager implements GroupManager, LPSubjectCollection {
@Override @Override
public Predicate<String> getIdentifierValidityPredicate() { public Predicate<String> getIdentifierValidityPredicate() {
// TODO change this to use the actual limitations return DataConstraints.GROUP_NAME_TEST;
return Predicates.alwaysTrue();
} }
@Override @Override
public CompletableFuture<LPSubject> loadSubject(String identifier) { public CompletableFuture<LPSubject> loadSubject(String identifier) {
if (!DataConstraints.GROUP_NAME_TEST.test(identifier)) {
CompletableFuture<LPSubject> fut = new CompletableFuture<>();
fut.completeExceptionally(new IllegalArgumentException("Illegal subject identifier"));
return fut;
}
LPSubject present = subjectLoadingCache.getIfPresent(identifier.toLowerCase()); LPSubject present = subjectLoadingCache.getIfPresent(identifier.toLowerCase());
if (present != null) { if (present != null) {
return CompletableFuture.completedFuture(present); return CompletableFuture.completedFuture(present);