HuskClaims icon indicating copy to clipboard operation
HuskClaims copied to clipboard

User caching rarely causes perm checks to fail

Open mainulXD18 opened this issue 10 months ago • 6 comments

The plugin randomly tells a random player that he doesn't have any permission to run any commands of huskclaim, even for server operators. After rejoining the server the permission issue gets fixed but it still happens after sometime randomly.

I couldn't find any steps to reproduce this.

I edited the no permission message. so players can understand and rejoin the server. Image

Image Server version 1.21.3 Luckperms Version 5.4.153

mainulXD18 avatar Feb 17 '25 05:02 mainulXD18

I have had this issue before (and still do sometimes). Honestly I thought it had nothing to do with huskclaims but I’m glad someone else has this issue so I’m not going insane trying to find a reason why it happens haha.

ColdSight avatar Mar 14 '25 14:03 ColdSight

Hey, any updates on this? Happens quite frequently for players…

ColdSight avatar May 05 '25 16:05 ColdSight

Same problem here, still didnt find an reason and how to reproduce

djoey123 avatar May 06 '25 18:05 djoey123

+1, same issue

JorisvD01 avatar May 06 '25 21:05 JorisvD01

This happens too frequently and players complaining about it. Why this issue is ignored for months?

Sometimes player relog doesn't solve the problem and it requires server reboot.

I did some testing and I found Player#hasPermission and bukkitPlayer#hasPermission gives different results with Bukkit's API.

The test code I've used (Skript):

command /haspermtest <player>:
	permission: op
	trigger:
		set {_player} to arg 1
		send "{_player} class: %({_player}).toString()%"
		send ({_player}).hasPermission("huskclaims.inspect")
		set {_user} to ({API::BukkitHuskClaims}).getOnlineUser({_player})
		send "&b%({_user}).bukkitPlayer.toString()%"
		send "&a%({_user}).bukkitPlayer% / %({_user}).bukkitPlayer.getClass()%"
		send "&e%({_user}).bukkitPlayer.hasPermission("huskclaims.inspect")%"
		send "&c%({_user}).bukkitPlayer.hashCode()% &8/ &c%({_player}).hashCode()%"
		send hasPermission(({_user}).bukkitPlayer, "huskclaims.inspect", true)
Image

LuckPerms's hasPermission check returns true as expected but bukkit's hasPermission returns false. You should follow the "send" messages in order to understand debug even if you don't know Skript.

bukkitPlayer#hasPermission should give same result with Player#hasPermission. But it doesn't. Image

This is another player, this works as expected. Even bukkitPlayer's hasPermission returns true (same result with Player#hasPermission().).

@WiIIiam278

rudde0 avatar Sep 24 '25 15:09 rudde0

+1 Same issue

Why is this still a problem? This has been open for over 8 months now...

Patrickmid7 avatar Oct 07 '25 18:10 Patrickmid7