NyaaCat/LockettePro

Limit protected chest per group

Opened this issue · 2 comments

Can I limit groups protection? Like normal players has 1 chest, vip 5 chest, ...

This would be awesome to see, provided the person comes back... I was thinking of adding perhaps a permission node for groups. Example:

  • lockettepro.limit.#
  • lockettepro.limit.1 etc and so on.

At the time of writing I'm not sure how easily this can be done in Spigot/Paper/Etc. I was successful in Sponge once.

If its feasible and the author returns ill try submitting a PR for it

Ow! Nice to see people interessing =)

On bukkit, you can loop permissions, and check the permission node to get value. Something like that:

for(PermissionAttachmentInfo permission : player.getEffectivePermissions())
{
	if(permission.getPermission().startsWith("lockettepro.limit.") && permission.getValue()) {
		int limit = Integer.parseInt(permission.getPermission().split(".")[2]);
	}
}

ps: sorry if that not run