Update luckperms api version
This commit is contained in:
6 files changed
+16
-19
No files matched your search
+1
-1
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>me.lucko</groupId>
|
||||
<artifactId>luckperms-placeholders</artifactId>
|
||||
<version>4.0-SNAPSHOT</version>
|
||||
<version>4.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>placeholders-common</artifactId>
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
package me.lucko.luckperms.placeholders;
|
||||
|
||||
import com.google.common.base.Splitter;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import me.lucko.luckperms.api.Group;
|
||||
@@ -64,7 +65,7 @@ public abstract class LPPlaceholderProvider {
|
||||
}
|
||||
|
||||
public String handle(Player player, String identifier) {
|
||||
User user = this.api.getUserSafe(this.api.getUuidCache().getUUID(player.getUniqueId())).orElse(null);
|
||||
User user = this.api.getUserManager().getUser(player.getUniqueId());
|
||||
if (user == null) {
|
||||
return "";
|
||||
}
|
||||
@@ -101,7 +102,7 @@ public abstract class LPPlaceholderProvider {
|
||||
|
||||
if (identifier.startsWith("inherits_permission_") && identifier.length() > "inherits_permission_".length()) {
|
||||
String node = identifier.substring("inherits_permission_".length());
|
||||
return formatBoolean(user.getPermissions().stream().anyMatch(n -> n.getPermission().equals(node)));
|
||||
return formatBoolean(user.getAllNodes().stream().anyMatch(n -> n.getPermission().equals(node)));
|
||||
}
|
||||
|
||||
if (identifier.startsWith("check_permission_") && identifier.length() > "check_permission_".length()) {
|
||||
@@ -178,8 +179,8 @@ public abstract class LPPlaceholderProvider {
|
||||
)
|
||||
.filter(Optional::isPresent)
|
||||
.map(Optional::get)
|
||||
.map(this::formatGroupName)
|
||||
.findFirst()
|
||||
.map(this::formatGroupName)
|
||||
.orElse("");
|
||||
}
|
||||
|
||||
@@ -197,8 +198,8 @@ public abstract class LPPlaceholderProvider {
|
||||
)
|
||||
.filter(Optional::isPresent)
|
||||
.map(Optional::get)
|
||||
.map(this::formatGroupName)
|
||||
.findFirst()
|
||||
.map(this::formatGroupName)
|
||||
.orElse("");
|
||||
}
|
||||
|
||||
@@ -228,11 +229,11 @@ public abstract class LPPlaceholderProvider {
|
||||
}
|
||||
|
||||
if (identifier.equals("prefix")) {
|
||||
return Optional.ofNullable(data.calculateMeta(this.api.getContextsForPlayer(player)).getPrefix()).orElse("");
|
||||
return Strings.nullToEmpty(data.calculateMeta(this.api.getContextsForPlayer(player)).getPrefix());
|
||||
}
|
||||
|
||||
if (identifier.equals("suffix")) {
|
||||
return Optional.ofNullable(data.calculateMeta(this.api.getContextsForPlayer(player)).getSuffix()).orElse("");
|
||||
return Strings.nullToEmpty(data.calculateMeta(this.api.getContextsForPlayer(player)).getSuffix());
|
||||
}
|
||||
|
||||
if (identifier.startsWith("meta_") && identifier.length() > "meta_".length()) {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>me.lucko</groupId>
|
||||
<artifactId>luckperms-placeholders</artifactId>
|
||||
<version>4.0-SNAPSHOT</version>
|
||||
<version>4.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>luckperms-mvdw-hook</artifactId>
|
||||
@@ -60,7 +60,7 @@
|
||||
<dependency>
|
||||
<groupId>me.lucko</groupId>
|
||||
<artifactId>placeholders-common</artifactId>
|
||||
<version>4.0-SNAPSHOT</version>
|
||||
<version>4.1-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>me.lucko</groupId>
|
||||
<artifactId>luckperms-placeholders</artifactId>
|
||||
<version>4.0-SNAPSHOT</version>
|
||||
<version>4.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>luckperms-papi-expansion</artifactId>
|
||||
@@ -51,11 +51,11 @@
|
||||
<dependency>
|
||||
<groupId>me.lucko</groupId>
|
||||
<artifactId>placeholders-common</artifactId>
|
||||
<version>4.0-SNAPSHOT</version>
|
||||
<version>4.1-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- PlaceholderAPI -->
|
||||
<!-- PlaceholderAPI -->
|
||||
<dependency>
|
||||
<groupId>me.clip</groupId>
|
||||
<artifactId>placeholderapi</artifactId>
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class LuckPermsExpansion extends PlaceholderExpansion {
|
||||
private static final String IDENTIFIER = "luckperms";
|
||||
private static final String PLUGIN_NAME = "LuckPerms";
|
||||
private static final String AUTHOR = "Luck";
|
||||
private static final String VERSION = "4.0";
|
||||
private static final String VERSION = "4.1";
|
||||
|
||||
private LPPlaceholderProvider provider;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>me.lucko</groupId>
|
||||
<artifactId>luckperms-placeholders</artifactId>
|
||||
<version>4.0-SNAPSHOT</version>
|
||||
<version>4.1-SNAPSHOT</version>
|
||||
|
||||
<modules>
|
||||
<module>common</module>
|
||||
@@ -31,7 +31,7 @@
|
||||
<dependency>
|
||||
<groupId>me.lucko.luckperms</groupId>
|
||||
<artifactId>luckperms-api</artifactId>
|
||||
<version>4.0</version>
|
||||
<version>4.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- BukkitAPI -->
|
||||
@@ -48,10 +48,6 @@
|
||||
<id>spigot-repo</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>luck-repo</id>
|
||||
<url>https://repo.lucko.me/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
</project>
|
||||
Reference in new issue
Block a user