mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-27 21:29:47 +01:00
Just use the section char instead of some other random one
Idk wtf I was thinking
This commit is contained in:
parent
f5e41f7e7e
commit
91337b49ea
@ -105,8 +105,8 @@ public class MetaAddChatMeta extends GenericChildCommand {
|
|||||||
if (result.wasSuccessful()) {
|
if (result.wasSuccessful()) {
|
||||||
TextComponent.Builder builder = Message.ADD_CHATMETA_SUCCESS.asComponent(plugin.getLocaleManager(), holder.getFormattedDisplayName(), this.type.name().toLowerCase(), meta, priority, MessageUtils.contextSetToString(plugin.getLocaleManager(), context)).toBuilder();
|
TextComponent.Builder builder = Message.ADD_CHATMETA_SUCCESS.asComponent(plugin.getLocaleManager(), holder.getFormattedDisplayName(), this.type.name().toLowerCase(), meta, priority, MessageUtils.contextSetToString(plugin.getLocaleManager(), context)).toBuilder();
|
||||||
HoverEvent event = HoverEvent.showText(TextUtils.fromLegacy(
|
HoverEvent event = HoverEvent.showText(TextUtils.fromLegacy(
|
||||||
"¥3Raw " + this.type.name().toLowerCase() + ": ¥r" + meta,
|
"§3Raw " + this.type.name().toLowerCase() + ": §r" + meta,
|
||||||
'¥'
|
'§'
|
||||||
));
|
));
|
||||||
builder.applyDeep(c -> c.hoverEvent(event));
|
builder.applyDeep(c -> c.hoverEvent(event));
|
||||||
sender.sendMessage(builder.build());
|
sender.sendMessage(builder.build());
|
||||||
|
@ -114,8 +114,8 @@ public class MetaAddTempChatMeta extends GenericChildCommand {
|
|||||||
|
|
||||||
TextComponent.Builder builder = Message.ADD_TEMP_CHATMETA_SUCCESS.asComponent(plugin.getLocaleManager(), holder.getFormattedDisplayName(), this.type.name().toLowerCase(), meta, priority, DurationFormatter.LONG.format(duration), MessageUtils.contextSetToString(plugin.getLocaleManager(), context)).toBuilder();
|
TextComponent.Builder builder = Message.ADD_TEMP_CHATMETA_SUCCESS.asComponent(plugin.getLocaleManager(), holder.getFormattedDisplayName(), this.type.name().toLowerCase(), meta, priority, DurationFormatter.LONG.format(duration), MessageUtils.contextSetToString(plugin.getLocaleManager(), context)).toBuilder();
|
||||||
HoverEvent event = HoverEvent.showText(TextUtils.fromLegacy(
|
HoverEvent event = HoverEvent.showText(TextUtils.fromLegacy(
|
||||||
"¥3Raw " + this.type.name().toLowerCase() + ": ¥r" + meta,
|
"§3Raw " + this.type.name().toLowerCase() + ": §r" + meta,
|
||||||
'¥'
|
'§'
|
||||||
));
|
));
|
||||||
builder.applyDeep(c -> c.hoverEvent(event));
|
builder.applyDeep(c -> c.hoverEvent(event));
|
||||||
sender.sendMessage(builder.build());
|
sender.sendMessage(builder.build());
|
||||||
|
@ -172,10 +172,10 @@ public class MetaInfo extends GenericChildCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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.getPlainDisplayName()
|
"§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();
|
||||||
boolean explicitGlobalContext = !holder.getPlugin().getConfiguration().getContextsFile().getDefaultContexts().isEmpty();
|
boolean explicitGlobalContext = !holder.getPlugin().getConfiguration().getContextsFile().getDefaultContexts().isEmpty();
|
||||||
@ -199,10 +199,10 @@ public class MetaInfo extends GenericChildCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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.getPlainDisplayName()
|
"§7Click to remove this meta pair from " + holder.getPlainDisplayName()
|
||||||
), '¥'));
|
), '§'));
|
||||||
|
|
||||||
String id = holder.getType() == HolderType.GROUP ? holder.getObjectName() : holder.getPlainDisplayName();
|
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();
|
||||||
|
@ -119,8 +119,8 @@ public class MetaRemoveChatMeta extends GenericChildCommand {
|
|||||||
if (result.wasSuccessful()) {
|
if (result.wasSuccessful()) {
|
||||||
TextComponent.Builder builder = Message.REMOVE_CHATMETA_SUCCESS.asComponent(plugin.getLocaleManager(), holder.getFormattedDisplayName(), this.type.name().toLowerCase(), meta, priority, MessageUtils.contextSetToString(plugin.getLocaleManager(), context)).toBuilder();
|
TextComponent.Builder builder = Message.REMOVE_CHATMETA_SUCCESS.asComponent(plugin.getLocaleManager(), holder.getFormattedDisplayName(), this.type.name().toLowerCase(), meta, priority, MessageUtils.contextSetToString(plugin.getLocaleManager(), context)).toBuilder();
|
||||||
HoverEvent event = HoverEvent.showText(TextUtils.fromLegacy(
|
HoverEvent event = HoverEvent.showText(TextUtils.fromLegacy(
|
||||||
"¥3Raw " + this.type.name().toLowerCase() + ": ¥r" + meta,
|
"§3Raw " + this.type.name().toLowerCase() + ": §r" + meta,
|
||||||
'¥'
|
'§'
|
||||||
));
|
));
|
||||||
builder.applyDeep(c -> c.hoverEvent(event));
|
builder.applyDeep(c -> c.hoverEvent(event));
|
||||||
sender.sendMessage(builder.build());
|
sender.sendMessage(builder.build());
|
||||||
|
@ -119,8 +119,8 @@ public class MetaRemoveTempChatMeta extends GenericChildCommand {
|
|||||||
if (result.wasSuccessful()) {
|
if (result.wasSuccessful()) {
|
||||||
TextComponent.Builder builder = Message.REMOVE_TEMP_CHATMETA_SUCCESS.asComponent(plugin.getLocaleManager(), holder.getFormattedDisplayName(), this.type.name().toLowerCase(), meta, priority, MessageUtils.contextSetToString(plugin.getLocaleManager(), context)).toBuilder();
|
TextComponent.Builder builder = Message.REMOVE_TEMP_CHATMETA_SUCCESS.asComponent(plugin.getLocaleManager(), holder.getFormattedDisplayName(), this.type.name().toLowerCase(), meta, priority, MessageUtils.contextSetToString(plugin.getLocaleManager(), context)).toBuilder();
|
||||||
HoverEvent event = HoverEvent.showText(TextUtils.fromLegacy(
|
HoverEvent event = HoverEvent.showText(TextUtils.fromLegacy(
|
||||||
"¥3Raw " + this.type.name().toLowerCase() + ": ¥r" + meta,
|
"§3Raw " + this.type.name().toLowerCase() + ": §r" + meta,
|
||||||
'¥'
|
'§'
|
||||||
));
|
));
|
||||||
builder.applyDeep(c -> c.hoverEvent(event));
|
builder.applyDeep(c -> c.hoverEvent(event));
|
||||||
sender.sendMessage(builder.build());
|
sender.sendMessage(builder.build());
|
||||||
|
@ -91,8 +91,8 @@ public class MetaSet extends GenericChildCommand {
|
|||||||
|
|
||||||
TextComponent.Builder builder = Message.SET_META_SUCCESS.asComponent(plugin.getLocaleManager(), key, value, holder.getFormattedDisplayName(), MessageUtils.contextSetToString(plugin.getLocaleManager(), context)).toBuilder();
|
TextComponent.Builder builder = Message.SET_META_SUCCESS.asComponent(plugin.getLocaleManager(), key, value, holder.getFormattedDisplayName(), MessageUtils.contextSetToString(plugin.getLocaleManager(), context)).toBuilder();
|
||||||
HoverEvent event = HoverEvent.showText(TextUtils.fromLegacy(
|
HoverEvent event = HoverEvent.showText(TextUtils.fromLegacy(
|
||||||
TextUtils.joinNewline("¥3Raw key: ¥r" + key, "¥3Raw value: ¥r" + value),
|
TextUtils.joinNewline("§3Raw key: §r" + key, "§3Raw value: §r" + value),
|
||||||
'¥'
|
'§'
|
||||||
));
|
));
|
||||||
builder.applyDeep(c -> c.hoverEvent(event));
|
builder.applyDeep(c -> c.hoverEvent(event));
|
||||||
sender.sendMessage(builder.build());
|
sender.sendMessage(builder.build());
|
||||||
|
@ -140,8 +140,8 @@ public class MetaSetChatMeta extends GenericChildCommand {
|
|||||||
if (result.wasSuccessful()) {
|
if (result.wasSuccessful()) {
|
||||||
TextComponent.Builder builder = Message.ADD_CHATMETA_SUCCESS.asComponent(plugin.getLocaleManager(), holder.getFormattedDisplayName(), this.type.name().toLowerCase(), meta, priority, MessageUtils.contextSetToString(plugin.getLocaleManager(), context)).toBuilder();
|
TextComponent.Builder builder = Message.ADD_CHATMETA_SUCCESS.asComponent(plugin.getLocaleManager(), holder.getFormattedDisplayName(), this.type.name().toLowerCase(), meta, priority, MessageUtils.contextSetToString(plugin.getLocaleManager(), context)).toBuilder();
|
||||||
HoverEvent event = HoverEvent.showText(TextUtils.fromLegacy(
|
HoverEvent event = HoverEvent.showText(TextUtils.fromLegacy(
|
||||||
"¥3Raw " + this.type.name().toLowerCase() + ": ¥r" + meta,
|
"§3Raw " + this.type.name().toLowerCase() + ": §r" + meta,
|
||||||
'¥'
|
'§'
|
||||||
));
|
));
|
||||||
builder.applyDeep(c -> c.hoverEvent(event));
|
builder.applyDeep(c -> c.hoverEvent(event));
|
||||||
sender.sendMessage(builder.build());
|
sender.sendMessage(builder.build());
|
||||||
|
@ -97,8 +97,8 @@ public class MetaSetTemp extends GenericChildCommand {
|
|||||||
|
|
||||||
TextComponent.Builder builder = Message.SET_META_TEMP_SUCCESS.asComponent(plugin.getLocaleManager(), key, value, holder.getFormattedDisplayName(), DurationFormatter.LONG.format(duration), MessageUtils.contextSetToString(plugin.getLocaleManager(), context)).toBuilder();
|
TextComponent.Builder builder = Message.SET_META_TEMP_SUCCESS.asComponent(plugin.getLocaleManager(), key, value, holder.getFormattedDisplayName(), DurationFormatter.LONG.format(duration), MessageUtils.contextSetToString(plugin.getLocaleManager(), context)).toBuilder();
|
||||||
HoverEvent event = HoverEvent.showText(TextUtils.fromLegacy(
|
HoverEvent event = HoverEvent.showText(TextUtils.fromLegacy(
|
||||||
TextUtils.joinNewline("¥3Raw key: ¥r" + key, "¥3Raw value: ¥r" + value),
|
TextUtils.joinNewline("§3Raw key: §r" + key, "§3Raw value: §r" + value),
|
||||||
'¥'
|
'§'
|
||||||
));
|
));
|
||||||
builder.applyDeep(c -> c.hoverEvent(event));
|
builder.applyDeep(c -> c.hoverEvent(event));
|
||||||
sender.sendMessage(builder.build());
|
sender.sendMessage(builder.build());
|
||||||
|
@ -153,8 +153,8 @@ public class MetaSetTempChatMeta extends GenericChildCommand {
|
|||||||
|
|
||||||
TextComponent.Builder builder = Message.ADD_TEMP_CHATMETA_SUCCESS.asComponent(plugin.getLocaleManager(), holder.getFormattedDisplayName(), this.type.name().toLowerCase(), meta, priority, DurationFormatter.LONG.format(duration), MessageUtils.contextSetToString(plugin.getLocaleManager(), context)).toBuilder();
|
TextComponent.Builder builder = Message.ADD_TEMP_CHATMETA_SUCCESS.asComponent(plugin.getLocaleManager(), holder.getFormattedDisplayName(), this.type.name().toLowerCase(), meta, priority, DurationFormatter.LONG.format(duration), MessageUtils.contextSetToString(plugin.getLocaleManager(), context)).toBuilder();
|
||||||
HoverEvent event = HoverEvent.showText(TextUtils.fromLegacy(
|
HoverEvent event = HoverEvent.showText(TextUtils.fromLegacy(
|
||||||
"¥3Raw " + this.type.name().toLowerCase() + ": ¥r" + meta,
|
"§3Raw " + this.type.name().toLowerCase() + ": §r" + meta,
|
||||||
'¥'
|
'§'
|
||||||
));
|
));
|
||||||
builder.applyDeep(c -> c.hoverEvent(event));
|
builder.applyDeep(c -> c.hoverEvent(event));
|
||||||
sender.sendMessage(builder.build());
|
sender.sendMessage(builder.build());
|
||||||
|
@ -137,10 +137,10 @@ public class PermissionInfo extends GenericChildCommand {
|
|||||||
|
|
||||||
private static Consumer<ComponentBuilder<?, ?>> makeFancy(PermissionHolder holder, String label, Node node) {
|
private static Consumer<ComponentBuilder<?, ?>> makeFancy(PermissionHolder holder, String label, Node node) {
|
||||||
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.getPlainDisplayName()
|
"§7Click to remove this node from " + holder.getPlainDisplayName()
|
||||||
), '¥'));
|
), '§'));
|
||||||
|
|
||||||
String id = holder.getType() == HolderType.GROUP ? holder.getObjectName() : holder.getPlainDisplayName();
|
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();
|
||||||
|
Loading…
Reference in New Issue
Block a user