mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2025-01-01 14:07:56 +01:00
Use getPlainDisplayName to get name for hover messages (#1663)
This commit is contained in:
parent
6325e25630
commit
2eb0c1e67e
@ -174,7 +174,7 @@ public class MetaInfo extends SharedSubCommand {
|
|||||||
HoverEvent hoverEvent = HoverEvent.showText(TextUtils.fromLegacy(TextUtils.joinNewline(
|
HoverEvent hoverEvent = HoverEvent.showText(TextUtils.fromLegacy(TextUtils.joinNewline(
|
||||||
"¥3> ¥a" + node.getPriority() + " ¥7- ¥r" + node.getMetaValue(),
|
"¥3> ¥a" + node.getPriority() + " ¥7- ¥r" + node.getMetaValue(),
|
||||||
" ",
|
" ",
|
||||||
"¥7Click to remove this " + node.getMetaType().name().toLowerCase() + " from " + holder.getFormattedDisplayName()
|
"¥7Click to remove this " + node.getMetaType().name().toLowerCase() + " from " + holder.getPlainDisplayName()
|
||||||
), '¥'));
|
), '¥'));
|
||||||
|
|
||||||
String id = holder.getType() == HolderType.GROUP ? holder.getObjectName() : holder.getFormattedDisplayName();
|
String id = holder.getType() == HolderType.GROUP ? holder.getObjectName() : holder.getFormattedDisplayName();
|
||||||
@ -201,10 +201,10 @@ public class MetaInfo extends SharedSubCommand {
|
|||||||
HoverEvent hoverEvent = HoverEvent.showText(TextUtils.fromLegacy(TextUtils.joinNewline(
|
HoverEvent hoverEvent = HoverEvent.showText(TextUtils.fromLegacy(TextUtils.joinNewline(
|
||||||
"¥3> ¥r" + node.getMetaKey() + " ¥7- ¥r" + node.getMetaValue(),
|
"¥3> ¥r" + node.getMetaKey() + " ¥7- ¥r" + node.getMetaValue(),
|
||||||
" ",
|
" ",
|
||||||
"¥7Click to remove this meta pair from " + holder.getFormattedDisplayName()
|
"¥7Click to remove this meta pair from " + holder.getPlainDisplayName()
|
||||||
), '¥'));
|
), '¥'));
|
||||||
|
|
||||||
String id = holder.getType() == HolderType.GROUP ? holder.getObjectName() : holder.getFormattedDisplayName();
|
String id = holder.getType() == HolderType.GROUP ? holder.getObjectName() : holder.getPlainDisplayName();
|
||||||
boolean explicitGlobalContext = !holder.getPlugin().getConfiguration().getContextsFile().getDefaultContexts().isEmpty();
|
boolean explicitGlobalContext = !holder.getPlugin().getConfiguration().getContextsFile().getDefaultContexts().isEmpty();
|
||||||
String command = "/" + label + " " + NodeCommandFactory.generateCommand(node, id, holder.getType(), false, explicitGlobalContext);
|
String command = "/" + label + " " + NodeCommandFactory.generateCommand(node, id, holder.getType(), false, explicitGlobalContext);
|
||||||
ClickEvent clickEvent = ClickEvent.suggestCommand(command);
|
ClickEvent clickEvent = ClickEvent.suggestCommand(command);
|
||||||
|
@ -139,10 +139,10 @@ public class ParentInfo extends SharedSubCommand {
|
|||||||
HoverEvent hoverEvent = HoverEvent.showText(TextUtils.fromLegacy(TextUtils.joinNewline(
|
HoverEvent hoverEvent = HoverEvent.showText(TextUtils.fromLegacy(TextUtils.joinNewline(
|
||||||
"&3> &f" + node.getGroupName(),
|
"&3> &f" + node.getGroupName(),
|
||||||
" ",
|
" ",
|
||||||
"&7Click to remove this parent from " + holder.getFormattedDisplayName()
|
"&7Click to remove this parent from " + holder.getPlainDisplayName()
|
||||||
), TextUtils.AMPERSAND_CHAR));
|
), TextUtils.AMPERSAND_CHAR));
|
||||||
|
|
||||||
String id = holder.getType() == HolderType.GROUP ? holder.getObjectName() : holder.getFormattedDisplayName();
|
String id = holder.getType() == HolderType.GROUP ? holder.getObjectName() : holder.getPlainDisplayName();
|
||||||
boolean explicitGlobalContext = !holder.getPlugin().getConfiguration().getContextsFile().getDefaultContexts().isEmpty();
|
boolean explicitGlobalContext = !holder.getPlugin().getConfiguration().getContextsFile().getDefaultContexts().isEmpty();
|
||||||
String command = "/" + label + " " + NodeCommandFactory.generateCommand(node, id, holder.getType(), false, explicitGlobalContext);
|
String command = "/" + label + " " + NodeCommandFactory.generateCommand(node, id, holder.getType(), false, explicitGlobalContext);
|
||||||
ClickEvent clickEvent = ClickEvent.suggestCommand(command);
|
ClickEvent clickEvent = ClickEvent.suggestCommand(command);
|
||||||
|
@ -139,10 +139,10 @@ public class PermissionInfo extends SharedSubCommand {
|
|||||||
HoverEvent hoverEvent = HoverEvent.showText(TextUtils.fromLegacy(TextUtils.joinNewline(
|
HoverEvent hoverEvent = HoverEvent.showText(TextUtils.fromLegacy(TextUtils.joinNewline(
|
||||||
"¥3> " + (node.getValue() ? "¥a" : "¥c") + node.getKey(),
|
"¥3> " + (node.getValue() ? "¥a" : "¥c") + node.getKey(),
|
||||||
" ",
|
" ",
|
||||||
"¥7Click to remove this node from " + holder.getFormattedDisplayName()
|
"¥7Click to remove this node from " + holder.getPlainDisplayName()
|
||||||
), '¥'));
|
), '¥'));
|
||||||
|
|
||||||
String id = holder.getType() == HolderType.GROUP ? holder.getObjectName() : holder.getFormattedDisplayName();
|
String id = holder.getType() == HolderType.GROUP ? holder.getObjectName() : holder.getPlainDisplayName();
|
||||||
boolean explicitGlobalContext = !holder.getPlugin().getConfiguration().getContextsFile().getDefaultContexts().isEmpty();
|
boolean explicitGlobalContext = !holder.getPlugin().getConfiguration().getContextsFile().getDefaultContexts().isEmpty();
|
||||||
String command = "/" + label + " " + NodeCommandFactory.generateCommand(node, id, holder.getType(), false, explicitGlobalContext);
|
String command = "/" + label + " " + NodeCommandFactory.generateCommand(node, id, holder.getType(), false, explicitGlobalContext);
|
||||||
ClickEvent clickEvent = ClickEvent.suggestCommand(command);
|
ClickEvent clickEvent = ClickEvent.suggestCommand(command);
|
||||||
|
Loading…
Reference in New Issue
Block a user