Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6a1d2ecd7 |
No files matched your search
@@ -32,6 +32,3 @@ ij_java_generate_final_parameters = true
|
||||
|
||||
[test-plugin/**/*.java]
|
||||
ij_java_use_fq_class_names = false
|
||||
|
||||
[Paper-Server/src/main/resources/data/**/*.json]
|
||||
indent_size = 2
|
||||
+1
-1
@@ -478,4 +478,4 @@ everything like usual.
|
||||
> in Windows like described here:
|
||||
> <https://docs.microsoft.com/en-us/windows/wsl/filesystems#view-your-current-directory-in-windows-file-explorer>
|
||||
|
||||
[MappingViewer]: https://mappings.cephx.dev/
|
||||
[MappingViewer]: https://nms.screamingsandals.org/
|
||||
@@ -40,7 +40,7 @@ How To (Plugin Developers)
|
||||
<dependency>
|
||||
<groupId>io.papermc.paper</groupId>
|
||||
<artifactId>paper-api</artifactId>
|
||||
<version>1.20.2-R0.1-SNAPSHOT</version>
|
||||
<version>1.20.1-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
```
|
||||
@@ -53,7 +53,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("io.papermc.paper:paper-api:1.20.2-R0.1-SNAPSHOT")
|
||||
compileOnly("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT")
|
||||
}
|
||||
|
||||
java {
|
||||
|
||||
@@ -8,8 +8,4 @@
|
||||
# To import classes from the vanilla Minecraft jar use `minecraft` as the artifactId:
|
||||
# minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter
|
||||
# minecraft net/minecraft/world/level/entity/LevelEntityGetter.java
|
||||
# To import minecraft data files, like the default chat type, use `mc_data` as the prefix:
|
||||
# mc_data chat_type/chat.json
|
||||
# mc_data dimension_type/overworld.json
|
||||
#
|
||||
|
||||
+10
-10
@@ -5,7 +5,7 @@ plugins {
|
||||
java
|
||||
`maven-publish`
|
||||
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
||||
id("io.papermc.paperweight.core") version "1.5.9"
|
||||
id("io.papermc.paperweight.core") version "1.5.5"
|
||||
}
|
||||
|
||||
allprojects {
|
||||
@@ -61,8 +61,8 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
paramMappings("net.fabricmc:yarn:1.20.2+build.1:mergedv2")
|
||||
remapper("net.fabricmc:tiny-remapper:0.8.10:fat")
|
||||
paramMappings("net.fabricmc:yarn:1.20.1+build.1:mergedv2")
|
||||
remapper("net.fabricmc:tiny-remapper:0.8.6:fat")
|
||||
decompiler("net.minecraftforge:forgeflower:2.0.627.2")
|
||||
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.6")
|
||||
paperclip("io.papermc:paperclip:3.0.3")
|
||||
@@ -131,15 +131,15 @@ allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
// Uncomment while updating for a new Minecraft version
|
||||
/*
|
||||
tasks.collectAtsFromPatches {
|
||||
extraPatchDir.set(layout.projectDirectory.dir("patches/unapplied/server"))
|
||||
// Uncomment while updating for a new Minecraft version
|
||||
// extraPatchDir.set(layout.projectDirectory.dir("patches/unapplied/server"))
|
||||
}
|
||||
tasks.withType<io.papermc.paperweight.tasks.RebuildGitPatches> {
|
||||
filterPatches.set(false)
|
||||
}
|
||||
*/
|
||||
|
||||
// Uncomment while updating for a new Minecraft version
|
||||
// tasks.withType<io.papermc.paperweight.tasks.RebuildGitPatches> {
|
||||
// filterPatches.set(false)
|
||||
// }
|
||||
|
||||
tasks.register("printMinecraftVersion") {
|
||||
doLast {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
group=io.papermc.paper
|
||||
version=1.20.2-R0.1-SNAPSHOT
|
||||
mcVersion=1.20.2
|
||||
version=1.20.1-R0.1-SNAPSHOT
|
||||
mcVersion=1.20.1
|
||||
|
||||
org.gradle.caching=true
|
||||
org.gradle.parallel=true
|
||||
|
||||
@@ -27,10 +27,10 @@ index 11038da2e071699d6561a331565db0c8d7850d0e..317acfec5894101294a55abff6181943
|
||||
+/.factorypath
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..41e77b687df6480adf8f5e21daad105dab208df2
|
||||
index 0000000000000000000000000000000000000000..c2e5d8006420aab5a60e5aaa188223aeb0396483
|
||||
--- /dev/null
|
||||
+++ b/build.gradle.kts
|
||||
@@ -0,0 +1,91 @@
|
||||
@@ -0,0 +1,86 @@
|
||||
+plugins {
|
||||
+ `java-library`
|
||||
+ `maven-publish`
|
||||
@@ -46,10 +46,10 @@ index 0000000000000000000000000000000000000000..41e77b687df6480adf8f5e21daad105d
|
||||
+
|
||||
+dependencies {
|
||||
+ // api dependencies are listed transitively to API consumers
|
||||
+ api("com.google.guava:guava:32.1.2-jre")
|
||||
+ api("com.google.code.gson:gson:2.10.1")
|
||||
+ api("com.google.guava:guava:31.1-jre")
|
||||
+ api("com.google.code.gson:gson:2.10")
|
||||
+ api("net.md-5:bungeecord-chat:$bungeeCordChatVersion")
|
||||
+ api("org.yaml:snakeyaml:2.2")
|
||||
+ api("org.yaml:snakeyaml:2.0")
|
||||
+ api("org.joml:joml:1.10.5")
|
||||
+
|
||||
+ compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||
@@ -61,9 +61,8 @@ index 0000000000000000000000000000000000000000..41e77b687df6480adf8f5e21daad105d
|
||||
+ testCompileOnly(annotations)
|
||||
+
|
||||
+ testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
+ testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
|
||||
+ testImplementation("org.hamcrest:hamcrest:2.2")
|
||||
+ testImplementation("org.mockito:mockito-core:5.5.0")
|
||||
+ testImplementation("junit:junit:4.13.2")
|
||||
+ testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
+ testImplementation("org.ow2.asm:asm-tree:9.5")
|
||||
+}
|
||||
+
|
||||
@@ -100,8 +99,8 @@ index 0000000000000000000000000000000000000000..41e77b687df6480adf8f5e21daad105d
|
||||
+ options.use()
|
||||
+ options.isDocFilesSubDirs = true
|
||||
+ options.links(
|
||||
+ "https://guava.dev/releases/32.1.2-jre/api/docs/",
|
||||
+ "https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
|
||||
+ "https://guava.dev/releases/31.1-jre/api/docs/",
|
||||
+ "https://javadoc.io/doc/org.yaml/snakeyaml/2.0/",
|
||||
+ "https://javadoc.io/doc/org.jetbrains/annotations-java5/$annotationsVersion/",
|
||||
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/",
|
||||
+ )
|
||||
@@ -118,16 +117,12 @@ index 0000000000000000000000000000000000000000..41e77b687df6480adf8f5e21daad105d
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+tasks.test {
|
||||
+ useJUnitPlatform()
|
||||
+}
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
deleted file mode 100644
|
||||
index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..0000000000000000000000000000000000000000
|
||||
index 068987ca1171857fc9996d645e775448a09f0feb..0000000000000000000000000000000000000000
|
||||
--- a/pom.xml
|
||||
+++ /dev/null
|
||||
@@ -1,278 +0,0 @@
|
||||
@@ -1,270 +0,0 @@
|
||||
-
|
||||
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
@@ -135,7 +130,7 @@ index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..00000000000000000000000000000000
|
||||
-
|
||||
- <groupId>org.spigotmc</groupId>
|
||||
- <artifactId>spigot-api</artifactId>
|
||||
- <version>1.20.2-R0.1-SNAPSHOT</version>
|
||||
- <version>1.20.1-R0.1-SNAPSHOT</version>
|
||||
- <packaging>jar</packaging>
|
||||
-
|
||||
- <name>Spigot-API</name>
|
||||
@@ -165,14 +160,14 @@ index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>com.google.guava</groupId>
|
||||
- <artifactId>guava</artifactId>
|
||||
- <version>32.1.2-jre</version>
|
||||
- <version>31.1-jre</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <!-- bundled with Minecraft, should be kept in sync -->
|
||||
- <dependency>
|
||||
- <groupId>com.google.code.gson</groupId>
|
||||
- <artifactId>gson</artifactId>
|
||||
- <version>2.10.1</version>
|
||||
- <version>2.10</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <!-- bundled with Minecraft, should be kept in sync -->
|
||||
@@ -192,7 +187,7 @@ index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>org.yaml</groupId>
|
||||
- <artifactId>snakeyaml</artifactId>
|
||||
- <version>2.2</version>
|
||||
- <version>2.0</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <!-- not part of the API proper -->
|
||||
@@ -223,21 +218,15 @@ index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..00000000000000000000000000000000
|
||||
- </dependency>
|
||||
- <!-- testing -->
|
||||
- <dependency>
|
||||
- <groupId>org.junit.jupiter</groupId>
|
||||
- <artifactId>junit-jupiter</artifactId>
|
||||
- <version>5.10.0</version>
|
||||
- <groupId>junit</groupId>
|
||||
- <artifactId>junit</artifactId>
|
||||
- <version>4.13.2</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.hamcrest</groupId>
|
||||
- <artifactId>hamcrest</artifactId>
|
||||
- <version>2.2</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.mockito</groupId>
|
||||
- <artifactId>mockito-core</artifactId>
|
||||
- <version>5.5.0</version>
|
||||
- <artifactId>hamcrest-library</artifactId>
|
||||
- <version>1.3</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
@@ -330,6 +319,9 @@ index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..00000000000000000000000000000000
|
||||
- <configuration>
|
||||
- <links>
|
||||
- <link>https://guava.dev/releases/31.1-jre/api/docs/</link>
|
||||
- <link>https://javadoc.io/doc/org.yaml/snakeyaml/2.0/</link>
|
||||
- <link>https://javadoc.io/doc/org.jetbrains/annotations-java5/24.0.1/</link>
|
||||
- <link>https://javadoc.io/doc/net.md-5/bungeecord-chat/1.20-R0.1/</link>
|
||||
- </links>
|
||||
- <tags>
|
||||
- <tag>
|
||||
@@ -340,11 +332,6 @@ index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..00000000000000000000000000000000
|
||||
- </tags>
|
||||
- </configuration>
|
||||
- </plugin>
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-surefire-plugin</artifactId>
|
||||
- <version>3.1.0</version>
|
||||
- </plugin>
|
||||
- </plugins>
|
||||
- </build>
|
||||
-
|
||||
|
||||
@@ -5,12 +5,12 @@ Subject: [PATCH] Build system changes
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 41e77b687df6480adf8f5e21daad105dab208df2..d86ee6acb78d249424c5df98a851178c0f62eec1 100644
|
||||
index c2e5d8006420aab5a60e5aaa188223aeb0396483..ffd1c792b0e0fe1ed3da85cf933202c5193734ce 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -18,15 +18,27 @@ dependencies {
|
||||
api("net.md-5:bungeecord-chat:$bungeeCordChatVersion")
|
||||
api("org.yaml:snakeyaml:2.2")
|
||||
api("org.yaml:snakeyaml:2.0")
|
||||
api("org.joml:joml:1.10.5")
|
||||
+ // Paper start
|
||||
+ api("com.googlecode.json-simple:json-simple:1.1.1") {
|
||||
@@ -35,25 +35,20 @@ index 41e77b687df6480adf8f5e21daad105dab208df2..d86ee6acb78d249424c5df98a851178c
|
||||
+ // Paper end
|
||||
+
|
||||
testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
|
||||
testImplementation("org.hamcrest:hamcrest:2.2")
|
||||
@@ -69,8 +81,12 @@ tasks.withType<Javadoc> {
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
@@ -68,7 +80,7 @@ tasks.withType<Javadoc> {
|
||||
options.links(
|
||||
"https://guava.dev/releases/32.1.2-jre/api/docs/",
|
||||
"https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
|
||||
"https://guava.dev/releases/31.1-jre/api/docs/",
|
||||
"https://javadoc.io/doc/org.yaml/snakeyaml/2.0/",
|
||||
- "https://javadoc.io/doc/org.jetbrains/annotations-java5/$annotationsVersion/",
|
||||
+ "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
|
||||
"https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/",
|
||||
+ // Paper start - add missing javadoc links
|
||||
+ "https://javadoc.io/doc/org.joml/joml/1.10.5/index.html",
|
||||
+ "https://www.javadoc.io/doc/com.google.code.gson/gson/2.10.1",
|
||||
+ // Paper end
|
||||
)
|
||||
options.tags("apiNote:a:API Note:")
|
||||
|
||||
@@ -89,3 +105,14 @@ tasks.withType<Javadoc> {
|
||||
tasks.test {
|
||||
useJUnitPlatform()
|
||||
@@ -84,3 +96,14 @@ tasks.withType<Javadoc> {
|
||||
}
|
||||
}
|
||||
}
|
||||
+
|
||||
+// Paper start
|
||||
|
||||
@@ -3,6 +3,7 @@ From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sun, 17 Mar 2019 23:04:30 +0000
|
||||
Subject: [PATCH] Test changes
|
||||
|
||||
- convert to mockito for mocking of types
|
||||
- Allow use of TYPE_USE annotations
|
||||
- Ignore package-private methods for nullability annotations
|
||||
- Add excludes for classes which don't pass
|
||||
@@ -12,22 +13,46 @@ Co-authored-by: Riley Park <rileysebastianpark@gmail.com>
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index d86ee6acb78d249424c5df98a851178c0f62eec1..75bfb0ab8049ebbb52240abf661d469de5526767 100644
|
||||
index ffd1c792b0e0fe1ed3da85cf933202c5193734ce..b38a9f4d628fa639e5d2b7dcd5a63f0bf6b8330b 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -106,6 +106,12 @@ tasks.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
@@ -38,6 +38,7 @@ dependencies {
|
||||
compileOnlyApi(checkerQual)
|
||||
testCompileOnly(checkerQual)
|
||||
// Paper end
|
||||
+ testImplementation("org.mockito:mockito-core:4.9.0") // Paper - add mockito
|
||||
|
||||
+// Paper start - compile tests with -parameters for better junit parameterized test names
|
||||
+tasks.compileTestJava {
|
||||
+ options.compilerArgs.add("-parameters")
|
||||
+}
|
||||
+// Paper end
|
||||
testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
diff --git a/src/test/java/io/papermc/paper/testing/EmptyRegistry.java b/src/test/java/io/papermc/paper/testing/EmptyRegistry.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..ba9ddce87a9f385e729a5c2cf7c5eec120e388a7
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/testing/EmptyRegistry.java
|
||||
@@ -0,0 +1,23 @@
|
||||
+package io.papermc.paper.testing;
|
||||
+
|
||||
// Paper start
|
||||
val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks.ScanJarForBadCalls::class) {
|
||||
badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;")
|
||||
+import java.util.Collections;
|
||||
+import java.util.Iterator;
|
||||
+import org.bukkit.Keyed;
|
||||
+import org.bukkit.NamespacedKey;
|
||||
+import org.bukkit.Registry;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+public record EmptyRegistry() implements Registry<Keyed> {
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public Iterator<Keyed> iterator() {
|
||||
+ return Collections.emptyIterator();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @Nullable Keyed get(@NotNull final NamespacedKey key) {
|
||||
+ return null;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/test/java/io/papermc/paper/testing/EmptyTag.java b/src/test/java/io/papermc/paper/testing/EmptyTag.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..77154095cfb8b259bdb318e8ff40cb6f559ebc18
|
||||
@@ -65,8 +90,62 @@ index 0000000000000000000000000000000000000000..77154095cfb8b259bdb318e8ff40cb6f
|
||||
+ return Collections.emptySet();
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/test/java/io/papermc/paper/testing/TestServer.java b/src/test/java/io/papermc/paper/testing/TestServer.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..756acf231b1b076b08046d86992ba7ce7f62a94f
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/testing/TestServer.java
|
||||
@@ -0,0 +1,48 @@
|
||||
+package io.papermc.paper.testing;
|
||||
+
|
||||
+import java.util.logging.Logger;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.bukkit.NamespacedKey;
|
||||
+import org.bukkit.Server;
|
||||
+import org.bukkit.command.SimpleCommandMap;
|
||||
+import org.bukkit.plugin.PluginManager;
|
||||
+import org.bukkit.plugin.SimplePluginManager;
|
||||
+
|
||||
+import static org.mockito.ArgumentMatchers.anyString;
|
||||
+import static org.mockito.Mockito.any;
|
||||
+import static org.mockito.Mockito.mock;
|
||||
+import static org.mockito.Mockito.when;
|
||||
+
|
||||
+public final class TestServer {
|
||||
+
|
||||
+ @SuppressWarnings("removal")
|
||||
+ public static void setup() {
|
||||
+ //noinspection ConstantValue
|
||||
+ if (Bukkit.getServer() != null) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ final Server dummyServer = mock(Server.class);
|
||||
+
|
||||
+ final Logger logger = Logger.getLogger(TestServer.class.getCanonicalName());
|
||||
+ when(dummyServer.getLogger()).thenReturn(logger);
|
||||
+ when(dummyServer.getName()).thenReturn(TestServer.class.getSimpleName());
|
||||
+ when(dummyServer.getVersion()).thenReturn("Version_" + TestServer.class.getPackage().getImplementationVersion());
|
||||
+ when(dummyServer.getBukkitVersion()).thenReturn("BukkitVersion_" + TestServer.class.getPackage().getImplementationVersion());
|
||||
+
|
||||
+
|
||||
+ final Thread currentThread = Thread.currentThread();
|
||||
+ when(dummyServer.isPrimaryThread()).thenAnswer(ignored -> Thread.currentThread().equals(currentThread));
|
||||
+
|
||||
+ when(dummyServer.getTag(anyString(), any(NamespacedKey.class), any())).thenAnswer(ignored -> new EmptyTag());
|
||||
+
|
||||
+ final PluginManager pluginManager = new SimplePluginManager(dummyServer, new SimpleCommandMap(dummyServer));
|
||||
+ when(dummyServer.getPluginManager()).thenReturn(pluginManager);
|
||||
+
|
||||
+ when(dummyServer.getRegistry(any())).thenAnswer(ignored -> new EmptyRegistry());
|
||||
+ when(dummyServer.getScoreboardCriteria(anyString())).thenReturn(null);
|
||||
+
|
||||
+ Bukkit.setServer(dummyServer);
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
index 64e7aef6220097edefdff3b98a771b988365930d..abadff47166722fdc756afdbc6ac7242b6bd4fb0 100644
|
||||
index 4ac3dd977e75cd8464163351d306e037ee32cb48..c26ea217927ba77611e6ae93f8df50a83bceb3dd 100644
|
||||
--- a/src/test/java/org/bukkit/AnnotationTest.java
|
||||
+++ b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
@@ -29,7 +29,13 @@ public class AnnotationTest {
|
||||
@@ -162,8 +241,8 @@ index 64e7aef6220097edefdff3b98a771b988365930d..abadff47166722fdc756afdbc6ac7242
|
||||
+ builder.append("\t").append(message).append("\n");
|
||||
}
|
||||
|
||||
- fail("There " + errors.size() + " are missing annotation(s)");
|
||||
+ fail(builder.toString());
|
||||
- Assert.fail("There " + errors.size() + " are missing annotation(s)");
|
||||
+ Assert.fail(builder.toString());
|
||||
}
|
||||
|
||||
private static void collectClasses(@NotNull File from, @NotNull Map<String, ClassNode> to) throws IOException {
|
||||
@@ -221,30 +300,243 @@ index 64e7aef6220097edefdff3b98a771b988365930d..abadff47166722fdc756afdbc6ac7242
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/test/java/org/bukkit/BukkitMirrorTest.java b/src/test/java/org/bukkit/BukkitMirrorTest.java
|
||||
index 89ca06ebecdaadd5dfc7bc74473ca15ad36f6eff..5974ceea58940e1799f3589eac0e39b925a42c3b 100644
|
||||
index 2dfada66067d79b84cd490eadbe0178e8cd8c260..06d66512c91c680130132b79e34fbf32245ff9ee 100644
|
||||
--- a/src/test/java/org/bukkit/BukkitMirrorTest.java
|
||||
+++ b/src/test/java/org/bukkit/BukkitMirrorTest.java
|
||||
@@ -9,6 +9,7 @@ import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
@@ -20,6 +20,7 @@ public class BukkitMirrorTest {
|
||||
|
||||
+@org.junit.jupiter.api.Disabled // Paper
|
||||
public class BukkitMirrorTest {
|
||||
@Parameters(name = "{index}: {1}")
|
||||
public static List<Object[]> data() {
|
||||
+ if (true) return List.of(); // Paper
|
||||
return Lists.transform(Arrays.asList(Server.class.getDeclaredMethods()), new Function<Method, Object[]>() {
|
||||
@Override
|
||||
public Object[] apply(Method input) {
|
||||
diff --git a/src/test/java/org/bukkit/TestServer.java b/src/test/java/org/bukkit/TestServer.java
|
||||
deleted file mode 100644
|
||||
index 701a17c10f31cd345238a3c568264178ce372faa..0000000000000000000000000000000000000000
|
||||
--- a/src/test/java/org/bukkit/TestServer.java
|
||||
+++ /dev/null
|
||||
@@ -1,139 +0,0 @@
|
||||
-package org.bukkit;
|
||||
-
|
||||
-import com.google.common.collect.ImmutableMap;
|
||||
-import java.lang.reflect.InvocationHandler;
|
||||
-import java.lang.reflect.Method;
|
||||
-import java.lang.reflect.Proxy;
|
||||
-import java.util.Iterator;
|
||||
-import java.util.Map;
|
||||
-import java.util.logging.Logger;
|
||||
-import org.bukkit.command.SimpleCommandMap;
|
||||
-import org.bukkit.plugin.PluginManager;
|
||||
-import org.bukkit.plugin.SimplePluginManager;
|
||||
-import org.jetbrains.annotations.NotNull;
|
||||
-import org.jetbrains.annotations.Nullable;
|
||||
-
|
||||
-public final class TestServer implements InvocationHandler {
|
||||
- private static interface MethodHandler {
|
||||
- Object handle(TestServer server, Object[] args);
|
||||
- }
|
||||
-
|
||||
- private static final Map<Method, MethodHandler> methods;
|
||||
-
|
||||
- static {
|
||||
- try {
|
||||
- ImmutableMap.Builder<Method, MethodHandler> methodMap = ImmutableMap.builder();
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("isPrimaryThread"),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return Thread.currentThread().equals(server.creatingThread);
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getPluginManager"),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return server.pluginManager;
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getLogger"),
|
||||
- new MethodHandler() {
|
||||
- final Logger logger = Logger.getLogger(TestServer.class.getCanonicalName());
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return logger;
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getName"),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return TestServer.class.getSimpleName();
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getVersion"),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return "Version_" + TestServer.class.getPackage().getImplementationVersion();
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getBukkitVersion"),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return "BukkitVersion_" + TestServer.class.getPackage().getImplementationVersion();
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getRegistry", Class.class),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return new Registry() {
|
||||
- @NotNull
|
||||
- @Override
|
||||
- public Iterator iterator() {
|
||||
- return null;
|
||||
- }
|
||||
-
|
||||
- @Nullable
|
||||
- @Override
|
||||
- public Keyed get(@NotNull NamespacedKey key) {
|
||||
- return null;
|
||||
- }
|
||||
- };
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getScoreboardCriteria", String.class),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- // Does not need to return anything. Exists solely to test CriteriaTest which has static init fields
|
||||
- return null;
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methods = methodMap.build();
|
||||
-
|
||||
- TestServer server = new TestServer();
|
||||
- Server instance = Proxy.getProxyClass(Server.class.getClassLoader(), Server.class).asSubclass(Server.class).getConstructor(InvocationHandler.class).newInstance(server);
|
||||
- Bukkit.setServer(instance);
|
||||
- server.pluginManager = new SimplePluginManager(instance, new SimpleCommandMap(instance));
|
||||
- } catch (Throwable t) {
|
||||
- throw new Error(t);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- private Thread creatingThread = Thread.currentThread();
|
||||
- private PluginManager pluginManager;
|
||||
- private TestServer() {};
|
||||
-
|
||||
- public static Server getInstance() {
|
||||
- return Bukkit.getServer();
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public Object invoke(Object proxy, Method method, Object[] args) {
|
||||
- MethodHandler handler = methods.get(method);
|
||||
- if (handler != null) {
|
||||
- return handler.handle(this, args);
|
||||
- }
|
||||
- throw new UnsupportedOperationException(String.valueOf(method));
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/test/java/org/bukkit/TestWorld.java b/src/test/java/org/bukkit/TestWorld.java
|
||||
index ab34f1199921d415fa2ca6e281a8125c9e6d7173..f64d024f5bbf9482aaddb56597b23b04c66f21bf 100644
|
||||
--- a/src/test/java/org/bukkit/TestWorld.java
|
||||
+++ b/src/test/java/org/bukkit/TestWorld.java
|
||||
@@ -18,7 +18,7 @@ public final class TestWorld implements InvocationHandler {
|
||||
|
||||
public static Stream<Arguments> data() {
|
||||
diff --git a/src/test/java/org/bukkit/support/TestServer.java b/src/test/java/org/bukkit/support/TestServer.java
|
||||
index 79173d6ed844f1e640e3aa745a9b560ec5e6a2bc..73ec679ac0d1f398b417bd174b47f9af93351e27 100644
|
||||
--- a/src/test/java/org/bukkit/support/TestServer.java
|
||||
+++ b/src/test/java/org/bukkit/support/TestServer.java
|
||||
@@ -61,6 +61,11 @@ public final class TestServer {
|
||||
UnsafeValues unsafeValues = mock(withSettings().stubOnly());
|
||||
when(instance.getUnsafe()).thenReturn(unsafeValues);
|
||||
static {
|
||||
try {
|
||||
- TestServer.getInstance();
|
||||
+ io.papermc.paper.testing.TestServer.setup(); // Paper
|
||||
|
||||
+ // Paper start - testing changes
|
||||
+ when(instance.getTag(anyString(), any(NamespacedKey.class), any())).thenAnswer(ignored -> new io.papermc.paper.testing.EmptyTag());
|
||||
+ when(instance.getScoreboardCriteria(anyString())).thenReturn(null);
|
||||
+ // Paper end - testing changes
|
||||
+
|
||||
Bukkit.setServer(instance);
|
||||
ImmutableMap.Builder<Method, MethodHandler> methodMap = ImmutableMap.builder();
|
||||
methodMap.put(
|
||||
diff --git a/src/test/java/org/bukkit/event/SyntheticEventTest.java b/src/test/java/org/bukkit/event/SyntheticEventTest.java
|
||||
index d402cb59f508205ebe9ee450594826b04cecb90b..09886568ae6167141b463b6262565fa212af3385 100644
|
||||
--- a/src/test/java/org/bukkit/event/SyntheticEventTest.java
|
||||
+++ b/src/test/java/org/bukkit/event/SyntheticEventTest.java
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.bukkit.event;
|
||||
|
||||
-import org.bukkit.TestServer;
|
||||
import org.bukkit.plugin.PluginLoader;
|
||||
import org.bukkit.plugin.SimplePluginManager;
|
||||
import org.bukkit.plugin.TestPlugin;
|
||||
@@ -12,14 +11,15 @@ public class SyntheticEventTest {
|
||||
@SuppressWarnings("deprecation")
|
||||
@Test
|
||||
public void test() {
|
||||
- final JavaPluginLoader loader = new JavaPluginLoader(TestServer.getInstance());
|
||||
+ io.papermc.paper.testing.TestServer.setup(); // Paper
|
||||
+ final JavaPluginLoader loader = new JavaPluginLoader(org.bukkit.Bukkit.getServer()); // Paper
|
||||
TestPlugin plugin = new TestPlugin(getClass().getName()) {
|
||||
@Override
|
||||
public PluginLoader getPluginLoader() {
|
||||
return loader;
|
||||
}
|
||||
};
|
||||
- SimplePluginManager pluginManager = new SimplePluginManager(TestServer.getInstance(), null);
|
||||
+ SimplePluginManager pluginManager = new SimplePluginManager(org.bukkit.Bukkit.getServer(), null); // Paper
|
||||
|
||||
TestEvent event = new TestEvent(false);
|
||||
Impl impl = new Impl();
|
||||
diff --git a/src/test/java/org/bukkit/plugin/PluginManagerTest.java b/src/test/java/org/bukkit/plugin/PluginManagerTest.java
|
||||
index f188cd4f3b07027c30d41f1162db77a506b7b6bb..c46ed2acb82db814d660459b705dd49e6d44240f 100644
|
||||
--- a/src/test/java/org/bukkit/plugin/PluginManagerTest.java
|
||||
+++ b/src/test/java/org/bukkit/plugin/PluginManagerTest.java
|
||||
@@ -2,7 +2,6 @@ package org.bukkit.plugin;
|
||||
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
-import org.bukkit.TestServer;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.TestEvent;
|
||||
import org.bukkit.permissions.Permission;
|
||||
@@ -14,7 +13,7 @@ public class PluginManagerTest {
|
||||
volatile Object value = null;
|
||||
}
|
||||
|
||||
- private static final PluginManager pm = TestServer.getInstance().getPluginManager();
|
||||
+ private static final PluginManager pm = org.bukkit.Bukkit.getServer().getPluginManager(); // Paper
|
||||
|
||||
private final MutableObject store = new MutableObject();
|
||||
|
||||
diff --git a/src/test/java/org/bukkit/scoreboard/CriteriaTest.java b/src/test/java/org/bukkit/scoreboard/CriteriaTest.java
|
||||
index eb94b6f4d58cd9f66b07791c57af7e359992e28c..a93f28e2f987a36e2c7e4f7d31506b750bdb222b 100644
|
||||
--- a/src/test/java/org/bukkit/scoreboard/CriteriaTest.java
|
||||
+++ b/src/test/java/org/bukkit/scoreboard/CriteriaTest.java
|
||||
@@ -2,7 +2,6 @@ package org.bukkit.scoreboard;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Statistic;
|
||||
-import org.bukkit.TestServer;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
@@ -11,7 +10,7 @@ public class CriteriaTest {
|
||||
|
||||
@Test
|
||||
public void testStatistic() {
|
||||
- TestServer.getInstance();
|
||||
+ io.papermc.paper.testing.TestServer.setup(); // Paper
|
||||
|
||||
Assert.assertThrows(IllegalArgumentException.class, () -> Criteria.statistic(Statistic.AVIATE_ONE_CM, Material.STONE)); // Generic statistic with block
|
||||
Assert.assertThrows(IllegalArgumentException.class, () -> Criteria.statistic(Statistic.AVIATE_ONE_CM, EntityType.CREEPER)); // Generic statistic with entity type
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Add FastUtil to Bukkit
|
||||
Doesn't expose to plugins, just allows Paper-API to use it for optimization
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 75bfb0ab8049ebbb52240abf661d469de5526767..ecba866b84bc5f86a442bf220ab24ed8706aadf9 100644
|
||||
index b38a9f4d628fa639e5d2b7dcd5a63f0bf6b8330b..19720f73cb8454d6ddd8d75e7d08556d61436505 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -22,6 +22,7 @@ dependencies {
|
||||
|
||||
@@ -7,7 +7,7 @@ Co-authored-by: zml <zml@stellardrift.ca>
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index ecba866b84bc5f86a442bf220ab24ed8706aadf9..2377d476aee8c88d26ca715fdb756dc97749aac8 100644
|
||||
index 19720f73cb8454d6ddd8d75e7d08556d61436505..82310336813b5c2d7c6f708839cb6f3928293445 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -10,12 +10,24 @@ java {
|
||||
@@ -29,11 +29,11 @@ index ecba866b84bc5f86a442bf220ab24ed8706aadf9..2377d476aee8c88d26ca715fdb756dc9
|
||||
|
||||
dependencies {
|
||||
// api dependencies are listed transitively to API consumers
|
||||
api("com.google.guava:guava:32.1.2-jre")
|
||||
api("com.google.code.gson:gson:2.10.1")
|
||||
api("com.google.guava:guava:31.1-jre")
|
||||
api("com.google.code.gson:gson:2.10")
|
||||
- api("net.md-5:bungeecord-chat:$bungeeCordChatVersion")
|
||||
+ api("net.md-5:bungeecord-chat:$bungeeCordChatVersion-deprecated+build.14") // Paper
|
||||
api("org.yaml:snakeyaml:2.2")
|
||||
api("org.yaml:snakeyaml:2.0")
|
||||
api("org.joml:joml:1.10.5")
|
||||
// Paper start
|
||||
@@ -23,6 +35,13 @@ dependencies {
|
||||
@@ -50,17 +50,13 @@ index ecba866b84bc5f86a442bf220ab24ed8706aadf9..2377d476aee8c88d26ca715fdb756dc9
|
||||
// Paper end
|
||||
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||
@@ -83,14 +102,30 @@ tasks.withType<Javadoc> {
|
||||
"https://guava.dev/releases/32.1.2-jre/api/docs/",
|
||||
"https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
|
||||
@@ -83,10 +102,26 @@ tasks.withType<Javadoc> {
|
||||
"https://guava.dev/releases/31.1-jre/api/docs/",
|
||||
"https://javadoc.io/doc/org.yaml/snakeyaml/2.0/",
|
||||
"https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
|
||||
- "https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/",
|
||||
+ // "https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/", // Paper - don't link to bungee chat
|
||||
// Paper start - add missing javadoc links
|
||||
"https://javadoc.io/doc/org.joml/joml/1.10.5/index.html",
|
||||
"https://www.javadoc.io/doc/com.google.code.gson/gson/2.10.1",
|
||||
// Paper end
|
||||
+ // Paper start
|
||||
+ // "https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/", // don't link to bungee chat
|
||||
+ "https://jd.advntr.dev/api/$adventureVersion/",
|
||||
+ "https://jd.advntr.dev/text-minimessage/$adventureVersion/",
|
||||
+ "https://jd.advntr.dev/text-serializer-gson/$adventureVersion/",
|
||||
@@ -1091,10 +1087,10 @@ index b79daa857fc686f00ac06b8851e0ab68d83ae949..45d996878ba8d314a47078589b6da59d
|
||||
public void setCustomName(@Nullable String name);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
|
||||
index ae7b51341fb66c41b8a7c4604fd273d876e311be..4034fcb9abc39b12f0de47c4b679f2ef82353c89 100644
|
||||
index c559f38fdb92cfee9f2e0ffb7088d1cf74a7f73d..a42f1d53340e4073038d46b7fabf5d44248d5b32 100644
|
||||
--- a/src/main/java/org/bukkit/NamespacedKey.java
|
||||
+++ b/src/main/java/org/bukkit/NamespacedKey.java
|
||||
@@ -19,7 +19,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -18,7 +18,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* underscores, hyphens, and forward slashes.
|
||||
*
|
||||
*/
|
||||
@@ -1103,7 +1099,7 @@ index ae7b51341fb66c41b8a7c4604fd273d876e311be..4034fcb9abc39b12f0de47c4b679f2ef
|
||||
|
||||
/**
|
||||
* The namespace representing all inbuilt keys.
|
||||
@@ -130,10 +130,11 @@ public final class NamespacedKey {
|
||||
@@ -129,10 +129,11 @@ public final class NamespacedKey {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
@@ -1119,7 +1115,7 @@ index ae7b51341fb66c41b8a7c4604fd273d876e311be..4034fcb9abc39b12f0de47c4b679f2ef
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -141,11 +142,10 @@ public final class NamespacedKey {
|
||||
@@ -140,11 +141,10 @@ public final class NamespacedKey {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
@@ -1135,7 +1131,7 @@ index ae7b51341fb66c41b8a7c4604fd273d876e311be..4034fcb9abc39b12f0de47c4b679f2ef
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -247,4 +247,24 @@ public final class NamespacedKey {
|
||||
@@ -246,4 +246,24 @@ public final class NamespacedKey {
|
||||
public static NamespacedKey fromString(@NotNull String key) {
|
||||
return fromString(key, null);
|
||||
}
|
||||
@@ -1415,7 +1411,7 @@ index 8263a17a46c2aa7f976b37b80933acd850b9434a..e3602c6703b29ffec17ef7806c9deb3e
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Sound.java b/src/main/java/org/bukkit/Sound.java
|
||||
index c5ba0f3ad4df1f52efe9795cfe2ded8783657b40..e30ea44c962f685f216dadd174c91a00d880c5cd 100644
|
||||
index 4cbc963f268753316327e38b6e1e42cffb486b54..6e8d2b35d8f33827396dbcfa817cd9c2f8ad83a6 100644
|
||||
--- a/src/main/java/org/bukkit/Sound.java
|
||||
+++ b/src/main/java/org/bukkit/Sound.java
|
||||
@@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
@@ -1427,7 +1423,7 @@ index c5ba0f3ad4df1f52efe9795cfe2ded8783657b40..e30ea44c962f685f216dadd174c91a00
|
||||
|
||||
AMBIENT_BASALT_DELTAS_ADDITIONS("ambient.basalt_deltas.additions"),
|
||||
AMBIENT_BASALT_DELTAS_LOOP("ambient.basalt_deltas.loop"),
|
||||
@@ -1512,4 +1512,11 @@ public enum Sound implements Keyed {
|
||||
@@ -1498,4 +1498,11 @@ public enum Sound implements Keyed {
|
||||
public NamespacedKey getKey() {
|
||||
return key;
|
||||
}
|
||||
@@ -1476,10 +1472,10 @@ index ac5e263d737973af077e3406a84a84baca4370db..2d91924b7f5ef16a91d40cdc1bfc3d68
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 4a9a82540e40685d2b837c76c431827a00cf4ba3..a3ee6f2f588bc9c87e49378359f450820b9af1b9 100644
|
||||
index 650adcecdca839518e0b57bc47935d010ca0f64f..fd0ae07b8a19f6b628601a487329a929f3a26c91 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -26,6 +26,15 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -25,6 +25,15 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
@Deprecated
|
||||
public interface UnsafeValues {
|
||||
@@ -1508,10 +1504,10 @@ index efb97712cc9dc7c1e12a59f5b94e4f2ad7c6b7d8..3024468af4c073324e536c1cb26beffb
|
||||
return warning == null || warning.value();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 5c9d74a5d8876507ee855dbecc2bfa8755f4062e..1403d28bf9124e3c4cd741dfda06400318e8a0a0 100644
|
||||
index c4d2a13d62059ca1f148a9af909f424b745bc8df..5357291ff0f2f20bd87ab9f6e57f6a4f6ff65226 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -45,7 +45,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -44,7 +44,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Represents a world, which may contain entities, chunks and blocks
|
||||
*/
|
||||
@@ -1520,7 +1516,7 @@ index 5c9d74a5d8876507ee855dbecc2bfa8755f4062e..1403d28bf9124e3c4cd741dfda064003
|
||||
|
||||
/**
|
||||
* Gets the {@link Block} at the given coordinates
|
||||
@@ -606,6 +606,14 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -605,6 +605,14 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public List<Player> getPlayers();
|
||||
|
||||
@@ -1579,10 +1575,10 @@ index 372c0bd5a4d7800a11c24c95e39fe376a96232bf..9c88be68b4f403d0500cb607394b3a16
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/block/Sign.java b/src/main/java/org/bukkit/block/Sign.java
|
||||
index 5fc1c759e6e8f3fd43a5fa5c6e3f777efa16b1ec..2813f96bb13b9be28867d2c045a3003a18456879 100644
|
||||
index 5fc1c759e6e8f3fd43a5fa5c6e3f777efa16b1ec..e6b87ad5b2099800a61e7f585a5404e9e672228a 100644
|
||||
--- a/src/main/java/org/bukkit/block/Sign.java
|
||||
+++ b/src/main/java/org/bukkit/block/Sign.java
|
||||
@@ -10,12 +10,51 @@ import org.jetbrains.annotations.NotNull;
|
||||
@@ -10,12 +10,50 @@ import org.jetbrains.annotations.NotNull;
|
||||
* Represents a captured state of either a SignPost or a WallSign.
|
||||
*/
|
||||
public interface Sign extends TileState, Colorable {
|
||||
@@ -1591,10 +1587,9 @@ index 5fc1c759e6e8f3fd43a5fa5c6e3f777efa16b1ec..2813f96bb13b9be28867d2c045a3003a
|
||||
+ * Gets all the lines of text currently on the {@link Side#FRONT} of this sign.
|
||||
+ *
|
||||
+ * @return List of components containing each line of text
|
||||
+ * @deprecated A sign may have multiple writable sides now. Use {@link Sign#getSide(Side)} and {@link SignSide#lines()}.
|
||||
+ * @deprecated A sign may have multiple writable sides now. Use {@link Sign#getSide(Side)} and {@link SignSide#lines()}.
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ @Deprecated
|
||||
+ public java.util.List<net.kyori.adventure.text.Component> lines();
|
||||
+
|
||||
+ /**
|
||||
@@ -1635,7 +1630,7 @@ index 5fc1c759e6e8f3fd43a5fa5c6e3f777efa16b1ec..2813f96bb13b9be28867d2c045a3003a
|
||||
*/
|
||||
@Deprecated
|
||||
@NotNull
|
||||
@@ -29,7 +68,7 @@ public interface Sign extends TileState, Colorable {
|
||||
@@ -29,7 +67,7 @@ public interface Sign extends TileState, Colorable {
|
||||
* @param index Line number to get the text from, starting at 0
|
||||
* @return Text on the given line
|
||||
* @throws IndexOutOfBoundsException Thrown when the line does not exist
|
||||
@@ -1644,7 +1639,7 @@ index 5fc1c759e6e8f3fd43a5fa5c6e3f777efa16b1ec..2813f96bb13b9be28867d2c045a3003a
|
||||
*/
|
||||
@Deprecated
|
||||
@NotNull
|
||||
@@ -44,7 +83,7 @@ public interface Sign extends TileState, Colorable {
|
||||
@@ -44,7 +82,7 @@ public interface Sign extends TileState, Colorable {
|
||||
* @param index Line number to set the text at, starting from 0
|
||||
* @param line New text to set at the specified index
|
||||
* @throws IndexOutOfBoundsException If the index is out of the range 0..3
|
||||
@@ -2100,7 +2095,7 @@ index 9566e4306ada5e82dede0f002aa06da12c44996b..4d5f0837bd0e02a30c943d8969fb6b13
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index ead9a9aaad3c7469a9393f3c73aa9a5fdb5b7406..121cd27185269339babae1757a604fbb5aabc869 100644
|
||||
index f3afe67f0832cb828d25be3654518ff73a80b0e1..598abaa82c634178043a29f6caa6ac5221659d06 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -2112,7 +2107,7 @@ index ead9a9aaad3c7469a9393f3c73aa9a5fdb5b7406..121cd27185269339babae1757a604fbb
|
||||
|
||||
/**
|
||||
* Gets the entity's current position
|
||||
@@ -724,4 +724,20 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -710,4 +710,20 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@Override
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
@@ -2134,7 +2129,7 @@ index ead9a9aaad3c7469a9393f3c73aa9a5fdb5b7406..121cd27185269339babae1757a604fbb
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 3d84a75a6999129353a9ead48f9db25bc80f685b..e5a54a2f35d83f8c7a5f2b6512b86481aa7f9f51 100644
|
||||
index 3d84a75a6999129353a9ead48f9db25bc80f685b..a5010cb46aa5ef69c559ef9fc717f90365c05807 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -51,7 +51,41 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -2472,27 +2467,19 @@ index 3d84a75a6999129353a9ead48f9db25bc80f685b..e5a54a2f35d83f8c7a5f2b6512b86481
|
||||
* pack correctly.
|
||||
* </ul>
|
||||
*
|
||||
+ * @deprecated in favour of {@link #setResourcePack(String, byte[], net.kyori.adventure.text.Component)}
|
||||
+ * @deprecated in favour of {@link #setResourcePack(String, byte[], Component)}
|
||||
* @param url The URL from which the client will download the resource
|
||||
* pack. The string must contain only US-ASCII characters and should
|
||||
* be encoded as per RFC 1738.
|
||||
@@ -1327,6 +1539,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
|
||||
* long.
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
public void setResourcePack(@NotNull String url, @Nullable byte[] hash);
|
||||
|
||||
/**
|
||||
@@ -1358,6 +1571,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1358,6 +1570,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* pack correctly.
|
||||
* </ul>
|
||||
*
|
||||
+ * @deprecated in favour of {@link #setResourcePack(String, byte[], net.kyori.adventure.text.Component)}
|
||||
+ * @deprecated in favour of {@link #setResourcePack(String, byte[], Component, boolean)}
|
||||
* @param url The URL from which the client will download the resource
|
||||
* pack. The string must contain only US-ASCII characters and should
|
||||
* be encoded as per RFC 1738.
|
||||
@@ -1371,8 +1585,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1371,8 +1584,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
|
||||
* long.
|
||||
*/
|
||||
@@ -2550,15 +2537,7 @@ index 3d84a75a6999129353a9ead48f9db25bc80f685b..e5a54a2f35d83f8c7a5f2b6512b86481
|
||||
/**
|
||||
* Request that the player's client download and switch resource packs.
|
||||
* <p>
|
||||
@@ -1447,6 +1710,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* pack correctly.
|
||||
* </ul>
|
||||
*
|
||||
+ * @deprecated in favour of {@link #setResourcePack(String, byte[], net.kyori.adventure.text.Component, boolean)}
|
||||
* @param url The URL from which the client will download the resource
|
||||
* pack. The string must contain only US-ASCII characters and should
|
||||
* be encoded as per RFC 1738.
|
||||
@@ -1462,8 +1726,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1462,8 +1724,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
|
||||
* long.
|
||||
*/
|
||||
@@ -2616,7 +2595,7 @@ index 3d84a75a6999129353a9ead48f9db25bc80f685b..e5a54a2f35d83f8c7a5f2b6512b86481
|
||||
/**
|
||||
* Gets the Scoreboard displayed to this player
|
||||
*
|
||||
@@ -1598,7 +1911,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1598,7 +1909,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*
|
||||
* @param title Title text
|
||||
* @param subtitle Subtitle text
|
||||
@@ -2625,7 +2604,7 @@ index 3d84a75a6999129353a9ead48f9db25bc80f685b..e5a54a2f35d83f8c7a5f2b6512b86481
|
||||
*/
|
||||
@Deprecated
|
||||
public void sendTitle(@Nullable String title, @Nullable String subtitle);
|
||||
@@ -1617,7 +1930,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1617,7 +1928,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param fadeIn time in ticks for titles to fade in. Defaults to 10.
|
||||
* @param stay time in ticks for titles to stay. Defaults to 70.
|
||||
* @param fadeOut time in ticks for titles to fade out. Defaults to 20.
|
||||
@@ -2635,7 +2614,7 @@ index 3d84a75a6999129353a9ead48f9db25bc80f685b..e5a54a2f35d83f8c7a5f2b6512b86481
|
||||
public void sendTitle(@Nullable String title, @Nullable String subtitle, int fadeIn, int stay, int fadeOut);
|
||||
|
||||
/**
|
||||
@@ -1844,6 +2159,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1844,6 +2157,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public int getClientViewDistance();
|
||||
|
||||
@@ -2650,7 +2629,7 @@ index 3d84a75a6999129353a9ead48f9db25bc80f685b..e5a54a2f35d83f8c7a5f2b6512b86481
|
||||
/**
|
||||
* Gets the player's estimated ping in milliseconds.
|
||||
*
|
||||
@@ -1869,8 +2192,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1869,8 +2190,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* they wish.
|
||||
*
|
||||
* @return the player's locale
|
||||
@@ -2661,7 +2640,7 @@ index 3d84a75a6999129353a9ead48f9db25bc80f685b..e5a54a2f35d83f8c7a5f2b6512b86481
|
||||
public String getLocale();
|
||||
|
||||
/**
|
||||
@@ -1922,6 +2247,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1922,6 +2245,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public boolean isAllowingServerListings();
|
||||
|
||||
@@ -2676,7 +2655,7 @@ index 3d84a75a6999129353a9ead48f9db25bc80f685b..e5a54a2f35d83f8c7a5f2b6512b86481
|
||||
// Spigot start
|
||||
public class Spigot extends Entity.Spigot {
|
||||
|
||||
@@ -1953,11 +2286,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1953,11 +2284,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@@ -2690,7 +2669,7 @@ index 3d84a75a6999129353a9ead48f9db25bc80f685b..e5a54a2f35d83f8c7a5f2b6512b86481
|
||||
@Override
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -1968,7 +2303,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1968,7 +2301,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*
|
||||
* @param position the screen position
|
||||
* @param component the components to send
|
||||
@@ -2700,7 +2679,7 @@ index 3d84a75a6999129353a9ead48f9db25bc80f685b..e5a54a2f35d83f8c7a5f2b6512b86481
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -1978,7 +2315,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1978,7 +2313,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*
|
||||
* @param position the screen position
|
||||
* @param components the components to send
|
||||
@@ -2710,7 +2689,7 @@ index 3d84a75a6999129353a9ead48f9db25bc80f685b..e5a54a2f35d83f8c7a5f2b6512b86481
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -1989,7 +2328,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1989,7 +2326,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param position the screen position
|
||||
* @param sender the sender of the message
|
||||
* @param component the components to send
|
||||
@@ -2720,7 +2699,7 @@ index 3d84a75a6999129353a9ead48f9db25bc80f685b..e5a54a2f35d83f8c7a5f2b6512b86481
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable java.util.UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -2000,7 +2341,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2000,7 +2339,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param position the screen position
|
||||
* @param sender the sender of the message
|
||||
* @param components the components to send
|
||||
@@ -4007,10 +3986,10 @@ index e12996492c1558fed9fab30de9f8018e0ed7fac3..002acfbdce1db10f7ba1b6a013e678f5
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index 502a1fd398fb0dcfbaf82081a655e2efc3bf71dc..30770d03044da684aa8c79ca74796050c319f6be 100644
|
||||
index a66bec33fffd4e11d859efd8d17d274a5fa75f69..9578d6b0fa54feac75fa9a0727d878bd13b9e19e 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -172,4 +172,24 @@ public interface ItemFactory {
|
||||
@@ -171,4 +171,24 @@ public interface ItemFactory {
|
||||
*/
|
||||
@Nullable
|
||||
Material getSpawnEgg(@NotNull EntityType type);
|
||||
@@ -4317,10 +4296,10 @@ index 94852d50e88d0594b84b581cd627174043629995..be7c2cfc757e4dd15927be850739d401
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
index 8ca9605fc1193de9277407f02f755d81190472a4..d7fab2b856f6dfec4f9225c1bdb4254b238d98a4 100644
|
||||
index 2fbb0b7640dd9b9b0e70d4bc60fbb0310d5ec250..049c70c935fd7a781280d223f74bbbf87223f505 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
@@ -32,6 +32,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -31,6 +31,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
*/
|
||||
boolean hasDisplayName();
|
||||
|
||||
@@ -4345,7 +4324,7 @@ index 8ca9605fc1193de9277407f02f755d81190472a4..d7fab2b856f6dfec4f9225c1bdb4254b
|
||||
/**
|
||||
* Gets the display name that is set.
|
||||
* <p>
|
||||
@@ -39,7 +57,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -38,7 +56,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* before calling this method.
|
||||
*
|
||||
* @return the display name that is set
|
||||
@@ -4355,7 +4334,7 @@ index 8ca9605fc1193de9277407f02f755d81190472a4..d7fab2b856f6dfec4f9225c1bdb4254b
|
||||
@NotNull
|
||||
String getDisplayName();
|
||||
|
||||
@@ -47,7 +67,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -46,7 +66,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* Sets the display name.
|
||||
*
|
||||
* @param name the name to set
|
||||
@@ -4365,7 +4344,7 @@ index 8ca9605fc1193de9277407f02f755d81190472a4..d7fab2b856f6dfec4f9225c1bdb4254b
|
||||
void setDisplayName(@Nullable String name);
|
||||
|
||||
/**
|
||||
@@ -82,6 +104,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -81,6 +103,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
*/
|
||||
boolean hasLore();
|
||||
|
||||
@@ -4390,7 +4369,7 @@ index 8ca9605fc1193de9277407f02f755d81190472a4..d7fab2b856f6dfec4f9225c1bdb4254b
|
||||
/**
|
||||
* Gets the lore that is set.
|
||||
* <p>
|
||||
@@ -89,7 +129,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -88,7 +128,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* calling this method.
|
||||
*
|
||||
* @return a list of lore that is set
|
||||
@@ -4400,7 +4379,7 @@ index 8ca9605fc1193de9277407f02f755d81190472a4..d7fab2b856f6dfec4f9225c1bdb4254b
|
||||
@Nullable
|
||||
List<String> getLore();
|
||||
|
||||
@@ -98,7 +140,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -97,7 +139,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* Removes lore when given null.
|
||||
*
|
||||
* @param lore the lore that will be set
|
||||
@@ -4411,7 +4390,7 @@ index 8ca9605fc1193de9277407f02f755d81190472a4..d7fab2b856f6dfec4f9225c1bdb4254b
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
index b90fd819a781d3a2117ffa25f0864b1576901f9f..7d4f4970dae6fe4eeea6b6b6810dcecfe20d6e51 100644
|
||||
index 83354b2a38b6261b172b91c1008dcf3313cc4a8f..762d8a53bbfa82edcd725a52d630b61c40503d67 100644
|
||||
--- a/src/main/java/org/bukkit/map/MapCursor.java
|
||||
+++ b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
@@ -10,7 +10,7 @@ public final class MapCursor {
|
||||
@@ -4808,18 +4787,9 @@ index 083bb2c92a2c557e10b705b773ced97401586c3c..d5723e977d9a25701a4f387f1b26d241
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java
|
||||
index 7b9a7890b25ca4bd95ab81f3181288bf79ed649c..52e8be769d2e9b69e9833bc9a7fe39afd10c5095 100644
|
||||
index 7b9a7890b25ca4bd95ab81f3181288bf79ed649c..e5a38e3568148170025e05c7ba69e8615f578047 100644
|
||||
--- a/src/main/java/org/bukkit/scoreboard/Team.java
|
||||
+++ b/src/main/java/org/bukkit/scoreboard/Team.java
|
||||
@@ -12,7 +12,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* properties. This team is only relevant to the display of the associated
|
||||
* {@link #getScoreboard() scoreboard}.
|
||||
*/
|
||||
-public interface Team {
|
||||
+public interface Team extends net.kyori.adventure.audience.ForwardingAudience { // Paper - Make Team extend ForwardingAudience
|
||||
|
||||
/**
|
||||
* Gets the name of this Team
|
||||
@@ -23,13 +23,96 @@ public interface Team {
|
||||
@NotNull
|
||||
String getName();
|
||||
@@ -4992,7 +4962,7 @@ index 7b9a7890b25ca4bd95ab81f3181288bf79ed649c..52e8be769d2e9b69e9833bc9a7fe39af
|
||||
/**
|
||||
diff --git a/src/test/java/io/papermc/paper/adventure/KeyTest.java b/src/test/java/io/papermc/paper/adventure/KeyTest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..7ede17d60358e0e3a04f3166ea9657e5239e0d8f
|
||||
index 0000000000000000000000000000000000000000..70c575077d204e4b36d07559f6a8d952b84af1cf
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/adventure/KeyTest.java
|
||||
@@ -0,0 +1,31 @@
|
||||
@@ -5002,10 +4972,10 @@ index 0000000000000000000000000000000000000000..7ede17d60358e0e3a04f3166ea9657e5
|
||||
+import java.util.Set;
|
||||
+import net.kyori.adventure.key.Key;
|
||||
+import org.bukkit.NamespacedKey;
|
||||
+import org.junit.jupiter.api.Test;
|
||||
+import org.junit.Test;
|
||||
+
|
||||
+import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
+import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
+import static org.junit.Assert.assertEquals;
|
||||
+import static org.junit.Assert.assertTrue;
|
||||
+
|
||||
+public class KeyTest {
|
||||
+
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Use ASM for event executors.
|
||||
Uses method handles for private or static methods.
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 2377d476aee8c88d26ca715fdb756dc97749aac8..0c6e0bb90fe5ea29c467323a179a47ec122ba0f6 100644
|
||||
index cbab63d2f3b045f6193f5a3422ae4b5509d3003b..ba6f0a70ba2442dbe60ed6cc92e4fb91a48d9f3b 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -42,6 +42,9 @@ dependencies {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Paper Plugins
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 0c6e0bb90fe5ea29c467323a179a47ec122ba0f6..145f6209a984e74da2d2de03cf725c06c77ef8da 100644
|
||||
index ba6f0a70ba2442dbe60ed6cc92e4fb91a48d9f3b..22b65c3ad4ed6e19b88a51a2e001f0e5846d9ae6 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -47,7 +47,7 @@ dependencies {
|
||||
@@ -17,14 +17,6 @@ index 0c6e0bb90fe5ea29c467323a179a47ec122ba0f6..145f6209a984e74da2d2de03cf725c06
|
||||
compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
|
||||
compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3")
|
||||
compileOnly("com.google.code.findbugs:jsr305:1.3.9") // Paper
|
||||
@@ -118,6 +118,7 @@ tasks.withType<Javadoc> {
|
||||
"https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
|
||||
"https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
|
||||
// Paper end
|
||||
+ "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3", // Paper
|
||||
)
|
||||
options.tags("apiNote:a:API Note:")
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/PermissionManager.java b/src/main/java/io/papermc/paper/plugin/PermissionManager.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..cdbc93b317b3bab47bf6552c29cfbb2c27846933
|
||||
@@ -1346,13 +1338,13 @@ index 0000000000000000000000000000000000000000..6bf3d212a6156ad9ab0e82d1ca0a04f8
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index a3ee6f2f588bc9c87e49378359f450820b9af1b9..0743592273cc1c5f4ab6935349941bf25b438448 100644
|
||||
index fd0ae07b8a19f6b628601a487329a929f3a26c91..2042e3fb0ea347148814d9838cd7bb475bd23984 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -109,4 +109,14 @@ public interface UnsafeValues {
|
||||
* @return an internal potion data
|
||||
*/
|
||||
PotionType.InternalPotionData getInternalPotionData(NamespacedKey key);
|
||||
@@ -101,4 +101,14 @@ public interface UnsafeValues {
|
||||
|
||||
@Nullable
|
||||
FeatureFlag getFeatureFlag(@NotNull NamespacedKey key);
|
||||
+
|
||||
+ // Paper start
|
||||
+ @Deprecated(forRemoval = true)
|
||||
@@ -1449,10 +1441,10 @@ index 94f8ceb965cecb5669a84a0ec61c0f706c2a2673..e773db6da357ad210eb24d4c389af2dc
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
|
||||
index f48bdeb628a82416d93f84a0a10141447482bf83..c0691a849831f99268fdcb7b0f471f80a1a2a70e 100644
|
||||
index 0eae1c027cab0444a125ae4efed7f9fcb1b9934f..07e8908d25fcd4e5eabadc9f019b54acff3b5e3c 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
|
||||
@@ -198,7 +198,7 @@ import org.yaml.snakeyaml.representer.Representer;
|
||||
@@ -197,7 +197,7 @@ import org.yaml.snakeyaml.representer.Representer;
|
||||
* inferno.burningdeaths: true
|
||||
*</pre></blockquote>
|
||||
*/
|
||||
@@ -1461,7 +1453,7 @@ index f48bdeb628a82416d93f84a0a10141447482bf83..c0691a849831f99268fdcb7b0f471f80
|
||||
private static final Pattern VALID_NAME = Pattern.compile("^[A-Za-z0-9 _.-]+$");
|
||||
private static final ThreadLocal<Yaml> YAML = new ThreadLocal<Yaml>() {
|
||||
@Override
|
||||
@@ -259,6 +259,70 @@ public final class PluginDescriptionFile {
|
||||
@@ -258,6 +258,70 @@ public final class PluginDescriptionFile {
|
||||
private Set<PluginAwareness> awareness = ImmutableSet.of();
|
||||
private String apiVersion = null;
|
||||
private List<String> libraries = ImmutableList.of();
|
||||
@@ -2088,10 +2080,10 @@ index 6d634b0ea813ccb19f1562a7d0e5a59cea4eab21..e4b6f278a811acbb0070e311c5c3bdaf
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
index 64a294aeb6fb548794708b38c3707f9dd882b2ff..74b6581a97a092c44a0876e7981ff8a8e6153100 100644
|
||||
index 2f74ec96ece706de23156ebabfe493211bc05391..302319acbc257a075adfb78d9f5c49fdadf45bdc 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
@@ -31,7 +31,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -29,7 +29,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* A ClassLoader for plugins, to allow shared classes across multiple plugins
|
||||
*/
|
||||
@@ -2101,7 +2093,7 @@ index 64a294aeb6fb548794708b38c3707f9dd882b2ff..74b6581a97a092c44a0876e7981ff8a8
|
||||
private final JavaPluginLoader loader;
|
||||
private final Map<String, Class<?>> classes = new ConcurrentHashMap<String, Class<?>>();
|
||||
private final PluginDescriptionFile description;
|
||||
@@ -45,24 +46,32 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
@@ -43,24 +44,32 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
private JavaPlugin pluginInit;
|
||||
private IllegalStateException pluginState;
|
||||
private final Set<String> seenIllegalAccess = Collections.newSetFromMap(new ConcurrentHashMap<>());
|
||||
@@ -2130,15 +2122,15 @@ index 64a294aeb6fb548794708b38c3707f9dd882b2ff..74b6581a97a092c44a0876e7981ff8a8
|
||||
this.url = file.toURI().toURL();
|
||||
this.libraryLoader = libraryLoader;
|
||||
|
||||
+
|
||||
+ // Paper start
|
||||
+ this.dependencyContext = dependencyContext;
|
||||
+ this.classLoaderGroup = io.papermc.paper.plugin.provider.classloader.PaperClassLoaderStorage.instance().registerSpigotGroup(this);
|
||||
+ // Paper end
|
||||
+
|
||||
Class<?> jarClass;
|
||||
try {
|
||||
jarClass = Class.forName(description.getMain(), true, this);
|
||||
@@ -107,6 +116,27 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
Class<?> jarClass;
|
||||
try {
|
||||
@@ -94,6 +103,27 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
return findResources(name);
|
||||
}
|
||||
|
||||
@@ -2166,7 +2158,7 @@ index 64a294aeb6fb548794708b38c3707f9dd882b2ff..74b6581a97a092c44a0876e7981ff8a8
|
||||
@Override
|
||||
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
|
||||
return loadClass0(name, resolve, true, true);
|
||||
@@ -132,26 +162,11 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
@@ -119,26 +149,11 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
|
||||
if (checkGlobal) {
|
||||
// This ignores the libraries of other plugins, unless they are transitive dependencies.
|
||||
@@ -2195,7 +2187,7 @@ index 64a294aeb6fb548794708b38c3707f9dd882b2ff..74b6581a97a092c44a0876e7981ff8a8
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -180,7 +195,7 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
@@ -167,7 +182,7 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
throw new ClassNotFoundException(name, ex);
|
||||
}
|
||||
|
||||
@@ -2204,7 +2196,7 @@ index 64a294aeb6fb548794708b38c3707f9dd882b2ff..74b6581a97a092c44a0876e7981ff8a8
|
||||
|
||||
int dot = name.lastIndexOf('.');
|
||||
if (dot != -1) {
|
||||
@@ -210,8 +225,8 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
@@ -197,8 +212,8 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
result = super.findClass(name);
|
||||
}
|
||||
|
||||
@@ -2214,7 +2206,7 @@ index 64a294aeb6fb548794708b38c3707f9dd882b2ff..74b6581a97a092c44a0876e7981ff8a8
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -220,6 +235,12 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
@@ -207,6 +222,12 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
try {
|
||||
@@ -2227,7 +2219,7 @@ index 64a294aeb6fb548794708b38c3707f9dd882b2ff..74b6581a97a092c44a0876e7981ff8a8
|
||||
super.close();
|
||||
} finally {
|
||||
jar.close();
|
||||
@@ -231,7 +252,7 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
@@ -218,7 +239,7 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
return classes.values();
|
||||
}
|
||||
|
||||
@@ -2236,7 +2228,7 @@ index 64a294aeb6fb548794708b38c3707f9dd882b2ff..74b6581a97a092c44a0876e7981ff8a8
|
||||
Preconditions.checkArgument(javaPlugin != null, "Initializing plugin cannot be null");
|
||||
Preconditions.checkArgument(javaPlugin.getClass().getClassLoader() == this, "Cannot initialize plugin outside of this class loader");
|
||||
if (this.plugin != null || this.pluginInit != null) {
|
||||
@@ -241,6 +262,38 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
@@ -228,6 +249,38 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
pluginState = new IllegalStateException("Initial initialization");
|
||||
this.pluginInit = javaPlugin;
|
||||
|
||||
@@ -2276,35 +2268,48 @@ index 64a294aeb6fb548794708b38c3707f9dd882b2ff..74b6581a97a092c44a0876e7981ff8a8
|
||||
+
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/test/java/io/papermc/paper/testing/TestServer.java b/src/test/java/io/papermc/paper/testing/TestServer.java
|
||||
index 756acf231b1b076b08046d86992ba7ce7f62a94f..52d27d977b9df0bdf02b33ed0aaa3b4db0a04cb4 100644
|
||||
--- a/src/test/java/io/papermc/paper/testing/TestServer.java
|
||||
+++ b/src/test/java/io/papermc/paper/testing/TestServer.java
|
||||
@@ -36,9 +36,6 @@ public final class TestServer {
|
||||
|
||||
when(dummyServer.getTag(anyString(), any(NamespacedKey.class), any())).thenAnswer(ignored -> new EmptyTag());
|
||||
|
||||
- final PluginManager pluginManager = new SimplePluginManager(dummyServer, new SimpleCommandMap(dummyServer));
|
||||
- when(dummyServer.getPluginManager()).thenReturn(pluginManager);
|
||||
-
|
||||
when(dummyServer.getRegistry(any())).thenAnswer(ignored -> new EmptyRegistry());
|
||||
when(dummyServer.getScoreboardCriteria(anyString())).thenReturn(null);
|
||||
|
||||
diff --git a/src/test/java/org/bukkit/event/SyntheticEventTest.java b/src/test/java/org/bukkit/event/SyntheticEventTest.java
|
||||
deleted file mode 100644
|
||||
index 40a086f2883c4419d2bf0bd44285f7c55562ba3e..0000000000000000000000000000000000000000
|
||||
index 09886568ae6167141b463b6262565fa212af3385..0000000000000000000000000000000000000000
|
||||
--- a/src/test/java/org/bukkit/event/SyntheticEventTest.java
|
||||
+++ /dev/null
|
||||
@@ -1,49 +0,0 @@
|
||||
@@ -1,48 +0,0 @@
|
||||
-package org.bukkit.event;
|
||||
-
|
||||
-import static org.junit.jupiter.api.Assertions.*;
|
||||
-import org.bukkit.Bukkit;
|
||||
-import org.bukkit.plugin.PluginLoader;
|
||||
-import org.bukkit.plugin.SimplePluginManager;
|
||||
-import org.bukkit.plugin.TestPlugin;
|
||||
-import org.bukkit.plugin.java.JavaPluginLoader;
|
||||
-import org.bukkit.support.AbstractTestingBase;
|
||||
-import org.junit.jupiter.api.Test;
|
||||
-import org.junit.Assert;
|
||||
-import org.junit.Test;
|
||||
-
|
||||
-public class SyntheticEventTest extends AbstractTestingBase {
|
||||
-public class SyntheticEventTest {
|
||||
- @SuppressWarnings("deprecation")
|
||||
- @Test
|
||||
- public void test() {
|
||||
- final JavaPluginLoader loader = new JavaPluginLoader(Bukkit.getServer());
|
||||
- io.papermc.paper.testing.TestServer.setup(); // Paper
|
||||
- final JavaPluginLoader loader = new JavaPluginLoader(org.bukkit.Bukkit.getServer()); // Paper
|
||||
- TestPlugin plugin = new TestPlugin(getClass().getName()) {
|
||||
- @Override
|
||||
- public PluginLoader getPluginLoader() {
|
||||
- return loader;
|
||||
- }
|
||||
- };
|
||||
- SimplePluginManager pluginManager = new SimplePluginManager(Bukkit.getServer(), null);
|
||||
- SimplePluginManager pluginManager = new SimplePluginManager(org.bukkit.Bukkit.getServer(), null); // Paper
|
||||
-
|
||||
- TestEvent event = new TestEvent(false);
|
||||
- Impl impl = new Impl();
|
||||
@@ -2312,7 +2317,7 @@ index 40a086f2883c4419d2bf0bd44285f7c55562ba3e..00000000000000000000000000000000
|
||||
- pluginManager.registerEvents(impl, plugin);
|
||||
- pluginManager.callEvent(event);
|
||||
-
|
||||
- assertEquals(1, impl.callCount);
|
||||
- Assert.assertEquals(1, impl.callCount);
|
||||
- }
|
||||
-
|
||||
- public abstract static class Base<E extends Event> implements Listener {
|
||||
@@ -2333,28 +2338,26 @@ index 40a086f2883c4419d2bf0bd44285f7c55562ba3e..00000000000000000000000000000000
|
||||
-}
|
||||
diff --git a/src/test/java/org/bukkit/plugin/PluginManagerTest.java b/src/test/java/org/bukkit/plugin/PluginManagerTest.java
|
||||
deleted file mode 100644
|
||||
index 03b08e47e91e8b56c1992fcd749a62eb9e7d4d68..0000000000000000000000000000000000000000
|
||||
index c46ed2acb82db814d660459b705dd49e6d44240f..0000000000000000000000000000000000000000
|
||||
--- a/src/test/java/org/bukkit/plugin/PluginManagerTest.java
|
||||
+++ /dev/null
|
||||
@@ -1,185 +0,0 @@
|
||||
@@ -1,183 +0,0 @@
|
||||
-package org.bukkit.plugin;
|
||||
-
|
||||
-import static org.bukkit.support.MatcherAssert.*;
|
||||
-import static org.hamcrest.Matchers.*;
|
||||
-import org.bukkit.Bukkit;
|
||||
-import static org.junit.Assert.*;
|
||||
-import org.bukkit.event.Event;
|
||||
-import org.bukkit.event.TestEvent;
|
||||
-import org.bukkit.permissions.Permission;
|
||||
-import org.bukkit.support.AbstractTestingBase;
|
||||
-import org.junit.jupiter.api.AfterEach;
|
||||
-import org.junit.jupiter.api.Test;
|
||||
-import org.junit.After;
|
||||
-import org.junit.Test;
|
||||
-
|
||||
-public class PluginManagerTest extends AbstractTestingBase {
|
||||
-public class PluginManagerTest {
|
||||
- private class MutableObject {
|
||||
- volatile Object value = null;
|
||||
- }
|
||||
-
|
||||
- private static final PluginManager pm = Bukkit.getServer().getPluginManager();
|
||||
- private static final PluginManager pm = org.bukkit.Bukkit.getServer().getPluginManager(); // Paper
|
||||
-
|
||||
- private final MutableObject store = new MutableObject();
|
||||
-
|
||||
@@ -2503,20 +2506,20 @@ index 03b08e47e91e8b56c1992fcd749a62eb9e7d4d68..00000000000000000000000000000000
|
||||
- private void testRemovePermissionByName(final String name) {
|
||||
- final Permission perm = new Permission(name);
|
||||
- pm.addPermission(perm);
|
||||
- assertThat(pm.getPermission(name), is(perm), "Permission \"" + name + "\" was not added");
|
||||
- assertThat("Permission \"" + name + "\" was not added", pm.getPermission(name), is(perm));
|
||||
- pm.removePermission(name);
|
||||
- assertThat(pm.getPermission(name), is(nullValue()), "Permission \"" + name + "\" was not removed");
|
||||
- assertThat("Permission \"" + name + "\" was not removed", pm.getPermission(name), is(nullValue()));
|
||||
- }
|
||||
-
|
||||
- private void testRemovePermissionByPermission(final String name) {
|
||||
- final Permission perm = new Permission(name);
|
||||
- pm.addPermission(perm);
|
||||
- assertThat(pm.getPermission(name), is(perm), "Permission \"" + name + "\" was not added");
|
||||
- assertThat("Permission \"" + name + "\" was not added", pm.getPermission(name), is(perm));
|
||||
- pm.removePermission(perm);
|
||||
- assertThat(pm.getPermission(name), is(nullValue()), "Permission \"" + name + "\" was not removed");
|
||||
- assertThat("Permission \"" + name + "\" was not removed", pm.getPermission(name), is(nullValue()));
|
||||
- }
|
||||
-
|
||||
- @AfterEach
|
||||
- @After
|
||||
- public void tearDown() {
|
||||
- pm.clearPlugins();
|
||||
- assertThat(pm.getPermissions(), is(empty()));
|
||||
@@ -2539,17 +2542,3 @@ index a8be3e23e3e280ad301d9530de50028515612966..43b58e920e739bb949ac0673e9ef73ba
|
||||
|
||||
@Override
|
||||
public FileConfiguration getConfig() {
|
||||
diff --git a/src/test/java/org/bukkit/support/TestServer.java b/src/test/java/org/bukkit/support/TestServer.java
|
||||
index 73ec679ac0d1f398b417bd174b47f9af93351e27..b208150297a23c0b4acb79135416809718f5650e 100644
|
||||
--- a/src/test/java/org/bukkit/support/TestServer.java
|
||||
+++ b/src/test/java/org/bukkit/support/TestServer.java
|
||||
@@ -25,8 +25,7 @@ public final class TestServer {
|
||||
Thread creatingThread = Thread.currentThread();
|
||||
when(instance.isPrimaryThread()).then(mock -> Thread.currentThread().equals(creatingThread));
|
||||
|
||||
- PluginManager pluginManager = new SimplePluginManager(instance, new SimpleCommandMap(instance));
|
||||
- when(instance.getPluginManager()).thenReturn(pluginManager);
|
||||
+ // Paper - remove plugin manager for Paper Plugins
|
||||
|
||||
Logger logger = Logger.getLogger(TestServer.class.getCanonicalName());
|
||||
when(instance.getLogger()).thenReturn(logger);
|
||||
@@ -192,10 +192,10 @@ index 0000000000000000000000000000000000000000..93476aaf8d21efb5a30b6d2cc2eeda81
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/math/Position.java b/src/main/java/io/papermc/paper/math/Position.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..26bc5a0fa67855af87c8fd4cd8229b4d9f242740
|
||||
index 0000000000000000000000000000000000000000..300da713dcc303b340efad70efe57facf5422964
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/math/Position.java
|
||||
@@ -0,0 +1,191 @@
|
||||
@@ -0,0 +1,184 @@
|
||||
+package io.papermc.paper.math;
|
||||
+
|
||||
+import org.bukkit.Location;
|
||||
@@ -273,13 +273,6 @@ index 0000000000000000000000000000000000000000..26bc5a0fa67855af87c8fd4cd8229b4d
|
||||
+ boolean isFine();
|
||||
+
|
||||
+ /**
|
||||
+ * Checks if each component of this position is finite.
|
||||
+ */
|
||||
+ default boolean isFinite() {
|
||||
+ return Double.isFinite(this.x()) && Double.isFinite(this.y()) && Double.isFinite(this.z());
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns a position offset by the specified amounts.
|
||||
+ *
|
||||
+ * @param x x value to offset
|
||||
@@ -388,7 +381,7 @@ index 0000000000000000000000000000000000000000..26bc5a0fa67855af87c8fd4cd8229b4d
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
|
||||
index 7c4db051472fb6a6c6d24092dc6f75487356690a..85c342fc50f2fe0ce9a1b3980df9e088c3dea92d 100644
|
||||
index 7c4db051472fb6a6c6d24092dc6f75487356690a..3b99f359f556e6f2c341d55fa69b7462e69b6546 100644
|
||||
--- a/src/main/java/org/bukkit/Location.java
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -20,7 +20,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -400,7 +393,7 @@ index 7c4db051472fb6a6c6d24092dc6f75487356690a..85c342fc50f2fe0ce9a1b3980df9e088
|
||||
private Reference<World> world;
|
||||
private double x;
|
||||
private double y;
|
||||
@@ -706,4 +706,31 @@ public class Location implements Cloneable, ConfigurationSerializable {
|
||||
@@ -706,4 +706,26 @@ public class Location implements Cloneable, ConfigurationSerializable {
|
||||
}
|
||||
return pitch;
|
||||
}
|
||||
@@ -422,11 +415,6 @@ index 7c4db051472fb6a6c6d24092dc6f75487356690a..85c342fc50f2fe0ce9a1b3980df9e088
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isFinite() {
|
||||
+ return io.papermc.paper.math.FinePosition.super.isFinite() && Float.isFinite(this.getYaw()) && Float.isFinite(this.getPitch());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @NotNull Location toLocation(@NotNull World world) {
|
||||
+ return new Location(world, this.x(), this.y(), this.z(), this.getYaw(), this.getPitch());
|
||||
+ }
|
||||
|
||||
@@ -2897,10 +2897,10 @@ index e3602c6703b29ffec17ef7806c9deb3eead8a112..3e642d8a0294f7290c3d4310813e6e8a
|
||||
* Sends the component to the player
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 0743592273cc1c5f4ab6935349941bf25b438448..659405d84b5a61618576e930805da5cd3a054b4c 100644
|
||||
index 2042e3fb0ea347148814d9838cd7bb475bd23984..f68ef89f37057cf677a767026ab395f7a839a2f9 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -36,6 +36,7 @@ public interface UnsafeValues {
|
||||
@@ -35,6 +35,7 @@ public interface UnsafeValues {
|
||||
net.kyori.adventure.text.Component resolveWithContext(net.kyori.adventure.text.Component component, org.bukkit.command.CommandSender context, org.bukkit.entity.Entity scoreboardSubject, boolean bypassPermissions) throws java.io.IOException;
|
||||
// Paper end
|
||||
|
||||
@@ -2908,7 +2908,7 @@ index 0743592273cc1c5f4ab6935349941bf25b438448..659405d84b5a61618576e930805da5cd
|
||||
Material toLegacy(Material material);
|
||||
|
||||
Material fromLegacy(Material material);
|
||||
@@ -119,4 +120,12 @@ public interface UnsafeValues {
|
||||
@@ -111,4 +112,12 @@ public interface UnsafeValues {
|
||||
return !Bukkit.getUnsafe().isSupportedApiVersion(plugin.getDescription().getAPIVersion());
|
||||
}
|
||||
// Paper end
|
||||
@@ -3455,10 +3455,10 @@ index 516d7fc7812aac343782861d0d567f54aa578c2a..00000000000000000000000000000000
|
||||
- // Spigot end
|
||||
-}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index e5a54a2f35d83f8c7a5f2b6512b86481aa7f9f51..c54d478035f7782074c00f870d41da8283fec538 100644
|
||||
index a5010cb46aa5ef69c559ef9fc717f90365c05807..1a54682f584479a5a548f6f1f2ffd5da5dc11c88 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2346,7 +2346,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2344,7 +2344,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@Deprecated // Paper
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable java.util.UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -3466,11 +3466,6 @@ index e5a54a2f35d83f8c7a5f2b6512b86481aa7f9f51..c54d478035f7782074c00f870d41da82
|
||||
+ }
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * @return the player's ping
|
||||
+ * @deprecated use {@link Player#getPing()}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public int getPing() {
|
||||
+ throw new UnsupportedOperationException( "Not supported yet." );
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the
|
||||
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 8d101352f72fc7fa21e0ba68039c79ce2fb92eb9..b5bdefc93d8614b5efbfd6e4c975275b9b53868c 100644
|
||||
index 45f9ac35874c67c24718f6891b95df1ff4f0b93f..7717f5346aa784df4a0f6e43a5a74a66f279bc8a 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -78,6 +78,20 @@ public final class Bukkit {
|
||||
@@ -32,7 +32,7 @@ index 8d101352f72fc7fa21e0ba68039c79ce2fb92eb9..b5bdefc93d8614b5efbfd6e4c975275b
|
||||
* Attempts to set the {@link Server} singleton.
|
||||
* <p>
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 3e642d8a0294f7290c3d4310813e6e8a467810e7..d4d87ce99ad757733a0f2dd1a02eb79f4ee7972f 100644
|
||||
index 087da3cd2cafd8255ed70e5e632b270a33e37eaf..0f990d33ab07249e4cf2d2269920b4cbeed27d39 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -63,6 +63,18 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Player affects spawning API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index c54d478035f7782074c00f870d41da8283fec538..f21183cd5491b09e4543839252aed1ea10ddf849 100644
|
||||
index 1a54682f584479a5a548f6f1f2ffd5da5dc11c88..6b1a198f930a5a995e0cb6c279b455e1639a5039 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2198,6 +2198,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2196,6 +2196,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@Deprecated // Paper
|
||||
public String getLocale();
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add getTPS method
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index b5bdefc93d8614b5efbfd6e4c975275b9b53868c..67ef3471a5ded760950459db5e65d20ca18af967 100644
|
||||
index 7717f5346aa784df4a0f6e43a5a74a66f279bc8a..fba3e617a8847a3e9282e6a1a389132b2ad5511c 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1964,6 +1964,17 @@ public final class Bukkit {
|
||||
@@ -27,7 +27,7 @@ index b5bdefc93d8614b5efbfd6e4c975275b9b53868c..67ef3471a5ded760950459db5e65d20c
|
||||
* Get the advancement specified by this key.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index d4d87ce99ad757733a0f2dd1a02eb79f4ee7972f..3b273e3ef2160ea3e436cabdfc4b33f605ab82c6 100644
|
||||
index 0f990d33ab07249e4cf2d2269920b4cbeed27d39..c8cf66e64a3163c2bdf781f3ce52059546969b9b 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1672,6 +1672,16 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
||||
@@ -56,10 +56,10 @@ index 0000000000000000000000000000000000000000..a736d7bcdc5861a01b66ba36158db1c7
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 659405d84b5a61618576e930805da5cd3a054b4c..4604392831d19a789e4906cf1a5f0197105fd6f2 100644
|
||||
index f68ef89f37057cf677a767026ab395f7a839a2f9..a6aa33b9574d0278e10927007a62290e1d102e73 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -127,5 +127,12 @@ public interface UnsafeValues {
|
||||
@@ -119,5 +119,12 @@ public interface UnsafeValues {
|
||||
* @return name
|
||||
*/
|
||||
String getTimingsServerName();
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 121cd27185269339babae1757a604fbb5aabc869..63137429779d06fafb162f1bfb823d5149b3c58a 100644
|
||||
index 598abaa82c634178043a29f6caa6ac5221659d06..70a32f89c16439c575d8928332cfed64d1d6ab7e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -739,5 +739,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -725,5 +725,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
default net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowEntity> asHoverEvent(final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowEntity> op) {
|
||||
return net.kyori.adventure.text.event.HoverEvent.showEntity(op.apply(net.kyori.adventure.text.event.HoverEvent.ShowEntity.of(this.getType().getKey(), this.getUniqueId(), this.customName())));
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ Add per player no-tick, tick, and send view distances.
|
||||
Also add send/no-tick view distance to World.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 1403d28bf9124e3c4cd741dfda06400318e8a0a0..3559115d09b57acf5c2853b811862e5131f2a625 100644
|
||||
index 5357291ff0f2f20bd87ab9f6e57f6a4f6ff65226..887aa6217583d224d66f6d238ac269c23725d459 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -2663,6 +2663,62 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -2662,6 +2662,62 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
int getSimulationDistance();
|
||||
// Spigot end
|
||||
|
||||
@@ -75,10 +75,10 @@ index 1403d28bf9124e3c4cd741dfda06400318e8a0a0..3559115d09b57acf5c2853b811862e51
|
||||
public class Spigot {
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index f21183cd5491b09e4543839252aed1ea10ddf849..f9b9e0269b3a9402c5be1c1c2007956415ff708a 100644
|
||||
index 6b1a198f930a5a995e0cb6c279b455e1639a5039..f8e45f70fe23cf73c8677b5d24cefcd3aae5e24e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2212,6 +2212,78 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2210,6 +2210,78 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param affects Whether the player can affect mob spawning
|
||||
*/
|
||||
public void setAffectsSpawning(boolean affects);
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Expose server CommandMap
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 67ef3471a5ded760950459db5e65d20ca18af967..b53e94d79862d66165bbcd2a79b82770398a7f3e 100644
|
||||
index fba3e617a8847a3e9282e6a1a389132b2ad5511c..acb34296923fb27cfc28c130cf0b5405cfe340f6 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2165,6 +2165,19 @@ public final class Bukkit {
|
||||
@@ -29,7 +29,7 @@ index 67ef3471a5ded760950459db5e65d20ca18af967..b53e94d79862d66165bbcd2a79b82770
|
||||
public static Server.Spigot spigot() {
|
||||
return server.spigot();
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 3b273e3ef2160ea3e436cabdfc4b33f605ab82c6..124e88e512d24b6ff7ace3cf7d5a6adf4c2bb40d 100644
|
||||
index c8cf66e64a3163c2bdf781f3ce52059546969b9b..5b3c34b01038849b1463870ccf657b11db82cd09 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1682,6 +1682,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
||||
@@ -76,7 +76,7 @@ index 124e88e512d24b6ff7ace3cf7d5a6adf4c2bb40d..ccc825a2ea43bb84a5a08dff00c4d8ec
|
||||
* Gets the name of the update folder. The update folder is used to safely
|
||||
* update plugins at the right moment on a plugin load.
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index f9b9e0269b3a9402c5be1c1c2007956415ff708a..284bb156c4430a9a8afce0a7dffa96722b8c29cc 100644
|
||||
index f8e45f70fe23cf73c8677b5d24cefcd3aae5e24e..f52e7d4e5b8399d04d77384f8fe5315086acd776 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1041,6 +1041,42 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add BaseComponent sendMessage methods to CommandSender
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/command/CommandSender.java b/src/main/java/org/bukkit/command/CommandSender.java
|
||||
index 70fec73328227725f519af845ecbdce8be2fa4e2..04e7cd0e4e2d0eb38fb2862ce6688a4470f30d6b 100644
|
||||
index 0f2b85e4979c478fbcc20bd67446e6ac8c8696d7..5c8ae3e0a927f2f2924d719b03499d936cf4d951 100644
|
||||
--- a/src/main/java/org/bukkit/command/CommandSender.java
|
||||
+++ b/src/main/java/org/bukkit/command/CommandSender.java
|
||||
@@ -1,6 +1,9 @@
|
||||
|
||||
@@ -432,7 +432,7 @@ index 0000000000000000000000000000000000000000..9e90c3df567a65b48a0b9341f784eb90
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 284bb156c4430a9a8afce0a7dffa96722b8c29cc..d5746291dd0cfc32591482945040e992ad1efb8e 100644
|
||||
index f52e7d4e5b8399d04d77384f8fe5315086acd776..3650fb2b79368ad39278062f215d25cc99637cac 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1075,6 +1075,131 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Complete resource pack API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index d5746291dd0cfc32591482945040e992ad1efb8e..e12d28143a213abdc0552a15e82cacecc414ca26 100644
|
||||
index 3650fb2b79368ad39278062f215d25cc99637cac..967ea421aed7f9d4c8edd366c00cf3ceca723b2f 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1655,7 +1655,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -18,7 +18,7 @@ index d5746291dd0cfc32591482945040e992ad1efb8e..e12d28143a213abdc0552a15e82cacec
|
||||
public void setResourcePack(@NotNull String url);
|
||||
|
||||
/**
|
||||
@@ -2502,6 +2504,124 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2500,6 +2502,124 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
default net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowEntity> asHoverEvent(final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowEntity> op) {
|
||||
return net.kyori.adventure.text.event.HoverEvent.showEntity(op.apply(net.kyori.adventure.text.event.HoverEvent.ShowEntity.of(this.getType().getKey(), this.getUniqueId(), this.displayName())));
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Add command to reload permissions.yml and require confirm to
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 9417030074fccdd9113bf75eb8f17f74b9a9118b..9003a603b6bf82a7b6f04fa027cdc889cf7c274f 100644
|
||||
index 88cbb61a855d77fe6840be48140261032c5a38b8..540c57e82247eaad2cae1ab0199caf2a6cabcab1 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2200,6 +2200,13 @@ public final class Bukkit {
|
||||
@@ -24,7 +24,7 @@ index 9417030074fccdd9113bf75eb8f17f74b9a9118b..9003a603b6bf82a7b6f04fa027cdc889
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index ccc825a2ea43bb84a5a08dff00c4d8ec27e4e95a..45e628f6c47945ce008d8436e3b13325bb5084d8 100644
|
||||
index 7edaadd0a99fd8bbe3c683a126efd29993ed596c..f3452f65e6b69e8a2f0942c7a6afb9837a6d88fd 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1943,4 +1943,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
||||
@@ -238,16 +238,6 @@ index 0000000000000000000000000000000000000000..fd184f13f5e8ee5cf829fff4f44696e1
|
||||
+ cancelled = cancel;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/block/Barrel.java b/src/main/java/org/bukkit/block/Barrel.java
|
||||
index aa1bb7a1a1c94b0b029bb60026efbc7f55584dd7..d3789b2b7dd71d7c1872a0d84698d35a1884101b 100644
|
||||
--- a/src/main/java/org/bukkit/block/Barrel.java
|
||||
+++ b/src/main/java/org/bukkit/block/Barrel.java
|
||||
@@ -5,4 +5,4 @@ import org.bukkit.loot.Lootable;
|
||||
/**
|
||||
* Represents a captured state of a Barrel.
|
||||
*/
|
||||
-public interface Barrel extends Container, Lootable, Lidded { }
|
||||
+public interface Barrel extends Container, com.destroystokyo.paper.loottable.LootableBlockInventory, Lidded { } // Paper
|
||||
diff --git a/src/main/java/org/bukkit/block/Chest.java b/src/main/java/org/bukkit/block/Chest.java
|
||||
index b451191312e4fb19f2131c2d0a0c0337953f6c7c..db6affbc78106b2d93b41953b624a0bca0ca1d72 100644
|
||||
--- a/src/main/java/org/bukkit/block/Chest.java
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Command Aliases
|
||||
Reload the aliases stored in commands.yml
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 9003a603b6bf82a7b6f04fa027cdc889cf7c274f..297f7befdac5c45efb1c9f432c49696814f513ab 100644
|
||||
index 540c57e82247eaad2cae1ab0199caf2a6cabcab1..abbafce790d30bab81b40c6c973d21f09d3d24ef 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2207,6 +2207,15 @@ public final class Bukkit {
|
||||
@@ -26,7 +26,7 @@ index 9003a603b6bf82a7b6f04fa027cdc889cf7c274f..297f7befdac5c45efb1c9f432c496968
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 45e628f6c47945ce008d8436e3b13325bb5084d8..d80e9a6770c565c2cdb6bea6ad14969a6a6d0dad 100644
|
||||
index f3452f65e6b69e8a2f0942c7a6afb9837a6d88fd..925e3e32bf971efc08fd39d1e10d83bb0c6e8634 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1945,4 +1945,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add String based Action Bar API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index e12d28143a213abdc0552a15e82cacecc414ca26..3954f40b23536fec495585a8b14e82d092d62e39 100644
|
||||
index 967ea421aed7f9d4c8edd366c00cf3ceca723b2f..87b67723cb9dcead110eb88dd741d3348eb9ec1b 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1042,6 +1042,39 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
|
||||
@@ -7,10 +7,10 @@ Provides counts without the ineffeciency of using .getEntities().size()
|
||||
which creates copy of the collections.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 3559115d09b57acf5c2853b811862e5131f2a625..dbb799aed5bbb80edd2428b63d3fce15cf2e2f05 100644
|
||||
index 887aa6217583d224d66f6d238ac269c23725d459..4ef6bbfa753da439ac57bd8d70dd114d73665c8d 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -47,6 +47,33 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -46,6 +46,33 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, PersistentDataHolder, Keyed, net.kyori.adventure.audience.ForwardingAudience { // Paper
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Add configuration option to prevent player names from being
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 297f7befdac5c45efb1c9f432c49696814f513ab..add298a1a0b6f6dbd72fe9e8f87794d193760fb7 100644
|
||||
index abbafce790d30bab81b40c6c973d21f09d3d24ef..4665d42f167d587ec3edaf6432eef0a5a883401f 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2216,6 +2216,16 @@ public final class Bukkit {
|
||||
@@ -27,7 +27,7 @@ index 297f7befdac5c45efb1c9f432c49696814f513ab..add298a1a0b6f6dbd72fe9e8f87794d1
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index d80e9a6770c565c2cdb6bea6ad14969a6a6d0dad..22d508a6c80d7e19352bceb57009fdbcb16bc723 100644
|
||||
index 925e3e32bf971efc08fd39d1e10d83bb0c6e8634..7b95c1049ec365b8a1c20e5e18f6a79d4042fa38 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1947,4 +1947,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
||||
@@ -75,7 +75,7 @@ index 0cf808356a1a5c6fc4bcf97a694ed9beb80a776a..dc765dea47a9a1c1520fb16ddb24f814
|
||||
* @return temperature at given coordinate
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/RegionAccessor.java b/src/main/java/org/bukkit/RegionAccessor.java
|
||||
index 02de62c083ceaa466c80cb732e8304b8cc3f07f8..7c2b1eff41dd43fda84d84e76c05bbbf37c186b8 100644
|
||||
index 43f5aab2fe70af5f570de1f21eca83905f1e2f57..05c29cbd2ae1ca0434a90f8389479bd608ca2ac1 100644
|
||||
--- a/src/main/java/org/bukkit/RegionAccessor.java
|
||||
+++ b/src/main/java/org/bukkit/RegionAccessor.java
|
||||
@@ -158,7 +158,7 @@ public interface RegionAccessor {
|
||||
@@ -142,10 +142,10 @@ index 22d508a6c80d7e19352bceb57009fdbcb16bc723..3c1862b9a9293155f756615b5bd23cc8
|
||||
* @return an array containing all previous players
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index dbb799aed5bbb80edd2428b63d3fce15cf2e2f05..609e4908ed21f69b9e813500e702bbe784bff00c 100644
|
||||
index 4ef6bbfa753da439ac57bd8d70dd114d73665c8d..7f23527168a33b92d823f76765edfe00abe0e4f6 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -2577,7 +2577,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -2576,7 +2576,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
/**
|
||||
* Find the closest nearby structure of a given {@link StructureType}.
|
||||
* Finding unexplored structures can, and will, block if the world is
|
||||
@@ -154,7 +154,7 @@ index dbb799aed5bbb80edd2428b63d3fce15cf2e2f05..609e4908ed21f69b9e813500e702bbe7
|
||||
* temporarily freezing while locating an unexplored structure.
|
||||
* <p>
|
||||
* The {@code radius} is not a rigid square radius. Each structure may alter
|
||||
@@ -2611,7 +2611,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -2610,7 +2610,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
/**
|
||||
* Find the closest nearby structure of a given {@link StructureType}.
|
||||
* Finding unexplored structures can, and will, block if the world is
|
||||
@@ -163,7 +163,7 @@ index dbb799aed5bbb80edd2428b63d3fce15cf2e2f05..609e4908ed21f69b9e813500e702bbe7
|
||||
* temporarily freezing while locating an unexplored structure.
|
||||
* <p>
|
||||
* The {@code radius} is not a rigid square radius. Each structure may alter
|
||||
@@ -2644,7 +2644,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -2643,7 +2643,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
/**
|
||||
* Find the closest nearby structure of a given {@link Structure}. Finding
|
||||
* unexplored structures can, and will, block if the world is looking in
|
||||
@@ -303,10 +303,10 @@ index 91fc11dda99de506be83d40df8929bf7cd8e8d85..7dc631ebd009f5f5c3ac1699c3f3515c
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Arrow.java b/src/main/java/org/bukkit/entity/Arrow.java
|
||||
index 8eb0cf31b1ce6d714a14cf65bbb117ff163ae2f3..8e57082e8b19a2fd9625816c2ea4a90d41f78ca5 100644
|
||||
index 8814519df13c5e9475774f4bce4c8c6a462c2978..be9a35790fc664721ac94f3708613eb77631a0c5 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Arrow.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Arrow.java
|
||||
@@ -93,7 +93,7 @@ public interface Arrow extends AbstractArrow {
|
||||
@@ -73,7 +73,7 @@ public interface Arrow extends AbstractArrow {
|
||||
* Removes a custom potion effect from this arrow.
|
||||
*
|
||||
* @param type the potion effect type to remove
|
||||
@@ -386,7 +386,7 @@ index ae9eaaa8e38e1d9dfc459926c7fc51ddb89de84a..b2ec535bb1b0ce0c114ddd7638b90218
|
||||
@Override
|
||||
public int getConversionTime();
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 3954f40b23536fec495585a8b14e82d092d62e39..264c6bdeb2f1f0d937e4356d761a3264a1c4d58a 100644
|
||||
index 87b67723cb9dcead110eb88dd741d3348eb9ec1b..266e89b48d4991f6099290cf9d44fa06b43ffa2c 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -431,15 +431,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -678,67 +678,6 @@ index c17ff41a688b2cbd877cda25d4ec033ac8ef5524..bd67b7cba78b9bbdd82a5a40048e658a
|
||||
*/
|
||||
public class PiglinBarterEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/FurnaceBurnEvent.java b/src/main/java/org/bukkit/event/inventory/FurnaceBurnEvent.java
|
||||
index bc71bc2d3ace0d19d730c09f05f9e0655bcee8f5..24077da8e6a7937f66eafc6779206055cf82e8d2 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/FurnaceBurnEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/FurnaceBurnEvent.java
|
||||
@@ -8,7 +8,9 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
- * Called when an ItemStack is successfully burned as fuel in a furnace.
|
||||
+ * Called when an ItemStack is successfully burned as fuel in a furnace-like block such as a
|
||||
+ * {@link org.bukkit.block.Furnace}, {@link org.bukkit.block.Smoker}, or
|
||||
+ * {@link org.bukkit.block.BlastFurnace}.
|
||||
*/
|
||||
public class FurnaceBurnEvent extends BlockEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/FurnaceExtractEvent.java b/src/main/java/org/bukkit/event/inventory/FurnaceExtractEvent.java
|
||||
index 020739697a0b535cad0b15b574f77cdabbdfa3eb..a965b6a78073c5da86ad671752eff4a270029420 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/FurnaceExtractEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/FurnaceExtractEvent.java
|
||||
@@ -7,7 +7,9 @@ import org.bukkit.event.block.BlockExpEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
- * This event is called when a player takes items out of the furnace
|
||||
+ * This event is called when a player takes items out of a furnace-like block such as a
|
||||
+ * {@link org.bukkit.block.Furnace}, {@link org.bukkit.block.Smoker}, or
|
||||
+ * {@link org.bukkit.block.BlastFurnace}.
|
||||
*/
|
||||
public class FurnaceExtractEvent extends BlockExpEvent {
|
||||
private final Player player;
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/FurnaceSmeltEvent.java b/src/main/java/org/bukkit/event/inventory/FurnaceSmeltEvent.java
|
||||
index 066e7dd9a34d35c8b643a5efcf95d6a5ef47c7ee..f8f9b08a0bd82a2667ae4e0c99dae9103f0db3f0 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/FurnaceSmeltEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/FurnaceSmeltEvent.java
|
||||
@@ -6,7 +6,9 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
- * Called when an ItemStack is successfully smelted in a furnace.
|
||||
+ * Called when an ItemStack is successfully smelted in a furnace-like block
|
||||
+ * such as a {@link org.bukkit.block.Furnace}, {@link org.bukkit.block.Smoker},
|
||||
+ * or {@link org.bukkit.block.BlastFurnace}.
|
||||
*/
|
||||
public class FurnaceSmeltEvent extends BlockCookEvent {
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java b/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java
|
||||
index 1440c6115520d692faf75455df35b92aa8734491..0808e7aeffb69160913344de5b5e21d5e857f1d6 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java
|
||||
@@ -8,7 +8,10 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
- * Called when a Furnace starts smelting.
|
||||
+ * Called when any of the furnace-like blocks start smelting.
|
||||
+ * <p>
|
||||
+ * Furnace-like blocks are {@link org.bukkit.block.Furnace},
|
||||
+ * {@link org.bukkit.block.Smoker}, and {@link org.bukkit.block.BlastFurnace}.
|
||||
*/
|
||||
public class FurnaceStartSmeltEvent extends InventoryBlockStartEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java b/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java
|
||||
index 79797a2be7fb139d528116d34d13e51d39b96e56..fe58058f9b5d29388d48115cc81dc48ab08c58c1 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java
|
||||
@@ -1203,10 +1142,10 @@ index 07c3dff4d6190ef388d9c1e1c36f67f00a3e8e66..597a18a767b68b47e81454b7d44613c7
|
||||
* @param input The input choice.
|
||||
* @return The changed recipe, so you can chain calls.
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
index d7fab2b856f6dfec4f9225c1bdb4254b238d98a4..9d40e6a5ce7adc377934cfc5ce663b5d9cb2e4dc 100644
|
||||
index 049c70c935fd7a781280d223f74bbbf87223f505..f78714c2a6d9da162c9802552984cbfad76ff728 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
@@ -306,7 +306,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -305,7 +305,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
/**
|
||||
* Return an immutable copy of all {@link Attribute}s and their
|
||||
* {@link AttributeModifier}s for a given {@link EquipmentSlot}.<br>
|
||||
@@ -1216,7 +1155,7 @@ index d7fab2b856f6dfec4f9225c1bdb4254b238d98a4..9d40e6a5ce7adc377934cfc5ce663b5d
|
||||
* AttributeModifiers without a slot are active in any slot.<br>
|
||||
* If there are no attributes set for the given slot, an empty map
|
||||
diff --git a/src/main/java/org/bukkit/scoreboard/Objective.java b/src/main/java/org/bukkit/scoreboard/Objective.java
|
||||
index 22b1dc5fd4d453161a5ee520072f8e8f955b3a80..a625bcab8e77b05b3341a52c708fae1542b7e3d5 100644
|
||||
index 0ff409bcf093e6058c957cdcc5bb17bdc32c87be..be3b2e5d9364abde50716c35cabd5938fe2c5e4d 100644
|
||||
--- a/src/main/java/org/bukkit/scoreboard/Objective.java
|
||||
+++ b/src/main/java/org/bukkit/scoreboard/Objective.java
|
||||
@@ -86,7 +86,7 @@ public interface Objective {
|
||||
@@ -1229,10 +1168,10 @@ index 22b1dc5fd4d453161a5ee520072f8e8f955b3a80..a625bcab8e77b05b3341a52c708fae15
|
||||
boolean isModifiable();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java
|
||||
index 52e8be769d2e9b69e9833bc9a7fe39afd10c5095..4d2b8e10263802432dfeac72666487f9547cd2c5 100644
|
||||
index 36260de3424012ac020d6c6e381010b3d4a32c6f..5416386c89a4019a2c123374dd5cb6d4f12744f0 100644
|
||||
--- a/src/main/java/org/bukkit/scoreboard/Team.java
|
||||
+++ b/src/main/java/org/bukkit/scoreboard/Team.java
|
||||
@@ -265,7 +265,7 @@ public interface Team extends net.kyori.adventure.audience.ForwardingAudience {
|
||||
@@ -265,7 +265,7 @@ public interface Team {
|
||||
* Gets the Set of entries on the team
|
||||
*
|
||||
* @return entries on the team
|
||||
|
||||
@@ -321,7 +321,7 @@ index 0000000000000000000000000000000000000000..7b3b6ef533d32169fbeca389bd61cfc6
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index b21f90f291a087b6282cd7b55e0075a01729f0ba..dcd539220e5a2bda41f27101ea4c0ece146e1d0d 100644
|
||||
index ae017e210a54e78ecd14117ac939e1bb3da4497a..047676a7ea94bf26c8dd0552c72760bcc264218f 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2228,6 +2228,83 @@ public final class Bukkit {
|
||||
@@ -409,7 +409,7 @@ index b21f90f291a087b6282cd7b55e0075a01729f0ba..dcd539220e5a2bda41f27101ea4c0ece
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 3c1862b9a9293155f756615b5bd23cc810a6df5e..016cee903c7179baf711984503d1d0793d40c5c5 100644
|
||||
index e1211bb9c3186ffb1c5c7b858b8bab50bf87df9f..94192cfe9bb15c0083cf28761bc3f0f6bb19aa8d 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1955,5 +1955,74 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Entity#fromMobSpawner()
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 63137429779d06fafb162f1bfb823d5149b3c58a..4319dbac54b4cce95ad7479d5bd141a2b12ab7ae 100644
|
||||
index 70a32f89c16439c575d8928332cfed64d1d6ab7e..b1dc148301012ba708333d620c8bdf0062140c8b 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -749,5 +749,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -735,5 +735,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
*/
|
||||
@Nullable
|
||||
Location getOrigin();
|
||||
|
||||
@@ -8,10 +8,10 @@ Currently the server only supports the English language. To override this,
|
||||
You must replace the language file embedded in the server jar.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index 30770d03044da684aa8c79ca74796050c319f6be..f0025ba978f4bdf1e6bab7d30466fc950bb2a13b 100644
|
||||
index 9578d6b0fa54feac75fa9a0727d878bd13b9e19e..a6795b102c9678b122dfd3b36d02783b9e108b48 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -192,4 +192,20 @@ public interface ItemFactory {
|
||||
@@ -191,4 +191,20 @@ public interface ItemFactory {
|
||||
@NotNull
|
||||
net.kyori.adventure.text.Component displayName(@NotNull ItemStack itemStack);
|
||||
// Paper end - Adventure
|
||||
|
||||
@@ -7,10 +7,10 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr
|
||||
to ensure it meets latest minecraft expectations.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index f0025ba978f4bdf1e6bab7d30466fc950bb2a13b..d641a8293f3acd465d5fdde8507046647cb6c568 100644
|
||||
index a6795b102c9678b122dfd3b36d02783b9e108b48..74cd662d0594f2fbc5aa30ba64d9e4928145dbb9 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -208,4 +208,18 @@ public interface ItemFactory {
|
||||
@@ -207,4 +207,18 @@ public interface ItemFactory {
|
||||
@Deprecated
|
||||
String getI18NDisplayName(@Nullable ItemStack item);
|
||||
// Paper end - add getI18NDisplayName
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] LivingEntity#setKiller
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 390bb294d09389877937ee2c6c3f346e65dfb178..6a9df4ec0eee205bcd37de9c4d04a6c67eb21644 100644
|
||||
index c094070f8399586af7e02fe4ed489c82080f3678..ae201851aa00d47da37cca087ec9f8c03738a94a 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -319,6 +319,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
|
||||
@@ -14,7 +14,7 @@ it without having to shade it in the plugin and going through
|
||||
several layers of logging abstraction.
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 145f6209a984e74da2d2de03cf725c06c77ef8da..639651972fddce4dff63a0f0a7e566a15b9e2dd6 100644
|
||||
index 8c93ff28273ef9ddce2fb7a62ac50701fa3cd9a2..8045f92ffdfb4164bcbef99c41359590c45f9006 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -11,6 +11,8 @@ java {
|
||||
@@ -35,15 +35,15 @@ index 145f6209a984e74da2d2de03cf725c06c77ef8da..639651972fddce4dff63a0f0a7e566a1
|
||||
|
||||
implementation("org.ow2.asm:asm:9.4")
|
||||
implementation("org.ow2.asm:asm-commons:9.4")
|
||||
@@ -117,6 +121,8 @@ tasks.withType<Javadoc> {
|
||||
@@ -113,6 +117,8 @@ tasks.withType<Javadoc> {
|
||||
"https://jd.advntr.dev/text-serializer-legacy/$adventureVersion/",
|
||||
"https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
|
||||
"https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
|
||||
+ "https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/",
|
||||
+ "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/$log4jVersion/",
|
||||
// Paper end
|
||||
"https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3", // Paper
|
||||
)
|
||||
options.tags("apiNote:a:API Note:")
|
||||
diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java
|
||||
index 8c76716249e44ed8bf6be94c1f5c7b6d9bb35be2..4eb639fbb46a0848be207149ea433455550fae1c 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/Plugin.java
|
||||
|
||||
@@ -93,18 +93,19 @@ index 7cd9f98c042dc2bb80876af35c755f81bef34651..5cd236965de12392d8c7aa81307c0ff1
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
index 74b6581a97a092c44a0876e7981ff8a8e6153100..d6d3e1332e51adc5611543b2a6689efa5921a9f2 100644
|
||||
index 302319acbc257a075adfb78d9f5c49fdadf45bdc..a8ac1fb22a6fba50d69bf726b49c49ba190ab79a 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
@@ -67,6 +67,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
|
||||
@@ -65,7 +65,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
|
||||
this.url = file.toURI().toURL();
|
||||
this.libraryLoader = libraryLoader;
|
||||
|
||||
-
|
||||
+ this.logger = com.destroystokyo.paper.utils.PaperPluginLogger.getLogger(description); // Paper - Register logger early
|
||||
// Paper start
|
||||
this.dependencyContext = dependencyContext;
|
||||
this.classLoaderGroup = io.papermc.paper.plugin.provider.classloader.PaperClassLoaderStorage.instance().registerSpigotGroup(this);
|
||||
@@ -262,7 +263,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
|
||||
@@ -249,7 +249,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
|
||||
pluginState = new IllegalStateException("Initial initialization");
|
||||
this.pluginInit = javaPlugin;
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Add PlayerArmorChangeEvent
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerArmorChangeEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerArmorChangeEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..57521010ff0574f1bbc96727948a6185fd37e9ee
|
||||
index 0000000000000000000000000000000000000000..faea096dac02d339667c02a0011b6f8313fd8c12
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerArmorChangeEvent.java
|
||||
@@ -0,0 +1,139 @@
|
||||
@@ -0,0 +1,137 @@
|
||||
+package com.destroystokyo.paper.event.player;
|
||||
+
|
||||
+import org.bukkit.Material;
|
||||
@@ -22,7 +22,6 @@ index 0000000000000000000000000000000000000000..57521010ff0574f1bbc96727948a6185
|
||||
+import java.util.Collections;
|
||||
+import java.util.HashSet;
|
||||
+import java.util.Set;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
@@ -37,11 +36,10 @@ index 0000000000000000000000000000000000000000..57521010ff0574f1bbc96727948a6185
|
||||
+ private static final HandlerList HANDLERS = new HandlerList();
|
||||
+
|
||||
+ @NotNull private final SlotType slotType;
|
||||
+ @NotNull private final ItemStack oldItem;
|
||||
+ @NotNull private final ItemStack newItem;
|
||||
+ @Nullable private final ItemStack oldItem;
|
||||
+ @Nullable private final ItemStack newItem;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public PlayerArmorChangeEvent(@NotNull Player player, @NotNull SlotType slotType, @NotNull ItemStack oldItem, @NotNull ItemStack newItem) {
|
||||
+ public PlayerArmorChangeEvent(@NotNull Player player, @NotNull SlotType slotType, @Nullable ItemStack oldItem, @Nullable ItemStack newItem) {
|
||||
+ super(player);
|
||||
+ this.slotType = slotType;
|
||||
+ this.oldItem = oldItem;
|
||||
@@ -63,7 +61,7 @@ index 0000000000000000000000000000000000000000..57521010ff0574f1bbc96727948a6185
|
||||
+ *
|
||||
+ * @return old item
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ @Nullable
|
||||
+ public ItemStack getOldItem() {
|
||||
+ return this.oldItem;
|
||||
+ }
|
||||
@@ -73,7 +71,7 @@ index 0000000000000000000000000000000000000000..57521010ff0574f1bbc96727948a6185
|
||||
+ *
|
||||
+ * @return new item
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ @Nullable
|
||||
+ public ItemStack getNewItem() {
|
||||
+ return this.newItem;
|
||||
+ }
|
||||
@@ -139,10 +137,10 @@ index 0000000000000000000000000000000000000000..57521010ff0574f1bbc96727948a6185
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets whether this material can be equipped to a slot
|
||||
+ * Gets whether or not this material can be equipped to a slot
|
||||
+ *
|
||||
+ * @param material material to check
|
||||
+ * @return whether this material can be equipped
|
||||
+ * @return whether or not this material can be equipped
|
||||
+ */
|
||||
+ public static boolean isEquipable(@NotNull Material material) {
|
||||
+ return getByMaterial(material) != null;
|
||||
|
||||
@@ -578,7 +578,7 @@ index 270e6d8ad4358baa256cee5f16cff281f063ce3b..4a3451af454295ac3e1b688e6665cad9
|
||||
|
||||
@Override
|
||||
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
index abadff47166722fdc756afdbc6ac7242b6bd4fb0..88f1ca89fa640a686231b8eec87e70419b2d73ef 100644
|
||||
index c26ea217927ba77611e6ae93f8df50a83bceb3dd..06e96e5c98f1a7a68c8b4b5e527314c1aa774e38 100644
|
||||
--- a/src/test/java/org/bukkit/AnnotationTest.java
|
||||
+++ b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
@@ -48,6 +48,8 @@ public class AnnotationTest {
|
||||
|
||||
@@ -57,7 +57,7 @@ index 0000000000000000000000000000000000000000..7b2af1bd72dfbcf4e962a982940fc49b
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 264c6bdeb2f1f0d937e4356d761a3264a1c4d58a..f9239eae50b86f54f0cd8c604d2ba9468fc5f33b 100644
|
||||
index bb9f28d1a0290c5951412de1d2de8c2e6e354369..c1c2e8d9d6ff39ca6cdabb0744076cc540f86681 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -51,7 +51,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -10,7 +10,7 @@ of giving the player experience points.
|
||||
Both an API To standalone mend, and apply mending logic to .giveExp has been added.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index f9239eae50b86f54f0cd8c604d2ba9468fc5f33b..9dca8fc727b727063d9ca50fdd8f6452173a5cd4 100644
|
||||
index 6586262b6dfcb0b022d78096b7d4ec339c0b396c..2257a1808d19775607e60c155d9e5508e7825811 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1368,6 +1368,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
|
||||
@@ -3,17 +3,37 @@ From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 18 Jan 2018 01:00:27 -0500
|
||||
Subject: [PATCH] Optimize Hoppers
|
||||
|
||||
Adds data about what Item related methods were used in InventoryMoveItem event
|
||||
so that the server can improve the performance of this event.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryMoveItemEvent.java b/src/main/java/org/bukkit/event/inventory/InventoryMoveItemEvent.java
|
||||
index 919cc993e3cb1c14e2a3aebf90e6cc0fa6fbc17f..0161b8a94c7e8774fec3ed9c36d9c37221525928 100644
|
||||
index 919cc993e3cb1c14e2a3aebf90e6cc0fa6fbc17f..95e51bcf5dfd27cc9012d7542c4ed1bceca29626 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryMoveItemEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryMoveItemEvent.java
|
||||
@@ -58,7 +58,7 @@ public class InventoryMoveItemEvent extends Event implements Cancellable {
|
||||
@@ -31,6 +31,8 @@ public class InventoryMoveItemEvent extends Event implements Cancellable {
|
||||
private final Inventory destinationInventory;
|
||||
private ItemStack itemStack;
|
||||
private final boolean didSourceInitiate;
|
||||
+ public boolean calledGetItem; // Paper
|
||||
+ public boolean calledSetItem; // Paper
|
||||
|
||||
public InventoryMoveItemEvent(@NotNull final Inventory sourceInventory, @NotNull final ItemStack itemStack, @NotNull final Inventory destinationInventory, final boolean didSourceInitiate) {
|
||||
Preconditions.checkArgument(itemStack != null, "ItemStack cannot be null");
|
||||
@@ -58,7 +60,8 @@ public class InventoryMoveItemEvent extends Event implements Cancellable {
|
||||
*/
|
||||
@NotNull
|
||||
public ItemStack getItem() {
|
||||
- return itemStack.clone();
|
||||
+ calledGetItem = true; // Paper - record this method was used for auto detection of mode
|
||||
+ return itemStack; // Paper - Removed clone, handled better in Server
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,6 +73,7 @@ public class InventoryMoveItemEvent extends Event implements Cancellable {
|
||||
*/
|
||||
public void setItem(@NotNull ItemStack itemStack) {
|
||||
Preconditions.checkArgument(itemStack != null, "ItemStack cannot be null. Cancel the event if you want nothing to be transferred.");
|
||||
+ calledSetItem = true; // Paper - record this method was used for auto detection of mode
|
||||
this.itemStack = itemStack.clone();
|
||||
}
|
||||
|
||||
@@ -93,10 +93,10 @@ index 016cee903c7179baf711984503d1d0793d40c5c5..064edd612885b2ea4b35001a864503b5
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 9dca8fc727b727063d9ca50fdd8f6452173a5cd4..ccd80734cf5641455fd9d9b63238739987e225da 100644
|
||||
index 2257a1808d19775607e60c155d9e5508e7825811..21952b30559cafb00ddcef54557caea5e4dbb36e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2678,6 +2678,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2676,6 +2676,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED}
|
||||
*/
|
||||
boolean hasResourcePack();
|
||||
|
||||
@@ -9,7 +9,7 @@ In Offline Mode, will return an Offline UUID
|
||||
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index f5358612884aae8d0686f3ff98ccee567a746f16..a6f9336f27cb4a7aed0c01cde417d2287e393929 100644
|
||||
index 5b9d04de045a83e786df4bf9bfe2fc50835247bb..67c92e10b38af2ac45c1d9b6374695247bf1e7c3 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -688,6 +688,20 @@ public final class Bukkit {
|
||||
@@ -34,7 +34,7 @@ index f5358612884aae8d0686f3ff98ccee567a746f16..a6f9336f27cb4a7aed0c01cde417d228
|
||||
* Gets the plugin manager for interfacing with plugins.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 064edd612885b2ea4b35001a864503b568c53987..dfbccef8dd67195d588112989a9ffecb712a9fe9 100644
|
||||
index 9865238afb71f19b5c1cc7c414ea3a637f9fc00c..88b93ac279f2bd23ca853788c409549fe2afe041 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -592,6 +592,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
||||
@@ -36,10 +36,10 @@ index abdca9fe5acc90f167219eb769ece66c35682bb1..b3aa3dc6aa5afbc36cc86741b4cba56f
|
||||
/**
|
||||
* Make the entity drop the item in their hand.
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index ccd80734cf5641455fd9d9b63238739987e225da..bca4794a67c369b0bb882e56f489ed952488b2c5 100644
|
||||
index af7af85887e9463c561ddb0c47862b27b5de5d43..8e7482df076c41ae12813e64153206851e020764 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2523,10 +2523,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2521,10 +2521,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
/**
|
||||
* Open a Sign for editing by the Player.
|
||||
*
|
||||
|
||||
@@ -74,7 +74,7 @@ index 12349910297a75c00e64f6ccc7981aeeeb43ecd3..8f2f3e0ac5266f571b62a754921422bb
|
||||
/**
|
||||
* Adds this user to the {@link ProfileBanList}. If a previous ban exists, this will
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index bca4794a67c369b0bb882e56f489ed952488b2c5..a851ec4d350ce442eb01385d21ca75e695cf09d2 100644
|
||||
index 8e7482df076c41ae12813e64153206851e020764..6cbb64d4555a3741d0f4938c1850f64d055a3ac4 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1042,6 +1042,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's
|
||||
Provides more methods to get nearby entities, and filter by types and predicates
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 609e4908ed21f69b9e813500e702bbe784bff00c..7a6caf93606203198369030a295f1edbffde3c31 100644
|
||||
index 7f23527168a33b92d823f76765edfe00abe0e4f6..0f76496471c50d5f18cedc735e667265e6c27422 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1,6 +1,9 @@
|
||||
@@ -19,7 +19,7 @@ index 609e4908ed21f69b9e813500e702bbe784bff00c..7a6caf93606203198369030a295f1edb
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -625,6 +628,256 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -624,6 +627,256 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public Collection<Entity> getEntitiesByClasses(@NotNull Class<?>... classes);
|
||||
|
||||
|
||||
@@ -500,11 +500,11 @@ index 0000000000000000000000000000000000000000..f45b8cfd1611345e8d81ecb8297a586f
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java
|
||||
index e2adb9901cc92ede9d44ca9939c6a54d4762eb4b..81bd12c8addcee754c71e5e030c729c7e096fb4c 100644
|
||||
index 73b782c3975ad13159b6236976783fcfabd20493..819506712e9874c0142fc9e7d959bd7be97fc649 100644
|
||||
--- a/src/main/java/org/bukkit/Particle.java
|
||||
+++ b/src/main/java/org/bukkit/Particle.java
|
||||
@@ -194,6 +194,18 @@ public enum Particle implements Keyed {
|
||||
return key;
|
||||
@@ -162,6 +162,17 @@ public enum Particle {
|
||||
return dataType;
|
||||
}
|
||||
|
||||
+ // Paper start - Particle API expansion
|
||||
@@ -518,15 +518,14 @@ index e2adb9901cc92ede9d44ca9939c6a54d4762eb4b..81bd12c8addcee754c71e5e030c729c7
|
||||
+ return new com.destroystokyo.paper.ParticleBuilder(this);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Options which can be applied to redstone dust particles - a particle
|
||||
* color and size.
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 7a6caf93606203198369030a295f1edbffde3c31..3e7385d21380abcd40649045e4666cf4bed32195 100644
|
||||
index 0f76496471c50d5f18cedc735e667265e6c27422..0ed7a7db90856ff50ed1354f9914c0cc321d2d09 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -2777,7 +2777,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -2776,7 +2776,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
* @param data the data to use for the particle or null,
|
||||
* the type of this depends on {@link Particle#getDataType()}
|
||||
*/
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] PotionEffect clone methods
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/potion/PotionEffect.java b/src/main/java/org/bukkit/potion/PotionEffect.java
|
||||
index 88f720aba13961b08e54b3fd35dbaabc5dd9a4c2..037af5fd6d71a526c0e6620f2db0cd6df9625261 100644
|
||||
index 66dfed07bfb44e99a94fb02dc056e8601115994a..ccdca0d75868135dc7b96daeff2236b225c4add1 100644
|
||||
--- a/src/main/java/org/bukkit/potion/PotionEffect.java
|
||||
+++ b/src/main/java/org/bukkit/potion/PotionEffect.java
|
||||
@@ -107,6 +107,33 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
@@ -106,6 +106,33 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
this(getEffectType(map), getInt(map, DURATION), getInt(map, AMPLIFIER), getBool(map, AMBIENT, false), getBool(map, PARTICLES, true), getBool(map, ICON, getBool(map, PARTICLES, true)));
|
||||
}
|
||||
|
||||
@@ -41,4 +41,4 @@ index 88f720aba13961b08e54b3fd35dbaabc5dd9a4c2..037af5fd6d71a526c0e6620f2db0cd6d
|
||||
+
|
||||
@NotNull
|
||||
private static PotionEffectType getEffectType(@NotNull Map<?, ?> map) {
|
||||
PotionEffectType effect;
|
||||
int type = getInt(map, TYPE);
|
||||
@@ -108,10 +108,10 @@ index 6693e3d8dc2519facb12db981a6b6325faa095bf..b7ff09ffdd3aecc1843d175bc76fe5fa
|
||||
* Returns a list of entities within a bounding box centered around a Location.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 3e7385d21380abcd40649045e4666cf4bed32195..266ed71b79d32f9b812be322563c247051ccd9d0 100644
|
||||
index 0ed7a7db90856ff50ed1354f9914c0cc321d2d09..fa192be9916ccd0a443281c104637ba09cde7755 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1392,6 +1392,88 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -1391,6 +1391,88 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
*/
|
||||
public boolean createExplosion(@NotNull Location loc, float power, boolean setFire);
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add World.getEntity(UUID) API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 266ed71b79d32f9b812be322563c247051ccd9d0..ffe6c8be86fc93d39e256a89e5016e3025afbe5c 100644
|
||||
index fa192be9916ccd0a443281c104637ba09cde7755..e9af7ce218e44940cd074cc0d511268284e312ef 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -912,6 +912,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -911,6 +911,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public Collection<Entity> getNearbyEntities(@NotNull Location location, double x, double y, double z);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ index 9e012c3c0671e5d0e55c243fdb4e14057038c153..d44c5a3fda0b159dc541246cb2fca842
|
||||
* Returns the ItemStack currently in your hand, can be empty.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java b/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java
|
||||
index c0cc82d98348e8aae3cb56bafb2fcb590b03094f..4db0a07db156c61867644f50c185e63b695e2462 100644
|
||||
index 3cf2e2e87b8021f4c5e046b22ed89798b4172ae7..d527e3d7ba8d5b8c044e5a04ebdb9a2c117f22c7 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java
|
||||
@@ -30,9 +30,60 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Entity#getChunk API
|
||||
Get the chunk the entity is currently registered to
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 4319dbac54b4cce95ad7479d5bd141a2b12ab7ae..5fc085f785719933eef7ab1b3cf173579c64739b 100644
|
||||
index b1dc148301012ba708333d620c8bdf0062140c8b..5f703c8847a94c8fd356abe2a0cd45e6af6efcec 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -3,6 +3,7 @@ package org.bukkit.entity;
|
||||
@@ -17,7 +17,7 @@ index 4319dbac54b4cce95ad7479d5bd141a2b12ab7ae..5fc085f785719933eef7ab1b3cf17357
|
||||
import org.bukkit.EntityEffect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Nameable;
|
||||
@@ -756,5 +757,16 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -742,5 +743,16 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
* @return True if entity spawned from a mob spawner
|
||||
*/
|
||||
boolean fromMobSpawner();
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] EnderDragon Events
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFireballHitEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFireballHitEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..615bc4c973ff371d87f996e981207fc15b70275b
|
||||
index 0000000000000000000000000000000000000000..118c7b6772a52c250649af2a9286f483f43da385
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFireballHitEvent.java
|
||||
@@ -0,0 +1,77 @@
|
||||
@@ -0,0 +1,79 @@
|
||||
+package com.destroystokyo.paper.event.entity;
|
||||
+
|
||||
+import org.bukkit.entity.AreaEffectCloud;
|
||||
@@ -20,21 +20,17 @@ index 0000000000000000000000000000000000000000..615bc4c973ff371d87f996e981207fc1
|
||||
+import org.bukkit.event.entity.EntityEvent;
|
||||
+
|
||||
+import java.util.Collection;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+/**
|
||||
+ * Fired when a DragonFireball collides with a block/entity and spawns an AreaEffectCloud
|
||||
+ */
|
||||
+public class EnderDragonFireballHitEvent extends EntityEvent implements Cancellable {
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
+
|
||||
+ @NotNull private final Collection<LivingEntity> targets;
|
||||
+ @Nullable private final Collection<LivingEntity> targets;
|
||||
+ @NotNull private final AreaEffectCloud areaEffectCloud;
|
||||
+ private boolean cancelled = false;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public EnderDragonFireballHitEvent(@NotNull DragonFireball fireball, @NotNull Collection<LivingEntity> targets, @NotNull AreaEffectCloud areaEffectCloud) {
|
||||
+ public EnderDragonFireballHitEvent(@NotNull DragonFireball fireball, @Nullable Collection<LivingEntity> targets, @NotNull AreaEffectCloud areaEffectCloud) {
|
||||
+ super(fireball);
|
||||
+ this.targets = targets;
|
||||
+ this.areaEffectCloud = areaEffectCloud;
|
||||
@@ -52,9 +48,11 @@ index 0000000000000000000000000000000000000000..615bc4c973ff371d87f996e981207fc1
|
||||
+ /**
|
||||
+ * The living entities hit by fireball
|
||||
+ *
|
||||
+ * May be null if no entities were hit
|
||||
+ *
|
||||
+ * @return the targets
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ @Nullable
|
||||
+ public Collection<LivingEntity> getTargets() {
|
||||
+ return targets;
|
||||
+ }
|
||||
@@ -67,6 +65,20 @@ index 0000000000000000000000000000000000000000..615bc4c973ff371d87f996e981207fc1
|
||||
+ return areaEffectCloud;
|
||||
+ }
|
||||
+
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+
|
||||
+ @NotNull
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ private boolean cancelled = false;
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isCancelled() {
|
||||
+ return cancelled;
|
||||
@@ -76,16 +88,6 @@ index 0000000000000000000000000000000000000000..615bc4c973ff371d87f996e981207fc1
|
||||
+ public void setCancelled(boolean cancel) {
|
||||
+ cancelled = cancel;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFlameEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFlameEvent.java
|
||||
new file mode 100644
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Expand Location Manipulation API
|
||||
Adds set(x, y, z), add(base, x, y, z), subtract(base, x, y, z);
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
|
||||
index b7ff09ffdd3aecc1843d175bc76fe5fae1f48dde..aa6821aa33d3c579a139bd7c0378253c43b3754a 100644
|
||||
index 5a6b33c6d9a68affdbd02c13fdb0854e011e327d..943c3364f6b931fe11f9a6099504590b2da34657 100644
|
||||
--- a/src/main/java/org/bukkit/Location.java
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -546,6 +546,54 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] AnvilDamageEvent
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/block/AnvilDamagedEvent.java b/src/main/java/com/destroystokyo/paper/event/block/AnvilDamagedEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..aa5c3690fb898a7560a9551df91588a0cdc69fe2
|
||||
index 0000000000000000000000000000000000000000..a83c286c1c11af25fc4d16af7a42b95ce90b9dee
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/block/AnvilDamagedEvent.java
|
||||
@@ -0,0 +1,151 @@
|
||||
@@ -0,0 +1,148 @@
|
||||
+package com.destroystokyo.paper.event.block;
|
||||
+
|
||||
+import org.bukkit.Material;
|
||||
@@ -19,7 +19,6 @@ index 0000000000000000000000000000000000000000..aa5c3690fb898a7560a9551df91588a0
|
||||
+import org.bukkit.event.inventory.InventoryEvent;
|
||||
+import org.bukkit.inventory.AnvilInventory;
|
||||
+import org.bukkit.inventory.InventoryView;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
@@ -27,13 +26,11 @@ index 0000000000000000000000000000000000000000..aa5c3690fb898a7560a9551df91588a0
|
||||
+ * Called when an anvil is damaged from being used
|
||||
+ */
|
||||
+public class AnvilDamagedEvent extends InventoryEvent implements Cancellable {
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
+
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+ private boolean cancel;
|
||||
+ private DamageState damageState;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public AnvilDamagedEvent(@NotNull InventoryView inventory, @Nullable BlockData blockData) {
|
||||
+ public AnvilDamagedEvent(@NotNull InventoryView inventory, @NotNull BlockData blockData) {
|
||||
+ super(inventory);
|
||||
+ this.damageState = DamageState.getState(blockData);
|
||||
+ }
|
||||
@@ -95,12 +92,12 @@ index 0000000000000000000000000000000000000000..aa5c3690fb898a7560a9551df91588a0
|
||||
+
|
||||
+ @NotNull
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return HANDLER_LIST;
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return HANDLER_LIST;
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -112,7 +109,7 @@ index 0000000000000000000000000000000000000000..aa5c3690fb898a7560a9551df91588a0
|
||||
+ DAMAGED(Material.DAMAGED_ANVIL),
|
||||
+ BROKEN(Material.AIR);
|
||||
+
|
||||
+ private final Material material;
|
||||
+ private Material material;
|
||||
+
|
||||
+ DamageState(@NotNull Material material) {
|
||||
+ this.material = material;
|
||||
@@ -157,7 +154,7 @@ index 0000000000000000000000000000000000000000..aa5c3690fb898a7560a9551df91588a0
|
||||
+ return state;
|
||||
+ }
|
||||
+ }
|
||||
+ throw new IllegalArgumentException("Material is not an anvil state");
|
||||
+ throw new IllegalArgumentException("Material not an anvil");
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
@@ -44,10 +44,10 @@ index efbfed855248cff8b4bdbfc181d3e82058df4749..766d643f0fe79660942fdad25e39e488
|
||||
* Gets the world containing this chunk
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index ffe6c8be86fc93d39e256a89e5016e3025afbe5c..315ecb5dc0f33edfef893ead1297c8165d292250 100644
|
||||
index e9af7ce218e44940cd074cc0d511268284e312ef..159307600747c49948c5242d6cf39eed08c902e7 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -180,6 +180,37 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -179,6 +179,37 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public Chunk getChunkAt(@NotNull Block block);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ Y range: [0, 1023]
|
||||
X, Z range: [-67 108 864, 67 108 863]
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
|
||||
index aa6821aa33d3c579a139bd7c0378253c43b3754a..6e6e65c40813ccce618fa7a3df2c0030aa0a3bbe 100644
|
||||
index 943c3364f6b931fe11f9a6099504590b2da34657..16a604b6315daff228c827fe02b1234cca3e884d 100644
|
||||
--- a/src/main/java/org/bukkit/Location.java
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -15,7 +15,6 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -50,10 +50,10 @@ index aa6821aa33d3c579a139bd7c0378253c43b3754a..6e6e65c40813ccce618fa7a3df2c0030
|
||||
* @return A new location where X/Y/Z are the center of the block
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 315ecb5dc0f33edfef893ead1297c8165d292250..ad5afa7a05636cee82b517c673d281f0f4e38644 100644
|
||||
index 159307600747c49948c5242d6cf39eed08c902e7..e83de41cbaf0e5a68ce0d5ad2b5ec10877ec4055 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -97,6 +97,41 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -96,6 +96,41 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public Block getBlockAt(@NotNull Location location);
|
||||
|
||||
|
||||
@@ -6,17 +6,16 @@ Subject: [PATCH] Add PhantomPreSpawnEvent
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/PhantomPreSpawnEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/PhantomPreSpawnEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..d8f3f1c354331bc5e6fc1d9aa013476baf2daf05
|
||||
index 0000000000000000000000000000000000000000..9022f697ab244df43074e48c9150f39d44217531
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/PhantomPreSpawnEvent.java
|
||||
@@ -0,0 +1,33 @@
|
||||
@@ -0,0 +1,31 @@
|
||||
+package com.destroystokyo.paper.event.entity;
|
||||
+
|
||||
+import org.bukkit.Location;
|
||||
+import org.bukkit.entity.Entity;
|
||||
+import org.bukkit.entity.EntityType;
|
||||
+import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
@@ -27,7 +26,6 @@ index 0000000000000000000000000000000000000000..d8f3f1c354331bc5e6fc1d9aa013476b
|
||||
+public class PhantomPreSpawnEvent extends PreCreatureSpawnEvent {
|
||||
+ @NotNull private final Entity entity;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public PhantomPreSpawnEvent(@NotNull Location location, @NotNull Entity entity, @NotNull CreatureSpawnEvent.SpawnReason reason) {
|
||||
+ super(location, EntityType.PHANTOM, reason);
|
||||
+ this.entity = entity;
|
||||
@@ -38,7 +36,7 @@ index 0000000000000000000000000000000000000000..d8f3f1c354331bc5e6fc1d9aa013476b
|
||||
+ *
|
||||
+ * @return Entity
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ @Nullable
|
||||
+ public Entity getSpawningEntity() {
|
||||
+ return entity;
|
||||
+ }
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] isChunkGenerated API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
|
||||
index 6e6e65c40813ccce618fa7a3df2c0030aa0a3bbe..8508aa2c6fb7c9f41f3d185f5228c86dd3b8b627 100644
|
||||
index 16a604b6315daff228c827fe02b1234cca3e884d..20978b269a7757a561d6b872cc77898b44bbd272 100644
|
||||
--- a/src/main/java/org/bukkit/Location.java
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -3,6 +3,7 @@ package org.bukkit;
|
||||
@@ -34,10 +34,10 @@ index 6e6e65c40813ccce618fa7a3df2c0030aa0a3bbe..8508aa2c6fb7c9f41f3d185f5228c86d
|
||||
/**
|
||||
* Sets the position of this Location and returns itself
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index ad5afa7a05636cee82b517c673d281f0f4e38644..880ff5ee1237096ac2da115b665dc663c677e57b 100644
|
||||
index e83de41cbaf0e5a68ce0d5ad2b5ec10877ec4055..c63a660f2deade66fffad9036ce7c7c693bf0207 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -246,6 +246,19 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -245,6 +245,19 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
}
|
||||
// Paper end - chunk long key API
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ Adds API's to load or generate chunks asynchronously.
|
||||
Also adds utility methods to Entity to teleport asynchronously.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 880ff5ee1237096ac2da115b665dc663c677e57b..fc6b99e4f37179b15254bf0b398b1a800de1b73f 100644
|
||||
index c63a660f2deade66fffad9036ce7c7c693bf0207..67d14468703e0445afccdbd8de8028fb21b90d2d 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -955,6 +955,482 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -954,6 +954,482 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
}
|
||||
return nearby;
|
||||
}
|
||||
@@ -495,7 +495,7 @@ index 880ff5ee1237096ac2da115b665dc663c677e57b..fc6b99e4f37179b15254bf0b398b1a80
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 5fc085f785719933eef7ab1b3cf173579c64739b..711d95bfafac0d415895023bdaac4059395667ab 100644
|
||||
index 5f703c8847a94c8fd356abe2a0cd45e6af6efcec..9eca441d6702752938813a1c97724edf13134171 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -165,6 +165,33 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
|
||||
@@ -78,7 +78,7 @@ index 0000000000000000000000000000000000000000..c896d172519a8552a132031cb956378d
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 97d0f82041a229e85217a7e575bf003eddc31b70..8a18f269ee1767d57367160cb0e3513a4e2969fb 100644
|
||||
index 17e5d2e2acdae23d8ea3b3b1a89f62e8be7b81a8..8cccec99cdb028e86b71b3984f4f94201fd9a390 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -83,6 +83,98 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index a851ec4d350ce442eb01385d21ca75e695cf09d2..9954fc11b2c2fe56c194d7d3ce878a343a9b2429 100644
|
||||
index 87bc9d5e966d91b2786c89290a5609f94c59dd70..5cabbe3aec83f76cefe34fd3e34be467fe5e59c8 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2854,6 +2854,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2852,6 +2852,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param profile The new profile to use
|
||||
*/
|
||||
void setPlayerProfile(@NotNull com.destroystokyo.paper.profile.PlayerProfile profile);
|
||||
|
||||
@@ -48,7 +48,7 @@ index 0000000000000000000000000000000000000000..909617079db61b675cc7b60b44ef96b3
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index a6f9336f27cb4a7aed0c01cde417d2287e393929..67dc67343fc149c21ae234a338f08e2f1fa13867 100644
|
||||
index 67c92e10b38af2ac45c1d9b6374695247bf1e7c3..627c04f5e71ad032760296092a65596b08807a55 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -56,6 +56,7 @@ import org.bukkit.util.CachedServerIcon;
|
||||
|
||||
@@ -199,10 +199,10 @@ index 0000000000000000000000000000000000000000..28f3fda950999a9c964a3608042ca605
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
|
||||
index 4034fcb9abc39b12f0de47c4b679f2ef82353c89..6fa219aef009f8dfb8a2b1e5ee0603b18cf3d0f5 100644
|
||||
index a42f1d53340e4073038d46b7fabf5d44248d5b32..dbc22807a33606f8fe326cc2f5f755fee5edc7aa 100644
|
||||
--- a/src/main/java/org/bukkit/NamespacedKey.java
|
||||
+++ b/src/main/java/org/bukkit/NamespacedKey.java
|
||||
@@ -19,7 +19,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -18,7 +18,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* underscores, hyphens, and forward slashes.
|
||||
*
|
||||
*/
|
||||
@@ -211,7 +211,7 @@ index 4034fcb9abc39b12f0de47c4b679f2ef82353c89..6fa219aef009f8dfb8a2b1e5ee0603b1
|
||||
|
||||
/**
|
||||
* The namespace representing all inbuilt keys.
|
||||
@@ -119,11 +119,13 @@ public final class NamespacedKey implements net.kyori.adventure.key.Key { // Pap
|
||||
@@ -118,11 +118,13 @@ public final class NamespacedKey implements net.kyori.adventure.key.Key { // Pap
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -226,10 +226,10 @@ index 4034fcb9abc39b12f0de47c4b679f2ef82353c89..6fa219aef009f8dfb8a2b1e5ee0603b1
|
||||
return key;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
index 9d40e6a5ce7adc377934cfc5ce663b5d9cb2e4dc..46ac120ed51274a2084719387e35e517981bbf4b 100644
|
||||
index f78714c2a6d9da162c9802552984cbfad76ff728..55e9dc5d1d87fbc9d0dabbb7bd59584fe2c5f379 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
@@ -445,4 +445,87 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -444,4 +444,87 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@SuppressWarnings("javadoc")
|
||||
@NotNull
|
||||
ItemMeta clone();
|
||||
|
||||
@@ -37,10 +37,10 @@ index ac3b24c5c99eeb1435d785efade728dd40947da5..dbdf3dbe9517b09a7965cf9d65cae1ed
|
||||
@Override
|
||||
public FurnaceInventory getInventory();
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java b/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java
|
||||
index 0808e7aeffb69160913344de5b5e21d5e857f1d6..d386ab5dd46cc6706ace61fe6b646713ffd50cb7 100644
|
||||
index 1440c6115520d692faf75455df35b92aa8734491..1e55f50f04de78ae0b8832a8021ffc7327676e8e 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java
|
||||
@@ -18,10 +18,17 @@ public class FurnaceStartSmeltEvent extends InventoryBlockStartEvent {
|
||||
@@ -15,10 +15,17 @@ public class FurnaceStartSmeltEvent extends InventoryBlockStartEvent {
|
||||
private final CookingRecipe<?> recipe;
|
||||
private int totalCookTime;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Material API additions
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 7ed67f356cf0ef8b3252256dcd4185f18573c989..d56d899ca7737b537ea55c13a384888a873f5da3 100644
|
||||
index f52c0e25e75e890046339d605c0abf79d82864f2..64d01ce77966e895ec494719a4398577be1097a1 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -118,6 +118,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -16,7 +16,7 @@ index 7ed67f356cf0ef8b3252256dcd4185f18573c989..d56d899ca7737b537ea55c13a384888a
|
||||
public enum Material implements Keyed, Translatable {
|
||||
//<editor-fold desc="Materials" defaultstate="collapsed">
|
||||
AIR(9648, 0),
|
||||
@@ -4438,6 +4439,22 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -4435,6 +4436,22 @@ public enum Material implements Keyed, Translatable {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,8 +7,7 @@ This adds a bunch of useful and missing Tags to be able to identify items that
|
||||
are related to each other by a trait.
|
||||
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Co-authored-by: Lena Kolb <lenakolb2204@gmail.com>
|
||||
Co-authored-by: Layla Silbernberg <livsilbernberg@gmail.com>
|
||||
Co-authored by: Lena Kolb <lenakolb2204@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/MaterialSetTag.java b/src/main/java/com/destroystokyo/paper/MaterialSetTag.java
|
||||
new file mode 100644
|
||||
@@ -115,10 +114,10 @@ index 0000000000000000000000000000000000000000..a02a02aa0c87e0f0ed9e509e4dcab015
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/MaterialTags.java b/src/main/java/com/destroystokyo/paper/MaterialTags.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..f59151cec84fc0e300a8d759c6d74a804cbd047f
|
||||
index 0000000000000000000000000000000000000000..0b92f3279fe5dcbea77b22803447b7ad21ef999f
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/MaterialTags.java
|
||||
@@ -0,0 +1,708 @@
|
||||
@@ -0,0 +1,704 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2018 Daniel Ennis (Aikar) MIT License
|
||||
+ *
|
||||
@@ -683,12 +682,8 @@ index 0000000000000000000000000000000000000000..f59151cec84fc0e300a8d759c6d74a80
|
||||
+ */
|
||||
+ public static final MaterialSetTag ENCHANTABLE = new MaterialSetTag(keyFor("enchantable"))
|
||||
+ .add(PICKAXES, SWORDS, SHOVELS, AXES, HOES, HELMETS, CHEST_EQUIPPABLE, LEGGINGS, BOOTS, BOWS)
|
||||
+ .add(Material.TRIDENT, Material.SHIELD, Material.FISHING_ROD, Material.SHEARS,
|
||||
+ Material.FLINT_AND_STEEL, Material.CARROT_ON_A_STICK, Material.WARPED_FUNGUS_ON_A_STICK,
|
||||
+ Material.BRUSH, Material.CARVED_PUMPKIN, Material.COMPASS, Material.SKELETON_SKULL,
|
||||
+ Material.WITHER_SKELETON_SKULL, Material.PLAYER_HEAD, Material.ZOMBIE_HEAD,
|
||||
+ Material.CREEPER_HEAD, Material.DRAGON_HEAD, Material.PIGLIN_HEAD)
|
||||
+ .ensureSize("ENCHANTABLE", 75).lock();
|
||||
+ .add(Material.TRIDENT, Material.SHIELD, Material.FISHING_ROD, Material.SHEARS, Material.FLINT_AND_STEEL, Material.CARROT_ON_A_STICK, Material.WARPED_FUNGUS_ON_A_STICK)
|
||||
+ .ensureSize("ENCHANTABLE", 65).lock();
|
||||
+
|
||||
+ /**
|
||||
+ * Covers the variants of raw ores.
|
||||
@@ -1064,7 +1059,7 @@ index 0000000000000000000000000000000000000000..c89c4619aaf388197834d98eb95af2f1
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/tag/EntityTags.java b/src/main/java/io/papermc/paper/tag/EntityTags.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..5376e51adf5af15572b0d760b17f2de6d3f24a9b
|
||||
index 0000000000000000000000000000000000000000..d7eb49a05c3f0cacf285f8995433c5d5e988de0f
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/tag/EntityTags.java
|
||||
@@ -0,0 +1,54 @@
|
||||
@@ -1087,7 +1082,7 @@ index 0000000000000000000000000000000000000000..5376e51adf5af15572b0d760b17f2de6
|
||||
+
|
||||
+ /**
|
||||
+ * Covers undead mobs
|
||||
+ * @see <a href="https://minecraft.wiki/wiki/Mob#Undead_mobs">https://minecraft.wiki/wiki/Mob#Undead_mobs</a>
|
||||
+ * @see <a href="https://minecraft.gamepedia.com/Mob#Undead_mobs">https://minecraft.gamepedia.com/Mob#Undead_mobs</a>
|
||||
+ */
|
||||
+ public static final EntitySetTag UNDEADS = new EntitySetTag(keyFor("undeads"))
|
||||
+ .add(DROWNED, HUSK, PHANTOM, SKELETON, SKELETON_HORSE, STRAY, WITHER, WITHER_SKELETON, ZOGLIN, ZOMBIE, ZOMBIE_HORSE, ZOMBIE_VILLAGER, ZOMBIFIED_PIGLIN)
|
||||
@@ -1116,14 +1111,14 @@ index 0000000000000000000000000000000000000000..5376e51adf5af15572b0d760b17f2de6
|
||||
+
|
||||
+ /**
|
||||
+ * Covers all water based mobs
|
||||
+ * @see <a href="https://minecraft.wiki/wiki/Mob#Aquatic_mobs">https://minecraft.wiki/wiki/Mob#Aquatic_mobs</a>
|
||||
+ * @see <a href="https://minecraft.gamepedia.com/Mob#Water-based_mobs">https://minecraft.gamepedia.com/Mob#Water-based_mobs</a>
|
||||
+ */
|
||||
+ public static final EntitySetTag WATER_BASED = new EntitySetTag(keyFor("water_based"))
|
||||
+ .add(AXOLOTL, DOLPHIN, SQUID, GLOW_SQUID, GUARDIAN, ELDER_GUARDIAN, TURTLE, COD, SALMON, PUFFERFISH, TROPICAL_FISH)
|
||||
+ .ensureSize("WATER_BASED", 11).lock();
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Tag.java b/src/main/java/org/bukkit/Tag.java
|
||||
index 02f75db7ac55f792e84a08138e89657a3e226ff5..69462a0679c255acee2adb84f590523d3fc3c9aa 100644
|
||||
index 1504dca4ec3e8d21189b7534bb009521799ffdf7..82d34e9aae42dfafd900dc0e610bf1dc82a5a6f3 100644
|
||||
--- a/src/main/java/org/bukkit/Tag.java
|
||||
+++ b/src/main/java/org/bukkit/Tag.java
|
||||
@@ -11,6 +11,10 @@ import org.jetbrains.annotations.NotNull;
|
||||
@@ -1139,10 +1134,10 @@ index 02f75db7ac55f792e84a08138e89657a3e226ff5..69462a0679c255acee2adb84f590523d
|
||||
public interface Tag<T extends Keyed> extends Keyed {
|
||||
diff --git a/src/test/java/com/destroystokyo/paper/MaterialTagsTest.java b/src/test/java/com/destroystokyo/paper/MaterialTagsTest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..82ee9a486d1c3deec6e529b1cb12ecc2c6a5862e
|
||||
index 0000000000000000000000000000000000000000..e541f29e983d8dcaca91de9ee1459d587226b4c3
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/com/destroystokyo/paper/MaterialTagsTest.java
|
||||
@@ -0,0 +1,58 @@
|
||||
@@ -0,0 +1,65 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2018 Daniel Ennis (Aikar) MIT License
|
||||
+ */
|
||||
@@ -1151,18 +1146,25 @@ index 0000000000000000000000000000000000000000..82ee9a486d1c3deec6e529b1cb12ecc2
|
||||
+
|
||||
+import io.papermc.paper.tag.BaseTag;
|
||||
+import io.papermc.paper.tag.EntityTags;
|
||||
+import io.papermc.paper.testing.TestServer;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.junit.Before;
|
||||
+import org.junit.Test;
|
||||
+
|
||||
+import java.lang.reflect.Field;
|
||||
+import java.lang.reflect.Modifier;
|
||||
+import java.util.HashSet;
|
||||
+import java.util.Set;
|
||||
+import java.util.logging.Level;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.bukkit.support.AbstractTestingBase;
|
||||
+import org.junit.jupiter.api.Test;
|
||||
+
|
||||
+import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
+import static org.junit.Assert.assertTrue;
|
||||
+
|
||||
+public class MaterialTagsTest extends AbstractTestingBase {
|
||||
+public class MaterialTagsTest {
|
||||
+
|
||||
+ @Before
|
||||
+ public void before() {
|
||||
+ TestServer.setup();
|
||||
+ }
|
||||
+
|
||||
+ @Test
|
||||
+ public void testInitialize() {
|
||||
@@ -1183,7 +1185,7 @@ index 0000000000000000000000000000000000000000..82ee9a486d1c3deec6e529b1cb12ecc2
|
||||
+
|
||||
+ private static void testLocked(Class<?> clazz) {
|
||||
+ for (BaseTag<?, ?> tag : collectTags(clazz)) {
|
||||
+ assertTrue(tag.isLocked(), "Tag " + tag.key() + " is not locked");
|
||||
+ assertTrue("Tag " + tag.key() + " is not locked", tag.isLocked());
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
@@ -1203,23 +1205,24 @@ index 0000000000000000000000000000000000000000..82ee9a486d1c3deec6e529b1cb12ecc2
|
||||
+}
|
||||
diff --git a/src/test/java/io/papermc/paper/EntityTagsTest.java b/src/test/java/io/papermc/paper/EntityTagsTest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..91d70cc703192b5a3a48211ee0dadd2e4260ec00
|
||||
index 0000000000000000000000000000000000000000..3caf03d8e50cd2180e9aac2dddeaa3afd0bf7438
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/EntityTagsTest.java
|
||||
@@ -0,0 +1,21 @@
|
||||
@@ -0,0 +1,22 @@
|
||||
+package io.papermc.paper;
|
||||
+
|
||||
+import io.papermc.paper.tag.EntityTags;
|
||||
+import io.papermc.paper.testing.TestServer;
|
||||
+import java.util.logging.Level;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.bukkit.support.AbstractTestingBase;
|
||||
+import org.junit.jupiter.api.Test;
|
||||
+import org.junit.Test;
|
||||
+
|
||||
+public class EntityTagsTest extends AbstractTestingBase {
|
||||
+public class EntityTagsTest {
|
||||
+
|
||||
+ @Test
|
||||
+ public void testInitialize() {
|
||||
+ try {
|
||||
+ TestServer.setup();
|
||||
+ EntityTags.HORSES.getValues();
|
||||
+ assert true;
|
||||
+ } catch (Throwable e) {
|
||||
|
||||
@@ -51,7 +51,7 @@ index 0000000000000000000000000000000000000000..af8765b213390cf75fe02a6eb68aecf7
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 8a18f269ee1767d57367160cb0e3513a4e2969fb..79fdb183887cb8153254f6ac84a981a7ffcb561c 100644
|
||||
index 8cccec99cdb028e86b71b3984f4f94201fd9a390..94fad96f8fd57314c571b6396f44cd9d91254cfc 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -173,6 +173,77 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add sun related API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index fc6b99e4f37179b15254bf0b398b1a800de1b73f..df511007ca4b3b5df04abfa6b7f1c4de636407fc 100644
|
||||
index 67d14468703e0445afccdbd8de8028fb21b90d2d..c6019065869130608ac97af951c7036031eec242 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1782,6 +1782,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -1781,6 +1781,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
*/
|
||||
public void setFullTime(long time);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Make the default permission message configurable
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 67dc67343fc149c21ae234a338f08e2f1fa13867..3ad64a11c1e67cce5e49c34d389888060bf2a962 100644
|
||||
index 627c04f5e71ad032760296092a65596b08807a55..213b76f4ba50e882b6c7349d980701e0b6323e7c 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2268,6 +2268,28 @@ public final class Bukkit {
|
||||
@@ -38,7 +38,7 @@ index 67dc67343fc149c21ae234a338f08e2f1fa13867..3ad64a11c1e67cce5e49c34d38988806
|
||||
* Creates a PlayerProfile for the specified uuid, with name as null.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index dfbccef8dd67195d588112989a9ffecb712a9fe9..3c09a5e08c2641502b7171f27d28d92d02ed39d0 100644
|
||||
index 88b93ac279f2bd23ca853788c409549fe2afe041..281c1e511e46a31a1c3ee9380d60888628af87c3 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1974,6 +1974,23 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
||||
@@ -18,10 +18,10 @@ index 1d061412cdafa28c6940c7433747ab1dabe23de1..6fda7f3aa68e76af64362e9afed70fc6
|
||||
|
||||
@Override
|
||||
diff --git a/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java b/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java
|
||||
index 144ae2f31badb8142bc4a76a7abab37a57118191..8ffaa33d97c045c0fd6851ec2f189344b4a070d2 100644
|
||||
index dce3d619a6f1791197e44277c2dee9eaf19ff56f..7e2335ed8acc692af1e70eddcf97ee7a56e30f68 100644
|
||||
--- a/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java
|
||||
+++ b/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java
|
||||
@@ -26,8 +26,8 @@ public class StandardMessengerTest {
|
||||
@@ -25,8 +25,8 @@ public class StandardMessengerTest {
|
||||
assertTrue(messenger.isReservedChannel("minecraft:register"));
|
||||
assertFalse(messenger.isReservedChannel("test:register"));
|
||||
assertTrue(messenger.isReservedChannel("minecraft:unregister"));
|
||||
|
||||
@@ -12,10 +12,10 @@ or DEFAULT since data was not stored.
|
||||
Co-authored-by: Aurora <aurora@relanet.eu>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 711d95bfafac0d415895023bdaac4059395667ab..20a83a2fa9f3d65837fffb027b1f8f1e76957770 100644
|
||||
index 9eca441d6702752938813a1c97724edf13134171..9d3c3dedb4f71b9fc35cb5da6e38c77c7c673ad6 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -795,5 +795,11 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -781,5 +781,11 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
// TODO remove impl here
|
||||
return getLocation().getChunk();
|
||||
}
|
||||
|
||||
@@ -90,10 +90,10 @@ index 8508aa2c6fb7c9f41f3d185f5228c86dd3b8b627..f7564581c18425c903e54f949728dd37
|
||||
if (this.world == null) {
|
||||
return null;
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index d56d899ca7737b537ea55c13a384888a873f5da3..cbec3b145a44ceee20823ae0e9c8162b15726189 100644
|
||||
index 64d01ce77966e895ec494719a4398577be1097a1..7705fece7f58bd66f7d68da85f8f34e43b4bae12 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -4468,11 +4468,11 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -4465,11 +4465,11 @@ public enum Material implements Keyed, Translatable {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -107,7 +107,7 @@ index d56d899ca7737b537ea55c13a384888a873f5da3..cbec3b145a44ceee20823ae0e9c8162b
|
||||
public boolean isLegacy() {
|
||||
return legacy;
|
||||
}
|
||||
@@ -4543,8 +4543,10 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -4540,8 +4540,10 @@ public enum Material implements Keyed, Translatable {
|
||||
* Gets the MaterialData class associated with this Material
|
||||
*
|
||||
* @return MaterialData associated with this Material
|
||||
@@ -119,10 +119,10 @@ index d56d899ca7737b537ea55c13a384888a873f5da3..cbec3b145a44ceee20823ae0e9c8162b
|
||||
Preconditions.checkArgument(legacy, "Cannot get data class of Modern Material");
|
||||
return ctor.getDeclaringClass();
|
||||
diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
|
||||
index 6fa219aef009f8dfb8a2b1e5ee0603b18cf3d0f5..8ac72cb0b05e2c493d98310f2e87c3714d15c5e3 100644
|
||||
index dbc22807a33606f8fe326cc2f5f755fee5edc7aa..1416918d1924b362a688635823484f16e6adf125 100644
|
||||
--- a/src/main/java/org/bukkit/NamespacedKey.java
|
||||
+++ b/src/main/java/org/bukkit/NamespacedKey.java
|
||||
@@ -74,12 +74,14 @@ public final class NamespacedKey implements net.kyori.adventure.key.Key, com.des
|
||||
@@ -73,12 +73,14 @@ public final class NamespacedKey implements net.kyori.adventure.key.Key, com.des
|
||||
|
||||
/**
|
||||
* Create a key in a specific namespace.
|
||||
@@ -132,10 +132,10 @@ index 6fa219aef009f8dfb8a2b1e5ee0603b18cf3d0f5..8ac72cb0b05e2c493d98310f2e87c371
|
||||
*
|
||||
* @param namespace namespace
|
||||
* @param key key
|
||||
- * @apiNote should never be used by plugins, for internal use only!!
|
||||
- * @deprecated should never be used by plugins, for internal use only!!
|
||||
+ * @see #NamespacedKey(Plugin, String)
|
||||
*/
|
||||
- @ApiStatus.Internal
|
||||
- @Deprecated
|
||||
public NamespacedKey(@NotNull String namespace, @NotNull String key) {
|
||||
Preconditions.checkArgument(namespace != null && isValidNamespace(namespace), "Invalid namespace. Must be [a-z0-9._-]: %s", namespace);
|
||||
Preconditions.checkArgument(key != null && isValidKey(key), "Invalid key. Must be [a-z0-9/._-]: %s", key);
|
||||
@@ -155,47 +155,11 @@ index f43209cf7b752c26718c303ca8c3e1c7d9912ad3..f0094e6fb05e526736629ad3181c8d2c
|
||||
public enum NetherWartsState {
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java
|
||||
index 81bd12c8addcee754c71e5e030c729c7e096fb4c..6992600d6cff9ed0a30d37ac4dc5dc0e56ecb2c7 100644
|
||||
--- a/src/main/java/org/bukkit/Particle.java
|
||||
+++ b/src/main/java/org/bukkit/Particle.java
|
||||
@@ -54,7 +54,9 @@ public enum Particle implements Keyed {
|
||||
BLOCK_CRACK("block", BlockData.class),
|
||||
/**
|
||||
* Uses {@link BlockData} as DataType
|
||||
+ * @deprecated use {@link #BLOCK_CRACK}
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
BLOCK_DUST("block", BlockData.class, false),
|
||||
WATER_DROP("rain"),
|
||||
MOB_APPEARANCE("elder_guardian"),
|
||||
@@ -138,15 +140,21 @@ public enum Particle implements Keyed {
|
||||
// ----- Legacy Separator -----
|
||||
/**
|
||||
* Uses {@link MaterialData} as DataType
|
||||
+ * @deprecated {@link MaterialData} is deprecated API
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
LEGACY_BLOCK_CRACK(null, MaterialData.class, false),
|
||||
/**
|
||||
* Uses {@link MaterialData} as DataType
|
||||
+ * @deprecated {@link MaterialData} is deprecated API
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
LEGACY_BLOCK_DUST(null, MaterialData.class, false),
|
||||
/**
|
||||
* Uses {@link MaterialData} as DataType
|
||||
+ * @deprecated {@link MaterialData} is deprecated API
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
LEGACY_FALLING_DUST(null, MaterialData.class, false);
|
||||
|
||||
private final NamespacedKey key;
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index c373614a865d6df8a2fe265497cf0b5f074490b0..8e0f985e8a6af728376a85eef998f7881e50786c 100644
|
||||
index 6e5e5fecdd7b76dde2e1524fe7b5faa837f491fb..09e3c2872462da546b891cbc396aaffb77f6aadf 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -197,14 +197,14 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -157,14 +157,14 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see TrimMaterial
|
||||
*/
|
||||
@@ -212,7 +176,7 @@ index c373614a865d6df8a2fe265497cf0b5f074490b0..8e0f985e8a6af728376a85eef998f788
|
||||
Registry<TrimPattern> TRIM_PATTERN = Bukkit.getRegistry(TrimPattern.class);
|
||||
/**
|
||||
* Villager profession.
|
||||
@@ -286,8 +286,11 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -246,8 +246,11 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @param input non-null input
|
||||
* @return registered object or null if does not exist
|
||||
@@ -318,10 +282,10 @@ index e455eb21abf121dc6ff10ff8a13dd06f67096a8f..bbc01e7c192ae6689c301670047ff114
|
||||
return origin;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index df511007ca4b3b5df04abfa6b7f1c4de636407fc..dea26b0bd6e1dccb7b043a7395e7958461e270ee 100644
|
||||
index c6019065869130608ac97af951c7036031eec242..31fc272b0e82e4eef6d9bf01dd25d39513d354b3 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -416,9 +416,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -415,9 +415,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
* @param z Z-coordinate of the chunk
|
||||
* @return Whether the chunk was actually refreshed
|
||||
*
|
||||
@@ -332,71 +296,22 @@ index df511007ca4b3b5df04abfa6b7f1c4de636407fc..dea26b0bd6e1dccb7b043a7395e79584
|
||||
public boolean refreshChunk(int x, int z);
|
||||
|
||||
/**
|
||||
@@ -3708,6 +3707,10 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
// Paper end - view distance api
|
||||
|
||||
// Spigot start
|
||||
+ /**
|
||||
+ * @deprecated Unsupported api
|
||||
+ */
|
||||
+ @Deprecated // Paper
|
||||
public class Spigot {
|
||||
|
||||
/**
|
||||
@@ -3716,8 +3719,12 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
* @param loc The location to strike lightning
|
||||
* @param isSilent Whether this strike makes no sound
|
||||
* @return The lightning entity.
|
||||
+ * @deprecated The lightning strike sound has been moved into the client and
|
||||
+ * this doesn't prevent the sound being played. Use the regular (non spigot) methods instead
|
||||
+ * for a consistent behavior.
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
public LightningStrike strikeLightning(@NotNull Location loc, boolean isSilent) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -3728,14 +3735,22 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
* @param loc The location to strike lightning
|
||||
* @param isSilent Whether this strike makes no sound
|
||||
* @return The lightning entity.
|
||||
+ * @deprecated The lightning strike sound has been moved into the client and
|
||||
+ * this doesn't prevent the sound being played. Use the regular (non spigot) methods instead
|
||||
+ * for a consistent behavior.
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
public LightningStrike strikeLightningEffect(@NotNull Location loc, boolean isSilent) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * @deprecated Unsupported api
|
||||
+ */
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||
index 78f6cc1a8a8de05aec6f551f8a5f425944f0ffa3..653a83b7ceb5cec1d92aed5250ae50e714fe5f9f 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -517,7 +517,7 @@ public interface Block extends Metadatable, Translatable {
|
||||
* @return a list of dropped items for this type of block
|
||||
@@ -2130,8 +2129,10 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
* @return The spawned {@link FallingBlock} instance
|
||||
* @throws IllegalArgumentException if {@link Location} or {@link
|
||||
* MaterialData} are null or {@link Material} of the {@link MaterialData} is not a block
|
||||
+ * @deprecated use {@link #spawnFallingBlock(Location, BlockData)}
|
||||
*/
|
||||
@NotNull
|
||||
- Collection<ItemStack> getDrops(@NotNull ItemStack tool, @Nullable Entity entity);
|
||||
+ Collection<ItemStack> getDrops(@Nullable ItemStack tool, @Nullable Entity entity); // Paper
|
||||
+ @Deprecated // Paper
|
||||
public FallingBlock spawnFallingBlock(@NotNull Location location, @NotNull MaterialData data) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Returns if the given item is a preferred choice to break this Block.
|
||||
diff --git a/src/main/java/org/bukkit/block/BlockState.java b/src/main/java/org/bukkit/block/BlockState.java
|
||||
index 7c5438fa92053cdbd7a01483a9baa4d48df07b24..a4f0a5270693e1c4af4fad827fa0a2ce753e07b5 100644
|
||||
index 631cbf2be51040eee00aa39a39c5ec4003f91843..3147e278eac674ed21d714bbe318b135c0a6b408 100644
|
||||
--- a/src/main/java/org/bukkit/block/BlockState.java
|
||||
+++ b/src/main/java/org/bukkit/block/BlockState.java
|
||||
@@ -36,8 +36,10 @@ public interface BlockState extends Metadatable {
|
||||
@@ -35,8 +35,10 @@ public interface BlockState extends Metadatable {
|
||||
* Gets the metadata for this block state.
|
||||
*
|
||||
* @return block specific metadata
|
||||
@@ -407,7 +322,7 @@ index 7c5438fa92053cdbd7a01483a9baa4d48df07b24..a4f0a5270693e1c4af4fad827fa0a2ce
|
||||
MaterialData getData();
|
||||
|
||||
/**
|
||||
@@ -141,7 +143,9 @@ public interface BlockState extends Metadatable {
|
||||
@@ -131,7 +133,9 @@ public interface BlockState extends Metadatable {
|
||||
* Sets the metadata for this block state.
|
||||
*
|
||||
* @param data New block specific metadata
|
||||
@@ -454,43 +369,6 @@ index 605af1a9fc48602643aec57dd14e8c4ab657a0bc..b3085c7ff8b3e96083d209f6612c0065
|
||||
public void setCarriedMaterial(@NotNull MaterialData material);
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/LightningStrike.java b/src/main/java/org/bukkit/entity/LightningStrike.java
|
||||
index c49628f2638da68e1ec126e53c8b7c74b0d81b22..8dc433baba7060df5cfe6fc10210a5a27287987d 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LightningStrike.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LightningStrike.java
|
||||
@@ -84,20 +84,31 @@ public interface LightningStrike extends Entity {
|
||||
public void setCausingPlayer(@Nullable Player player);
|
||||
|
||||
// Spigot start
|
||||
+ /**
|
||||
+ * @deprecated Unsupported api
|
||||
+ */
|
||||
+ @Deprecated // Paper
|
||||
public class Spigot extends Entity.Spigot {
|
||||
|
||||
- /*
|
||||
+ /**
|
||||
* Returns whether the strike is silent.
|
||||
*
|
||||
* @return whether the strike is silent.
|
||||
+ * @deprecated The lightning strike sound has been moved into the client and
|
||||
+ * this can't predict if the sound will be played or not accurately.
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
public boolean isSilent() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * @deprecated Unsupported api
|
||||
+ */
|
||||
@NotNull
|
||||
@Override
|
||||
+ @Deprecated // Paper
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/LingeringPotion.java b/src/main/java/org/bukkit/entity/LingeringPotion.java
|
||||
index f124b35ec76e6cb6a1a0dc464005087043c3efd0..f50aaddf8582be55fd4860ad374d8f2206991897 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LingeringPotion.java
|
||||
@@ -545,24 +423,26 @@ index 95c79c5fa0c4e30201f887da6467ce5f81c8a255..7f9c4d4b430a3f0276461346ff2621ba
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Projectile.java b/src/main/java/org/bukkit/entity/Projectile.java
|
||||
index 906b33b7569fff5dd78258f9765e879180a52834..06e3ad9cd8f39de0ef6ead794df1492415bc4302 100644
|
||||
index c854860c13912f9a8707eb825cca23763d1323a6..a523fca4baab447181ef91df67fa69b24e010149 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Projectile.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Projectile.java
|
||||
@@ -29,7 +29,7 @@ public interface Projectile extends Entity {
|
||||
@@ -29,7 +29,9 @@ public interface Projectile extends Entity {
|
||||
* If a small fireball does not bounce it will set the target on fire.
|
||||
*
|
||||
* @return true if it should bounce.
|
||||
* @deprecated does not do anything
|
||||
+ * @deprecated Does not do anything
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @Deprecated(forRemoval = true)
|
||||
+ @Deprecated(forRemoval = true) // Paper
|
||||
public boolean doesBounce();
|
||||
|
||||
/**
|
||||
@@ -39,6 +39,6 @@ public interface Projectile extends Entity {
|
||||
@@ -37,6 +39,8 @@ public interface Projectile extends Entity {
|
||||
* something.
|
||||
*
|
||||
* @param doesBounce whether or not it should bounce.
|
||||
* @deprecated does not do anything
|
||||
+ * @deprecated Does not do anything
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @Deprecated(forRemoval = true)
|
||||
+ @Deprecated(forRemoval = true) // Paper
|
||||
public void setBounce(boolean doesBounce);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/SplashPotion.java b/src/main/java/org/bukkit/entity/SplashPotion.java
|
||||
@@ -611,19 +491,6 @@ index e9a6e5be5f33a342f7e5c496f0f1c64b2f302ace..f0db59a556deaefefbdaca121585c0fd
|
||||
return offers;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityTargetLivingEntityEvent.java b/src/main/java/org/bukkit/event/entity/EntityTargetLivingEntityEvent.java
|
||||
index 090ec6f96ca9b7f760389994da988c44c32b9976..e6b4d4c1722bf4a11744a421d09646b22745b138 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityTargetLivingEntityEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityTargetLivingEntityEvent.java
|
||||
@@ -10,7 +10,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* LivingEntity's.
|
||||
*/
|
||||
public class EntityTargetLivingEntityEvent extends EntityTargetEvent {
|
||||
- public EntityTargetLivingEntityEvent(@NotNull final Entity entity, @Nullable final LivingEntity target, @Nullable final TargetReason reason) {
|
||||
+ public EntityTargetLivingEntityEvent(@NotNull final Entity entity, @Nullable final LivingEntity target, @NotNull final TargetReason reason) { // Paper
|
||||
super(entity, target, reason);
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityToggleSwimEvent.java b/src/main/java/org/bukkit/event/entity/EntityToggleSwimEvent.java
|
||||
index e1123295b9511a2c610a1baf7195638f7f3e64c4..273ae8e5da0a858d3b82d1b0f5992318ff49f145 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityToggleSwimEvent.java
|
||||
@@ -643,149 +510,6 @@ index e1123295b9511a2c610a1baf7195638f7f3e64c4..273ae8e5da0a858d3b82d1b0f5992318
|
||||
@Override
|
||||
public void setCancelled(boolean cancel) {
|
||||
this.cancel = cancel;
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java b/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java
|
||||
index 775e3223aa5054f1883403e50c8f2241d97b1285..5d4817d2a3b709f1a1a1162309a1c923bd09cc1d 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java
|
||||
@@ -19,22 +19,27 @@ public class ProjectileHitEvent extends EntityEvent implements Cancellable {
|
||||
private final BlockFace hitFace;
|
||||
private boolean cancel = false;
|
||||
|
||||
+ @Deprecated @io.papermc.paper.annotation.DoNotUse // Paper
|
||||
public ProjectileHitEvent(@NotNull final Projectile projectile) {
|
||||
- this(projectile, null, null);
|
||||
+ this(projectile, null, null, null); // Paper
|
||||
}
|
||||
|
||||
+ @Deprecated @io.papermc.paper.annotation.DoNotUse // Paper
|
||||
public ProjectileHitEvent(@NotNull final Projectile projectile, @Nullable Entity hitEntity) {
|
||||
- this(projectile, hitEntity, null);
|
||||
+ this(projectile, hitEntity, null, null); // Paper
|
||||
}
|
||||
|
||||
+ @Deprecated @io.papermc.paper.annotation.DoNotUse // Paper
|
||||
public ProjectileHitEvent(@NotNull final Projectile projectile, @Nullable Block hitBlock) {
|
||||
- this(projectile, null, hitBlock);
|
||||
+ this(projectile, null, hitBlock, null); // Paper
|
||||
}
|
||||
|
||||
+ @Deprecated @io.papermc.paper.annotation.DoNotUse // Paper
|
||||
public ProjectileHitEvent(@NotNull final Projectile projectile, @Nullable Entity hitEntity, @Nullable Block hitBlock) {
|
||||
this(projectile, hitEntity, hitBlock, null);
|
||||
}
|
||||
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public ProjectileHitEvent(@NotNull final Projectile projectile, @Nullable Entity hitEntity, @Nullable Block hitBlock, @Nullable BlockFace hitFace) {
|
||||
super(projectile);
|
||||
this.hitEntity = hitEntity;
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/SpawnerSpawnEvent.java b/src/main/java/org/bukkit/event/entity/SpawnerSpawnEvent.java
|
||||
index 9353f0d09272404f42167ab8b7ad83a03620c436..f3ec8f67328b266defb31a44a36d31401d5e9371 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/SpawnerSpawnEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/SpawnerSpawnEvent.java
|
||||
@@ -12,12 +12,19 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class SpawnerSpawnEvent extends EntitySpawnEvent {
|
||||
private final CreatureSpawner spawner;
|
||||
|
||||
- public SpawnerSpawnEvent(@NotNull final Entity spawnee, @NotNull final CreatureSpawner spawner) {
|
||||
+ public SpawnerSpawnEvent(@NotNull final Entity spawnee, @org.jetbrains.annotations.Nullable final CreatureSpawner spawner) { // Paper
|
||||
super(spawnee);
|
||||
this.spawner = spawner;
|
||||
}
|
||||
|
||||
- @NotNull
|
||||
+ /**
|
||||
+ * Gets the spawner tile state, or null
|
||||
+ * when the entity is spawned from a minecart
|
||||
+ * spawner.
|
||||
+ *
|
||||
+ * @return the spawner tile state
|
||||
+ */
|
||||
+ @org.jetbrains.annotations.Nullable // Paper
|
||||
public CreatureSpawner getSpawner() {
|
||||
return spawner;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/event/hanging/HangingBreakByEntityEvent.java b/src/main/java/org/bukkit/event/hanging/HangingBreakByEntityEvent.java
|
||||
index 68517811f63838bdad41073ee26be82f95042a8e..454885e47611edd707358ddfe0a01b7acf9ad5c8 100644
|
||||
--- a/src/main/java/org/bukkit/event/hanging/HangingBreakByEntityEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/hanging/HangingBreakByEntityEvent.java
|
||||
@@ -11,22 +11,21 @@ import org.jetbrains.annotations.Nullable;
|
||||
public class HangingBreakByEntityEvent extends HangingBreakEvent {
|
||||
private final Entity remover;
|
||||
|
||||
- public HangingBreakByEntityEvent(@NotNull final Hanging hanging, @Nullable final Entity remover) {
|
||||
+ public HangingBreakByEntityEvent(@NotNull final Hanging hanging, @NotNull final Entity remover) { // Paper
|
||||
this(hanging, remover, HangingBreakEvent.RemoveCause.ENTITY);
|
||||
}
|
||||
|
||||
- public HangingBreakByEntityEvent(@NotNull final Hanging hanging, @Nullable final Entity remover, @NotNull final HangingBreakEvent.RemoveCause cause) {
|
||||
+ public HangingBreakByEntityEvent(@NotNull final Hanging hanging, @NotNull final Entity remover, @NotNull final HangingBreakEvent.RemoveCause cause) { // Paper
|
||||
super(hanging, cause);
|
||||
this.remover = remover;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the entity that removed the hanging entity.
|
||||
- * May be null, for example when broken by an explosion.
|
||||
*
|
||||
* @return the entity that removed the hanging entity
|
||||
*/
|
||||
- @Nullable
|
||||
+ @NotNull // Paper
|
||||
public Entity getRemover() {
|
||||
return remover;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/HopperInventorySearchEvent.java b/src/main/java/org/bukkit/event/inventory/HopperInventorySearchEvent.java
|
||||
index 80a0a4ad813d6453b30273d25942e6612bb05c1b..18bb808e73c7a78f367ccdb44d5fe12bc54672cb 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/HopperInventorySearchEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/HopperInventorySearchEvent.java
|
||||
@@ -34,7 +34,7 @@ public class HopperInventorySearchEvent extends BlockEvent {
|
||||
DESTINATION;
|
||||
}
|
||||
|
||||
- public HopperInventorySearchEvent(@NotNull Inventory inventory, @NotNull ContainerType containerType, @NotNull Block hopper, @NotNull Block searchBlock) {
|
||||
+ public HopperInventorySearchEvent(@Nullable Inventory inventory, @NotNull ContainerType containerType, @NotNull Block hopper, @NotNull Block searchBlock) { // Paper
|
||||
super(hopper);
|
||||
this.inventory = inventory;
|
||||
this.containerType = containerType;
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java b/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java
|
||||
index fe58058f9b5d29388d48115cc81dc48ab08c58c1..ac67a4e321f43d1ede09dafe2daa1f07de8a923f 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java
|
||||
@@ -85,7 +85,7 @@ public class InventoryClickEvent extends InventoryInteractEvent {
|
||||
*
|
||||
* @return the cursor ItemStack
|
||||
*/
|
||||
- @Nullable
|
||||
+ @NotNull // Paper - fix nullability
|
||||
public ItemStack getCursor() {
|
||||
return getView().getCursor();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java b/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java
|
||||
index 1cb70b5c8776863f44f1c4cdde152c35cb51edb5..f09b378508fcc6299e7cb40f174028f6f88ba067 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java
|
||||
@@ -43,7 +43,10 @@ public class PlayerBedLeaveEvent extends PlayerEvent implements Cancellable {
|
||||
* {@link Player#setBedSpawnLocation(Location)}.
|
||||
*
|
||||
* @return true if the spawn location will be changed
|
||||
+ * @deprecated the respawn point is now set when the player enter the bed and
|
||||
+ * this option doesn't work since MC 1.15.
|
||||
*/
|
||||
+ @Deprecated(forRemoval = true) // Paper - Unused
|
||||
public boolean shouldSetSpawnLocation() {
|
||||
return setBedSpawn;
|
||||
}
|
||||
@@ -59,7 +62,10 @@ public class PlayerBedLeaveEvent extends PlayerEvent implements Cancellable {
|
||||
* {@link Player#setBedSpawnLocation(Location)}.
|
||||
*
|
||||
* @param setBedSpawn true to change the new spawn location
|
||||
+ * @deprecated the respawn point is now set when the player enter the bed and
|
||||
+ * this option doesn't work since MC 1.15.
|
||||
*/
|
||||
+ @Deprecated(forRemoval = true) // Paper - Unused
|
||||
public void setSpawnLocation(boolean setBedSpawn) {
|
||||
this.setBedSpawn = setBedSpawn;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
|
||||
index 1b2267f4e8ebded198773ec80e2bff2c861c7084..1a58734d919fae247eeb85dd785fd59990856505 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
|
||||
@@ -799,28 +523,6 @@ index 1b2267f4e8ebded198773ec80e2bff2c861c7084..1a58734d919fae247eeb85dd785fd599
|
||||
public Location getTo() {
|
||||
return to;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/event/raid/RaidSpawnWaveEvent.java b/src/main/java/org/bukkit/event/raid/RaidSpawnWaveEvent.java
|
||||
index cd58dd7de781823804701fc023706e805c0142a8..1b8bb5241efcf4a90fd098f2000f8394072dca4a 100644
|
||||
--- a/src/main/java/org/bukkit/event/raid/RaidSpawnWaveEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/raid/RaidSpawnWaveEvent.java
|
||||
@@ -19,7 +19,7 @@ public class RaidSpawnWaveEvent extends RaidEvent {
|
||||
private final List<Raider> raiders;
|
||||
private final Raider leader;
|
||||
|
||||
- public RaidSpawnWaveEvent(@NotNull Raid raid, @NotNull World world, @Nullable Raider leader, @NotNull List<Raider> raiders) {
|
||||
+ public RaidSpawnWaveEvent(@NotNull Raid raid, @NotNull World world, @NotNull Raider leader, @NotNull List<Raider> raiders) { // Paper
|
||||
super(raid, world);
|
||||
this.raiders = raiders;
|
||||
this.leader = leader;
|
||||
@@ -30,7 +30,7 @@ public class RaidSpawnWaveEvent extends RaidEvent {
|
||||
*
|
||||
* @return {@link Raider}
|
||||
*/
|
||||
- @Nullable
|
||||
+ @NotNull // Paper
|
||||
public Raider getPatrolLeader() {
|
||||
return leader;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java
|
||||
index 6bafc62e2235a6b783cbf96f4dabeeaf02bd5178..50c762d777ac90a05772501a28cacff8fd3f5126 100644
|
||||
--- a/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java
|
||||
@@ -989,29 +691,11 @@ index f1a48eab1a357ae64545e1f1dc941c383cff8707..466d1bd7089b76f48f953e1a51c611ec
|
||||
|
||||
/**
|
||||
* Checks if the inventory contains any ItemStacks with the given
|
||||
diff --git a/src/main/java/org/bukkit/inventory/InventoryView.java b/src/main/java/org/bukkit/inventory/InventoryView.java
|
||||
index 002acfbdce1db10f7ba1b6a013e678f504ac6e69..aac9180fa3bcbdb0c17dcf96c86647b54ccc28c3 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/InventoryView.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/InventoryView.java
|
||||
@@ -210,10 +210,10 @@ public abstract class InventoryView {
|
||||
/**
|
||||
* Get the item on the cursor of one of the viewing players.
|
||||
*
|
||||
- * @return The item on the player's cursor, or null if they aren't holding
|
||||
- * one.
|
||||
+ * @return The item on the player's cursor, or an empty stack
|
||||
+ * if they aren't holding one.
|
||||
*/
|
||||
- @Nullable
|
||||
+ @NotNull // Paper - fix nullability
|
||||
public final ItemStack getCursor() {
|
||||
return getPlayer().getItemOnCursor();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index d641a8293f3acd465d5fdde8507046647cb6c568..74aa058e0dee7ae858a2a1d0a48e3bb9093a53ea 100644
|
||||
index 74cd662d0594f2fbc5aa30ba64d9e4928145dbb9..856751439b6599943d85203a59efd691ddbd89e9 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -28,7 +28,7 @@ public interface ItemFactory {
|
||||
@@ -27,7 +27,7 @@ public interface ItemFactory {
|
||||
* @return a new ItemMeta that could be applied to an item stack of the
|
||||
* specified material
|
||||
*/
|
||||
@@ -1217,10 +901,10 @@ index 5ccae862dbac393805a47fe26c18a2f33f1e140d..72281899817c5c140cdca2afff75fbce
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
index 46ac120ed51274a2084719387e35e517981bbf4b..420a91a834016d3af95efd79ca92ae45c4f081c4 100644
|
||||
index 55e9dc5d1d87fbc9d0dabbb7bd59584fe2c5f379..5c1ca0e47f0ac1525c3d37b55f52874878f44c28 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
@@ -75,8 +75,10 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -74,8 +74,10 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
/**
|
||||
* Checks for existence of a localized name.
|
||||
*
|
||||
@@ -1231,7 +915,7 @@ index 46ac120ed51274a2084719387e35e517981bbf4b..420a91a834016d3af95efd79ca92ae45
|
||||
boolean hasLocalizedName();
|
||||
|
||||
/**
|
||||
@@ -85,16 +87,20 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -84,16 +86,20 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* Plugins should check that hasLocalizedName() returns <code>true</code>
|
||||
* before calling this method.
|
||||
*
|
||||
@@ -1336,12 +1020,12 @@ index 0ea9c6b2420a0f990bd1fdf50fc015e37a7060d8..e99644eae1c662b117aa19060d2484ac
|
||||
|
||||
/**
|
||||
diff --git a/src/test/java/org/bukkit/materials/MaterialDataTest.java b/src/test/java/org/bukkit/materials/MaterialDataTest.java
|
||||
index 8d78435cc42a9e668b2d4d674b79b4094c3bd1b1..24a8ce4387b897c717b55405f363ffafff45894d 100644
|
||||
index a935ae4a25b7955416652bf8c4690a804f12e903..e83321263bb0e2b67af981dbb2e8fec4e973ae56 100644
|
||||
--- a/src/test/java/org/bukkit/materials/MaterialDataTest.java
|
||||
+++ b/src/test/java/org/bukkit/materials/MaterialDataTest.java
|
||||
@@ -22,6 +22,7 @@ import org.bukkit.material.WoodenStep;
|
||||
import org.bukkit.material.types.MushroomBlockTexture;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
+@Deprecated // Paper
|
||||
public class MaterialDataTest {
|
||||
|
||||
@@ -102,10 +102,10 @@ index f7564581c18425c903e54f949728dd3742ca7bf2..1bfe465b9aaeea7d3c871140145b7de1
|
||||
/**
|
||||
* Creates explosion at this location with given power
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index e673e05c3d94c28d6809a0de7f7d070712b85741..5d3b645eb24f5c0e3309143fc0e53545c6de8083 100644
|
||||
index 31fc272b0e82e4eef6d9bf01dd25d39513d354b3..0c5ce79c04e8193db248a221f519d80a944ef6ba 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -151,6 +151,87 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -150,6 +150,87 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public Block getHighestBlockAt(@NotNull Location location);
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ index 0000000000000000000000000000000000000000..ec36942128cbacae171584c89480b4aa
|
||||
+ Sound getFallSound();
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||
index 653a83b7ceb5cec1d92aed5250ae50e714fe5f9f..2b267d4c9adcc13722d4a655a98ca16a0f9746ca 100644
|
||||
index 78f6cc1a8a8de05aec6f551f8a5f425944f0ffa3..b0b148918eeaf10d60734def6ac84b678c0d74c7 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -607,4 +607,25 @@ public interface Block extends Metadatable, Translatable {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Expose the internal current tick
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index cb0ad65e4e30c3604d655bb75c7b26a7bf4227d7..6ae9a923d85f76bf5e6a41fb0a499196be05473e 100644
|
||||
index f377b0d6bfdc88be2af2a8b059aac04421c4f378..93c83d1513745ada3c1ea9b5cc88905f1957d3c4 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2363,6 +2363,10 @@ public final class Bukkit {
|
||||
@@ -20,7 +20,7 @@ index cb0ad65e4e30c3604d655bb75c7b26a7bf4227d7..6ae9a923d85f76bf5e6a41fb0a499196
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 49877944a385b22e5de66b4e33056ee3f592fcd7..86e89976618a7083d3cd5b81669c99788bc72d05 100644
|
||||
index bb90413c0170d3d37bc67565a6bd6f8795b2f6bd..3b3cd9994b84770dc9b3c7a0531461bdc3d4b16a 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2056,5 +2056,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
||||
@@ -10,7 +10,7 @@ Adds bool param to trigger exp drops for blocks
|
||||
Co-authored-by: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||
index 2b267d4c9adcc13722d4a655a98ca16a0f9746ca..22cfffddb681a7ed95e19f4da6e2c272d22a6f69 100644
|
||||
index b0b148918eeaf10d60734def6ac84b678c0d74c7..232662f3130ca49156ed8b71acf4495aea33c212 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -481,6 +481,52 @@ public interface Block extends Metadatable, Translatable {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add tick times API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 6ae9a923d85f76bf5e6a41fb0a499196be05473e..8961bd08163a2e42e1d0628335fa44bac575a6a4 100644
|
||||
index 93c83d1513745ada3c1ea9b5cc88905f1957d3c4..d715a069a8cfc8704471f254f421bb7baeb498f4 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2035,6 +2035,25 @@ public final class Bukkit {
|
||||
@@ -35,7 +35,7 @@ index 6ae9a923d85f76bf5e6a41fb0a499196be05473e..8961bd08163a2e42e1d0628335fa44ba
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 86e89976618a7083d3cd5b81669c99788bc72d05..201fb920b2facdd56651b62b873aaeb7946e88de 100644
|
||||
index 3b3cd9994b84770dc9b3c7a0531461bdc3d4b16a..e00d4860ba9ac19014995e85fccea659793f67e7 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1718,6 +1718,21 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Expose MinecraftServer#isRunning
|
||||
This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 8961bd08163a2e42e1d0628335fa44bac575a6a4..f444294c96f6ab7362eacad47805c6b0f4afdc3a 100644
|
||||
index d715a069a8cfc8704471f254f421bb7baeb498f4..e54ba870293676f16fabac5b91ffd7202d3a17e0 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2386,6 +2386,15 @@ public final class Bukkit {
|
||||
@@ -26,7 +26,7 @@ index 8961bd08163a2e42e1d0628335fa44bac575a6a4..f444294c96f6ab7362eacad47805c6b0
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 201fb920b2facdd56651b62b873aaeb7946e88de..12d338b6751a04b626162f91c35cddaa49cdead1 100644
|
||||
index e00d4860ba9ac19014995e85fccea659793f67e7..e4d7c0a3c36a34ef5bdb728d52cf0c4f2aa3ef77 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2078,5 +2078,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization
|
||||
Serializes using NBT which is safer for server data migrations than bukkits format.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 4604392831d19a789e4906cf1a5f0197105fd6f2..f063016f8a88dbff480ac3b4b3ef05c16a8e515a 100644
|
||||
index a6aa33b9574d0278e10927007a62290e1d102e73..beddcb13a598d799c8ae1cec9c01c900e38b1458 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -134,5 +134,9 @@ public interface UnsafeValues {
|
||||
@@ -126,5 +126,9 @@ public interface UnsafeValues {
|
||||
default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
||||
return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher();
|
||||
}
|
||||
|
||||
@@ -229,10 +229,10 @@ index 0000000000000000000000000000000000000000..cf67dc7d465223710adbf2b798109f52
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 9954fc11b2c2fe56c194d7d3ce878a343a9b2429..393b3be157d2111d7209b7a94515c93a931a1ec9 100644
|
||||
index 5cabbe3aec83f76cefe34fd3e34be467fe5e59c8..45cd9cf3bfa7a64fca463f76a9e29d5f9abdfd58 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2874,6 +2874,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2872,6 +2872,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* Reset the cooldown counter to 0, effectively starting the cooldown period.
|
||||
*/
|
||||
void resetCooldown();
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Expose game version
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index f444294c96f6ab7362eacad47805c6b0f4afdc3a..1c0a7bba8cbab86382598e20b7b73f0fd2dabcae 100644
|
||||
index e54ba870293676f16fabac5b91ffd7202d3a17e0..eb1e5e87d003e5cd7fbf4a01265ef30bb87abd47 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -157,6 +157,18 @@ public final class Bukkit {
|
||||
@@ -28,7 +28,7 @@ index f444294c96f6ab7362eacad47805c6b0f4afdc3a..1c0a7bba8cbab86382598e20b7b73f0f
|
||||
* Gets a view of all currently logged in players. This {@linkplain
|
||||
* Collections#unmodifiableCollection(Collection) view} is a reused
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 12d338b6751a04b626162f91c35cddaa49cdead1..62716a5a5e6936430f50bf725c061ef39952b96c 100644
|
||||
index e4d7c0a3c36a34ef5bdb728d52cf0c4f2aa3ef77..4ec70d58f4341e9fe9467f2b3a65b9808a3d81a4 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -115,6 +115,16 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
||||
@@ -227,10 +227,10 @@ index 0000000000000000000000000000000000000000..e21f7574763dd4f13794f91bbef192ef
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..39fca3674f32c7bbb2797bf6c3e222707cd7495a
|
||||
index 0000000000000000000000000000000000000000..c9837c7c47314b5bdf6c7973e6bc962d390dc13d
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
||||
@@ -0,0 +1,303 @@
|
||||
@@ -0,0 +1,293 @@
|
||||
+package com.destroystokyo.paper.entity.ai;
|
||||
+
|
||||
+import com.destroystokyo.paper.entity.RangedEntity;
|
||||
@@ -357,6 +357,7 @@ index 0000000000000000000000000000000000000000..39fca3674f32c7bbb2797bf6c3e22270
|
||||
+ GoalKey<PolarBear> POLAR_BEAR_MELEE_ATTACK = GoalKey.of(PolarBear.class, NamespacedKey.minecraft("polar_bear_melee_attack"));
|
||||
+ GoalKey<PolarBear> POLAR_BEAR_PANIC = GoalKey.of(PolarBear.class, NamespacedKey.minecraft("polar_bear_panic"));
|
||||
+ GoalKey<PufferFish> PUFFERFISH_PUFF = GoalKey.of(PufferFish.class, NamespacedKey.minecraft("pufferfish_puff"));
|
||||
+ GoalKey<Rabbit> EVIL_RABBIT_ATTACK = GoalKey.of(Rabbit.class, NamespacedKey.minecraft("evil_rabbit_attack"));
|
||||
+ GoalKey<Rabbit> RABBIT_AVOID_ENTITY = GoalKey.of(Rabbit.class, NamespacedKey.minecraft("rabbit_avoid_entity"));
|
||||
+ GoalKey<Rabbit> RABBIT_PANIC = GoalKey.of(Rabbit.class, NamespacedKey.minecraft("rabbit_panic"));
|
||||
+ GoalKey<Rabbit> RAID_GARDEN = GoalKey.of(Rabbit.class, NamespacedKey.minecraft("raid_garden"));
|
||||
@@ -402,6 +403,7 @@ index 0000000000000000000000000000000000000000..39fca3674f32c7bbb2797bf6c3e22270
|
||||
+ GoalKey<Phantom> PHANTOM_ATTACK_STRATEGY = GoalKey.of(Phantom.class, NamespacedKey.minecraft("phantom_attack_strategy"));
|
||||
+ GoalKey<Phantom> PHANTOM_CIRCLE_AROUND_ANCHOR = GoalKey.of(Phantom.class, NamespacedKey.minecraft("phantom_circle_around_anchor"));
|
||||
+ GoalKey<Phantom> PHANTOM_SWEEP_ATTACK = GoalKey.of(Phantom.class, NamespacedKey.minecraft("phantom_sweep_attack"));
|
||||
+ GoalKey<Ravager> RAVAGER_MELEE_ATTACK = GoalKey.of(Ravager.class, NamespacedKey.minecraft("ravager_melee_attack"));
|
||||
+ GoalKey<Shulker> SHULKER_ATTACK = GoalKey.of(Shulker.class, NamespacedKey.minecraft("shulker_attack"));
|
||||
+ GoalKey<Shulker> SHULKER_DEFENSE_ATTACK = GoalKey.of(Shulker.class, NamespacedKey.minecraft("shulker_defense_attack"));
|
||||
+ GoalKey<Shulker> SHULKER_NEAREST_ATTACK = GoalKey.of(Shulker.class, NamespacedKey.minecraft("shulker_nearest_attack"));
|
||||
@@ -421,6 +423,7 @@ index 0000000000000000000000000000000000000000..39fca3674f32c7bbb2797bf6c3e22270
|
||||
+ GoalKey<Vex> VEX_RANDOM_MOVE = GoalKey.of(Vex.class, NamespacedKey.minecraft("vex_random_move"));
|
||||
+ GoalKey<Mob> VINDICATOR_BREAK_DOOR = GoalKey.of(Mob.class, NamespacedKey.minecraft("vindicator_break_door"));
|
||||
+ GoalKey<Vindicator> VINDICATOR_JOHNNY_ATTACK = GoalKey.of(Vindicator.class, NamespacedKey.minecraft("vindicator_johnny_attack"));
|
||||
+ GoalKey<Vindicator> VINDICATOR_MELEE_ATTACK = GoalKey.of(Vindicator.class, NamespacedKey.minecraft("vindicator_melee_attack"));
|
||||
+ GoalKey<Zombie> ZOMBIE_ATTACK_TURTLE_EGG = GoalKey.of(Zombie.class, NamespacedKey.minecraft("zombie_attack_turtle_egg"));
|
||||
+ GoalKey<WanderingTrader> WANDER_TO_POSITION = GoalKey.of(WanderingTrader.class, NamespacedKey.minecraft("wander_to_position"));
|
||||
+ GoalKey<Raider> HOLD_GROUND_ATTACK = GoalKey.of(Raider.class, NamespacedKey.minecraft("hold_ground_attack"));
|
||||
@@ -432,19 +435,6 @@ index 0000000000000000000000000000000000000000..39fca3674f32c7bbb2797bf6c3e22270
|
||||
+ GoalKey<Wolf> WOLF_PANIC = GoalKey.of(Wolf.class, NamespacedKey.minecraft("wolf_panic"));
|
||||
+
|
||||
+ /**
|
||||
+ * @deprecated removed in 1.20.2
|
||||
+ */
|
||||
+ @Deprecated GoalKey<Vindicator> VINDICATOR_MELEE_ATTACK = GoalKey.of(Vindicator.class, NamespacedKey.minecraft("vindicator_melee_attack"));
|
||||
+ /**
|
||||
+ * @deprecated removed in 1.20.2
|
||||
+ */
|
||||
+ @Deprecated GoalKey<Ravager> RAVAGER_MELEE_ATTACK = GoalKey.of(Ravager.class, NamespacedKey.minecraft("ravager_melee_attack"));
|
||||
+ /**
|
||||
+ * @deprecated removed in 1.20.2
|
||||
+ */
|
||||
+ @Deprecated GoalKey<Rabbit> EVIL_RABBIT_ATTACK = GoalKey.of(Rabbit.class, NamespacedKey.minecraft("evil_rabbit_attack"));
|
||||
+
|
||||
+ /**
|
||||
+ * @deprecated removed in 1.16
|
||||
+ */
|
||||
+ @Deprecated(forRemoval = true) @ApiStatus.ScheduledForRemoval(inVersion = "1.21") GoalKey<PigZombie> ANGER = GoalKey.of(PigZombie.class, NamespacedKey.minecraft("anger"));
|
||||
@@ -535,7 +525,7 @@ index 0000000000000000000000000000000000000000..39fca3674f32c7bbb2797bf6c3e22270
|
||||
+ @Deprecated(forRemoval = true) @ApiStatus.ScheduledForRemoval(inVersion = "1.21") GoalKey<Mob> UNIVERSAL_ANGER_RESET = GoalKey.of(Mob.class, NamespacedKey.minecraft("universal_anger_reset"));
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 1c0a7bba8cbab86382598e20b7b73f0fd2dabcae..ae9f2213ba39b0f61cf670bc876bf265f47ce6df 100644
|
||||
index eb1e5e87d003e5cd7fbf4a01265ef30bb87abd47..520cfd6b8568fb05b3a732ffa641b0231ec936eb 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2407,6 +2407,16 @@ public final class Bukkit {
|
||||
@@ -556,7 +546,7 @@ index 1c0a7bba8cbab86382598e20b7b73f0fd2dabcae..ae9f2213ba39b0f61cf670bc876bf265
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 62716a5a5e6936430f50bf725c061ef39952b96c..b9a31fa710434351f058c50a402be6c89cee9080 100644
|
||||
index 4ec70d58f4341e9fe9467f2b3a65b9808a3d81a4..83c9d688666095ff50bf8fdf4e7510a622128ab4 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2095,5 +2095,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
||||
@@ -5,17 +5,17 @@ Subject: [PATCH] Spawn Reason API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/RegionAccessor.java b/src/main/java/org/bukkit/RegionAccessor.java
|
||||
index 7c2b1eff41dd43fda84d84e76c05bbbf37c186b8..bc70f4f5b82ce5b92ab0b2612c8fb8126ed1a8c2 100644
|
||||
index 05c29cbd2ae1ca0434a90f8389479bd608ca2ac1..66bc6da2a482bb207ec50beb22fd62aeda90cc34 100644
|
||||
--- a/src/main/java/org/bukkit/RegionAccessor.java
|
||||
+++ b/src/main/java/org/bukkit/RegionAccessor.java
|
||||
@@ -11,6 +11,7 @@ import org.bukkit.block.data.BlockData;
|
||||
@@ -10,6 +10,7 @@ import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
+import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
import org.bukkit.util.Consumer;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -309,7 +310,34 @@ public interface RegionAccessor {
|
||||
* {@link Entity} requested cannot be spawned
|
||||
*/
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Support components in ItemMeta
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
index 420a91a834016d3af95efd79ca92ae45c4f081c4..ea64d5b1ebaa652785ddbc7b515808174f636a62 100644
|
||||
index 5c1ca0e47f0ac1525c3d37b55f52874878f44c28..e33ec3eaa1cd520db8224250e886e6240fefe76f 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
@@ -5,6 +5,7 @@ import java.util.Collection;
|
||||
@@ -16,7 +16,7 @@ index 420a91a834016d3af95efd79ca92ae45c4f081c4..ea64d5b1ebaa652785ddbc7b51580817
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.attribute.AttributeModifier;
|
||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||
@@ -63,6 +64,20 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -62,6 +63,20 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@NotNull
|
||||
String getDisplayName();
|
||||
|
||||
@@ -37,7 +37,7 @@ index 420a91a834016d3af95efd79ca92ae45c4f081c4..ea64d5b1ebaa652785ddbc7b51580817
|
||||
/**
|
||||
* Sets the display name.
|
||||
*
|
||||
@@ -72,6 +87,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -71,6 +86,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@Deprecated // Paper
|
||||
void setDisplayName(@Nullable String name);
|
||||
|
||||
@@ -54,7 +54,7 @@ index 420a91a834016d3af95efd79ca92ae45c4f081c4..ea64d5b1ebaa652785ddbc7b51580817
|
||||
/**
|
||||
* Checks for existence of a localized name.
|
||||
*
|
||||
@@ -141,6 +166,19 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -140,6 +165,19 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@Nullable
|
||||
List<String> getLore();
|
||||
|
||||
@@ -74,7 +74,7 @@ index 420a91a834016d3af95efd79ca92ae45c4f081c4..ea64d5b1ebaa652785ddbc7b51580817
|
||||
/**
|
||||
* Sets the lore for this item.
|
||||
* Removes lore when given null.
|
||||
@@ -151,6 +189,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -150,6 +188,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@Deprecated // Paper
|
||||
void setLore(@Nullable List<String> lore);
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add entity liquid API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 20a83a2fa9f3d65837fffb027b1f8f1e76957770..e9477b04e52fac843c1c15a47325b7bb29f9c6c5 100644
|
||||
index 9d3c3dedb4f71b9fc35cb5da6e38c77c7c673ad6..e2caf7d0f8c0754617a2d7dfa065fd46e74d3f52 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -801,5 +801,40 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -787,5 +787,40 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
*/
|
||||
@NotNull
|
||||
org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason getEntitySpawnReason();
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Brand support
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 393b3be157d2111d7209b7a94515c93a931a1ec9..81e8bfbe4380090830591274025a026de740fd05 100644
|
||||
index 45cd9cf3bfa7a64fca463f76a9e29d5f9abdfd58..785655dbb660f6b65d9ff2b498600efca6a89144 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2988,6 +2988,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2981,6 +2981,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
// Paper end
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ index 0000000000000000000000000000000000000000..df05153397b42930cd53d37b30824c7e
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/RegionAccessor.java b/src/main/java/org/bukkit/RegionAccessor.java
|
||||
index bc70f4f5b82ce5b92ab0b2612c8fb8126ed1a8c2..f587a529e4d7b097b3f204a34c636da0bbac6747 100644
|
||||
index 66bc6da2a482bb207ec50beb22fd62aeda90cc34..501dd5a26c27294420821b3d75f8938596afb1a8 100644
|
||||
--- a/src/main/java/org/bukkit/RegionAccessor.java
|
||||
+++ b/src/main/java/org/bukkit/RegionAccessor.java
|
||||
@@ -421,4 +421,12 @@ public interface RegionAccessor {
|
||||
|
||||
@@ -119,7 +119,7 @@ index 938c3217f92e6d3ef9a637269c469f8359af6347..ef49495909a37d718a87d5dfbcd644d4
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/GameRule.java b/src/main/java/org/bukkit/GameRule.java
|
||||
index 3ac563da8c7d2ef70d46fc451a6752f6b1fc1d1e..695a299a3544547bbc24095980221205ce5469ba 100644
|
||||
index 753bfcec441533071120d925c83789ef53afa176..c6bc84a8755b2fe5d7d8d3ec857700ec1cba3c9b 100644
|
||||
--- a/src/main/java/org/bukkit/GameRule.java
|
||||
+++ b/src/main/java/org/bukkit/GameRule.java
|
||||
@@ -15,7 +15,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -131,7 +131,7 @@ index 3ac563da8c7d2ef70d46fc451a6752f6b1fc1d1e..695a299a3544547bbc24095980221205
|
||||
|
||||
private static Map<String, GameRule<?>> gameRules = new HashMap<>();
|
||||
// Boolean rules
|
||||
@@ -327,4 +327,11 @@ public final class GameRule<T> {
|
||||
@@ -323,4 +323,11 @@ public final class GameRule<T> {
|
||||
public static GameRule<?>[] values() {
|
||||
return gameRules.values().toArray(new GameRule<?>[gameRules.size()]);
|
||||
}
|
||||
@@ -144,7 +144,7 @@ index 3ac563da8c7d2ef70d46fc451a6752f6b1fc1d1e..695a299a3544547bbc24095980221205
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index cbec3b145a44ceee20823ae0e9c8162b15726189..fdb36def5f2f4451b810624e0c3c04b4a0534528 100644
|
||||
index 7705fece7f58bd66f7d68da85f8f34e43b4bae12..6a89eab53f21bc4420e616cc299864fb564e1045 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -119,7 +119,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -156,7 +156,7 @@ index cbec3b145a44ceee20823ae0e9c8162b15726189..fdb36def5f2f4451b810624e0c3c04b4
|
||||
//<editor-fold desc="Materials" defaultstate="collapsed">
|
||||
AIR(9648, 0),
|
||||
STONE(22948),
|
||||
@@ -4453,6 +4453,15 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -4450,6 +4450,15 @@ public enum Material implements Keyed, Translatable {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -172,7 +172,7 @@ index cbec3b145a44ceee20823ae0e9c8162b15726189..fdb36def5f2f4451b810624e0c3c04b4
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
@@ -10952,9 +10961,11 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -10949,9 +10958,11 @@ public enum Material implements Keyed, Translatable {
|
||||
* material
|
||||
* @see #getBlockTranslationKey()
|
||||
* @see #getItemTranslationKey()
|
||||
@@ -185,27 +185,27 @@ index cbec3b145a44ceee20823ae0e9c8162b15726189..fdb36def5f2f4451b810624e0c3c04b4
|
||||
if (this.isItem()) {
|
||||
return Bukkit.getUnsafe().getItemTranslationKey(this);
|
||||
diff --git a/src/main/java/org/bukkit/MusicInstrument.java b/src/main/java/org/bukkit/MusicInstrument.java
|
||||
index a7573ce8c6dff9862c97ce74650284b4a42e7989..ee5368372e136541eafe1d7ffb395de670fe4843 100644
|
||||
index 614dc9f2ff5aa69659947c3fcedef98f9c9bab98..be5b47659d780ab5f97634fc44faa24456b6ebf0 100644
|
||||
--- a/src/main/java/org/bukkit/MusicInstrument.java
|
||||
+++ b/src/main/java/org/bukkit/MusicInstrument.java
|
||||
@@ -7,7 +7,7 @@ import java.util.Collections;
|
||||
@@ -8,7 +8,7 @@ import java.util.Map;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
-public abstract class MusicInstrument implements Keyed {
|
||||
+public abstract class MusicInstrument implements Keyed, net.kyori.adventure.translation.Translatable { // Paper - translation keys
|
||||
-public final class MusicInstrument implements Keyed {
|
||||
+public final class MusicInstrument implements Keyed, net.kyori.adventure.translation.Translatable { // Paper - translation keys
|
||||
|
||||
public static final MusicInstrument PONDER = getInstrument("ponder_goat_horn");
|
||||
public static final MusicInstrument SING = getInstrument("sing_goat_horn");
|
||||
@@ -52,4 +52,11 @@ public abstract class MusicInstrument implements Keyed {
|
||||
private static final Map<NamespacedKey, MusicInstrument> INSTRUMENTS = new HashMap<>();
|
||||
//
|
||||
@@ -63,4 +63,11 @@ public final class MusicInstrument implements Keyed {
|
||||
|
||||
return instrument;
|
||||
return new MusicInstrument(NamespacedKey.minecraft(name));
|
||||
}
|
||||
+
|
||||
+ // Paper start - translation key
|
||||
+ @Override
|
||||
+ public @NotNull String translationKey() {
|
||||
+ return "instrument.minecraft." + this.getKey().value();
|
||||
+ return "instrument.minecraft." + this.key.value();
|
||||
+ }
|
||||
+ // Paper end - translation key
|
||||
}
|
||||
@@ -233,7 +233,7 @@ index e3faa2c675c85a9cbdbbb1debec0ff81c58a1bbd..fd1629c2d2028a88fb3d56b0aeb833d1
|
||||
String getTranslationKey();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/attribute/Attribute.java b/src/main/java/org/bukkit/attribute/Attribute.java
|
||||
index 36501052de5ad0b80aa1dcbe97d44dd3204f749b..37f93b7e9f722e76631c3e7d3e770526ee0c3926 100644
|
||||
index 13eac9ad2c1672051635d1c35cc49239252e7a61..107e36ef02a9481954bd770ce9a55a0b1e84be7a 100644
|
||||
--- a/src/main/java/org/bukkit/attribute/Attribute.java
|
||||
+++ b/src/main/java/org/bukkit/attribute/Attribute.java
|
||||
@@ -7,7 +7,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
@@ -245,7 +245,7 @@ index 36501052de5ad0b80aa1dcbe97d44dd3204f749b..37f93b7e9f722e76631c3e7d3e770526
|
||||
|
||||
/**
|
||||
* Maximum health of an Entity.
|
||||
@@ -77,4 +77,10 @@ public enum Attribute implements Keyed {
|
||||
@@ -73,4 +73,10 @@ public enum Attribute implements Keyed {
|
||||
public NamespacedKey getKey() {
|
||||
return key;
|
||||
}
|
||||
@@ -282,7 +282,7 @@ index d3087d60378822cdd7cea25fd63d3f496e3cd2fb..5d8fa5b39a5d50cca48ba63af3a84b80
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||
index 22cfffddb681a7ed95e19f4da6e2c272d22a6f69..4dcfff9aa28eec3467d49d6fcc00f22943fd9c92 100644
|
||||
index 232662f3130ca49156ed8b71acf4495aea33c212..5ae85ddc2cff3145dcba877a7bf55abd818f6881 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -32,7 +32,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Create HoverEvent from ItemStack Entity
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index 74aa058e0dee7ae858a2a1d0a48e3bb9093a53ea..9045746aa3077c536173d4ac826e0bf49e732b32 100644
|
||||
index 856751439b6599943d85203a59efd691ddbd89e9..77ca38e5edda55daf67ab8af9afd633efb4000b1 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -222,4 +222,65 @@ public interface ItemFactory {
|
||||
@@ -221,4 +221,65 @@ public interface ItemFactory {
|
||||
@NotNull
|
||||
ItemStack ensureServerConversions(@NotNull ItemStack item);
|
||||
// Paper end - ensure server conversions API
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index f063016f8a88dbff480ac3b4b3ef05c16a8e515a..96b66f4f6fb8637ab3ad275ddd980d5b71711a6c 100644
|
||||
index beddcb13a598d799c8ae1cec9c01c900e38b1458..eabbe1cd18316948f70e7b56fb80827fdd3672f0 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -138,5 +138,12 @@ public interface UnsafeValues {
|
||||
@@ -130,5 +130,12 @@ public interface UnsafeValues {
|
||||
byte[] serializeItem(ItemStack item);
|
||||
|
||||
ItemStack deserializeItem(byte[] data);
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Entity#isTicking
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index e9477b04e52fac843c1c15a47325b7bb29f9c6c5..1dda73ca06a8d513cc3e9a3e4b1739520ca900ec 100644
|
||||
index e2caf7d0f8c0754617a2d7dfa065fd46e74d3f52..cb850d4310af0ba7db5ebee8fabe61e94cea6dad 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -836,5 +836,10 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -822,5 +822,10 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
* Check if entity is in lava
|
||||
*/
|
||||
boolean isInLava();
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Player elytra boost API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 81e8bfbe4380090830591274025a026de740fd05..36e3f86f463cd7b6bca4c8b63739a06f17d7e28a 100644
|
||||
index 785655dbb660f6b65d9ff2b498600efca6a89144..19358a956f14053ff5c57a4909ebf82f42a22043 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2880,6 +2880,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2878,6 +2878,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
@NotNull
|
||||
<T> T getClientOption(@NotNull com.destroystokyo.paper.ClientOption<T> option);
|
||||
@@ -22,14 +22,9 @@ index 81e8bfbe4380090830591274025a026de740fd05..36e3f86f463cd7b6bca4c8b63739a06f
|
||||
+ * @return The {@link Firework} boosting the Player or null if the spawning of the entity was cancelled
|
||||
+ * @throws IllegalArgumentException if {@link #isGliding()} is false
|
||||
+ * or if the {@code firework} isn't a {@link Material#FIREWORK_ROCKET}
|
||||
+ * @deprecated use {@link HumanEntity#fireworkBoost(ItemStack)} instead. Note that this method <b>does not</b>
|
||||
+ * check if the player is gliding or not.
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ default Firework boostElytra(@NotNull ItemStack firework) {
|
||||
+ com.google.common.base.Preconditions.checkState(this.isGliding(), "Player must be gliding");
|
||||
+ return this.fireworkBoost(firework);
|
||||
+ }
|
||||
+ Firework boostElytra(@NotNull ItemStack firework);
|
||||
// Paper end
|
||||
|
||||
// Spigot start
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String)
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index ae9f2213ba39b0f61cf670bc876bf265f47ce6df..2acb1e1e7a865596d0a0535717bc9d5dd49669c3 100644
|
||||
index 520cfd6b8568fb05b3a732ffa641b0231ec936eb..68e39ed5a80d6d2d26366122d8d09395d38434dd 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1249,6 +1249,27 @@ public final class Bukkit {
|
||||
@@ -37,7 +37,7 @@ index ae9f2213ba39b0f61cf670bc876bf265f47ce6df..2acb1e1e7a865596d0a0535717bc9d5d
|
||||
* Gets the player by the given UUID, regardless if they are offline or
|
||||
* online.
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index b9a31fa710434351f058c50a402be6c89cee9080..c8a312bf6cef6ba62114d4f46555f517f53c7576 100644
|
||||
index 83c9d688666095ff50bf8fdf4e7510a622128ab4..87c617edb7259932de48606c4931ec69086d2bee 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1048,6 +1048,25 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Add Destroy Speed API
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||
index 4dcfff9aa28eec3467d49d6fcc00f22943fd9c92..137a40c708bb67de4608447975867a07240ddc88 100644
|
||||
index 5ae85ddc2cff3145dcba877a7bf55abd818f6881..89bd97153d874c2710304d163f7c46062d8c8bab 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -681,4 +681,31 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
|
||||
|
||||
@@ -5,31 +5,11 @@ Subject: [PATCH] More lightning API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LightningStrike.java b/src/main/java/org/bukkit/entity/LightningStrike.java
|
||||
index 8dc433baba7060df5cfe6fc10210a5a27287987d..0b9e02bb88a1b1fe7378c11f1cca9c93b183f814 100644
|
||||
index be347c3d0291f44036bae29a4e7e4645d6a4cdf6..6f5b6901032eb03606c4566b24459a03baac0c73 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LightningStrike.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LightningStrike.java
|
||||
@@ -22,7 +22,9 @@ public interface LightningStrike extends Entity {
|
||||
* removed. By default this value is between 1 and 3.
|
||||
*
|
||||
* @return the flashes
|
||||
+ * @deprecated use {@link #getFlashCount()}
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
public int getFlashes();
|
||||
|
||||
/**
|
||||
@@ -31,7 +33,9 @@ public interface LightningStrike extends Entity {
|
||||
* has reduced below 0.
|
||||
*
|
||||
* @param flashes the flashes
|
||||
+ * @deprecated use {@link #setFlashCount(int)}
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
public void setFlashes(int flashes);
|
||||
|
||||
/**
|
||||
@@ -111,4 +115,42 @@ public interface LightningStrike extends Entity {
|
||||
@Deprecated // Paper
|
||||
@@ -31,4 +31,72 @@ public interface LightningStrike extends Entity {
|
||||
@Override
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
+
|
||||
@@ -51,6 +31,22 @@ index 8dc433baba7060df5cfe6fc10210a5a27287987d..0b9e02bb88a1b1fe7378c11f1cca9c93
|
||||
+ void setFlashCount(int flashes);
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the amount of ticks the current flash will do damage for.
|
||||
+ * Starts with 2 by default, will damage while it is equal to or above 0, with the next flash beginning somewhere between 0 and -9.
|
||||
+ *
|
||||
+ * @return ticks the current flash will do damage for
|
||||
+ */
|
||||
+ int getLifeTicks();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the amount of ticks the current flash will do damage/fire for.
|
||||
+ * Default is 2 for each flash, on which the sound and effect will also be played.
|
||||
+ *
|
||||
+ * @param lifeTicks ticks the current flash will do damage for
|
||||
+ */
|
||||
+ void setLifeTicks(int lifeTicks);
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the potential entity that caused this lightning strike to spawn in the world.
|
||||
+ * <p>
|
||||
+ * As of implementing this method, only {@link Player}s are capable of causing a lightning strike, however as this
|
||||
@@ -69,5 +65,19 @@ index 8dc433baba7060df5cfe6fc10210a5a27287987d..0b9e02bb88a1b1fe7378c11f1cca9c93
|
||||
+ */
|
||||
+ @org.jetbrains.annotations.Nullable
|
||||
+ Entity getCausingEntity();
|
||||
+
|
||||
+ /**
|
||||
+ * Updates the player that caused this lightning to be summoned into the world.
|
||||
+ * By default, players that channel their {@link Trident} will be the cause of the respective lightning.
|
||||
+ * <p>
|
||||
+ * While the respective getter method {@link #getCausingEntity()} does not guarantee a player as the cause of a
|
||||
+ * lightning to stay as future proof as possible, as of implementing this method, players are the only entities
|
||||
+ * that can cause a lightning strike and hence this setter is restricted to players.
|
||||
+ * </p>
|
||||
+ *
|
||||
+ * @param causingPlayer the player that should be the new cause of this lightning. {@code null} may be passed to
|
||||
+ * indicate that no player is responsible for this lightning.
|
||||
+ */
|
||||
+ void setCausingPlayer(@org.jetbrains.annotations.Nullable Player causingPlayer);
|
||||
+ // Paper end
|
||||
}
|
||||
Loaded 100 of 1211 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user