Permissions disappearing when player dies


#1

I’ve been trying to re-give permissions via SubjectData#setPermission () in RespawnPlayerEvent but the permissions disappear as soon as the event ends

Code:


#2
setPermission

Returns A CompletableFuture, check if the value is actually being added with it.


#3

It returns false


#4

What permissions plugin are you using? Or are you attempting to make your own?


#5

I’m just doing the server plugin, it doesn’t provide an permission service for Sponge


#6

It maybe that Sponge expects a permissions service to use Subject, even though you are using Transient. Add a permissions plugin and see if the value returns true


#7

I use this way when a player join, and everything is fine
Also it’s written in the docs that it’s not necessary a permission service to use Transient, i’ll try anyway.


#8

Okay, it worked; but will I be required to use a permission plugin just to fix this?


#9

I couldnt find in the docs to state that it is optional for a permissions service. I did find this though

Regular (persistent) = Might be saved somewhere, and therefore be persisted and exist forever. Its recommended for PermissionServices to implement a persistent store, however it is not a requirement

To me that reads that there is a optional part of the permission service that is for storing, not that the permission service is optional for a subject data.

Anyways, as your issue is that it requires a permission plugin (as you are dealing with permissions) and most servers will have a permissions plugin anyway, it seems like a issue for those servers that somwhow exist without a permissions plugin, i wouldnt be surprised if this is 1% of the servers running Sponge