-
-
Notifications
You must be signed in to change notification settings - Fork 4
Conditions
- Introduction
- Item Conditions Group
- Location Condition Group
- Permission
- Time
- Weather
- Placeholder
- MythicMob
The state of the door is defined by conditions and the evaluator.
A condition will be true
when it is fulfilled. Some conditions will return a neutral state as a null
value instead of false. This value is then used by a predefined Evaluator or a custom evaluator to define the door state.
The conditions are grouped into several groups. A door can have one condition of each group.
When a door opens is controlled by conditions. These can return a boolean value when checked or under specific circumstances a null value. This is important when dealing with custom evaluators.
Please see Evaluator for further information how the plugin determines the door state.
You may use the /bdo info <doorId>
command for a quick overview and easy adding, deleting and editing conditions.
Item conditions requires the player to have a key item.
The key items can be consumed to open the door. The item will only be consumed, when the door opens. E.g. The item will not be consumed when the player has the item but is not in the range of the door.
The item similarity is determined by its type and meta. Meta means e.g. name, lore, enchantments.
When you create a item condition simply hold the item which will be required in your hand.
All items conditions use the same arguments.
Syntax: <amount> <consumed>
-
amount
is the amount of items which will be needed to open the door. -
consumed
indicates whether the items should be taken from the player when the door opens or not. The item will only be taken from one player if multiple player fulfill all conditions. This will be false on default
This condition will open the door when the player clicks on a block with the key item. After creating this condition you will have to click on the block which should be the keyhole.
This condition will open the door when the player makes any interaction with the key in its hand. E.g. Placing or clicking in the air.
Its highly recommend to combine this with another condition like proximity or region.
This condition will open when the player holds the item in his main or off hand.
Its highly recommend to combine this with another condition like proximity or region.
This condition will open when the player has the item in his inventory.
Its highly recommend to combine this with another condition like proximity or region.
Location conditions require the player to be at a specific point in the world.
**This condition is only available with world guard 7+. Use simple region condition when you don't have world guard 7+.
The region condition requires the player to be inside a specific world guard region.
Hint: You will need world guard for this...
Syntax: <region name>
- region name is the name of the world guard region. The region has to be in the same world than the door.
The region condition requires the player to be inside a cuboid region.
After entering the condition you will be prompted to click on two blocks to define the region.
The proximity condition requires the player to be in a specific region around the door center.
The range can be defined in three dimensions and can have different sizes in x,y and z axis. The best practice should be only positive numbers.
The form of the region can be ellipsoid, cuboid or cylindrical.
The door center is defined by the plugin. So you just have to enter the size of the region around the door.
Syntax: <dimensions> <form>
- dimensions can be entered by a number or a three dimensional vector(x,y,z).
- form can be a ellipsoid, cuboid or cylindrical form
Example:
A door should open when a player on x or z axis is in the range of 20 blocks and on the nearly same height than the door.
/bdo setCondition testDoor proximity 20,10,20 cuboid
Each of the location permission also exist as world conditions. These require that just any player is inside the region and it does not require that a user which is in the location fulfills all other conditions.
The permNode
conditions requires the player to have a specific permission set by your permission plugin.
Its highly recommend to combine this with another condition like proximity or region.
Syntax: <permission>
- permission is the permission the player needs that the door opens.
The doorPerm
conditions requires the player to have a specific access to a door. This is the access defined by big doors, which need the be the same or higher access level.
Its highly recommend to combine this with another condition like proximity or region.
Syntax: <permission>
- permission is the permission the player needs that the door opens. Can be
owner
,member
oruser
The time condition will open and close the door at specific times.
You can use the force
parameter when you want, that the door closes in the closed time again, when the door was opened and vice versa.
Syntax: <open time> <close time> [force state]
- open and close time are the times the door will open and close. These can be entered as ticks 0-24000 or as a time 0:00-23:59
- force state is optional. If its true the door will try to keep the state. default is false.
The weather condition will open and close the door based on the weather.
You can use the force
parameter when you want, that the door closes in the closed condition again, when the door was opened.
Hint: The door will not close when it cant rain at the location. This is determined based on the biome and the height
Syntax: <type>
- type is the weather type the door should be open
The placeholder condition uses placeholder values provided by the PlaceholderAPI to define the door state.
To use this condition you have to be familiar with the javascript syntax. See Evaluator for a short introduction.
I highly recommend to combine this condition with a location condition to reduce unneeded checks of placeholder values. This is ensured by an internal execution order of the conditions.
Syntax: <evaluator>
The MythicMob condition will open a door when a mythic mob is killed. The mob is identified by its internal name. This is the same name which you use to spawn it. You will also have tab completion for this.
Syntax: <internal name>