Magic

Magic

190k Downloads

Permissions to allow shops and wand upgrades?

bobhenl opened this issue ยท 14 comments

commented

Hi, I disabled spells in my whole world, but I wanna enable wand shop by enchantment table to let players buy new enchantments on /warp enchant, which is on spawn with disabled magic (due to mines). I also maybe wanna allow some spells or just block list some of them. Is it possible too?

commented

Your two options are WorldGuard flags or per-world-permissions. You just need to deny access to all spells except the progressmenu, spellshop and anything else in the progressmenu you want them to have access to.

commented

And what are exact permission nodes for progressmenu and spellshop? I didn't find it in plugin.yml. I don't use worldguard, so only per-world permissions, if you give me them.

commented

Spell permissions are always Magic.cast.<spell> so Magic.cast.progressmenu. You'll need to -Magic.cast.*, I assume you've done this already, then add back in Magic.cast.progressmenu.

Depending on your permissions plugin this may get tricky, PermissionEx at least has a bug where negating and re-adding within the same permission group does not work, so you have to negate in some base group but then add the permissions back in using an inherited group. Hopefully your perm plugin is better than that, but I thought it worth mentioning.

commented

Haha- whoops, yeah I guess the spellshop filters out any spells a player does not have permission to cast. I could add a parameter to bypass that if that'd help?

commented
spellshop:
  parameters:
     show_no_permission: true

In spells.yml, using the latest dev build.

Also note that dev build has some hopeful improvements to MySQL connection robustness, but do please test it out first if you can since I don't have a setup to test that myself.

commented

And about permissions... do you suggest allowing just some of them (but there is so much of them... so don't know), or do you suggest me to enable all and just disable some?

If the second variant, which permissions do you disable in spawn world, where is also one area (mines), where is destroy true? I already noticed that there was problem with mine spell, so probably it, but do you suggest something else too?

Or will be better to disable every of them and enable just few of them? But then I won't give players whole freedom, but maybe it will be more safe.... to enable just for ex. beginner's spells and progressmenu.

commented

I am not sure why you've got magic disabled in that mine world in the first place, nor why players need to be able to buy spells there if they can't use them- so I think this is all something you'll have to decide on your own!

If you do allow the progressmenu I would suggest allowing everything in it, and yes it'll probably be like a dozen spells if you include all of the branches of the buff menu and all that.

commented

OK, and are there some of spells that you suggest me to disable in spawn world? And btw it's not mine world, on spawn are just MINES, created using Blockregen plugin... where blocks are regenerating, there has to be destroy:true in Residence, so if they can't grief this area using some of spells? I already discovered that they can do with mine spell, but any other idea what to disable?

commented

Ah, I see- and WorldGuard is not an option? It's strange that blockregen can't modify protected Residences.

Personally, my opinion is if you have to disable casting of all spells in that world, there isn't really a reason for players to purchase spells there. But if your players are asking for it, for whatever reason, then perhaps just enable progressmenu and spellshop for now and see how that goes.

commented

Yeah I also think it's strange, but author doesn't want to change it, already wrote him about it. They have own protection, but it's not a good solution. And if I enable all spells, is somewhere list that can cause destroy damage to area?

commented

No, almost all spells can change blocks. It'd be pretty pointless to try to sort through it. If your players ask for specific ones (like maybe heal, boon?) you could add a whitelist but that's really up to you.

commented

Yeah, I can enable some of spells... but now I tried to add spellshop and progressmenu permission and players can't even open categories to buy new spells :/ So it's useless probably?

commented

Maybe you could way to just purchase them without permission on using them?

commented

Ok, solved yesterday, thanks. Will test new MYSQL connection robustness.