#(danjoe3) Luckperms with Denizen

215 messages · Page 1 of 1 (latest)

chrome stratus
#

Hey there,
I'm currently trying to create a chat format for each group I've made with luckperms and possibly display the custom ranks using the prefix; what is the best way to work on this? I'd also like to completely remove the TAB plugin, and possibly have Denizen show a custom tab format too, is this something possible?

desert havenBOT
#

(danjoe3) Luckperms with Denizen

desert havenBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

chrome stratus
#

!t luckperms.list_groups

wispy cometBOT
chrome stratus
#

I know this would be useful to get the groups and match accordingly

#

!l format

wispy cometBOT
# chrome stratus !l format
Cannot Specify Searched Language

Multiple possible languages: Denizen Text Formatting, Format Script Containers.

chrome stratus
#

!t Format Script Containers

wispy cometBOT
# chrome stratus !t Format Script Containers
Cannot Specify Searched Tag

Multiple possible tags: <LocationTag.format[<format>]>, <ElementTag.format[<format_script>]>, <TimeTag.format[(<format>)]>, <ItemTag.formatted>, <LocationTag.formatted>, <ListTag.formatted>, <DurationTag.formatted>, <ElementTag.end_format>, <ElementTag.format_number[(<format>)]>, <server.economy.format[<#.#>]>, <TimeTag.format_discord[(<style>)]>, <PlayerTag.formatted_money>, <DurationTag.formatted_words>, <LocationTag.simple.formatted>, <EntityTag.formatted_health>, <LocationTag.formatted.citizens>, <PlayerTag.formatted_food_level[(<max>)]>.

chrome stratus
#

!l Format Script Containers

wispy cometBOT
# chrome stratus !l Format Script Containers

Format script containers are very simple script containers used for formatting messages, usually with the 'narrate' command.


Format_Script_Name:

    type: format

    # The only key is the format. The format can use '<[text]>' as a special def to contain the message being sent.
    # '<[name]>' is available as a special def as well for use with the 'on player chats' event to fill the player's name properly.
    # Note that 'special' means special: these tags behave a little funny in certain circumstances.
    # In particular, these can't be used as real tags in some cases, including for example when using a format script as a determine in the 'player chats' event.
    # | All format scripts MUST have this key!
    format: <[name]> says <[text]>

Group

Script Container System

vagrant shore
#

!t playertag.luckperms_primary

wispy cometBOT
vagrant shore
#

think this might be handy for your case?

chrome stratus
#

!t <LuckPermsGroupTag.group_prefix>

wispy cometBOT
vagrant shore
#

Yeah you can do a different format for each group

chrome stratus
#

And this to display the prefix?

#

in the chat format?

vagrant shore
#

try narrating <player.luckperms_primary_group.group_prefix>

chrome stratus
#

So this is basically to check if the player has that group, if it does, show that chat format

vagrant shore
#

Out of curiosity, what does <player.chat_prefix> return?

chrome stratus
#

Its the same

vagrant shore
#

Can use either then

#

id stick with the first one

chrome stratus
vagrant shore
#

ye

#

For the tab thing you can use

#

!m player_list_name

wispy cometBOT
chrome stratus
#

So the working would be:

  • Create individual chat formats for each group
  • Do a foreach to check the list of groups within luckperms (in a world event, under on player chats) and check if the player has that particular group
  • If yes, display the chat format
vagrant shore
#

Will there be a format for each group?

chrome stratus
vagrant shore
#

I'm pretty sure you could just name your format scripts rank_format and then when the players chat you define their rank and get the format script for it?

on player chats:
- define rank <player.luckperms_primary_group.group_name>
- determine format:<[rank]>_format```
#

Depends on how you want to write it really I'd either do that or slap them in a data script

chrome stratus
#

I'll check it out and come back! Thank you so much!

#

Also, if I was to replace the set group format for luckperms and create one out of Denizen, which is just /setrank {player_name} {rank} {duration} would I have to run asop or something else to execute the luckperms command?

#

/lp user {name} parent set {rank} I think this is what luckperm's command looks like

chrome stratus
vagrant shore
#

but it's not persistent (resets after log out)

#

so i'd set it on join

#

!e player join

wispy cometBOT
# vagrant shore !e player join
Cannot Specify Searched Event

Multiple possible events: player joins, jobs player joins job, pvparena player joins, towny player joins town, bungee player joins network.

vagrant shore
#

!e player joins

wispy cometBOT
# vagrant shore !e player joins
Group

Player

Event Lines

player joins player join

Triggers

when a player joins the server.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.message> returns an ElementTag of the join message.

Determine

ElementTag to change the join message.
"NONE" to cancel the join message.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

vagrant shore
#

Also if you want the ranks to have order on tab (owner first admin below etc.) i think it's sorted by team names alphabetically

#

so owner gets added to team A, admin to team B etc etc

#

!c team

wispy cometBOT
# vagrant shore !c team
Group

player

Syntax

team (id:<scoreboard>/{main}) [name:<team>] (add:<entry>|...) (remove:<entry>|...) (prefix:<prefix>) (suffix:<suffix>) (option:<type> status:<status>) (color:<color>)

Short Description

Controls scoreboard teams.

Description

The Team command allows you to control a scoreboard team.

Use the "prefix" or "suffix" arguments to modify a team's playername prefix and suffix.

The "entry" value can be a player's name to affect that player, or an entity's UUID to affect that entity.
You can alternately input a raw PlayerTag or EntityTag, and they will be automatically translated to the name/UUID internally.

Use the "color" argument to set the team color (for glowing, names, etc). Must be from <@link url https://hub.spigotm...

vagrant shore
#

I think you're better off using a data script for both tab and chat

rank_stuff:
  type: data
  ranks:
    owner:
      team: A
      format_script: owner_format
      tab_name: <&a>Owner <&6><player.name> <&7>cool suffix
    admin:
      team: B
      format_script: admin_format
      tab_name: <&c>Admin <&6><player.name>
......```
Then just read off it
```yaml
on player joins:
- define rank <player.luckperms_primary_group.group_name>
- define data <script[rank_stuff].parsed_key[ranks.<[rank]>]>
- adjust <player> tab_list_name:<[data.tab_name]>
- team name:<[data.team]> add:<player>

on player chats:
- define rank <player.luckperms_primary_group.group_name>
- define format <script[rank_stuff].data_key[ranks.<[rank]>.format]>
- determine format:<[format]>```
chrome stratus
#

So sorry for the late reply! But thank you so much, I'll try it out today and get back to you!

chrome stratus
#

Hey, is there anyway I could possibly update the tab when the player rank is set? So Danjoe3 has the owner rank, but it hasn't been updated on the tab.

Another question I have is about player tags; is it possible to set those too?

chrome stratus
#

Oh wait, I think I've figured it out

#

Or no, I don't think I have

#

!t name_tag

wispy cometBOT
#
Possible Confusion

Did you mean to search for listtag.parse_tag?

vagrant shore
#

!m nameplate

wispy cometBOT
#
Possible Confusion

Did you mean to search for base_plate?

#
Possible Confusion

Did you mean to search for command narrate?

vagrant shore
#

!m name_plate

wispy cometBOT
#
Possible Confusion

Did you mean to search for base_plate?

#
Possible Confusion

Did you mean to search for command narrate?

vagrant shore
#

Uh

wispy cometBOT
# vagrant shore !m player.name

Changes the name on this player's nameplate.

Object

PlayerTag

Input

ElementTag

Tags

<PlayerTag.name> Returns the name of the entity. This can be a player name, an NPC name, a custom_...

vagrant shore
#

About the rank update, I don't think there's a way to explicitly listen to that, you'd have to update it when the player rank is changed depending on how they obtain the rank

normal sparrow
#

when you run any command that changes permissions, ranks, and groups for players, you can just also - inject i_changed_someones_permission_so_now_ill_update_them / run the bit of script you need to run under your "event" - the event is you doing it and you're in control of that, just do the thing in your "event" when you do it-

#

but if it's another plugin inducing it, you can do many things to figure out when it happens:

  • listen to the command event, and execute what you want when that plugin is ran under those conditions;
#

!event command

wispy cometBOT
# normal sparrow !event command
Group

Server

**WARNING**

This event is to override existing commands, and should not be used to create new commands - use a command script instead.

Event Lines

command <command_name> command

Triggers

when a player, console, or command block/minecart runs a Bukkit command. This happens before
any code of established commands, allowing scripts to 'override' existing commands.
Note that for the sake of the event line, escaping is used, so 'bukkit:plugins' becomes 'bukkit&coplugins'

Has Player

when source_type is player. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.command> returns the command name as an ElementTag.
<context.raw_args> returns any args used, unmodified as plaintext.
<context.args> returns a ListTag of the arguments.
<context.source_type> returns the source of the command. Can be: PLAYER, SERVER, COMMAND_BLOCK, or COMMAND_MINECART.
<context.command_block_location> returns the command block's location (if the command was run from one).
<context.command_minecart> returns the EntityTag of the command minecart (if the command was run from one).

Determine

"FULFILLED" to tell Bukkit the command was handled.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

normal sparrow
#
  • check if any specific events that the plugin listens for as well, and run alongside - eg, if your permissions/rank/groups change when you leave spawn, save the spawn in a noted area and run it then
#
  • if it's totally random, you can check timely events... but that's getting to the point of handling it outside of the plugin if you want both the feature and a light script process
#

eg, on system time minutely -> did it change?

#

but i dont recommend that one really, unless it's a very simple script and there's no other way

chrome stratus
#

Oh I see!

#

I'll try that event then, thats something new!

#

Regarding the name tag thing

#

I have this code running to basically remove the . in a players name, as its a bedrock server too

normal sparrow
#

that's specific enough to player joins event

chrome stratus
#

So in a previous thread a friend sent over this code, how could I possibly implement the prefix or so to the nameplate too?

#

Oh

normal sparrow
wispy cometBOT
chrome stratus
#

I'll send over the script, I dont know if I've explained it properly

normal sparrow
#

!search prefix

wispy cometBOT
# normal sparrow !search prefix
Search Results

[Partial Name Match] !Tag objecttag.prefix, !Tag server.group_prefix, !Mechanism playertag.chat_prefix, !Tag playertag.chat_prefix, !Tag elementtag.parse_color, !Tag server.group_prefix.world, !Tag server.scoreboard.team.prefix, !Tag skillapiclasstag.prefix_color, !Tag skillapiclasstag.class_prefix, !Tag luckpermsgrouptag.group_prefix,
[Semi-Decent Match] !Command break, !Command team, !Command drop, !Command if, !Command sql, !Command log, !Command playeffect, !ObjectType secrettag, !Command scoreboard, !Command bungeetag, !ObjectType durationtag, !Language ~waitable, !Command discordreact, !ObjectType locationtag, !Language flag system, !Tag elementtag.not, !Language command syntax, !Tag locationtag.format, !Mechanism playertag.stop_sound, !Tag playertag.display_name, !Tag elementtag.contains_text, !Language advanced object matching,
[Just Barely Matched] !ObjectType elementtag.

chrome stratus
#

Its basically just adjusting the name

#

- adjust <player> name:<[name]>
I'd basically like to add in the prefix or so there or should I just take it from a data script?

reef pecan
#

You already using the prefix what's the issue

chrome stratus
#

It doesnt seem to show up in the nametag

#

Its just blank

#

I mean, just a normal ign

reef pecan
#

can you record a debug

#

!debug

wispy cometBOT
# reef pecan !debug
Info: debug

If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!

reef pecan
#

So I'll understand the issue

#

Also what

<context.message.replace[<player.name>].with[<[name]>]>

#

use a format script

#

!lang format script

wispy cometBOT
# reef pecan !lang format script

Format script containers are very simple script containers used for formatting messages, usually with the 'narrate' command.


Format_Script_Name:

    type: format

    # The only key is the format. The format can use '<[text]>' as a special def to contain the message being sent.
    # '<[name]>' is available as a special def as well for use with the 'on player chats' event to fill the player's name properly.
    # Note that 'special' means special: these tags behave a little funny in certain circumstances.
    # In particular, these can't be used as real tags in some cases, including for example when using a format script as a determine in the 'player chats' event.
    # | All format scripts MUST have this key!
    format: <[name]> says <[text]>

Group

Script Container System

reef pecan
#

has special definitions ^

#

that you may or may not use

chrome stratus
#

Or wait I'll send over the full rank script

#

!paste

wispy cometBOT
chrome stratus
reef pecan
#

Please record a debug too

chrome stratus
#

Alrighty

reef pecan
chrome stratus
wispy cometBOT
# chrome stratus !logcheck https://paste.denizenscript.com/View/116011
Server Version

Paper version git-Paper-194 (MC: 1.20.1)-- (Outdated build, behind by 13... Current build is 207)

Plugin Version(s)

Denizen: 1.2.8-SNAPSHOT (build 1797-REL) -- (Current build :white_check_mark:)
Depenizen: 2.1.0 (build 845) -- (Current build :white_check_mark:)

Checked For

@chrome stratus

UUID Version

0 (:triangular_flag_on_post: Hacked or Invalid ID)

Java Version

17.0.7 :white_check_mark:

Other Noteworthy Plugin(s)

ProtocolLib: 5.1.0

Problematic Plugin(s)

Geyser-Spigot: 2.2.0-SNAPSHOT - Bedrock clients are unsupportable. Please do all testing with a Java Edition client.
floodgate: 2.2.2-SNAPSHOT (b75-26c11bd)

Possibly Relevant Plugin(s)

ViaVersion: 4.8.0 - Mixed client vs server versions can sometimes cause packet-related issues.

chrome stratus
#

Geyser 😬

reef pecan
#

So what the issue?

#

Could you ellaborate please

chrome stratus
#

The prefix doesnt seem to show in their nametag

#

Like the picture

wispy cometBOT
# reef pecan !c rename
Group

entity

Syntax

rename [<name>/cancel] (t:<entity>|...) (per_player) (for:<player>|...) (list_name_only)

Short Description

Renames the linked NPC or list of entities.

Description

Renames the linked NPC or list of entities.
Functions like the '/npc rename' command.

Can rename a spawned or unspawned NPC to any name up to 256 characters.

Can rename a vanilla entity to any name up to 256 characters, and will automatically make the nameplate visible.

Can rename a player to any name up to 16 characters. This will affect only the player's nameplate.

Optionally specify 'per_player' to reprocess the input tags for each player when renaming a vanilla entity
(meaning, if you us...

reef pecan
#

Use ^ to rename a players nameplate

chrome stratus
#

Oh I see, alright

#

There is a nameplate tag as well right?

reef pecan
#

!t player.nameplate

wispy cometBOT
chrome stratus
#

Oh right

#

Doesnt change

#

Alrighty, I'll try that!

reef pecan
# wispy comet

iirc that also changes the players list name, so should check that too

swift girderBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@chrome stratus

chrome stratus
#
                 Error Message: The command 'RENAME' is only available when Citizens is on the server.```

This is the error I seem to get, even having Citizen on the server
gentle zenith
#

!logs

wispy cometBOT
# gentle zenith !logs
Info: logs

Please post your full latest log file.

Background Info: One of the most helpful tools to identifying the source of a problem is your server logs file! Logs contain all sorts of important information like server and plugin versions, any error messages, and a lot more important information (More Info).

How To: Your log can be found in the logs folder within your server folder. The most recent log is a text file labeled latest.log. To get help using these logs, please open that file in a text editor and copy all of the text, then open https://paste.denizenscript.com/New/Log and paste the text into the box on the page. Then click "Submit" and copy the URL and paste that back into this channel.

Please do not upload the file to Discord or to other pastebin services, use the log pastebin linked above.

gentle zenith
#

also pretty sure thaat

#

!g "quotes go around the whole argument"

gentle zenith
#

also also

#

if the player name starts with . you remove it, else you remove it

#

oh wait

#

your whole rename syntax is weird

#

!c rename

wispy cometBOT
# gentle zenith !c rename
Group

entity

Syntax

rename [<name>/cancel] (t:<entity>|...) (per_player) (for:<player>|...) (list_name_only)

Short Description

Renames the linked NPC or list of entities.

Description

Renames the linked NPC or list of entities.
Functions like the '/npc rename' command.

Can rename a spawned or unspawned NPC to any name up to 256 characters.

Can rename a vanilla entity to any name up to 256 characters, and will automatically make the nameplate visible.

Can rename a player to any name up to 16 characters. This will affect only the player's nameplate.

Optionally specify 'per_player' to reprocess the input tags for each player when renaming a vanilla entity
(meaning, if you us...

gentle zenith
#

t arg requires entity not result

#

also per_player prolly isnt great idea in this case

#

Optionally specify 'per_player' to reprocess the input tags for each player when renaming a vanilla entity
(meaning, if you use "- rename <player.name> t:<[someent]> per_player", every player will see their own name on that entity).

chrome stratus
#

But when changing a player's name tag, does it really need an entity?

#

I'll send the log soon!

chrome stratus
#

Wait, Citizen is disabled because of the mc version I believe

#

I'll send over the log now

chrome stratus
wispy cometBOT
# chrome stratus !logcheck https://paste.denizenscript.com/View/116265
Server Version

Paper version git-Paper-194 (MC: 1.20.1)-- (:warning: Outdated build, behind by 32... Current build is 226)

Plugin Version(s)

Citizens: 2.0.33-SNAPSHOT (build 3219) -- (Current build :white_check_mark:)
Denizen: 1.2.8-SNAPSHOT (build 1797-REL) -- (Current build :white_check_mark:)
Depenizen: 2.1.0 (build 845) -- (Current build :white_check_mark:)

Checked For

@chrome stratus

UUID Version

0 (:triangular_flag_on_post: Hacked or Invalid ID)

Java Version

17.0.7 :white_check_mark:

Other Noteworthy Plugin(s)

ProtocolLib: 5.1.0

Problematic Plugin(s)

Geyser-Spigot: 2.2.0-SNAPSHOT - Bedrock clients are unsupportable. Please do all testing with a Java Edition client.
floodgate: 2.2.2-SNAPSHOT (b75-26c11bd)

Possibly Relevant Plugin(s)

ViaVersion: 4.8.0 - Mixed client vs server versions can sometimes cause packet-related issues.

chrome stratus
#

Bedrock!

#

!update paper

wispy cometBOT
# chrome stratus !update paper
Update Paper

Paper is a higher-performance alternative to Spigot that is 100% compatible with the equivalent Spigot version. It's much easier to update than Spigot itself, and carries a lot of performance and quality-of-life benefits.

Latest Paper builds are at https://papermc.io/downloads/paper.

(If you would prefer to use a Spigot build, refer to !update spigot).

chrome stratus
#

Damn, updating Paper just messed up with the plugins

#

I dont know which version to use

#

Cuz they seem to break all the plugins 😬

#

Well, some

chrome stratus
#

!update Denizen

wispy cometBOT
chrome stratus
#

!update Depenizen

wispy cometBOT
chrome stratus
#

!update citizens

wispy cometBOT
chrome stratus
#

Strange, I have all the latest versions and yet they crash

#

So please let me know

gentle zenith
#

thaaats interesting

chrome stratus
#

I dont know, it's really strange. That's the latest paper version too

gentle zenith
#

could you post latest logs?

sly rain
#

iirc there is no release version for 1.20.2

#

try using the latest dev version instead

chrome stratus
chrome stratus
gentle zenith
#

buuuut thats not whole thing

chrome stratus
#

Do you want me to paste in the entire console start up?

sly rain
#

the latest.log file, yes

chrome stratus
#

Oh right

#

I'm just starting the server with the Denizen dev build

#

Oh wait

#

The latest dev build worked

#

That seemed to somewhat load in the plugins

#

Now to get the name tag to show up

#

Well the name tag doesnt seem to work on players

#

There isnt any errors

young pier
#

But also what people usually do to change player nameplates is hide their real ones and use something like a text display, as iirc Mojang has a length limit on player names for some reason

chrome stratus
young pier
#

!c rename usage

wispy cometBOT
# young pier !c rename usage
Group

entity

Syntax

rename [<name>/cancel] (t:<entity>|...) (per_player) (for:<player>|...) (list_name_only)

Short Description

Renames the linked NPC or list of entities.

Use to rename the linked NPC to 'Bob'.
- rename Bob
Use to rename a different NPC to 'Bob'.
- rename Bob t:<[some_npc]>
Use to make an entity show players their own name for 10 seconds.
- rename <green><player.name> t:<[some_entity]> per_player
- wait 10s
- rename cancel t:<[some_entity]> per_player
young pier
#

It even has examples ^, t: is the entities to rename, and <name> is the name to rename to

young pier
#

!m translation

wispy cometBOT
# young pier !m translation

(Property) A display entity's translation, represented as a !objecttype LocationTag vector.
Can be interpolated, see !language Display entity interpolation.

Group

Properties

Object

EntityTag

Input

LocationTag

Tags

<EntityTag.translation> (Property) A display entity's translation, represented as a <@link objectt...

young pier
#

And that to put it at the correct height