Giter Site home page Giter Site logo

placeholders's Introduction

LuckPerms

Build Status javadoc Maven Central Discord

LuckPerms is a permissions plugin for Minecraft servers. It allows server admins to control what features players can use by creating groups and assigning permissions.

The latest downloads, wiki & other useful links can be found on the project homepage at luckperms.net.

It is:

  • fast - written with performance and scalability in mind.
  • reliable - trusted by thousands of server admins, and the largest of server networks.
  • easy to use - setup permissions using commands, directly in config files, or using the web editor.
  • flexible - supports a variety of data storage options, and works on lots of different server types.
  • extensive - a plethora of customization options and settings which can be changed to suit your server.
  • free - available for download and usage at no cost, and permissively licensed so it can remain free forever.

For more information, see the wiki article on Why LuckPerms?

Building

LuckPerms uses Gradle to handle dependencies & building.

Requirements

  • Java 21 JDK or newer
  • Git

Compiling from source

git clone https://github.com/LuckPerms/LuckPerms.git
cd LuckPerms/
./gradlew build

You can find the output jars in the loader/build/libs or build/libs directories.

Tests

There are some automated tests which run during each build.

Contributing

Pull Requests

If you make any changes or improvements to the plugin which you think would be beneficial to others, please consider making a pull request to merge your changes back into the upstream project. (especially if your changes are bug fixes!)

LuckPerms loosely follows the Google Java Style Guide. Generally, try to copy the style of code found in the class you're editing.

Project Layout

The project is split up into a few separate modules.

  • API - The public, semantically versioned API used by other plugins wishing to integrate with and retrieve data from LuckPerms. This module (for the most part) does not contain any implementation itself, and is provided by the plugin.
  • Common - The common module contains most of the code which implements the respective LuckPerms plugins. This abstract module reduces duplicated code throughout the project.
  • Bukkit, BungeeCord, Fabric, Forge, Nukkit, Sponge & Velocity - Each use the common module to implement plugins on the respective server platforms.

License

LuckPerms is licensed under the permissive MIT license. Please see LICENSE.txt for more info.

placeholders's People

Contributors

blockythedev avatar lucko avatar nikijaz avatar patbox avatar potatopresident avatar rymiel avatar tadhgboyle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

placeholders's Issues

Placeholder for expiration group

Please add placeholder %luckperms_highest_group_by_weight_expiration% or %luckperms_exipration_group%
So that "VIP" players know when their best VIP ends. + so that it is possible to somehow set the expiration format eg 1w 1d 1h to another language for example or just limit the format to 1w / 1d only, ... From what I've looked at placeholders, none of that is what I imagine. Just to show you the expiration time of the highest group you have, and if it doesn't find your expiration time, it will tell you that you have that group forever.

New placeholders that show expiry time of permissions/groups but in seconds.

Description

I was happing to use this info inside a script to compare permission nodes' expiry time and then have the output depend on which permission node has the longest expiry time. Just haven't been able to figure out how to get the time in seconds.

As it is right now, the only placeholder that shows such information, show it in a human-readable format
image

This information isn't helpful when wanting to use it in a script etc. and since I'm unsure of how else I could get the expiry time in seconds, I am unable to compare it to another permission node, inside of my Scripts / JavaSciprt placeholders etc.

Proposed Behaviour

The suggested placeholders could follow this format.

Placeholder Argument Description
%luckperms_expiry_time_in_seconds% <permission> Gets the duration remaining on a temporary permission assigned directly to the player in seconds.
%luckperms_inherited_expiry_time_in_seconds% <permission> Gets the duration remaining on a temporary permission assigned directly to or inherited by the player in seconds.
%luckperms_group_expiry_time_in_seconds% <group name> Gets the duration remaining on a temporary group membership assigned directly to the player in seconds.
%luckperms_inherited_group_expiry_time_in_seconds% <group name> Gets the duration remaining on a temporary group membership assigned directly to or inherited by the player in seconds.

Extra Details

n/a

New placeholder

Hello, I would like to know if it was possible to add a placeholder that retrieves the meta of a group and / or player because currently it is not possible to retrieve the meta of a specific player or a group.

PAPI Expansion-LuckPerms 5.4 appears to think of itself as 5.1-R2

  • Install Expansion-LuckPerms_VxxCns1.jar (aka version 5.4)
>papi reload
[08:09:10] [Server thread/INFO]: [PlaceholderAPI] Placeholder expansion registration initializing...
...
[08:09:25] [Server thread/INFO]: [PlaceholderAPI] Successfully registered expansion: luckperms [5.1-R2]
>papi info luckperms
[08:08:12] [Server thread/INFO]: Placeholder expansion info for: luckperms
[08:08:12] [Server thread/INFO]: Status: Registered
[08:08:12] [Server thread/INFO]: Author: Luck
[08:08:12] [Server thread/INFO]: Version: 5.1-R2
[08:08:12] [Server thread/INFO]: Requires plugin: LuckPerms

Fabric 1.19 crashing

I've been trying to get LuckPerms placeholders to work without success. I'm new to fabric, so I may be making some boneheaded mistakes. Here's the crash report:

crash-2022-07-02_22.30.23-server.txt

I have tried multiple versions of Fabric, and Patbox/TextPlaceholderAP. I get the same error regardless.

Meta Alternative for luckperms_expiry_time Placeholder

Description

I'd like to see an alternative for luckperms_expiry_time but specifically for a meta key as currently you need the meta value as well to use the permission variant.

Proposed Behaviour

%luckperms_expiry_time_meta_% to return the time left

Extra Details

No response

Adding a new placeholder.

Description

Hello dear developer. Currently there is a placeholder "%luckperms_meta_weight%" which displays the weight of the current group in number format. Is there a placeholder where I can specify a specific group name to check its weight?

Proposed Behaviour

For example, something like this: "%luckperms_meta_weight_{group}%"

Extra Details

If this does not exist yet, this will be a very useful thing for creating functions/commands where you can compare the weights of groups through conditions.

[feature suggestion] add placeholder for `highest_on_track_<track>`

I think it would be useful if placeholders for Prefix and Suffix Stacking were also available through PAPI etc.

My use case is this: VentureChat supports JSON hover / click events, and I would like to set up prefixes from individual tracks to have different hover elements. My current meta-formatting from LuckPerms looks like this:

`meta-formatting` from `config.yml`
meta-formatting:
  prefix:
    format:
      - "highest_on_track_staff"
      - "highest_on_track_vip"
      - "highest_on_track_patron"
      - "highest_on_track_discord-booster"
      - "highest_own"
    duplicates: none
    start-spacer: ""
    middle-spacer: ""
    end-spacer: "&r &7|&r "
  suffix:
    format:
      - "highest_on_track_staff"
      - "highest_on_track_vip"
      - "highest_on_track_patron"
      - "highest_on_track_discord-booster"
      - "highest_own"
    duplicates: none
    start-spacer: ""
    middle-spacer: " "
    end-spacer: ""

And my VentureChat config like this:

`config.yml` from VentureChat
jsonformatting:
  Default: 
    json_attributes:
      luckperms_prefix:
        hover_text:
        - '&cI am default!'
        click_action: 'run_command'
        click_text: '/help'

# ...

channels:
  Global:
    # ...
    format: '{luckperms_prefix}{player_displayname}{luckperms_suffix}:'

I would like the ability to break out highest_on_track_<track> so I could do the meta formatting in the VentureChat config itself and add a section in jsonformatting to have different hover text for every track prefix. Then I could, for example, have something like:

jsonformatting:
  Default: 
    json_attributes:
      luckperms_highest_on_track_vip:
        hover_text:
        - '&cVIP member! &eClick to learn how to buy this rank.'
        click_action: 'run_command'
        click_text: '/donate'

channels:
  Global:
    # ...
    format: '{luckperms_highest_on_track_vip}{player_displayname}{luckperms_suffix}:'

LP 5.0.0 does not play well with PlaceholderAPI expansion

Spigot 1.14.4 (Jenkins 2494)
LuckPerms 5.0.0
PlaceholderAPI 2.10.4

On server start-up:

[12:58:56] [Server thread/ERROR]: Could not pass event ServerLoadEvent to PlaceholderAPI v2.10.4
org.bukkit.event.EventException: null
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:320) ~[spigot-1.14.4.jar-2019-11-22-1736:git-Spigot-56f8471-ccd47a5]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.14.4.jar-2019-11-22-1736:git-Spigot-56f8471-ccd47a5]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:529) [spigot-1.14.4.jar-2019-11-22-1736:git-Spigot-56f8471-ccd47a5]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:514) [spigot-1.14.4.jar-2019-11-22-1736:git-Spigot-56f8471-ccd47a5]
        at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:450) [spigot-1.14.4.jar-2019-11-22-1736:git-Spigot-56f8471-ccd47a5]
        at net.minecraft.server.v1_14_R1.DedicatedServer.init(DedicatedServer.java:266) [spigot-1.14.4.jar-2019-11-22-1736:git-Spigot-56f8471-ccd47a5]
        at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:775) [spigot-1.14.4.jar-2019-11-22-1736:git-Spigot-56f8471-ccd47a5]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.NoClassDefFoundError: me/lucko/luckperms/api/LuckPermsApi
        at me.lucko.luckperms.placeholders.LuckPermsExpansion.canRegister(LuckPermsExpansion.java:49) ~[?:?]
        at me.clip.placeholderapi.expansion.ExpansionManager.registerExpansion(ExpansionManager.java:102) ~[?:?]
        at me.clip.placeholderapi.expansion.ExpansionManager.registerAllExpansions(ExpansionManager.java:154) ~[?:?]
        at me.clip.placeholderapi.ServerLoadEventListener.onServerLoad(ServerLoadEventListener.java:52) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316) ~[spigot-1.14.4.jar-2019-11-22-1736:git-Spigot-56f8471-ccd47a5]
        ... 7 more
Caused by: java.lang.ClassNotFoundException: me.lucko.luckperms.api.LuckPermsApi
        at java.net.URLClassLoader.findClass(URLClassLoader.java:471) ~[?:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:588) ~[?:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
        at me.lucko.luckperms.placeholders.LuckPermsExpansion.canRegister(LuckPermsExpansion.java:49) ~[?:?]
        at me.clip.placeholderapi.expansion.ExpansionManager.registerExpansion(ExpansionManager.java:102) ~[?:?]
        at me.clip.placeholderapi.expansion.ExpansionManager.registerAllExpansions(ExpansionManager.java:154) ~[?:?]
        at me.clip.placeholderapi.ServerLoadEventListener.onServerLoad(ServerLoadEventListener.java:52) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316) ~[spigot-1.14.4.jar-2019-11-22-1736:git-Spigot-56f8471-ccd47a5]
        ... 7 more

New placeholder => count current group on track

Description

Can you add 2 placeholder :

1:
Display the number of group on a track, ex → %luckperms_count_track_% => 10

2:
Display the player number group on a track, ex → %luckperms_count_player_position_track_% => 5

This feature is very usefull for scoreboard and stats for show our progression => current / max => 5 / 10

Proposed Behaviour

Extra Details

No response

[SUGGEST] Changing (and new) placeholders

!!! this message was translated using translate.google.com, please, if anything is confusing, let me know and I will rephrase the messages !!!

Well, we know that placeholders are essential in pretty much every plugin or server. And well, I'm having a problem with LuckPerms placeholders (and I think a lot of other people are too). The current LP placeholders are great, however, I think they still don't provide some things that I think are essential that could "make a certain difference", or facilitate players who have temporary ranks/roles/groups.

Currently the %luckperms_groups% placeholder returns all the groups the player owns, but randomly or inherited (I honestly don't know which way, apparently it's random for me), which actually should return all the groups the player owns , in order of group weight.

%luckperms_group_expiry_time% requires you to specify which group will be shown, which is fine, but there should be a "%luckperms_highest/lowest_group_expiry_time%", which returns the remaining time of the highest group, this same placeholder also returns only, months or total weeks, and even in English, I don't intend to provide the remaining group time in English based on weeks, this is really confusing for most players in my country

A new placeholder "%luckperms_highest/lowest_group_type%" or "%luckperms_group_type_<group>%" that returns what type of group the player has, permanent or temporary, that would be really interesting.

A new placeholder for dates could also be added, for example "%luckperms_join_date_group%" returns the date the player received such a group (placeholder aliases: %luckperms_join_date_highest/lowest_group% or %luckperms_join_date_group_%)
The same would be for a placeholder that returns the date that a temporary group ends. for example: "%luckperms_end_date_group%. "(placeholder aliases: %luckperms_end_date_highest/lowest_group% or %luckperms_end_date_group_%)

Expand expiry time placeholder to groups the player is in

Expand placeholder below to also check if the group the person is in has an expiry time on the permission and not just the permission added to the player, Would be good for doing countdowns across different features
"%luckperms_expiry_time_%"

Translate times

Description

Add the ability to translate %luckperms_expiry_time%, %luckperms_inherited_expiry_time%, %luckperms_group_expiry_time% and %luckperms_inherited_group_expiry_time% placeholders.

Proposed Behaviour

It's already available in translations but doesn't work in placeholders.

Extra Details

Translatable Placeholders can also be added.

[Request] Placeholder that returns the players current position on a track

As the title says. Just a placeholder that returns the group of a player position is on within a track. e.g. Staff track has Helper, Mod, Admin, Owner. Player is Mod. Placeholder will return that the player is Mod.

Possible Placeholders:
%luckperms_current_position_on_track_(track)%
%luckperms_group_on_track_(track)%

Or I could be completely overlooking something and this already exists.

Thanks for the help, I hope you consider my request :)

Placeholder based weight Bug

So I am using your extension for Papi placeholders. And when I use %luckperms_highest_group_by_weight% it returns the lowest group and %luckperms_lowest_group_by_weight% returns the highest group.

Version 5.0 Placeholder error

Using placeholder %luckperms_group_expiry_time_<group>% the value is wrong.

Exemple: Using placeholder returns with /papi parse <player> %luckperms_group_expiry_time_<group>%:
image

Player temporary parent:
image

Luck Perms Version: 5.0.9
Luck Perms Extensions: extension-legacy-api
Server Version: Paper 230

Placeholders not retrieving group aliases

Group name rewrites don't get retrieved by the placeholders, instead the normal group name is shown.
Tried using these placeholders on DeluxeChat with PlaceholderAPI.
%luckperms_last_group_on_tracks_%
%luckperms_group_name%
Vault placeholders seems to be working as expected. (%vault_rank%)
Using PaperSpigot 1.12 and LuckPerms 3.2.37

From LuckPerms/LuckPerms#380

Get a meta value for a specific group.

Description

Get a meta value for a specific group.

Proposed Behaviour

For example, I have groups called Admins, Moderators. In each group I have a meta entry: in admins: meta.color.&6 in moderators: meta.color.&4 I would like to use placeholder %luckperms_meta_color_fromspecificgroup% e.g. %luckperms_meta_color_fromAdmins%

I would like to store a color in one place so that I can use it in several places using a placeholder, e.g. in chat plugin, TAB plugin, scoreboard plugin, mycommand plugin. If I want to change the color, I won't have to change it in several places, but only in one.

In one place I would like to color Group name only in other I would like to color Group and nick name of the player that belongs to that group.

Extra Details

No response

Add %luckperms_primary_group_expiry_time% (Suggestion)

I would recommend adding that placeholder that shows the time remaining in the primary group and giving the option that when it is permanent a text can be configured. or add the option to put other luckperms variables inside others

Placeholder that verify permission based on given world context

Taken from LuckPerms/LuckPerms#838


It's possible to implement a PlaceHolder that verify permission giving a specific World context?

Example: %luckperms_check_permission_world%

I'm building a DeluxeMenu and this would make possible to hide some stuff based on permission that players may have multiple times in different worlds context, every permission in every world may be equal but it means different things for my logic on this menu that I'm building! Hence the need for World context placeholder!

New placeholder => count current group on track

Description

Can you add 2 placeholder :

1:
Display the number of group on a track, ex → %luckperms_count_track_% => 10

2:
Display the player number group on a track, ex → %luckperms_count_player_position_track_% => 5

This feature is very usefull for scoreboard and stats for show our progression => current / max => 5 / 10

Proposed Behaviour

Extra Details

No response

Commands placeholderpai

Support for placeholderapi in order execution.

Example:
lp user {player} meta set vote %math_0:_1+({luckperms_meta_vote})%

luckperms_expiry_time_permission_name no writes expiry time

If I set temp permission with /lp user username permission settemp jobs.boost.Barkácsoló.money.0.5 true 30m command the %luckperms_expiry_time_jobs.boost.Barkácsoló.money.0.5% placeholder no writes expiry time.

Expansion-LuckPerms version: jenkins build 28
LuckPerms version 5.3.0
This server is running Tuinity version git-Tuinity-"32b4d52" (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)

[Bugs] %luckperms_has_permission% with upperCase words never match

if permission with uppercase words, has permission placeholder cant got true at all, will always return false.

Reproduce Steps:

  1. lp user <username> permission set test.Test true
  2. use papi parse me %luckperms_has_permission_test.Test%, got false
  3. use papi parse me %luckperms_check_permission_test.Test%, got true
  4. use papi parse me %player_has_permission_test.Test%, got true

LuckPerms PlaceHolder error

Hey 😄 I have a problem with variables
i have a rank vip+8 and plugin FeatherBoard, LuckPermsMVdWHook
The problem is that the variable does not work because of the character "+"
variables: {luckperms_group_expiry_time_vip+8}

Could this be corrected?

Luckperms placeholderapi expansion package problem

Luckperms does not support the latest version of placeholderapi, which causes the displayed variable "luckperms_group_expiry_time_group" to be abnormal, the setting is 30 days, and the final output is <=20 days

Listing groups based on group-name-rewrite name & prefix color display

I've been playing around with LuckPerms placeholders recently. Mainly the %luckperms_groups% placeholder to list what groups players have when hovering over their name. However I noticed it only lists the groups by their name lowercased and in white.

Would it be possible to have a new placeholder that acts similarly to %luckperms_groups% but uses the group-name-rewrite name configuration and with the group's colored prefix in the list. That way you could have the names capitalized and with the prefix color it comes with?

Failed to load expansion class LuckPermsExpansion

I am not sure if this is falling in PlaceholdersAPI court or here

I'm having an issue getting LP expansion to load with PlaceholdersAPI (2.11.5) - There was mention that it might be due to a mismatch between LP and LPExpansion - 5.4R2 (latest build from Jenkins - March 14, 2024) is what I can find as latest and using against LP 5.4.121 - Getting error that NoClassDefFound - Any ideas??

[17:42:18 ERROR]: [PlaceholderAPI] Failed to load expansion class LuckPermsExpansion (Is a dependency missing?) java.lang.NoClassDefFoundError: me/lucko/luckperms/placeholders/LPPlaceholderProvider at me.lucko.luckperms.placeholders.LuckPermsExpansion.register(LuckPermsExpansion.java:58) ~[?:?] at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.register(LocalExpansionManager.java:193) ~[PlaceholderAPI-2.11.5.jar:?] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?] at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) ~[?:?] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?] at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?] at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$registerAll$4(LocalExpansionManager.java:366) ~[PlaceholderAPI-2.11.5.jar:?] at me.clip.placeholderapi.util.Futures.lambda$null$0(Futures.java:46) ~[PlaceholderAPI-2.11.5.jar:?] at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.4.jar:git-Paper-462] at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:482) ~[paper-1.20.4.jar:git-Paper-462] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1646) ~[paper-1.20.4.jar:git-Paper-462] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:447) ~[paper-1.20.4.jar:git-Paper-462] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1525) ~[paper-1.20.4.jar:git-Paper-462] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1226) ~[paper-1.20.4.jar:git-Paper-462] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-462] at java.lang.Thread.run(Thread.java:833) ~[?:?] Caused by: java.lang.ClassNotFoundException: me.lucko.luckperms.placeholders.LPPlaceholderProvider at java.net.URLClassLoader.findClass(URLClassLoader.java:445) ~[?:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:587) ~[?:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]

Luckperms_expiry_time PlaceHolder

Description

%luckperms_expiry_time% does not return any details for temp prefixes

Reproduction Steps

To reproduce run the following commands replacing PlayerName with your in game name.

/lp user PlayerName permission settemp prefix.101.&7[&#bccc00Test&7] true 1h

/papi parse PlayerName %luckperms_expiry_time_prefix.101.&7[&#bccc00Test&7]%

Expected Behaviour

I would expect papi parse to return the time remaining.

Server Details

git-paper-61 (MC: 1.19)

LuckPerms Version

v5.4.58

Logs and Configs

No response

Extra Details

No response

Incorrect Time Parsing For Expiry Time Placeholders

I use a menu system to display expiry time of specific permissions to players and have noticed that recently the time remaining displayed is being funky. The permissions expire at the correct time, but just the value that the placeholder displays is incorrect in many cases.

I have a system setup to add 72h to the temp permission time so here's what it displays for approx 3, 6, and 9 days.
image

Running LuckPerms 5.1.93 (also tried latest 5.1.96) , and PAPI 2.10.9 w/ luckperms expansion version 5.0-R2
Paper 1.16.1 build # 136

An example of the command that is run to add the time
lp group basic permission settemp mcmmo.perks.xp.double true 72h
An example of the placeholder used to display the time
%luckperms_inherited_expiry_time_mcmmo.perks.xp.double%

I'm almost 99% sure this was working as expected ~July 4th so a change to either Luckperms, PAPI or the expansion within the last 2 months should be the culprit. This makes me think it was the 5.1.93 release for Luckperms that caused this issue, but it is manifesting itself in the placeholders so thought it best to report here.

Possibly unrelated, but it also bugs out somewhere between 24 days and 27 days. 24 days displays as 23 days and change where as 27 days displays as 2 days and change. The console output looks correct and I assume the permission will expire on time, but just the placeholder bugs out.

: )

Edit:
Tried updating to 5.2.14 and the bug is still present.

Group permission placeholder

e.g.
%luckperms_{groupname}_has_permission_{permission}%

which returns true/false.

I want to return this value to a deluxemenu gui item to show if a group has access to chat (for an admin chat toggle system) so i can write

"Enabled: %luckperms_{groupname}_has_permission_{permission}%"

Placeholder

I want placeholders to customize messages such as day month year, I think this setting should be included in the config file.

Placeholders Lack World Feature

You can check if someone has a permission with placeholders. But if you give permissions just in a world, you can't check them with placeholders. I was wishing if you can add something like this: %luckperms_inherits_permission__%

Placeholder for group prefix unrelated to inheritance

Based on a conversation on discord, I'd like to propose a new placeholder to display prefixes unrelated to inheritance.

With currently existing placeholders, it is impossible to parse a placeholder which a user does not directly or indirectly inherits.
Example: I have group.owner but owner does not inherit from default, so using %luckperms_prefix_element_highest_from_group_default% will return empty for me. Now if I let the owner group inherit from default, the prefix shows up. The same thing applies to track-based placeholders: if the user is not on the track I try to display the prefix from, the placeholder returns empty.

Don't get me wrong, I do get why this is. Regardless, I agree with the user from discord that it could come in very handy if there was a placeholder that returned the prefix regardless of connectivity through inheritance, such as for example displaying them in menus.
It could look like this for example: %luckperms_static_prefix_highest_from_group_<group>% : Returns the highest weighted prefix from specified group regardless if the user inherits it or not.

Please consider adding this. Inheriting across tracks may not always be the best solution to make the placeholder work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.