Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing filters info and corrected info on some modules #103

Merged
merged 1 commit into from
Sep 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 31 additions & 61 deletions docs/modules/blocks/enderchests.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ The `<enderchest>` tag can contain any number of `<dropoff>` tags. Each `<dropof
determine where and when items should be dropped from the Ender chest.

Dropoffs handle taking a player's Ender chest inventory and dropping it on the ground at a defined region or it can completely erase it.
This can be triggered with a filter or once the player switches team or leaves the server.
This is triggered once the player switches teams or stops participating in the match.

:::caution
Ensure that any maps with Ender chests are loaded on a server using the latest
version of PGM available. Pre-existing Ender chests in previous versions of
PGM are not supported and will allow players to transfer items across matches.
Ensure that any maps with Ender chests are loaded on a server using PGM version `0.15` or newer.
Pre-existing Ender chests in previous versions of PGM are not supported and will allow players to transfer items across matches.
Additionally, players cannot place Ender chests under any circumstances.
:::

Expand Down Expand Up @@ -57,7 +56,7 @@ Additionally, players cannot place Ender chests under any circumstances.
</table>
</div>

### Dropoff Attributes
### Enderchest Attributes

<div className="table-container">
<table>
Expand All @@ -70,55 +69,16 @@ Additionally, players cannot place Ender chests under any circumstances.
</tr>
</thead>
<tbody>
<tr>
<td>
<label>region</label>
</td>
<td>
<span
className="badge badge--secondary"
title="Can be either this attribute or a sub-element."
>
Property
</span>
<span className="badge badge--danger">Required</span>
Region in which a player's Ender chest content will be dropped off.
</td>
<td>
<a href="/docs/modules/mechanics/regions">Region</a>
</td>
<td />
</tr>
<tr>
<td>
<label>filter</label>
</td>
<td>
<span
className="badge badge--secondary"
title="Can be either this attribute or a sub-element."
>
Property
</span>
<span className="badge badge--danger">Required</span>
Filter which determine when the content should be dropped.
</td>
<td>
<a href="/docs/modules/mechanics/filters">Filter</a>
</td>
<td />
</tr>
<tr>
<td>
<label>fallback</label>
</td>
<td>
Specify a fallback location option for when no drop-off locations are
defined.
<br />
<em>
Cannot be combined with <label>region</label>.
</em>
Specify a fallback operation for when no drop-off passes the filters.<br />
<label>KEEP</label> will maintain items when the player leaves a match.<br />
<label>DELETE</label> will clear the content of a player's Ender chest if they leave a match.
Under <label>AUTO</label>, it will acts as <label>DELETE</label> if no drop-offs are
defined, otherwise it will act as <label>KEEP</label>.
</td>
<td>
<label>AUTO</label>, <label>KEEP</label>, <label>DELETE</label>
Expand All @@ -131,51 +91,57 @@ Additionally, players cannot place Ender chests under any circumstances.
</table>
</div>

### Dropoff Sub-elements
### Dropoff Attributes

<div className="table-container">
<table>
<thead>
<tr>
<th>Element</th>
<th style={{ minWidth: "130px" }}>Attribute</th>
<th>Description</th>
<th>Value/Children</th>
<th>Value</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<label>{`<region>`}</label>
<label>region</label>
</td>
<td>
<span
className="badge badge--secondary"
title="Can be either this sub-element or an attribute."
title="Can be either this attribute or a sub-element."
>
Property
</span>
The region the drop-off applies to.
<span className="badge badge--danger">Required</span>
Region in which a player's Ender chest content will be dropped off.
</td>
<td>
<a href="/docs/modules/mechanics/regions">Bounded Regions</a>
<a href="/docs/modules/mechanics/regions">Randomize-able Region</a>
</td>
<td />
</tr>
<tr>
<td>
<label>{`<filter>`}</label>
<label>filter</label>
</td>
<td>
<span
className="badge badge--secondary"
title="Can be either this sub-element or an attribute."
title="Can be either this attribute or a sub-element."
>
Property
</span>
Filter which blocks are renewed.
<span className="badge badge--danger">Required</span>
Filter to determine whether to drop off Ender chest content at this location
or attempt the next location (if any).
</td>
<td>
<a href="/docs/modules/mechanics/filters">Filters</a>
<a href="/docs/modules/mechanics/filters">Filter</a>
</td>
<td />
</tr>
</tbody>
</table>
Expand All @@ -188,16 +154,20 @@ _Examples_
```xml
<!-- Add drop-off locations for when player switches teams or leave the match -->
<enderchest>
<!-- Each drop-off requires a region & filter attribute -->
<dropoff region="red-spawn" filter="red-only"/>
<dropoff region="blue-spawn" filter="blue-only"/>
</enderchest>
```

#### Fallback
#### Fallback Behavior

If you want Ender chest contents to not drop upon a certain event, you can specify what PGM will do with the inventory.
This will also be used when a drop-off is not possible.
By default, PGM will use `AUTO` if neither regions nor a fallback preference are specified.
`KEEP` will cause PGM to maintain a player's Ender chest if they leave. Upon rejoining, the Ender chest
will have the same inventory as before.
`DELETE` will cause PGM to clear a player's Ender chest if they leave. Upon rejoining, the Ender chest will be empty.

```xml
<!-- Specify a fallback option for when no drop-off locations are defined -->
Expand Down
10 changes: 4 additions & 6 deletions docs/modules/environment/time.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ title: Time & Dimension
description: You can use these time and dimension modules to have a finer control over your map's lighting and mood.
---

### Time

#### Time Set
### Time Set

Sets the map to use a certain time on match load, measured in ticks.

Expand All @@ -17,7 +15,7 @@ Sets the map to use a certain time on match load, measured in ticks.
</world>
```

#### Random Time
### Random Time

World time can be set from one of six possible times at random when a match loads.

Expand All @@ -29,11 +27,11 @@ World time can be set from one of six possible times at random when a match load
</world>
```

#### Time Lock
### Time Lock

Locks the time to a certain time, either from `<timeset>` or from the world data.
Time lock must be specifically turned off if one wishes to have the time cycle.
This can also be accomplished with the `doDaylightCycle` [gamerule](/docs/modules/mechanics/gamerules).
This can also be accomplished with the [`doDaylightCycle` gamerule](/docs/modules/mechanics/gamerules).

```xml
<world>
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/format/players.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ This gamemode is not compatible with the teams module!
<label>max</label>
</td>
<td>
Player limit -- normal players cannot join the match once it reaches
Player limit &#8212; normal players cannot join the match once it reaches
this size.
<br />
<em>
Expand All @@ -77,7 +77,7 @@ This gamemode is not compatible with the teams module!
<label>max-overfill</label>
</td>
<td>
Player overfill -- premium players cannot join the match once it
Player overfill &#8212; premium players cannot join the match once it
reaches this size.
<br />
<em>
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/gear/item-mods.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ the modify element does not currently support the projectile or grenade attribut
</em>
</td>
<td>
<a href="https://minecraft.fandom.com/wiki/Potion#Data_values">
<a href="https://minecraft.wiki/w/Potion#Data_values">
Potion ID
</a>
</td>
Expand Down
8 changes: 4 additions & 4 deletions docs/modules/gear/items.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ or on the [bukkit docs - Material](https://hub.spigotmc.org/javadocs/bukkit/org/
</td>
<td>The item's display name that appears when it is selected.</td>
<td>
<span className="badge badge--primary">String</span>
<span className="badge badge--primary">Formatted Text</span>
</td>
<td></td>
</tr>
Expand All @@ -200,7 +200,7 @@ or on the [bukkit docs - Material](https://hub.spigotmc.org/javadocs/bukkit/org/
</td>
<td>Custom text that appears when a player hovers over the item in the inventory.</td>
<td>
<span className="badge badge--primary">String</span>
<span className="badge badge--primary">Formatted Text</span>
</td>
<td></td>
</tr>
Expand Down Expand Up @@ -407,7 +407,7 @@ A player's skin data can be found by using `https://sessionserver.mojang.com/ses
<td>
<label>name</label>
</td>
<td>The heads display name.</td>
<td>The head's display name.</td>
<td>
<span className="badge badge--primary">String</span>
</td>
Expand Down Expand Up @@ -951,7 +951,7 @@ You can define custom explosion designs when creating and giving a firework rock

Any enchantment can be applied to any item and an item can have one or multiple enchantments.
The enchantment type can be specified by its
[Minecraft name](https://minecraft.fandom.com/wiki/Java_Edition_data_values/Pre-flattening#Enchantment_IDs) or
[Minecraft name](https://minecraft.wiki/w/Java_Edition_data_values/Pre-flattening#Enchantment_IDs) or
[Bukkit name](/docs/reference/items/enchantments).

To store an enchantment in an enchanted book (instead of enchanting the book itself),
Expand Down
24 changes: 12 additions & 12 deletions docs/modules/gear/kits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -576,9 +576,9 @@ affect a modifier applied by a different kit.

**Attribute Operations**

- `add` Add amount
- `base` Multiply amount by base value and add it
- `multiply` Multiply by amount
- `add` &#8212; Add amount
- `base` &#8212; Multiply amount by base value and add it
- `multiply` &#8212; Multiply by amount

##### Attribute Kit Elements

Expand Down Expand Up @@ -852,7 +852,7 @@ This element's enabled attribute can be used to disable double-jump inside regio
<td>
<label>recharge-time</label>
</td>
<td>Recharge time till the player can double jump again.</td>
<td>Recharge time until the player can double jump again.</td>
<td>
<a href="/docs/reference/misc/time-periods">Time Period</a>
</td>
Expand Down Expand Up @@ -884,7 +884,7 @@ This element's enabled attribute can be used to disable double-jump inside regio

The fly kit gives players which it is applied to the ability to fly.
It also allows modification of the speed at which they fly.
If no attributes are specified can-fly defaults to true.
If no attributes are specified, `can-fly` defaults to true.

<div className="table-container">
<table>
Expand All @@ -899,7 +899,7 @@ If no attributes are specified can-fly defaults to true.
<td>
<label>{`<fly/>`}</label>
</td>
<td>Control the player's flying ability</td>
<td>Control the player's flying ability.</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -936,9 +936,9 @@ If no attributes are specified can-fly defaults to true.
Set if the player is currently flying.
<br />
<i>
To enable flying
To enable flying,
<label>can-fly</label>
can not be set to false.
cannot be set to false.
</i>
</td>
<td>
Expand All @@ -962,9 +962,9 @@ If no attributes are specified can-fly defaults to true.

```xml
<kit id="fly">
<fly/> <!-- Allow player to fly -->
<fly can-fly="false"/> <!-- Don't allow player to fly -->
<fly flying="true"/> <!-- Make the player fly right away -->
<fly flying="false"/> <!-- Make the player stop flying right away -->
<fly/> <!-- Allow player to fly -->
<fly can-fly="false"/> <!-- Don't allow player to fly -->
<fly flying="true"/> <!-- Make the player fly right away -->
<fly flying="false"/> <!-- Make the player stop flying right away -->
</kit>
```
2 changes: 1 addition & 1 deletion docs/modules/gear/repair-remove-keep.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ _Example_

### Armor Keep

Similar to `<itemkeep>` except that the specified items are only kept if they are equipped in an armor slot.
Similar to `<itemkeep>`, except that the specified items are only kept if they are equipped in an armor slot.

<div className="table-container">
<table>
Expand Down
Loading
Loading