ItemRules

AreaRules configuration

AreaRules trigger manualRules when a player walks into a defined region. This is useful if you want to create certain rules that only apply in specific areas.

To start with, you need one or more manualRules: configured. A manual rule is the same as a normal rule, however it is not applied automatically to a player. A manual rule is only applied when entering/exiting an area or via the API for third party plugins.

In this example, I create a manualRule called sticksOnly that prevents the use of any tool or weapon (using aliases) but allows the use of sticks. Note I use mode: denyPrevious which removes all previously applied rules.

manualRules:
    sticksOnly:
        mode: denyPrevious
        actions: [USE, CRAFT]
        items:
            allow: [280]
            restrict: [woodenEquipment, ironEquipment, stoneEquipment, goldEquipment, diamondEquipment]

Now I create a zone that applies the sticksOnly rule when they walk into the region and then removes the sticksOnly rule when they leave.

areaRules:
    StickZone:
        description: 'use sticks to pummel people'
        world: pickleMasher
        ne: [253, 65, 293]
        sw: [259, 63, 314]
        messages:
            onEntrance: 'You are now entering the Stick only PvP Zone'
            onExit: 'You are now leaving the Stick Only PvP Zone'
        entrance: [sticksOnly]
        exit: [sticksOnly]

Here is a breakdown of options with areaRules:

settingsub optionexamplenotes
description'use sticks to pummel people'Shown to player when they type /rules or login
world'worldname'the name of the world this region is in. You can only have 1 per areaRule.
ne[253, 65, 293]A list of x, y, z coordinates for the northeast corner of region.
sw[259, 63, 314]A list of x, y, z coordinates for the southwest corner of region.
messages
onEntrance'You are now entering StickVille'The message displayed to player when walking into region
onExit'Thanks for visiting Stickville'The message displayed to player when walking out of region
entrance['ruleName', 'anotherRuleName']A list of manualRules applied to player when entering area
exit['ruleName', 'anotherName']A list of manualRules removed from player when exiting area

You must login to post a comment. Don't have an account? Register to get one!

Facts

Date created
Jan 27, 2013
Last updated
Jan 27, 2013

Author