Configuration

There are a number of configuration options at the top of the config.yml file. Their default values are listed below:

update: true
chatDropoff: 50
witchDrop: false
divination: true
divinationBlock: 20
divinationMaxDuration: 86400000
divinationMaxStartOffset: 604800000
muggletonBlockChange: true
deathExpLoss: true
bookLearning: false
chatColor: 5
flooPowder: REDSTONE
broomstick: STICK
  • update determines whether or not your plugin will automatically update to the newest version.
  • chatDropoff sets the distance at which other players will no longer hear you when you cast spells. This does not affect normal chat, only spell casting.
  • witchDrop determines whether or not witches drop a wand on death.
  • divination determines whether or not divination is allowed on your server. This also determines whether the book "Unfogging the Future" is given by /okit.
  • divinationBlock determines what block id is set to be the crystal ball. Default is GLASS. Changes to this value will be reflected in the divination instructions in "Unfogging the Future" when it is received through /okit.
  • divinationMaxDuration determines the maximum number of milliseconds that a divination result can last. Default is set to 24 hours.
  • divinationMaxStartOffset determines the maximum number of milliseconds in the future that the divination will start. Default is set to 7 days.
  • muggletonBlockChange determines if fake block data will be sent to users for blocks inside of a REPELLO_MUGGLETON stationary spell. If you are having performance issues with this spell, setting this option to false might help.
  • deathExpLoss determines whether or not a player loses their spell experience on death.
  • bookLearning determines whether or not a player needs to read about a spell in a book prior to being able to use it.
  • chatColor determines the color of messages sent to players by Ollivanders. Can be any value 0-9 and A-F.
  • flooPowder determines what item is produced out of the floo powder recipe.
  • broomstick determines what item is produced out of the broomstick recipe.

The config.yml has a node called 'zones'. If there is nothing listed under it, then this plugin will be active on the entire server. If you want to restrict it to certain regions or worlds, then use the following format as an example

zones:
  castle:
    type: WorldGuard
    world: worldname
    region: castle1
    disallowed-spells:
      - AVADA KEDAVRA
      - CRUCIO
      - STUPEFY
  duelling-arena:
    type: Cuboid
    world: worldname
    area: 0 0 0 20 5 10
    allowed-spells:
      - STUPEFY
  extra-world:
    type: World
    world: Donator
    disallowed-spells:
      - ALL

To break this down for you:

zones:
  castle:
    type: WorldGuard
    world: worldname
    region: castle1
    disallowed-spells:
      - AVADA KEDAVRA
      - CRUCIO
      - STUPEFY

'castle' is the name of your zone. This can be whatever you want. 'type:' is the type of selection. In this case, WorldGuard. This can also be 'World' and 'Cuboid'. 'world:' is the world on your server in which to look for the selection. 'region:' applies only to the WorldGuard type. It is the region which defines the selection. 'disallowed-spells:' is a list of spells which are not allowed in the zone.

  duelling-arena:
    type: Cuboid
    world: worldname
    area: 0 0 0 20 5 10
    allowed-spells:
      - STUPEFY

Because the 'type:' here is Cuboid, there is no 'region:' selector. Instead there is 'area:'. 'area:' defines the coordinates of the cuboid selection. The syntax is 'x y z X Y Z', where the xyz is the first corner, and the XYZ is the opposite corner. When a spells list is used on a zone which is overlapping another zone, the list of allowed spells will take priority over the list of disallowed spells.

  extra-world:
    type: World
    world: Donator
    disallowed-spells:
      - ALL

With a World argument used for the 'type:', all you need to do is define the 'world:'. This will disable any spells in the world which are in the 'disallowed-spells' list. At any time, you can use 'ALL' as a spell name, which will act as all spells. This is an easy way to quickly enable or disable all spells in a region, selection, or world.