Skip to content

Latest commit

 

History

History
162 lines (138 loc) · 8.4 KB

cmi-luckperms-prefix.md

File metadata and controls

162 lines (138 loc) · 8.4 KB

FAQ - Configuring CMI to use LuckPerms prefix in Chat and Tab

FAQ Menu

CMI and Bungeecord info-, • Chance example, • CMI Chat manager, • Chat format info, • Chat filter, • Chat rooms, • CMI Commands info, • Custom Join and Leave, • CMI Economy manager, • Event commands, • Extending commands, • Getting started with CMI, • Glow info, • Create custom /help, • CMI Hex colors, • Importing data into CMI, • CMILib library info, • Customizing CMI Locale, • CMI Chat with LuckPerms prefix, • Migrate to MySQL database, • Player stuck in Mode?, • User-moderation info, • More message commands, • MOTD, • Parameters explained, • Ranks info, • Create custom /rules, • Running CMI, • Safety tips, • Specialized commands info, • Toggle example, • Trash example, • CMI Vote manager, • Worth info.

Official Zrips Links
  • Zrips Website
    https://www.zrips.net/
    The official website, wiki/documentation/information
  • Zrips Discord
    https://discord.gg/dDMamN4
    The official Discord community server with member-driven support
  • Zrips Github
    https://github.com/Zrips
    The place for bug reports and feature suggestions
Prerequisites
  • Buy and Download CMI (premium plugin)
    https://www.spigotmc.org/resources/3742/
    Get the CMI plugin if you haven't already, and then install it on all your servers
  • Also Download CMILib (free library) (more info)
    https://www.spigotmc.org/resources/87610/
    All Zrips plugins require the CMILib .jar file. Get it and also put it on all your servers.
  • All my FAQ pages have been written for Spigot / Paper 1.20.x and CMI 9.6.x.x or newer.
  • The mrfdev Github page is not an official resource, we're building up our knowledge base as a courtesy.
  • I am an admin on the Zrips Discord, this does not mean what I share on here is official.

For server owners who want to use add a LuckPerms prefix to CMI Chat and/or CMI Tablist.


ℹ️ CMI can handle LuckPerms placeholders

  • Start using CMI as Chat Manager, if you were using something else.

Before we get to the CMI part of things, let's explain this to help you get some overview:

In order to get prefixes to show up in CMI, you need LuckPerms and PlaceholderAPI properly installed first. Also, you need to use CMI as chat manager. This way whatever LP placeholder is available to CMI through PAPI.

So assuming you've got the above steps completed the next step is to check the LuckPerms wiki and learn to install the LP ecloud extention on PAPI, then reload PAPI, and then finally you can configure CMI chat to use these placeholders.

  • In console type (or as command in-game):
papi ecloud download LuckPerms
papi reload
  • As per this page, the placeholder for the prefix is %luckperms_prefix%: https://github.com/lucko/LuckPerms/wiki/Placeholders

  • Next, you have to set the prefix for each group that you want to have one, you can do this from the console, in-game chat as a command, or through the lp editor web interface. However you desire to do so, you should end up with for example the VIP group to have this prefix, and the admin to have this other prefix:

prefix.14.&c(owner)
prefix.6.&6[VIP]

You can learn more about LuckPerms prefixes here: https://github.com/lucko/LuckPerms/wiki/Prefixes,-Suffixes-&-Meta Here's an example of how this looks and how you can test this:

> lp editor
  [LP] Preparing a new editor session, please wait...
  [LP] Click the link below to open the editor:
  https://luckperms.net/editor/C0xRbDj9T1
> lp user mrfloris info
  [LP] > User Info: mrfloris
  [LP] - UUID: 631e3896-da2a-4077-974b-d047859d76bc
  [LP]     (type: mojang)
  [LP] - Status: Offline
  [LP] - Parent Groups:
  [LP]     > 1mb_owner
  [LP] - Contextual Data: (mode: server)
  [LP]     Contexts: None
  [LP]     Prefix: ""
  [LP]     Suffix: None
  [LP]     Primary Group: 1mb_owner
  [LP]     Meta: (weight=14) (primarygroup=1mb_owner)
> lp applyedits AgHNFd5TCt
   [LP] Web editor data was applied to group 1mb_owner successfully.
   [LP] (1 addition and 1 deletion)
   +  prefix.14.&4(Owner) (true)
   -  prefix.14.&4 (true)
> lp user mrfloris info
  [LP] > User Info: mrfloris
  [LP] - UUID: 631e3896-da2a-4077-974b-d047859d76bc
  [LP]     (type: mojang)
  [LP] - Status: Offline
  [LP] - Parent Groups:
  [LP]     > 1mb_owner
  [LP] - Contextual Data: (mode: server)
  [LP]     Contexts: None
  [LP]     Prefix: "(Owner)"
  [LP]     Suffix: None
  [LP]     Primary Group: 1mb_owner
  [LP]     Meta: (weight=14) (primarygroup=1mb_owner)
>

(note, this is just a visual example, those aren't command instructions, I hope that's clear)

  • You should be done now with PAPI and LP, after adding all the prefixes, weights, meta info, etc.

  • Go in-game and type: /cmi placeholders parse %luckperms_prefix%

If you for example are in that admin group that has this prefix set up, you can now see it should reply (owner) or VIP. This means CMI can see the LuckPerms placeholders correctly. You can now use it in CMI Chat and/or CMI Tablist.

  • For CMI Chat, open Settings/Chat.yml and find GroupFormat:, at the %luckperms_prefix% at the appropriate place for the right groups.

  • Restart the server, and start typing, it should show up now.

  • For CMI Tablist, open Settings/Modules.yml and find tablist: true make sure it's set to true.

  • Then go to Settings/TabList.yml and find GroupFormat: and go through the PlayerName: parts and add the %luckperms_prefix% at the appropriate place for the right groups.

  • Restart the server, and press tab, it should show up now.