Skip to content

Commit 08e0d7c

Browse files
456devzlataovceLulu13022002
authored
feat: Bukkit configs, help.yml and permissions.yml (#571)
* add the final bukkit configs, help.yml and permissions.yml * apply formatting and fix spelling * apply suggeston Co-authored-by: Matouš Kučera <[email protected]> * remove mention of formatting permissions This behaviour is subject to change, and shouldn't be documented (probable bug) * punctuation * add not-a-permission-plugin-replacement warning * Update src/config/paper/help.yml Co-authored-by: Lulu13022002 <[email protected]> --------- Co-authored-by: Matouš Kučera <[email protected]> Co-authored-by: Lulu13022002 <[email protected]>
1 parent 32e146d commit 08e0d7c

File tree

6 files changed

+185
-2
lines changed

6 files changed

+185
-2
lines changed

astro.config.ts

+2
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ export default defineConfig({
8585
"paper/reference/bukkit-configuration",
8686
"paper/reference/spigot-configuration",
8787
"paper/reference/bukkit-commands-configuration",
88+
"paper/reference/bukkit-permissions-configuration",
89+
"paper/reference/bukkit-help-configuration",
8890
"paper/reference/server-properties",
8991
"paper/reference/vanilla-data-files",
9092
],

src/config/paper/help.yml

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
general-topics:
2+
<topic name>:
3+
header:
4+
message: A custom help "topic" to show when the user types "`/help <topic>`".
5+
shortText:
6+
description: |
7+
The first line of the help entry, used as a summary in index pages.
8+
9+
This is formatted with legacy "&" style formatting.
10+
default: '""'
11+
fullText:
12+
description: |
13+
The remaining lines of this help entry.
14+
15+
This is formatted with legacy "&" style formatting.
16+
default: '""'
17+
permission:
18+
description: |
19+
The permission required to view this help entry.
20+
21+
If this is empty/not set, the entry does not require a permission.
22+
default: '""'
23+
24+
index-topics:
25+
<topic name>:
26+
header:
27+
message: |
28+
A composite help topic index.
29+
30+
If the topic name is the special value "Default",
31+
it will override the automatically generated index used for /help with no arguments.
32+
shortText:
33+
description: |
34+
The short text used in other index topics.
35+
36+
This is not displayed when showing this topic itself.
37+
38+
This is formatted with legacy "&" style formatting.
39+
default: '""'
40+
preamble:
41+
description: |
42+
Information to show before the index.
43+
44+
This is formatted with legacy "&" style formatting.
45+
default: '""'
46+
permission:
47+
description: |
48+
A custom permission required to view this help entry.
49+
50+
If this is empty/not set, the entry does not require a permission.
51+
default: '""'
52+
commands:
53+
description: |
54+
What to show in the index.
55+
56+
This is a list of commands, or other help topics.
57+
58+
They will be displayed in the order they are listed here
59+
in "topic name: short text" format.
60+
61+
Each entry is a maximum of 1 minimum-width chat line (55 chars).
62+
default: "[]"
63+
64+
amended-topics:
65+
<topic name>:
66+
shortText:
67+
description: |
68+
A replacement for the short text of the topic.
69+
70+
If this is empty/not set, the original short text is used.
71+
72+
If this contains the literal string `<text>`, it will be replaced with the original short text.
73+
74+
This is formatted with legacy "&" style formatting.
75+
default: '""'
76+
fullText:
77+
description: |
78+
A replacement for the full text of the topic.
79+
80+
If this is empty/not set, the original full text is used.
81+
82+
If this contains the literal string `<text>`, it will be replaced with the original full text.
83+
84+
This is formatted with legacy "&" style formatting.
85+
default: '""'
86+
permission:
87+
description: |
88+
Overrides the permission required to view this help entry.
89+
90+
If this is empty/not set, the original permission is NOT used, instead no permission is required.
91+
default: '""'
92+
93+
ignore-plugins:
94+
description: |
95+
A list of plugins to ignore when generating help topics for registered commands.
96+
97+
If "All" is included, all plugins are ignored.
98+
99+
If the special plugin name "Bukkit" is included, all commands registered by Bukkit are ignored.
100+
default: "[]"
101+
102+
command-topics-in-master-index:
103+
description: |
104+
Whether to allow command topics (topics starting with a `/`) to be shown in the main index.
105+
106+
This is the index shown when the user types "`/help`" or "`/help <page>`".
107+
Command alias topics are always hidden.
108+
default: "true"

src/config/paper/permissions.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<permission>:
2+
default:
3+
description: |
4+
Who this permission is granted to by default.
5+
6+
"true": all players.
7+
8+
"false": no players.
9+
10+
"op": only operators (also aliased as "isop", "operator", "isoperator", "admin", and "isadmin").
11+
12+
"!op": all players except operators (also aliased as "notop", "!operator", "notoperator", "!admin", "notadmin").
13+
default: "op"
14+
children:
15+
header:
16+
message: A list (not shown) or a map (shown below) of child permissions.
17+
<permission>:
18+
description: |
19+
A child permission of this permission.
20+
21+
The value is either a boolean, where false inverts the whether the permission would be granted to this.
22+
23+
or a top level permission entry,
24+
except the default is this parent permissions default value,
25+
and any child permissions of the newly created permission are bubbled up to the top level.
26+
default: "true"
27+
description_:
28+
description: The description of the permission.
29+
default: '""'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: help.yml
3+
slug: paper/reference/bukkit-help-configuration
4+
---
5+
6+
import ConfigNode from "/src/components/ConfigNode.astro";
7+
import HelpYML from "/src/config/paper/help.yml?raw";
8+
import { parse } from "yaml";
9+
10+
:::note
11+
12+
The below YAML shows you the structure for `help.yml`.
13+
14+
Click on a leaf node to view the description for that setting.
15+
16+
:::
17+
18+
<ConfigNode data={parse(HelpYML)} />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: permissions.yml
3+
slug: paper/reference/bukkit-permissions-configuration
4+
---
5+
6+
import ConfigNode from "/src/components/ConfigNode.astro";
7+
import PermissionsYML from "/src/config/paper/permissions.yml?raw";
8+
import { parse } from "yaml";
9+
10+
:::note
11+
12+
The below YAML shows you the structure for `permissions.yml`.
13+
14+
Click on a leaf node to view the description for that setting.
15+
16+
:::
17+
18+
:::caution
19+
20+
This is NOT a replacement for a permissions plugin.
21+
22+
This file is used to define metadata about permissions themselves, including a description and a default value.
23+
24+
:::
25+
26+
<ConfigNode data={parse(PermissionsYML)} />

src/content/docs/paper/admin/reference/configuration/index.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ If this is not the case, they offer a brief explanation to what they are.
3232
- [bukkit.yml](/paper/reference/bukkit-configuration)
3333
- [commands.yml](/paper/reference/bukkit-commands-configuration)
3434
- [eula.txt](/paper/reference/vanilla-data-files#eulatxt) stores the EULA consent status
35-
- help.yml stores configuration for the `/help` command
35+
- [help.yml](/paper/reference/bukkit-help-configuration) stores configuration for the `/help` command
3636
- [ops.json](/paper/reference/vanilla-data-files#opsjson) stores information about players with operator status
37-
- permissions.yml stores permission configuration
37+
- [permissions.yml](/paper/reference/bukkit-permissions-configuration) stores additional permission definitions
3838
- [server.properties](/paper/reference/server-properties)
3939
- [spigot.yml](/paper/reference/spigot-configuration)
4040
- usercache.json caches players' Mojang API data, e.g. their head textures

0 commit comments

Comments
 (0)