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>
<artifactId>luckperms-api</artifactId>
<build>
<finalName>LuckPerms-API-${release.version}</finalName>
<resources>

View File

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

View File

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

View File

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

View File

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

View File

@ -75,7 +75,7 @@
<dependency>
<groupId>org.spongepowered</groupId>
<artifactId>spongeapi</artifactId>
<version>5.1.0</version>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
<!-- 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.context.ImmutableContextSet;
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.managers.GroupManager;
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.model.SpongeGroup;
import me.lucko.luckperms.sponge.service.LuckPermsService;
@ -184,12 +184,17 @@ public class SpongeGroupManager implements GroupManager, LPSubjectCollection {
@Override
public Predicate<String> getIdentifierValidityPredicate() {
// TODO change this to use the actual limitations
return Predicates.alwaysTrue();
return DataConstraints.GROUP_NAME_TEST;
}
@Override
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());
if (present != null) {
return CompletableFuture.completedFuture(present);