Updated Upstream (Paper & Purpur)

This commit is contained in:
AlphaKR93
2024-05-14 18:18:42 +09:00
parent 069250da59
commit 34fef470e5
42 changed files with 477 additions and 4141 deletions

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: granny <contact@granny.dev>
Date: Wed, 8 May 2024 08:14:51 +0000
Date: Tue, 14 May 2024 17:29:02 +0900
Subject: [PATCH] Purpur API Changes
PurpurMC
@@ -25,10 +25,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
diff --git a/build.gradle.kts b/build.gradle.kts
index 65e67b8726f1e19a6bcb1fe2f448e4ab68df11d1..892e78b1d2d29dc54def03fcb6d85a93ad56d84c 100644
index fd39ed209b20c927054b8482c400beeeeab460a3..6aef83558a5ef7e84873b127c3bb43a6468c9a24 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -121,6 +121,8 @@ tasks.jar {
@@ -142,6 +142,8 @@ tasks.jar {
}
tasks.withType<Javadoc> {
@@ -408,12 +408,12 @@ index 918a045165cdcde264bc24082b7afebb407271de..687d11619379aead7f665d4a5f8f8bcc
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index 7a337fe908915f8ea487a0b9236c511cb07d5e66..1dd02e2782364bf25521088cf8858d3443643447 100644
index 81f9ad99699a78b97e4accaaf1a98eacf29493ce..e3e996d932db689ba62a43f7f01d6f003f8337d3 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -11657,4 +11657,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
public boolean isEnabledByFeature(@NotNull World world) {
return Bukkit.getDataPackManager().isEnabledByFeature(this, world);
@@ -5701,4 +5701,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
}
return Registry.BLOCK.get(material.key);
}
+
+ // Purpur start
@@ -564,7 +564,7 @@ index 30298a629b39bd43ce14b414fc697b2dfcbea89c..ce00af9121de7a910aaea4e0685a06d4
+ // Purpur end - OfflinePlayer API
}
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 30cbe3bdc7142769019765b03cc4fe1f9ba1ddb4..320422ff95773efa01e8205edcc5c6c9a84d5ecd 100644
index c8595ffcfcbdd79794d464415287d46acef72b72..ec8b9b2cbe65838a194281f7d76d0e17defc5211 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -2257,6 +2257,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -586,7 +586,7 @@ index 30cbe3bdc7142769019765b03cc4fe1f9ba1ddb4..320422ff95773efa01e8205edcc5c6c9
/**
* Sends the component to the player
*
@@ -2540,4 +2552,105 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -2542,4 +2554,105 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
*/
boolean isOwnedByCurrentRegion(@NotNull Entity entity);
// Paper end - Folia region threading API
@@ -813,10 +813,10 @@ index 739911cda33b373f99df627a3a378b37d7d461aa..51e78c22cd021722b963fe31d1d9175d
* Add an entity to the block.
*
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
index ac9a28922f8a556944a4c3649d74c32c622f0cb0..5349f16136d9348c374a7dfe5b89a71dfcb0e66d 100644
index c3a9cf65db73ed534bf20996c7f05b5eb0aaebe1..fdedac32544be6534288c8ba28abe7f5c4c56f3b 100644
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -143,6 +143,19 @@ public class SimpleCommandMap implements CommandMap {
@@ -152,6 +152,19 @@ public class SimpleCommandMap implements CommandMap {
return false;
}
@@ -836,7 +836,7 @@ index ac9a28922f8a556944a4c3649d74c32c622f0cb0..5349f16136d9348c374a7dfe5b89a71d
// Paper start - Plugins do weird things to workaround normal registration
if (target.timings == null) {
target.timings = co.aikar.timings.TimingsManager.getCommandTiming(null, target);
@@ -150,10 +163,10 @@ public class SimpleCommandMap implements CommandMap {
@@ -159,10 +172,10 @@ public class SimpleCommandMap implements CommandMap {
// Paper end
try {
@@ -1440,10 +1440,10 @@ index c60be4fd24c7fdf65251dd6169e5e1ac3b588d95..569deccd2f1cf21da9b5906433ac493c
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 84a7bf0936d35bf42b5ed038d295d5c31740f472..6e9b4cbc81878616b1c48add5db534286d267b05 100644
index c64413a6740b604282984dea2a8430a6e7478d68..5c609d916e2d2f08ba90ebd23f13c5c9a14bc73c 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -17,6 +17,17 @@ import org.bukkit.inventory.meta.ItemMeta;
@@ -19,6 +19,17 @@ import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.material.MaterialData;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -1461,7 +1461,7 @@ index 84a7bf0936d35bf42b5ed038d295d5c31740f472..6e9b4cbc81878616b1c48add5db53428
/**
* Represents a stack of items.
@@ -1073,4 +1084,565 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -1079,4 +1090,565 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
return Bukkit.getUnsafe().computeTooltipLines(this, tooltipContext, player);
}
// Paper end - expose itemstack tooltip lines
@@ -2028,7 +2028,7 @@ index 84a7bf0936d35bf42b5ed038d295d5c31740f472..6e9b4cbc81878616b1c48add5db53428
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/inventory/RecipeChoice.java b/src/main/java/org/bukkit/inventory/RecipeChoice.java
index db8bcc66bdc4bedfffb4705db6338eda4c0ad29a..feda3ddfaaf37b6ee218a0e0b1fbc199899bd364 100644
index c143b0d8b97d514566bac8413d0346cf50822aeb..032a21766ce91471cb7d91b663d70e0d9fa66a26 100644
--- a/src/main/java/org/bukkit/inventory/RecipeChoice.java
+++ b/src/main/java/org/bukkit/inventory/RecipeChoice.java
@@ -10,6 +10,7 @@ import java.util.function.Predicate;
@@ -2039,7 +2039,7 @@ index db8bcc66bdc4bedfffb4705db6338eda4c0ad29a..feda3ddfaaf37b6ee218a0e0b1fbc199
/**
* Represents a potential item match within a recipe. All choices within a
@@ -150,6 +151,7 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
@@ -157,6 +158,7 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
public static class ExactChoice implements RecipeChoice {
private List<ItemStack> choices;
@@ -2047,7 +2047,7 @@ index db8bcc66bdc4bedfffb4705db6338eda4c0ad29a..feda3ddfaaf37b6ee218a0e0b1fbc199
public ExactChoice(@NotNull ItemStack stack) {
this(Arrays.asList(stack));
@@ -194,6 +196,7 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
@@ -206,6 +208,7 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
@Override
public boolean test(@NotNull ItemStack t) {
@@ -2055,7 +2055,7 @@ index db8bcc66bdc4bedfffb4705db6338eda4c0ad29a..feda3ddfaaf37b6ee218a0e0b1fbc199
for (ItemStack match : choices) {
if (t.isSimilar(match)) {
return true;
@@ -203,6 +206,17 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
@@ -215,6 +218,17 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
return false;
}

View File

@@ -5,27 +5,28 @@ Subject: [PATCH] Use Gradle Version Catalogs
diff --git a/build.gradle.kts b/build.gradle.kts
index 892e78b1d2d29dc54def03fcb6d85a93ad56d84c..cd64328dd664821a23ba2765e82dd633b696e3ab 100644
index 6aef83558a5ef7e84873b127c3bb43a6468c9a24..dedd9703559dbff43adb4b0aee6765789f130d50 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -9,11 +9,13 @@ java {
withJavadocJar()
}
+/*
+/* // Plazma - Use Gradle Version Catalogs
val annotationsVersion = "24.1.0"
val bungeeCordChatVersion = "1.20-R0.2"
val adventureVersion = "4.17.0-SNAPSHOT"
val adventureVersion = "4.17.0"
val slf4jVersion = "2.0.9"
val log4jVersion = "2.17.1"
+ */
+ */ // Plazma - Use Gradle Version Catalogs
val apiAndDocs: Configuration by configurations.creating {
attributes {
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
@@ -27,54 +29,31 @@ configurations.api {
@@ -27,55 +29,31 @@ configurations.api {
}
dependencies {
- api("com.mojang:brigadier:1.2.9") // Paper - Brigadier command api
- // 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")
@@ -82,8 +83,8 @@ index 892e78b1d2d29dc54def03fcb6d85a93ad56d84c..cd64328dd664821a23ba2765e82dd633
+ api(common.snakeyaml)
+ api(common.log4j.api)
+ api(common.maven.provider)
+ api(api.bungeechat) { exclude("com.google.guava", "guava") }
+ api(api.jsonsimple) { isTransitive = false }
+ api(api.bungeechat) { exclude("com.google.guava", "guava") }
+ apiAndDocs(platform(common.adventure.bom))
+ apiAndDocs(common.bundles.adventure)
+
@@ -102,7 +103,7 @@ index 892e78b1d2d29dc54def03fcb6d85a93ad56d84c..cd64328dd664821a23ba2765e82dd633
}
// Paper start
@@ -128,25 +107,16 @@ tasks.withType<Javadoc> {
@@ -149,25 +127,16 @@ tasks.withType<Javadoc> {
options.use()
options.isDocFilesSubDirs = true
options.links(
@@ -115,12 +116,12 @@ index 892e78b1d2d29dc54def03fcb6d85a93ad56d84c..cd64328dd664821a23ba2765e82dd633
- "https://www.javadoc.io/doc/com.google.code.gson/gson/2.10.1",
- // Paper end
- // Paper start
- //"https://jd.advntr.dev/api/$adventureVersion/",
- //"https://jd.advntr.dev/text-minimessage/$adventureVersion/",
- //"https://jd.advntr.dev/text-serializer-gson/$adventureVersion/",
- //"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://jd.advntr.dev/api/$adventureVersion/",
- "https://jd.advntr.dev/text-minimessage/$adventureVersion/",
- "https://jd.advntr.dev/text-serializer-gson/$adventureVersion/",
- "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

View File

@@ -0,0 +1,33 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Tue, 14 May 2024 18:36:30 +0900
Subject: [PATCH] Rebrand
diff --git a/MIT.txt b/MIT.txt
new file mode 100644
index 0000000000000000000000000000000000000000..67d405764ed68083d0164b1af0eabc0af7f6efea
--- /dev/null
+++ b/MIT.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2024 Paper Contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom
+the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Plazma Configurations
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 320422ff95773efa01e8205edcc5c6c9a84d5ecd..f1b39968788f90ffc785b9dd434b2a3671553a14 100644
index ec8b9b2cbe65838a194281f7d76d0e17defc5211..0062b2d4dc7a64d1e4da240bf8dc5b428eb242ee 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -2269,6 +2269,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi