HomeSpawnPlus allows you to define limits on the number of worlds players can have on a per-permission or per-world basis. This means you can allow your Members or VIPs to have more homes than your guests. Or perhaps have a creative world with more homes for everyone or an adventure world where players aren't allowed to set homes.
This is done using the homeLimits config section, here is an example, including comments taken from the default config:
# ability to raise or lower the limit of homes you allow # players to have. Can be defined on a per-world or # per-permission basis. (-1 = unlimited) homeLimits: # If singleGlobalHome is set, all other sections are ignored # and a single global home is enforced. This means typing # /sethome on any world will always work and it will always # overwrite whatever other home you had set. This can be # overridden by the permission "hsp.singleGlobalHomeExempt", # in which case the limits defined below still apply. singleGlobalHome: false # If true, a link is automatically established between a # base world such as "world" and it's child worlds such as # "world_nether" and "world_the_end". In this scenario, if # the default perWorld limit is 1, then that limit of 1 # applies equally to all 3 worlds (only 1 home for all 3). # A new world "foo" and it's children would also have # their own combined perWorld limit of 1. inheritAssociatedWorlds: true default: perWorld: 1 global: 5 world: creative: perWorld: 3 skylands: inherit: creative permission: limit1: permissions: - my.custom.perm - group.VIP perWorld: 4 global: 10
So let's break this config down and go through each section.
First, we have not enabled the singleGlobalHome flag. If we had, this will do exactly as it implies and enforce a single global home across all worlds.
(2.0 feature) In this example, inheritAssociatedWorlds is set to true, which means that the limit for "world" will be combined and apply to "world_nether" and "world_the_end" as well. The default perWorld limit of 1 will apply to world, which means a player can only have 1 home on any of world, world_nether or world_the_end. If the player has a home on world and then runs /sethome in world_nether, it will replace the one they had in world.
Next we setup the default limits, perWorld of 1 and global of 5. This means if no other limits apply to a given player or world, these are the ones that will be enforced.
world-specific limits, world inheritance
Next we move on to a world-specific setup. We've set it up so that anyone on the creative world can have 3 homes on that world. We didn't define a global limit, so the default global of 5 will apply.
What if we had defined a global limit of 6 on the creative world only? Well, if we did, lets assume the player only had 1 home on creative but had 4 homes elsewhere (thus filling up the default global of 5), they would still be allowed to create 1 more world on creative up to their global limit of 6 while on that world.
Next we have world skylands, which is defined to inherit & share creative's limits. This means if the player has 3 homes on creative already, they would not be allowed to create a new one on skylands. Note this means six worlds actually share the same 3 homes: creative, creative_nether, creative_the_end, skylands, skylands_nether and skylands_the_end (this is due to inheritAssociatedWorlds being set to true).
Last we have a per-permission limit defined. This applies to anyone has has either the permission my.custom.perm or group.VIP. I show both as an example to suggest different ways of doing it, but of course you can make up and use any permissions you want. Let's assume you have a VIP player and you've assigned group.VIP to your VIP group so they have this permission. The VIP player has a perWorld limit of 4 and a global limit of 10, which overrides all other homeLimit settings, including per-world. This means a VIP player could have 4 homes on world creative, for example.
Permission-specific settings are still bound by world limit inheritance, so a VIP player can have 4 homes on creative, but then they would be at their limit for skylands as well.
permission-specific limits, an alternative
While most people seem to like the simplicity of tying per-permission limits to their groups using a convention like group.VIP, there is a downside to this. Let's assume you have a VIP player, but you only want them to have an extra perWorld boost on "world", but you want your creative/survival limits to remain unchanged. If you've done your per-permission limits by group, you're stuck, because you can't very well take away their group.VIP permission on a world, that might impact other plugins. Let's change it up a bit:
homeLimits: permission: limit2: permissions: [hsp.limit2] perWorld: 2
Now we're using a permission hsp.limit2 instead. We can use our permission plugin to give this permission to our VIP players ONLY on world (and probably world_nether and world_the_end also to be consistent). Now, your VIPs have a limit of 2 instead of the default of 1 on world, but the higher limit of 3 for creative and skylands will still apply when they are on those worlds, because you won't give them the hsp.limit2 permission on those worlds.