mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-24 03:25:19 +01:00
Fix group info command
This commit is contained in:
parent
bfebe6a5d0
commit
637cb0d836
@ -43,7 +43,6 @@ import me.lucko.luckperms.common.util.DurationFormatter;
|
||||
import me.lucko.luckperms.common.util.Predicates;
|
||||
import me.lucko.luckperms.common.verbose.event.MetaCheckEvent;
|
||||
|
||||
import net.luckperms.api.context.ContextSet;
|
||||
import net.luckperms.api.node.Node;
|
||||
import net.luckperms.api.node.types.InheritanceNode;
|
||||
import net.luckperms.api.query.QueryOptions;
|
||||
@ -97,18 +96,10 @@ public class GroupInfo extends ChildCommand<Group> {
|
||||
|
||||
QueryOptions queryOptions = plugin.getContextManager().getStaticQueryOptions();
|
||||
|
||||
String context = "&bNone";
|
||||
String prefix = "&bNone";
|
||||
String suffix = "&bNone";
|
||||
String meta = "&bNone";
|
||||
|
||||
ContextSet contextSet = queryOptions.context();
|
||||
if (!contextSet.isEmpty()) {
|
||||
context = contextSet.toSet().stream()
|
||||
.map(e -> MessageUtils.contextToString(plugin.getLocaleManager(), e.getKey(), e.getValue()))
|
||||
.collect(Collectors.joining(" "));
|
||||
}
|
||||
|
||||
MetaCache data = group.getCachedData().getMetaData(queryOptions);
|
||||
String prefixValue = data.getPrefix(MetaCheckEvent.Origin.INTERNAL);
|
||||
if (prefixValue != null) {
|
||||
@ -127,7 +118,7 @@ public class GroupInfo extends ChildCommand<Group> {
|
||||
.collect(Collectors.joining(" "));
|
||||
}
|
||||
|
||||
Message.GROUP_INFO_CONTEXTUAL_DATA.send(sender, context, prefix, suffix, meta);
|
||||
Message.GROUP_INFO_CONTEXTUAL_DATA.send(sender, prefix, suffix, meta);
|
||||
return CommandResult.SUCCESS;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user