fixed Luckperms
This commit is contained in:
parent
79b542d052
commit
a898d0df05
@ -116,11 +116,13 @@ public final class Listeners {
|
|||||||
|
|
||||||
private String luckperms(String message, Player p) {
|
private String luckperms(String message, Player p) {
|
||||||
User user = luckPermsAPI.getPlayerAdapter(Player.class).getUser(p);
|
User user = luckPermsAPI.getPlayerAdapter(Player.class).getUser(p);
|
||||||
if (message.contains("#prefix#")) {
|
String prefix = user.getCachedData().getMetaData().getPrefix();
|
||||||
message = message.replace("#prefix#", Objects.requireNonNull(user.getCachedData().getMetaData().getPrefix()));
|
String suffix = user.getCachedData().getMetaData().getPrefix();
|
||||||
|
if (message.contains("#prefix#")&&prefix != null) {
|
||||||
|
message = message.replace("#prefix#", prefix);
|
||||||
}
|
}
|
||||||
if (message.contains("#suffix#")) {
|
if (message.contains("#suffix#")&&suffix != null) {
|
||||||
message = message.replace("#suffix#", Objects.requireNonNull(user.getCachedData().getMetaData().getSuffix()));
|
message = message.replace("#suffix#", suffix);
|
||||||
}
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user