bedHomes

I've had numerous requests over the life of this plugin to do this or that to the way bed homes work. Many of these requests are in direct conflict with each other (one person wants it one way, one wants it another). In the spirit of HSP giving you full control over your home/spawn setup, a number of config options have emerged around bed setting. This page attempts to describe them in detail enough so you can pick the options that match your desired setup.

DEFAULT

The default config options are:

core:
  bedsethome: true
  bedhome2clicks: true
  bedHomeMustBeNight: false
  bedHomeNeverDisplayNightMessage: false
  bedHomeOriginalBehavior: false

In this configuration, HSP works in the way I like most, which is that it requires 2 clicks to set your bed home, as a protection from accidentally setting it when you don't mean to. In this mode, the first click is "canceled" to prevent any spurious "You can only sleep at night" messages, but the second event goes through, which still allows players to sleep in their bed at night when clicking twice (although the second click might print a "You can only sleep at night" message if it's done during the day).

Sweet! But I don't want it to EVER print "You can only sleep at night"!

(Ticket #92). No worries, change the core.bedHomeNeverDisplayNightMessage to true. But be warned, the way this is implemented in Bukkit basically means ALL bed events are canceled, so the only way your players can ever actually sleep in their beds is by sneak-clicking.

I prefer the total single player mechanics

Sure thing. Change these options from the defaults:

core:
  bedhome2clicks: false
  bedHomeMustBeNight: true

This basically tells HSP to ignore the 2-click protection and to only allow players to set homes at night. Note that single player mechanics also involve the fact that destroying a bed "removes" that home. Since HSP stores beds in the database, this doesn't happen by default, but you can enable it for your home strategies by using the modeRequiresBed strategy (see strategy doc). This is an added bonus because it gives you the flexibility to do this on a per-world basis if you want.

Here's an example of requiring a bed in order for the home to work (essentially making the home unavailable if the bed is destroyed):

events:
  onDeath:
    - modeRequiresBed
    - homeLocalWorld
    - spawnLocalWorld

In this example, the mode is set and then the homeLocalWorld strategy is evaluated. Their HSP home might still exist, but if there's no bed, it won't be used (effectively meaning the home is not available when there is no bed nearby the home). In that event, the player would be sent to the spawn instead.

Well I'm a long-time HSP user and I like that first click lets players sleep at night while 2nd click sets their HSP home

(comment 318) The default behavior was changed in HSP v1.5.1, I think for the better, but if you prefer the "original" mechanics, then just set core.bedHomeOriginalBehavior to true. Note that v1.5.1 also added the "sneak" behavior to skip HSP entirely and let the bed-click go through, so you could also just tell your players to use that feature.

This bed stuff is for losers, I don't want it at all!

Maybe you don't want bed homes at all because you prefer to charge your players for /sethome, or whatever other reason that makes sense for your server. Just set core.bedsethome to false and bed HSP behavior is disabled entirely, meaning the event passes through to Bukkit with no modifications at all and does not set any HSP home.