events-config-example

Example events section of config.yml

This is just to show an example of how you can setup your event settings in config.yml to include things like per-world or per-permission strategies

events:
  # these are the "basic" default types that apply if there are no more
  # specific event types found (per-world or per-permission)
  onJoin:
  - spawnNewPlayer
  - spawnDefaultWorld

  onDeath:
  - homeMultiWorld
  - spawnLocalWorld

  onSpawnCommand:
  - spawnLocalWorld
  - spawnDefaultWorld

  onGroupSpawnCommand:
  - spawnGroup

  onHomeCommand:
  - homeMultiWorld

  # this is how you specify spawn strategies specific to a world
  world:
    myworld1:
      onHomeCommand:
      - homeLocalWorld

  # this is how you specify spawn strategies specific to a permission
  # group (or even multiple permission groups). Note the "entry1"
  # and "entry2" names can be whatever you want, they just have
  # to be unique names from each other.
  permission:
    entry1:
      permissions:
      - my.custom.perm
      onHomeCommand:
      - homeSpecificWorld:world
    entry2:
      permissions:
      - group.mygroup
      - group.othergroup
      onHomeCommand:
      - homeMultiWorld

In this example, if player A is on "myworld1" and in permission group "my.custom.perm", the permission will take precedence and so the strategy "homeSpecificWorld:world" will be used.

If player B is on "myworld1" and is not in any of the permission groups listed when they type /home, of course the myworld1 strategies will be used and so they will use the "homeLocalWorld" strategy.

If player C is on world "world" and is not in any permission groups when they type /home, they will use the global strategy setting which, in this case, will fire "homeMultiWorld".


Comments

Posts Quoted:
Reply
Clear All Quotes