Skip to content

Commit 589baff

Browse files
authored
Merge branch 'main' into main
2 parents 364bfc5 + 04a1f02 commit 589baff

22 files changed

+129
-126
lines changed

config-specs/paper/paper-world-defaults.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ fishing-time-range:
784784
description: The minimum number of RNG ticks needed to catch a fish
785785
fixes:
786786
disable-unloaded-chunk-enderpearl-exploit:
787-
default: "true"
787+
default: "false"
788788
description: Prevent enderpearls from storing the thrower when in an unloaded chunk
789789
falling-block-height-nerf:
790790
default: disabled

config-specs/paper/server-properties.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,9 @@ simulation-distance:
213213
updated by the server, measured in chunks in each direction of the player (radius, not diameter).
214214
If entities are outside this radius, then they will not be ticked by the server nor will they be
215215
visible to players. Must be between 3 and 32 inclusive.
216-
spawn-animals:
217-
default: "true"
218-
description: "Determines if animals will be able to spawn."
219216
spawn-monsters:
220217
default: "true"
221218
description: "Determines if monsters will be spawned."
222-
spawn-npcs:
223-
default: "true"
224-
description: "Determines if villagers will be spawned."
225219
spawn-protection:
226220
default: "16"
227221
description: >

config-specs/paper/vanilla/paper-world-defaults.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ entities:
3131
filtered-entity-tag-nbt-paths:
3232
default: "<expand>"
3333
description: "The default value is: []"
34-
fixes:
35-
disable-unloaded-chunk-enderpearl-exploit:
36-
default: "false"
3734
hopper:
3835
cooldown-when-full:
3936
default: "false"

docs/paper/contributing/events.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,5 @@ parent event and capture any child events but also listen to the child event sep
4242
### Miscellaneous
4343

4444
* New parameters or method returns of type <Javadoc name={"org.bukkit.inventory.ItemStack"}>`ItemStack`</Javadoc>
45-
should be [`@NotNull`](https://javadoc.io/doc/org.jetbrains/annotations/latest/org/jetbrains/annotations/NotNull.html).
45+
should not be [`@Nullable`](https://javadoc.io/doc/org.jspecify/jspecify/latest/org/jspecify/annotations/Nullable.html)
46+
in most case and instead accept an empty itemStack.

docs/paper/dev/api/command-api/arguments.mdx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ Argument type, but there are many others:
6262
|---------------------|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
6363
| GAME_EVENT | GameEvent | [Game events](https://minecraft.wiki/w/Sculk_Sensor#Vibration_frequencies) |
6464
| STRUCTURE_TYPE | StructureType | [Structure types](https://minecraft.wiki/w/Structure#Overworld) |
65-
| INSTRUMENT | MusicInstrument | [Goat horns](https://minecraft.wiki/w/Goat_Horn#Playing) |
6665
| MOB_EFFECT | PotionEffectType | [Potion effect](https://minecraft.wiki/w/Effect#List) |
6766
| BLOCK | BlockType | [Block type](https://minecraft.wiki/w/Block#List_of_blocks) |
6867
| ITEM | ItemType | [Item type](https://minecraft.wiki/w/Item#List_of_items) |
@@ -72,23 +71,24 @@ Argument type, but there are many others:
7271
| VILLAGER_TYPE | Villager.Type | [Villager biome specific type](https://minecraft.wiki/w/Villager#Professions) |
7372
| MAP_DECORATION_TYPE | MapCursor.Type | [Types of sprites displayed on a map](https://minecraft.wiki/w/Map#Map_icons) |
7473
| MENU | MenuType | [Menu type](https://wiki.vg/Inventory) |
74+
| ATTRIBUTE | Attribute | [Entity attribute](https://minecraft.wiki/w/Attribute) |
75+
| FLUID | Fluid | [Fluid types](https://minecraft.wiki/w/Fluid) |
76+
| SOUND_EVENT | Sound | [Events that trigger sound effects](https://minecraft.wiki/w/Sounds.json#Sound_events) |
77+
| BIOME | Biome | [Biome type](https://minecraft.wiki/w/Biome#Biome_types) |
7578
| STRUCTURE | Structure | [Structures](https://minecraft.wiki/w/Structure#Overworld) |
7679
| TRIM_MATERIAL | TrimMaterial | [Materials used to trim armor](https://minecraft.wiki/w/Smithing#Material) |
7780
| TRIM_PATTERN | TrimPattern | [Trim patterns](https://minecraft.wiki/w/Smithing#Trimming) |
7881
| DAMAGE_TYPE | DamageType | [All types of damage dealt to an entity](https://minecraft.wiki/w/Damage_type) |
82+
| WOLF_VARIANT | Wolf.Variant | [Wolf variants](https://minecraft.wiki/w/Wolf#Variants) |
7983
| ENCHANTMENT | Enchantment | [Enchantment type](https://minecraft.wiki/w/Enchanting#Summary_of_enchantments) |
8084
| JUKEBOX_SONG | JukeboxSong | Music disc songs |
81-
| WOLF_VARIANT | Wolf.Variant | [Wolf variants](https://minecraft.wiki/w/Wolf#Variants) |
8285
| BANNER_PATTERN | PatternType | [Banner patterns](https://minecraft.wiki/w/Banner_Pattern#Variants) |
83-
| BIOME | Biome | [Biome type](https://minecraft.wiki/w/Biome#Biome_types) |
8486
| PAINTING_VARIANT | Art | [Painting variants](https://minecraft.wiki/w/Painting#Canvases) |
85-
| ATTRIBUTE | Attribute | [Entity attribute](https://minecraft.wiki/w/Attribute) |
87+
| INSTRUMENT | MusicInstrument | [Goat horns](https://minecraft.wiki/w/Goat_Horn#Playing) |
8688
| ENTITY_TYPE | EntityType | [Every entity type](https://minecraft.wiki/w/Entity#Types_of_entities) |
8789
| PARTICLE_TYPE | Particle | [Every particle type](https://minecraft.wiki/w/Particles_(Java_Edition)#Types_of_particles) |
8890
| POTION | PotionType | [Every potion type](https://minecraft.wiki/w/Potion#Effect_potions) |
89-
| SOUND_EVENT | Sound | [Events that trigger sound effects](https://minecraft.wiki/w/Sounds.json#Sound_events) |
9091
| MEMORY_MODULE_TYPE | MemoryKey | Keys for saving per-entity data |
91-
| FLUID | Fluid | [Fluid types](https://minecraft.wiki/w/Fluid) |
9292

9393
Paper specifies many more argument types. For more information on them, see <Javadoc name={"io.papermc.paper.command.brigadier.argument.ArgumentTypes"}>ArgumentTypes</Javadoc>
9494

@@ -100,7 +100,7 @@ interface.
100100
Now, let's say that we want to implement a command which lets you order ice cream. For that,
101101
we add an enum that specifies all available values for our custom type.
102102

103-
```java
103+
```java title="IceCreamType.java"
104104
public enum IceCreamType {
105105
VANILLA,
106106
CHOCOLATE,
@@ -111,11 +111,11 @@ public enum IceCreamType {
111111
```
112112
Now, we have to define the argument itself. We do this by implementing the <Javadoc name={"io.papermc.paper.command.brigadier.argument.CustomArgumentType$Converted"}>CustomArgumentType.Converted</Javadoc> interface:
113113

114-
```java
114+
```java title="IceCreamTypeArgument.java"
115115
public class IceCreamTypeArgument implements CustomArgumentType.Converted<IceCreamType, String> {
116116

117117
@Override
118-
public @NotNull IceCreamType convert(String nativeType) throws CommandSyntaxException {
118+
public IceCreamType convert(String nativeType) throws CommandSyntaxException {
119119
try {
120120
return IceCreamType.valueOf(nativeType.toUpperCase(Locale.ENGLISH));
121121
} catch (IllegalArgumentException ignored) {
@@ -126,7 +126,7 @@ public class IceCreamTypeArgument implements CustomArgumentType.Converted<IceCre
126126
}
127127

128128
@Override
129-
public @NotNull ArgumentType<String> getNativeType() {
129+
public ArgumentType<String> getNativeType() {
130130
return StringArgumentType.word();
131131
}
132132

@@ -154,7 +154,8 @@ detail.
154154

155155
We then need to register the command:
156156

157-
```java
157+
```java title="TestPlugin.java"
158+
@Override
158159
public void onEnable() {
159160
final LifecycleEventManager<Plugin> manager = this.getLifecycleManager();
160161
manager.registerEventHandler(LifecycleEvents.COMMANDS, event -> {

docs/paper/dev/api/command-api/commands.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ method of the plugin. Commands registered here will not be available to datapack
3030
functions are loaded by the server before plugins are loaded. To make commands available to
3131
datapacks, register them via the [PluginBootstrap](#pluginbootstrap).
3232

33-
```java
33+
```java title="YourPluginClass.java"
3434
public class YourPluginClass extends JavaPlugin {
3535

3636
@Override
@@ -69,7 +69,7 @@ Commands are registered in the same way in a plugin's
6969
The benefit of registering commands here is that they will be available to datapack functions
7070
because the command registration happens early enough.
7171

72-
```java
72+
```java title="YourPluginBootstrap.java"
7373
public class YourPluginBootstrap implements PluginBootstrap {
7474

7575
@Override
@@ -97,11 +97,11 @@ manager.registerEventHandler(LifecycleEvents.COMMANDS, event -> {
9797
});
9898
```
9999

100-
```java
100+
```java title="FunCommand.java"
101101
class FunCommand implements BasicCommand {
102102

103103
@Override
104-
public void execute(@NotNull CommandSourceStack stack, @NotNull String[] args) {
104+
public void execute(CommandSourceStack stack, String[] args) {
105105
if (args.length == 1 && args[0].equalsIgnoreCase("start")) {
106106
stack.getSender().sendRichMessage("<rainbow>Fun activated!");
107107
}

docs/paper/dev/api/component-api/intro.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ final Component component = MiniMessage.miniMessage().deserialize(
9191
// if the syntax above is too verbose for you, create a helper method!
9292

9393
public final class Components {
94-
public static Component mm(String miniMessageString) { // mm, short for MiniMessage
95-
return MiniMessage.miniMessage().deserialize(miniMessageString);
96-
}
94+
public static Component mm(String miniMessageString) { // mm, short for MiniMessage
95+
return MiniMessage.miniMessage().deserialize(miniMessageString);
96+
}
9797
}
9898

9999
// ...

docs/paper/dev/api/custom-inventory-holder.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ If you wish, you can use the static method <Javadoc name={"org.bukkit.Bukkit#cre
2828

2929
:::
3030

31-
```java
31+
```java title="MyInventory.java"
3232
public class MyInventory implements InventoryHolder {
3333

3434
private final Inventory inventory;
@@ -93,7 +93,7 @@ You can store extra data for your inventories on the `InventoryHolder` by adding
9393
Let's make an inventory that counts the amount of times we clicked a stone inside it.
9494
First, let's modify our `MyInventory` class a little:
9595

96-
```java
96+
```java title="MyInventory.java"
9797
public class MyInventory implements InventoryHolder {
9898

9999
private final Inventory inventory;

docs/paper/dev/api/entity-api/entity-teleport.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ Teleport a player relatively, preventing velocity from being reset in the X, Y a
6969
```java
7070
player.teleport(
7171
location,
72-
TeleportFlag.Relative.X,
73-
TeleportFlag.Relative.Y,
74-
TeleportFlag.Relative.Z
72+
TeleportFlag.Relative.VELOCITY_X,
73+
TeleportFlag.Relative.VELOCITY_Y,
74+
TeleportFlag.Relative.VELOCITY_Z
7575
);
7676
```
7777

docs/paper/dev/api/event-api/chat-event.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ method. Previously, this was done by using the <Javadoc name={"org.bukkit.event.
3535
with its <Javadoc name={"org.bukkit.event.player.AsyncPlayerChatEvent#setFormat(java.lang.String)"}>`setFormat`</Javadoc> method.
3636

3737
```java title="ChatRenderer#render"
38-
public @NotNull Component render(@NotNull Player source, @NotNull Component sourceDisplayName, @NotNull Component message, @NotNull Audience viewer) {
38+
public Component render(Player source, Component sourceDisplayName, Component message, Audience viewer) {
3939
// ...
4040
}
4141
```
@@ -82,7 +82,7 @@ public class ChatListener implements Listener, ChatRenderer { // Implement the C
8282

8383
// Override the render method
8484
@Override
85-
public @NotNull Component render(@NotNull Player source, @NotNull Component sourceDisplayName, @NotNull Component message, @NotNull Audience viewer) {
85+
public Component render(Player source, Component sourceDisplayName, Component message, Audience viewer) {
8686
// ...
8787
}
8888
}
@@ -127,7 +127,7 @@ public class ChatListener implements Listener, ChatRenderer {
127127
// Listener logic
128128

129129
@Override
130-
public @NotNull Component render(@NotNull Player source, @NotNull Component sourceDisplayName, @NotNull Component message, @NotNull Audience viewer) {
130+
public Component render(Player source, Component sourceDisplayName, Component message, Audience viewer) {
131131
return sourceDisplayName
132132
.append(Component.text(": "))
133133
.append(message);

0 commit comments

Comments
 (0)