mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2025-02-17 21:02:12 +01:00
Created Requirements (markdown)
parent
27eef5f7fe
commit
a71c219701
69
Requirements.md
Normal file
69
Requirements.md
Normal file
@ -0,0 +1,69 @@
|
||||
## List
|
||||
This is a list of all built-in requirements of DungeonsXL.
|
||||
|
||||
### Level fee
|
||||
Makes the player pay experience levels.
|
||||
```
|
||||
requirements:
|
||||
feeLevel: 1
|
||||
```
|
||||
|
||||
### Monetary fee
|
||||
Makes the player pay Vault money.
|
||||
```
|
||||
requirements:
|
||||
feeMoney: 50.0
|
||||
```
|
||||
|
||||
### Forbidden items
|
||||
Items that may not be taken into the dungeon.
|
||||
```
|
||||
requirements:
|
||||
forbiddenItems:
|
||||
- ENDER_PEARL
|
||||
- MY_CUSTOM_ITEM
|
||||
```
|
||||
|
||||
### Group size
|
||||
Sets the allowed amount of group members.
|
||||
```
|
||||
requirements:
|
||||
groupSize:
|
||||
minimum: 2
|
||||
maximum: 4
|
||||
```
|
||||
|
||||
### Item keys
|
||||
Items the player must have to play the dungeon.
|
||||
```
|
||||
requirements:
|
||||
keyItems:
|
||||
- GOLD_INGOT
|
||||
- MY_CUSTOM_ITEM
|
||||
```
|
||||
|
||||
### Permission
|
||||
Permissions the player must have to play the dungeon.
|
||||
```
|
||||
requirements:
|
||||
permission:
|
||||
- my.custom.node
|
||||
- yet.another.node
|
||||
```
|
||||
|
||||
### Time frame
|
||||
The time when the dungeon may be played.
|
||||
In this example, it can only be played on a friday and from sunday to tuesday respectively at 15-16 o'clock.
|
||||
Note that the week in the Java Calendar API begins with sunday, so SATURDAY-SUNDAY does not work.
|
||||
```
|
||||
requirements:
|
||||
timeframe:
|
||||
- "FRIDAY"
|
||||
- "SUNDAY-TUESDAY"
|
||||
- "15-16"
|
||||
```
|
||||
|
||||
## API
|
||||
Creating a requirement is as easy as implementing the [Requirement](https://erethon.de/javadocs/dungeonsxl/de/erethon/dungeonsxl/api/Requirement.html) interface in a class with a [DungeonsAPI](https://erethon.de/javadocs/dungeonsxl/de/erethon/dungeonsxl/api/DungeonsAPI.html) parameter. See [here](https://github.com/DRE2N/DungeonsXL/blob/master/core/src/main/java/de/erethon/dungeonsxl/requirement/FeeMoneyRequirement.java) for reference.
|
||||
|
||||
Requirements fire [RequirementCheckEvent](https://erethon.de/javadocs/dungeonsxl/de/erethon/dungeonsxl/api/event/requirement/RequirementCheckEvent.html) and [RequirementDemandEvent](https://erethon.de/javadocs/dungeonsxl/de/erethon/dungeonsxl/api/event/requirement/RequirementDemandEvent.html).
|
Loading…
Reference in New Issue
Block a user