Skip to content

Commit 6f63072

Browse files
committed
feat: rebrand "paper plugins" as "lifecycle plugins"
1 parent 4a113f1 commit 6f63072

File tree

21 files changed

+159
-122
lines changed

21 files changed

+159
-122
lines changed

_redirects

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@
88
/paper/configuration /paper/reference/configuration
99
/paper/reference/vanilla-command-permissions /paper/reference/permissions
1010
/paper/dev/commands /paper/dev/command-api/commands
11+
/paper/dev/getting-started/paper-plugins /paper/dev/advanced/lifecycle-plugins
12+
/paper/dev/userdev /paper/dev/advanced/userdev
13+
/paper/admin/reference/paper-plugins /paper/admin/reference/lifecycle-plugins

config/sidebar.paper.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const paper: SidebarsConfig = {
6767
],
6868
},
6969
"admin/reference/system-properties",
70-
"admin/reference/paper-plugins",
70+
"admin/reference/lifecycle-plugins",
7171
"admin/reference/vanilla-command-permissions",
7272
],
7373
},
@@ -100,11 +100,9 @@ const paper: SidebarsConfig = {
100100
id: "dev/getting-started/README",
101101
},
102102
items: [
103+
"dev/getting-started/how-do-plugins-work",
103104
"dev/getting-started/project-setup",
104105
"dev/getting-started/plugin-yml",
105-
"dev/getting-started/how-do-plugins-work",
106-
"dev/getting-started/paper-plugins",
107-
"dev/getting-started/userdev",
108106
],
109107
},
110108
{
@@ -176,6 +174,16 @@ const paper: SidebarsConfig = {
176174
"dev/misc/internal-code",
177175
],
178176
},
177+
{
178+
type: "category",
179+
label: "Advanced",
180+
collapsed: true,
181+
link: {
182+
type: "doc",
183+
id: "dev/advanced/README",
184+
},
185+
items: ["dev/advanced/lifecycle-plugins", "dev/advanced/userdev"],
186+
},
179187
],
180188
},
181189
{

docs/misc/hangar-publishing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Your plugin project needs to use Gradle as its build tooling.
2121
If you are using
2222
Maven, [switching to a Gradle setup is easy](https://docs.gradle.org/current/userguide/migrating_from_maven.html) and in
2323
general recommended due to higher configurability and support for other plugins, such as
24-
when [compiling against an unobfuscated Minecraft server](/paper/dev/userdev).
24+
when [compiling against an unobfuscated Minecraft server](/paper/dev/advanced/userdev).
2525

2626
The provided examples use Kotlin DSL, but you can also do the same using Groovy. Online converters (even ChatGPT)
2727
are able to convert the example code.

docs/paper/admin/getting-started/adding-plugins.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ slug: /adding-plugins
44
description: Plugins are the most powerful way to extend the functionality of Paper beyond the configuration files.
55
---
66

7-
# Adding Plugins
7+
# Adding Plugins to your Paper Server
88

99
Plugins are the most powerful way to extend the functionality of Paper beyond the configuration
1010
files. Functionality added by plugins can range from making milk restore hunger or dead bushes grow,
@@ -18,7 +18,7 @@ it is imperative that plugins only be installed from trusted sources. Be careful
1818

1919
:::
2020

21-
## Finding plugins
21+
## Finding Paper plugins for your server
2222

2323
Before installing a plugin, you'll need to find what you want to install. The best place to find plugins is [Hangar](https://hangar.papermc.io), Paper's plugin repository, but you can also find many plugins
2424
on [SpigotMC](https://www.spigotmc.org/resources/),
@@ -35,7 +35,7 @@ mention Paper compatibility. It'll still work.
3535

3636
:::
3737

38-
## Installing plugins
38+
## Installing plugins on your Paper server
3939

4040
1. Once you've found the plugin you'd like to install, download it. Ensure the file you have
4141
downloaded ends in `.jar`. Some plugins also distribute as `.zip` files, in which case you will

docs/paper/admin/misc/faq.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,31 @@ description: Questions frequently asked by our community, answered by us!
77

88
## Unsupported Java detected, what do I do?!
99

10-
Unsupported, early-access, or internal versions of Java are often missing features, have known issues or be straight up broken.
10+
Unsupported, early-access, or internal versions of Java are often missing features, have known issues or be straight up broken.
1111
As such, we cannot provide support for servers running such versions.
1212
You should install a supported version of Java as explained [here](/misc/java-install).
1313

1414
If you still wish to continue, knowing that you are on your own and will receive NO support, you can disable the check with a system property, as explained [here](/paper/reference/system-properties#paperignorejavaversion).
15+
16+
## What is a Paper plugin?
17+
18+
A Paper plugin is a plugin that is compiled against the Paper API.<br>
19+
Developers can find more info on how to get started writing Paper plugins [here](/paper/dev/getting-started).<br>
20+
Server Admins can learn how to find and install Paper plugins [here](/paper/adding-plugins).
21+
22+
## What is a Spigot plugin?
23+
24+
A Spigot plugin is a plugin that is compiled against the Spigot API.
25+
Most Spigot plugins are compatible with your Paper, but plugins that use Spigot API introduced after Minecraft 1.21.4 may not work correctly.
26+
27+
## What is a Bukkit plugin?
28+
29+
The term Bukkit plugin is a bit missleading. The Bukkit project died in 2014. The Bukkit API lives on in our fork of it, called Paper API.
30+
When people say Bukkit plugin, they most likely refer to a [Paper plugin](#what-is-a-paper-plugin).
31+
32+
## What is a (Paper) lifecycle plugin? (formally known as experimental Paper plugins)
33+
34+
Lifecycle plugins are special kinds of Paper plugins that use advanced features of the Paper API to hook into the server's lifecycle.
35+
They have been confusingly refered to as (experimental) Paper plugins or Paper manifest plugins before.<br>
36+
Server Admins can find more information [here](/paper/reference/lifecycle-plugins).<br>
37+
Plugin developers can learn how to write lifecycle plugins [here](/paper/dev/advanced/lifecycle-plugins).
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
slug: /reference/lifecycle-plugins
3+
description: A guide to the ins and outs of lifecycle plugins.
4+
---
5+
6+
# Lifecycle Plugins
7+
8+
This documentation page serves to explain all the new semantics and possible confusions that lifecycle plugins may introduce.
9+
10+
:::info
11+
12+
Developers can get more information on lifecycle plugins [here](docs/paper/dev/advanced/lifecycle-plugins.mdx).
13+
14+
:::
15+
16+
## What are they?
17+
18+
Lifecycle plugins are plugins which are loaded by Paper's new plugin loading framework. Lifecycle plugins are used by developers to
19+
take advantage of modern systems Mojang provides, for example, datapacks.
20+
21+
![Plugin List](assets/plugin-list.png)
22+
23+
## What is the difference?
24+
25+
When enabled, lifecycle plugins are **identical** to traditional paper plugins. This allows plugins to still fully communicate and support each other, meaning that even if a
26+
plugin is a traditional paper plugin or lifecycle plugin, they are both able to depend on each other just fine.
27+
28+
Lifecycle plugins only support being loaded by Paper's Plugin Loader and may use new API unavailable to Bukkit plugins.
29+
30+
### How do I add Lifecycle plugins?
31+
32+
Lifecycle plugins are added the same as traditional paper plugins, therefore, you can follow [this guide](docs/paper/admin/getting-started/adding-plugins.md).
33+
34+
### Cyclic plugin loading
35+
36+
With the introduction of lifecycle plugins, Paper introduces a new plugin loader that fixes some odd issues.
37+
However, as a result, this now causes [cyclic loading](docs/paper/dev/advanced/lifecycle-plugins.mdx#cyclic-plugin-loading) between plugins to no longer be supported.
38+
39+
If Paper detects a loop, your server will be shut down with an error.
40+
41+
:::danger[Legacy]
42+
43+
If your server **requires** this circular loading, you can enable this by adding the [`-Dpaper.useLegacyPluginLoading=true`](system-properties.md#paperuselegacypluginloading) startup flag.
44+
Please note that this may not be supported in the future.
45+
46+
:::

docs/paper/admin/reference/paper-plugins.md

Lines changed: 0 additions & 46 deletions
This file was deleted.

docs/paper/admin/reference/system-properties.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ It also remaps plugin CB calls to remove the version information.
198198
#### paper.useLegacyPluginLoading
199199

200200
- **default**: `false`
201-
- **description**: Allows cyclic plugin loading. See [here](paper-plugins.md#cyclic-plugin-loading) for more info.
201+
- **description**: Allows cyclic plugin loading. See [here](lifecycle-plugins.md#cyclic-plugin-loading) for more info.
202202

203203
#### Paper.DisableCommandConverter
204204

@@ -213,7 +213,7 @@ It also remaps plugin CB calls to remove the version information.
213213
#### paper.disablePluginRemapping
214214

215215
- **default**: `false`
216-
- **description**: Disables plugin remapping introduced in 1.20.5. For more information see the [userdev](../../dev/getting-started/userdev.mdx#1205-and-beyond) documentation and the official [announcement](https://discord.com/channels/289587909051416579/976631292747735080/1232740079097876570).
216+
- **description**: Disables plugin remapping introduced in 1.20.5. For more information see the [userdev](../../dev/advanced/userdev.mdx#1205-and-beyond) documentation and the official [announcement](https://discord.com/channels/289587909051416579/976631292747735080/1232740079097876570).
217217

218218
#### paper.preferSparkPlugin
219219

docs/paper/dev/advanced/README.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import DocCardList from "@theme/DocCardList";
2+
import { useCurrentSidebarCategory } from "@docusaurus/theme-common";
3+
4+
# Advanced Topics
5+
6+
This section contains advanced topics for Paper plugin developers.
7+
Be sure to read the [Getting Started](/paper/dev/getting-started) guide before diving into these topics.
8+
9+
---
10+
11+
<DocCardList items={useCurrentSidebarCategory().items} />

docs/paper/dev/getting-started/paper-plugins.mdx renamed to docs/paper/dev/advanced/lifecycle-plugins.mdx

Lines changed: 22 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
11
---
2-
slug: /dev/getting-started/paper-plugins
3-
description: A development guide for how to write Paper-specific plugins.
2+
slug: /dev/advanced/lifecycle-plugins
3+
description: A development guide for how to write lifecycle plugins.
44
---
55

6-
# Paper Plugins (Experimental)
6+
# Lifecycle Plugins
77

8-
Paper plugins allow developers to take advantage of more modern concepts introduced by Mojang, such as datapacks, to
9-
expand the field of what the Paper API is able to introduce.
10-
11-
:::danger[Experimental]
12-
13-
This is experimental and may be subject to change.
14-
15-
:::
8+
## What is it used for?
9+
Lifecycle plugins, as the name suggests, allow developers to have more control over their plugins lifecycle.
10+
This is required to take advantage of some of the more modern concepts introduced by Mojang, such as datapacks.
11+
Lifecycle plugins allow us to do just that by defining a new way to load plugin resources before the server
12+
has started in form of [bootstrappers](#bootstrapper).
1613

1714
- [Bootstrapper](#bootstrapper)
1815
- [Loader](#loaders)
1916
- [Differences](#differences)
2017

2118
## How do I use them?
22-
Similarly to Bukkit plugins, you have to introduce a `paper-plugin.yml` file into your JAR resources folder.
19+
Similarly to traditional paper plugins, you have to introduce a `paper-plugin.yml` file into your JAR resources folder.
2320
This will not act as a drop-in replacement for `plugin.yml`, as some things, as outlined in this guide, need to be declared differently.
2421

25-
It should be noted that you still have the ability to include both `paper-plugin.yml` and `plugin.yml` in the same JAR.
22+
It should be noted that you still have the ability to include both `paper-plugin.yml` and `plugin.yml` in the same JAR, which can be useful for compatibility with older versions of Paper.
2623

2724
Here is an example configuration:
2825
<VersionFormattedCode language={"yaml"}>
@@ -39,7 +36,7 @@ loader: io.papermc.testplugin.TestPluginLoader
3936

4037
### Dependency declaration
4138

42-
Paper plugins change how to declare dependencies in your `paper-plugin.yml`:
39+
Lifecycle plugins change how to declare dependencies in your `paper-plugin.yml`:
4340

4441
```yml
4542
dependencies:
@@ -60,7 +57,7 @@ dependencies:
6057
join-classpath: false
6158
```
6259
63-
With Paper plugins, dependencies are split into two sections:
60+
With lifecycle plugins, dependencies are split into two sections:
6461
- `bootstrap` - These are dependencies that you will be using in the [bootstrap](#bootstrapper).
6562
- `server` - These are dependencies that are used for the core functionality of your plugin, whilst the server is running.
6663

@@ -103,13 +100,8 @@ SuperDuperTacoParty:
103100
join-classpath: true
104101
```
105102

106-
## What is it used for?
107-
Paper plugins lay down the framework for some future API. Our goals are to open more modern API that better aligns
108-
with Vanilla. Paper plugins allow us to do just that by making a new way to load plugin resources before the server
109-
has started by using [bootstrappers](#bootstrapper).
110-
111103
## Bootstrapper
112-
Paper plugins are able to identify their own bootstrapper by implementing
104+
Lifecycle plugins are able to identify their own bootstrapper by implementing
113105
<Javadoc name={"io.papermc.paper.plugin.bootstrap.PluginBootstrap"}>`PluginBootstrap`</Javadoc>
114106
and adding the class of your implementation to the bootstrapper field in the `paper-plugin.yml`.
115107
```java title="TestPluginBootstrap.java"
@@ -131,7 +123,7 @@ A bootstrapper also allows you to change the way your plugin is initialized, all
131123
Currently, bootstrappers do not offer much new API and are highly experimental. This may be subject to change once more API is introduced.
132124

133125
## Loaders
134-
Paper plugins are able to identify their own plugin loader by implementing
126+
Lifecycle plugins are able to identify their own plugin loader by implementing
135127
<Javadoc name={"io.papermc.paper.plugin.loader.PluginLoader"}>`PluginLoader`</Javadoc>
136128
and adding the class of your implementation to the loader field in the `paper-plugin.yml`.
137129

@@ -159,40 +151,40 @@ Currently, you are able to add two different library types:
159151
## Differences
160152

161153
### Bukkit serialization system
162-
Paper plugins still support the serialization system (`org.bukkit.configuration.serialization`) that Bukkit uses. However, custom classes will not be
154+
Lifecycle plugins still support the serialization system (`org.bukkit.configuration.serialization`) that Bukkit uses. However, custom classes will not be
163155
automatically registered for serialization. In order to use <Javadoc name={"org.bukkit.configuration.ConfigurationSection#getObject(java.lang.String,java.lang.Class)"}>`ConfigurationSection#getObject`</Javadoc>,
164156
you **must** call <Javadoc name={"org.bukkit.configuration.serialization.ConfigurationSerialization#registerClass(java.lang.Class)"}>`ConfigurationSerialization#registerClass(Class)`</Javadoc>
165157
before you attempt to fetch objects from configurations.
166158

167159
### Classloading isolation
168-
Paper plugins are not able to access each other unless given explicit access by depending on another plugin, etc. This
169-
helps prevent Paper plugins from accidentally accessing each other's dependencies, and in general helps ensure that
160+
Lifecycle plugins are not able to access each other unless given explicit access by depending on another plugin, etc. This
161+
helps prevent Lifecycle plugins from accidentally accessing each other's dependencies, and in general helps ensure that
170162
plugins are only able to access what they explicitly depend on.
171163

172-
Paper plugins have the ability to bypass this, being able to access OTHER plugins' classloaders by adding a `join-classpath` option to their `paper-plugin.yml`.
164+
Lifecycle plugins have the ability to bypass this, being able to access OTHER plugins' classloaders by adding a `join-classpath` option to their `paper-plugin.yml`.
173165

174166
```yml
175167
Plugin:
176168
join-classpath: true # Means you have access to their classpath
177169
```
178170

179-
Note, other Paper plugins will still be unable to access your classloader.
171+
Note, other Lifecycle plugins will still be unable to access your classloader.
180172

181173
### Load order logic split
182-
In order to better take advantage of classloading isolation, Paper plugins do **not** use the `dependencies` field to determine load order.
174+
In order to better take advantage of classloading isolation, Lifecycle plugins do **not** use the `dependencies` field to determine load order.
183175
This was done for a variety of reasons, mostly to allow better control and allow plugins to properly share classloaders.
184176

185177
See [declaring dependencies](#dependency-declaration) for more information on how to declare the load order of your plugin.
186178

187179
### Commands
188-
Paper plugins do not use the `commands` field to register commands. This means that you do not need to include all
180+
Lifecycle plugins do not use the `commands` field to register commands. This means that you do not need to include all
189181
of your commands in the `paper-plugin.yml` file. Instead, you can register commands using the
190182
[Brigadier Command API](../api/command-api/commands.mdx).
191183

192184
### Cyclic plugin loading
193185

194186
Cyclic loading describes the phenomenon when a plugin loading causes a loop that eventually cycles back to the original plugin.
195-
Unlike Bukkit plugins, Paper plugins will not attempt to resolve cyclic loading issues.
187+
Unlike traditional paper plugins, lifecycle plugins will not attempt to resolve cyclic loading issues.
196188

197189
```mermaid
198190
graph LR;

0 commit comments

Comments
 (0)