MagicSpells icon indicating copy to clipboard operation
MagicSpells copied to clipboard

Changing perms does not reflect in the available spells until reload/log off and on

Open keenerb opened this issue 9 years ago • 2 comments

I log on as a non-op player. I grant myself magicspells.grant.lightwalk and magicspells.cast.lightwalk. I can cast the lighwalk spell. I set the permissions to false. I can still cast the lightwalk spell until I /cast reload or log off/back on, as permissions are not checked at actual spell cast, as far as I can see in the code. This makes it quite difficult to set up a dynamic class-based system with Magicspells. Please check permissions on right-click of cast item, on casting of spell, and when you /cast list. This would make my life a LOT easier.

keenerb avatar Dec 11 '15 04:12 keenerb

The magicspells.grant.<spell> permission is required to put the spell in a player's spellbook. This spellbook reloads when /magicspells reload [player] is being used. The magicspells.cast.<spell> permission is being checked when the spell is cast.

If a player has the permission magicspells.grant.lightwalk, the permission magicspells.cast.lightwalk can be assigned dynamically to make it so the player can cast the spell, without having to reload the spellbook of the player. Assigning the magicspells.grant.lightwalk permission dynamically does not work without reloading the player's spellbook, however.

Another possibility of assigning permission nodes to spells is to use the permission cast modifier.

Japflap avatar Dec 11 '15 14:12 Japflap

When I revoke the magicspells.cast.lightwalk permission through my permissions plugin, MagicSpells still appears to believe I still have it.

I'd also like to see a completely permissions-based spell granting system rather than "adding spells to a spellbook" and whatnot.

I'm looking at the permission cast modifier right now.

keenerb avatar Dec 11 '15 15:12 keenerb