You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/paper/admin/getting-started/adding-plugins.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ slug: /adding-plugins
4
4
description: Plugins are the most powerful way to extend the functionality of Paper beyond the configuration files.
5
5
---
6
6
7
-
# Adding Plugins
7
+
# Adding Plugins to your Paper Server
8
8
9
9
Plugins are the most powerful way to extend the functionality of Paper beyond the configuration
10
10
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
18
18
19
19
:::
20
20
21
-
## Finding plugins
21
+
## Finding Paper plugins for your server
22
22
23
23
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
24
24
on [SpigotMC](https://www.spigotmc.org/resources/),
@@ -35,7 +35,7 @@ mention Paper compatibility. It'll still work.
35
35
36
36
:::
37
37
38
-
## Installing plugins
38
+
## Installing plugins on your Paper server
39
39
40
40
1. Once you've found the plugin you'd like to install, download it. Ensure the file you have
41
41
downloaded ends in `.jar`. Some plugins also distribute as `.zip` files, in which case you will
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
+

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.
Copy file name to clipboardexpand all lines: docs/paper/admin/reference/system-properties.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -198,7 +198,7 @@ It also remaps plugin CB calls to remove the version information.
198
198
#### paper.useLegacyPluginLoading
199
199
200
200
-**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.
202
202
203
203
#### Paper.DisableCommandConverter
204
204
@@ -213,7 +213,7 @@ It also remaps plugin CB calls to remove the version information.
213
213
#### paper.disablePluginRemapping
214
214
215
215
-**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).
Copy file name to clipboardexpand all lines: docs/paper/dev/advanced/lifecycle-plugins.mdx
+22-30
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,25 @@
1
1
---
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.
4
4
---
5
5
6
-
# Paper Plugins (Experimental)
6
+
# Lifecycle Plugins
7
7
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).
16
13
17
14
-[Bootstrapper](#bootstrapper)
18
15
-[Loader](#loaders)
19
16
-[Differences](#differences)
20
17
21
18
## 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.
23
20
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.
24
21
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.
and adding the class of your implementation to the loader field in the `paper-plugin.yml`.
137
129
@@ -159,40 +151,40 @@ Currently, you are able to add two different library types:
159
151
## Differences
160
152
161
153
### 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
163
155
automatically registered for serialization. In order to use <Javadoc name={"org.bukkit.configuration.ConfigurationSection#getObject(java.lang.String,java.lang.Class)"}>`ConfigurationSection#getObject`</Javadoc>,
164
156
you **must** call <Javadoc name={"org.bukkit.configuration.serialization.ConfigurationSerialization#registerClass(java.lang.Class)"}>`ConfigurationSerialization#registerClass(Class)`</Javadoc>
165
157
before you attempt to fetch objects from configurations.
166
158
167
159
### 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
170
162
plugins are only able to access what they explicitly depend on.
171
163
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`.
173
165
174
166
```yml
175
167
Plugin:
176
168
join-classpath: true # Means you have access to their classpath
177
169
```
178
170
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.
180
172
181
173
### 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.
183
175
This was done for a variety of reasons, mostly to allow better control and allow plugins to properly share classloaders.
184
176
185
177
See [declaring dependencies](#dependency-declaration) for more information on how to declare the load order of your plugin.
186
178
187
179
### 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
189
181
of your commands in the `paper-plugin.yml` file. Instead, you can register commands using the
Copy file name to clipboardexpand all lines: docs/paper/dev/advanced/userdev.mdx
+5-5
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
---
2
-
slug: /dev/userdev
3
-
sidebar_label: Paperweight Userdev
2
+
slug: /dev/advanced/userdev
3
+
sidebar_label: Accessing Internals (NMS, Userdev)
4
4
description: A guide on how to use the paperweight-userdev Gradle plugin to access internal code.
5
5
---
6
6
7
-
# paperweight-userdev
7
+
# Accessing Internals (NMS, Userdev)
8
8
9
-
**paperweight**is the name of Paper's custom build tooling. The **paperweight-userdev** Gradle plugin part of that
10
-
provides access to internal code (also known as NMS) during development.
9
+
While it is generally recommended to use the Paper API for plugin development, there are some cases where you may need to access server internals, commonly referred to as NMS (short for net.minecraft.server).
10
+
This guide will show you how to use the **paperweight-userdev** Gradle plugin to access internal code during development.
0 commit comments