use of me.lucko.luckperms.common.caching.type.MetaCache in project LuckPerms by lucko.
the class VaultChatHook method getGroupChatSuffix.
@Override
public String getGroupChatSuffix(String world, String name) {
Objects.requireNonNull(name, "name");
Group group = getGroup(name);
if (group == null) {
return null;
}
Contexts contexts = this.permissionHook.contextForLookup(null, world);
MetaCache metaData = group.getCachedData().getMetaData(contexts);
String ret = metaData.getSuffix();
if (log()) {
logMsg("#getGroupSuffix: %s - %s - %s", group.getName(), contexts.getContexts().toMultimap(), ret);
}
return Strings.nullToEmpty(ret);
}
use of me.lucko.luckperms.common.caching.type.MetaCache in project LuckPerms by lucko.
the class VaultChatHook method getUserChatPrefix.
@Override
public String getUserChatPrefix(String world, UUID uuid) {
if (uuid == null) {
return null;
}
User user = getUser(uuid);
if (user == null) {
return null;
}
Contexts contexts = this.permissionHook.contextForLookup(user, world);
MetaCache metaData = user.getCachedData().getMetaData(contexts);
String ret = metaData.getPrefix();
if (log()) {
logMsg("#getUserChatPrefix: %s - %s - %s", user.getFriendlyName(), contexts.getContexts().toMultimap(), ret);
}
return Strings.nullToEmpty(ret);
}
use of me.lucko.luckperms.common.caching.type.MetaCache in project LuckPerms by lucko.
the class VaultChatHook method getUserChatSuffix.
@Override
public String getUserChatSuffix(String world, UUID uuid) {
if (uuid == null) {
return null;
}
User user = getUser(uuid);
if (user == null) {
return null;
}
Contexts contexts = this.permissionHook.contextForLookup(user, world);
MetaCache metaData = user.getCachedData().getMetaData(contexts);
String ret = metaData.getSuffix();
if (log()) {
logMsg("#getUserChatSuffix: %s - %s - %s", user.getFriendlyName(), contexts.getContexts().toMultimap(), ret);
}
return Strings.nullToEmpty(ret);
}
Aggregations