Contexts do not work anymore when used with permissions
Closed this issue · 5 comments
Running LuckPerms v5.0.83 by Luck.
- Platform: Sponge
- Server Brand: SpongeForge
- Server Version:
- SpongeAPI: 7.1.0-ea50f0c2 - SpongeForge: 1.12.2-2838-7.1.9
- Storage:
- Type: MariaDB
- Ping: 0ms
- Connected: true
- Messaging: Sql
- Instance:
- Static contexts: server=dev
- Online Players: 1 (1 unique)
- Uptime: 1m 6s
- Local Data: 1 users, 9 groups, 0 tracks
SpongeForge
Minecraft: 1.12.2
SpongeAPI: 7.1.0-ea50f0c2
Sponge: 1.12.2-7.1.9
SpongeForge: 1.12.2-2838-7.1.9
Minecraft Forge: 14.23.5.2838
JVM: 1.8.0_232/64-bit (Oracle Corporation)
OS: Linux (4.9.0-11-amd64/amd64)
Setting a permission to a group or user specifying a context and then checking if that user (or a user in that group) has the permission will say the value is undefined.
How to reproduce the issue:
- Check the available contexts for yourself
/lp user KaiNoMood info
. My IGN is KaiNoMood, change it with your own IGN. Any context will do.
- Set yourself a test permission with a context:
/lp user KaiNoMood perm set test.permission world=world
.
- Use
/lp user KaiNoMood perm checkinherits test.permission
. It will say you do not inherit the permission.
- At the same time, if you give yourself
/lp user KaiNoMood perm set test.nocontext
and check it with/lp user KaiNoMood perm checkinherits test.nocontext
, it'll say you inherit the permission.
This makes plugins saying the players do not have the permission if contexts are used. Using the "extension-legacy-api" does not change the behaviour. Tested in a Pixelmon server without any other plugin or mod.
Example code:
public void test(Player player) {
if (player.hasPermission("test.permission")) {
player.sendMessage(Text.of("You have test.permission"));
} else {
player.sendMessage(Text.of("You do not have test.permission"));
}
}
This shows "You do not have test.permission" when contexts are used, even if the player got the context.
Contexts work fine under LuckPerms-Bukkit-4.4.27 on a Spigot 1.8.9 server (I have been using Contexts for years and they have been working just fine).
I'd like to downgrade to 4.4.x for SpongeForge so I can use contexts, but I can't find the jar.
Thank you very much for reading, have a nice day/night!
Does it work if using /lp user KaiNoMood permission checkinherits test.permission world=world
?