Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help] per rank tag #33

Open
TymekSL opened this issue Nov 26, 2024 · 7 comments
Open

[Help] per rank tag #33

TymekSL opened this issue Nov 26, 2024 · 7 comments

Comments

@TymekSL
Copy link

TymekSL commented Nov 26, 2024

Is there way to add per rank tag? WIll be helpful for staff to add "Staff X servername" because now when I will write this in defualt, all players will get this
nametags.tag.groupname

and meaby the current permission for color could be changed to "nametags.background.groupname" seriously really helpful

https://prnt.sc/80pgWMLB9I9B
example here i will get custom tag for CHATMOD RANK https://prnt.sc/4JSsH4PpHqmE

@Matt-MX
Copy link
Owner

Matt-MX commented Nov 26, 2024

Please check out the groups entry in the config.yml.

@TymekSL
Copy link
Author

TymekSL commented Nov 26, 2024

Please check out the groups entry in the config.yml.

I saw, this is not my suggestion, or describe how to make per rank tag

@Matt-MX
Copy link
Owner

Matt-MX commented Nov 27, 2024

I saw, this is not my suggestion, or describe how to make per rank tag

I don't really understand what you're asking and I will presume you want an example.

EXAMPLE: e.g you had a rank called MVP:

groups:
  mvp:
    background: black
    text:
    - "<red><bold>MVP"
    scale: 1.5

You then give your LuckPerms (or whatever permissions plugin) mvp group the nametags.groups.mvp permission node.

@TymonLC
Copy link

TymonLC commented Nov 29, 2024

https://prnt.sc/UII6SFMvPVl5 in which line should i paste this?

https://pastebin.com/TWePNfma this is my config, if you can edit it add this lines will be awesome and helpful for me

@Matt-MX
Copy link
Owner

Matt-MX commented Nov 29, 2024

Your first screenshot is correct.

However, you must replace the duplicate groups key.
To add more ranks, replicate the structure of the mvp block under groups.

Make sure you give your ranks their respective permission node.
e.g. mvp rank needs to have the nametags.groups.mvp node.

If you need to, please familiarize yourself with yaml structure...

I won't do it for you.

@Matt-MX Matt-MX changed the title [Suggestion] per rank tag [Help] per rank tag Nov 29, 2024
@TymonLC
Copy link

TymonLC commented Nov 30, 2024

[03:01:02 INFO]: Kapsel693 issued server command: /nametags-reload
[03:01:02 ERROR]: Cannot load plugins/NameTags/config.yml
org.bukkit.configuration.InvalidConfigurationException: while parsing a block mapping
in 'reader', line 1, column 1:
defaults:
^
expected , but found ''
in 'reader', line 45, column 2:
groups:
^

    at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:112) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:160) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:128) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(YamlConfiguration.java:310) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.java.JavaPlugin.reloadConfig(JavaPlugin.java:180) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
    at DisplayNameTags-1.3.jar/com.mattmx.nametags.NameTags.reloadConfig(NameTags.java:66) ~[DisplayNameTags-1.3.jar:?]
    at DisplayNameTags-1.3.jar/com.mattmx.nametags.NameTagsCommand.onCommand(NameTagsCommand.java:24) ~[DisplayNameTags-1.3.jar:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
    at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:91) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.3.10.jar:?]
    at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:31) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:443) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.commands.Commands.performCommand(Commands.java:350) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.commands.Commands.performCommand(Commands.java:337) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.commands.Commands.performCommand(Commands.java:332) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.performSignedChatCommand(ServerGamePacketListenerImpl.java:2279) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleSignedChatCommand$12(ServerGamePacketListenerImpl.java:2233) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1535) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1512) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1505) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1464) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1586) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1302) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
    at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping
in 'reader', line 1, column 1:
defaults:
^
expected , but found ''
in 'reader', line 45, column 2:
groups:
^

    at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:654) ~[snakeyaml-2.2.jar:?]
    at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:161) ~[snakeyaml-2.2.jar:?]
    at org.yaml.snakeyaml.comments.CommentEventsCollector$1.peek(CommentEventsCollector.java:57) ~[snakeyaml-2.2.jar:?]
    at org.yaml.snakeyaml.comments.CommentEventsCollector$1.peek(CommentEventsCollector.java:43) ~[snakeyaml-2.2.jar:?]
    at org.yaml.snakeyaml.comments.CommentEventsCollector.collectEvents(CommentEventsCollector.java:136) ~[snakeyaml-2.2.jar:?]
    at org.yaml.snakeyaml.comments.CommentEventsCollector.collectEvents(CommentEventsCollector.java:116) ~[snakeyaml-2.2.jar:?]
    at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:330) ~[snakeyaml-2.2.jar:?]
    at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:209) ~[snakeyaml-2.2.jar:?]
    at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:369) ~[snakeyaml-2.2.jar:?]
    at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:348) ~[snakeyaml-2.2.jar:?]
    at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:323) ~[snakeyaml-2.2.jar:?]
    at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:209) ~[snakeyaml-2.2.jar:?]
    at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:131) ~[snakeyaml-2.2.jar:?]
    at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:157) ~[snakeyaml-2.2.jar:?]
    at org.yaml.snakeyaml.Yaml.compose(Yaml.java:575) ~[snakeyaml-2.2.jar:?]
    at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:105) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
    ... 34 more

[03:01:02 INFO]: [NameTags] Using MINI_MESSAGE as text formatter.
[03:01:02 WARN]: [NameTags] Async task for NameTags v1.3-commit-ac52164 generated an exception
net.kyori.adventure.text.minimessage.internal.parser.ParsingExceptionImpl: Legacy formatting codes have been detected in a MiniMessage string - this is unsupported behaviour. Please refer to the Adventure documentation (https://docs.advntr.dev) for more information.
&aᴋʟᴀɴ: &6§c✘§7
^^
at net.kyori.adventure.text.minimessage.internal.parser.TokenParser.parseString(TokenParser.java:170) ~[adventure-text-minimessage-4.17.0.jar:?]
at net.kyori.adventure.text.minimessage.internal.parser.TokenParser.resolvePreProcessTags(TokenParser.java:112) ~[adventure-text-minimessage-4.17.0.jar:?]
at net.kyori.adventure.text.minimessage.MiniMessageParser.parseToTree(MiniMessageParser.java:195) ~[adventure-text-minimessage-4.17.0.jar:?]
at net.kyori.adventure.text.minimessage.MiniMessageParser.parseFormat(MiniMessageParser.java:209) ~[adventure-text-minimessage-4.17.0.jar:?]
at net.kyori.adventure.text.minimessage.MiniMessageImpl.deserialize(MiniMessageImpl.java:80) ~[adventure-text-minimessage-4.17.0.jar:?]
at net.kyori.adventure.text.minimessage.MiniMessageImpl.deserialize(MiniMessageImpl.java:46) ~[adventure-text-minimessage-4.17.0.jar:?]
at DisplayNameTags-1.3.jar/com.mattmx.nametags.config.TextFormatter.lambda$static$0(TextFormatter.java:15) ~[DisplayNameTags-1.3.jar:?]
at DisplayNameTags-1.3.jar/com.mattmx.nametags.config.TextFormatter.format(TextFormatter.java:42) ~[DisplayNameTags-1.3.jar:?]
at DisplayNameTags-1.3.jar/com.mattmx.nametags.config.TextDisplayMetaConfiguration.convertToComponent(TextDisplayMetaConfiguration.java:183) ~[DisplayNameTags-1.3.jar:?]
at DisplayNameTags-1.3.jar/com.mattmx.nametags.config.TextDisplayMetaConfiguration.lambda$applyTextMeta$0(TextDisplayMetaConfiguration.java:27) ~[DisplayNameTags-1.3.jar:?]
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1708) ~[?:?]
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?]
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
at java.base/java.util.stream.ReferencePipeline.reduce(ReferencePipeline.java:662) ~[?:?]
at DisplayNameTags-1.3.jar/com.mattmx.nametags.config.TextDisplayMetaConfiguration.applyTextMeta(TextDisplayMetaConfiguration.java:35) ~[DisplayNameTags-1.3.jar:?]
at DisplayNameTags-1.3.jar/com.mattmx.nametags.config.ConfigDefaultsListener.lambda$registerDefaultRefreshListener$2(ConfigDefaultsListener.java:69) ~[DisplayNameTags-1.3.jar:?]
at DisplayNameTags-1.3.jar/com.mattmx.nametags.entity.trait.RefreshTrait.lambda$onEnable$0(RefreshTrait.java:41) ~[DisplayNameTags-1.3.jar:?]
at io.papermc.paper.threadedregions.scheduler.FoliaAsyncScheduler$AsyncScheduledTask.run(FoliaAsyncScheduler.java:217) ~[paper-1.21.1.jar:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
mhm thanks, very hard paste 3 stupid lines in correct config
?

@Matt-MX
Copy link
Owner

Matt-MX commented Nov 30, 2024

You are using legacy colour codes, change for formatter option in the config to support 'legacy'.

Your config is invalid, if you're working with servers and plugins you should be familiar with YAML formatting since most Bukkit/Paper/Spigot plugins use it.

If it's only 3 lines and it's so trivial then you should be able to, I don't want to spoon feed stuff but I'll guide you in the right direction, if you're REALLY stuck ask chat GPT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants