Backport new paper features
This commit is contained in:
1 parent
4a59b14177
commit
a3ae1f021c
11 files changed
+466
-1
No files matched your search
@@ -91,7 +91,7 @@
|
||||
<dependency>
|
||||
<groupId>org.ow2.asm</groupId>
|
||||
<artifactId>asm-tree</artifactId>
|
||||
<version>7.3.1</version>
|
||||
<version>9.8</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NotCoded <66999075+not-coded@users.noreply.github.com>
|
||||
Date: Mon, 22 Jun 2026 19:16:35 +0200
|
||||
Subject: [PATCH] Update API dependencies: Adventure 4.13.1 + MiniMessage + ComponentLogger, checker-qual, ASM 9.8
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 73fbd5d5a591871a3a386fb5c455cd96a3992e7a..a7522fdb63bf1f9eed2333670c1b98eb8e01f85f 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -22,7 +22,7 @@
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
- <adventure.version>4.7.0</adventure.version> <!-- Paper - When updating this make sure to update the linked JavaDocs on the homepage as well! -->
|
||||
+ <adventure.version>4.13.1</adventure.version> <!-- Paper - When updating this make sure to update the linked JavaDocs on the homepage as well! -->
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
@@ -64,6 +64,19 @@
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-text-serializer-plain</artifactId>
|
||||
</dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>net.kyori</groupId>
|
||||
+ <artifactId>adventure-text-minimessage</artifactId>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>net.kyori</groupId>
|
||||
+ <artifactId>adventure-text-logger-slf4j</artifactId>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.checkerframework</groupId>
|
||||
+ <artifactId>checker-qual</artifactId>
|
||||
+ <version>3.33.0</version>
|
||||
+ </dependency>
|
||||
<!-- Paper end -->
|
||||
<dependency>
|
||||
<groupId>it.unimi.dsi</groupId>
|
||||
@@ -167,19 +180,19 @@
|
||||
<dependency>
|
||||
<groupId>org.ow2.asm</groupId>
|
||||
<artifactId>asm-tree</artifactId>
|
||||
- <version>9.1</version>
|
||||
+ <version>9.8</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- ASM -->
|
||||
<dependency>
|
||||
<groupId>org.ow2.asm</groupId>
|
||||
<artifactId>asm</artifactId>
|
||||
- <version>9.0</version>
|
||||
+ <version>9.8</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.ow2.asm</groupId>
|
||||
<artifactId>asm-commons</artifactId>
|
||||
- <version>9.0</version>
|
||||
+ <version>9.8</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -285,6 +298,8 @@
|
||||
<link>https://jd.adventure.kyori.net/text-serializer-gson/${adventure.version}/</link>
|
||||
<link>https://jd.adventure.kyori.net/text-serializer-legacy/${adventure.version}/</link>
|
||||
<link>https://jd.adventure.kyori.net/text-serializer-plain/${adventure.version}/</link>
|
||||
+ <link>https://jd.adventure.kyori.net/text-minimessage/${adventure.version}/</link>
|
||||
+ <link>https://jd.adventure.kyori.net/text-logger-slf4j/${adventure.version}/</link>
|
||||
<!-- Paper end -->
|
||||
</links>
|
||||
</configuration>
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NotCoded <66999075+not-coded@users.noreply.github.com>
|
||||
Date: Mon, 22 Jun 2026 19:16:35 +0200
|
||||
Subject: [PATCH] Backport CommandSender#sendRichMessage and sendPlainMessage
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/command/CommandSender.java b/src/main/java/org/bukkit/command/CommandSender.java
|
||||
index fb0e608fa92dae99b9eee8fc1cbdf4b91a33e620..ed1baafec483c3b4703a62d7ab4efa77e530a8f9 100644
|
||||
--- a/src/main/java/org/bukkit/command/CommandSender.java
|
||||
+++ b/src/main/java/org/bukkit/command/CommandSender.java
|
||||
@@ -148,5 +148,27 @@ public interface CommandSender extends net.kyori.adventure.audience.Audience, Pe
|
||||
default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
this.sendMessage(new net.md_5.bungee.api.chat.TextComponent(components).toLegacyText());
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Sends a message rendered from the given
|
||||
+ * <a href="https://docs.adventure.kyori.net/minimessage.html">MiniMessage</a> string.
|
||||
+ *
|
||||
+ * <p>For example {@code sendRichMessage("<red>Hello <bold>there")} sends a red "Hello"
|
||||
+ * followed by a red and bold "there".</p>
|
||||
+ *
|
||||
+ * @param message a MiniMessage string
|
||||
+ */
|
||||
+ default void sendRichMessage(final @NotNull String message) {
|
||||
+ this.sendMessage(net.kyori.adventure.text.minimessage.MiniMessage.miniMessage().deserialize(message));
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sends a plain message to the sender, with no parsing of colour codes or tags.
|
||||
+ *
|
||||
+ * @param message a plain message
|
||||
+ */
|
||||
+ default void sendPlainMessage(final @NotNull String message) {
|
||||
+ this.sendMessage(net.kyori.adventure.text.Component.text(message));
|
||||
+ }
|
||||
// Paper end
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NotCoded <66999075+not-coded@users.noreply.github.com>
|
||||
Date: Mon, 22 Jun 2026 19:16:35 +0200
|
||||
Subject: [PATCH] Backport PersistentDataContainer improvements
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/persistence/PersistentDataContainer.java b/src/main/java/org/bukkit/persistence/PersistentDataContainer.java
|
||||
index bf2a957be52d86d07d7d303c86bd3da5fe0a16c0..e776266ccbec65ea20a09d6836754b469ffcd4a6 100644
|
||||
--- a/src/main/java/org/bukkit/persistence/PersistentDataContainer.java
|
||||
+++ b/src/main/java/org/bukkit/persistence/PersistentDataContainer.java
|
||||
@@ -65,6 +65,20 @@ public interface PersistentDataContainer {
|
||||
*/
|
||||
<T, Z> boolean has(@NotNull NamespacedKey key, @NotNull PersistentDataType<T, Z> type);
|
||||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Returns if the persistent metadata provider has metadata registered under
|
||||
+ * the provided key, regardless of its data type.
|
||||
+ *
|
||||
+ * @param key the key the value is stored under
|
||||
+ * @return whether a value is stored under the given key
|
||||
+ * @throws NullPointerException if the key to look up is null
|
||||
+ */
|
||||
+ default boolean has(@NotNull NamespacedKey key) {
|
||||
+ return this.getKeys().contains(key);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Returns the metadata value that is stored on the
|
||||
* {@link PersistentDataHolder} instance.
|
||||
@@ -151,4 +165,19 @@ public interface PersistentDataContainer {
|
||||
*/
|
||||
@NotNull
|
||||
PersistentDataAdapterContext getAdapterContext();
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Copies all values from this {@link PersistentDataContainer} to the provided
|
||||
+ * container.
|
||||
+ * <p>
|
||||
+ * This method only copies custom object keys. Existing tags stored on the
|
||||
+ * provided container are not removed.
|
||||
+ *
|
||||
+ * @param other the container to copy to
|
||||
+ * @param replace whether to replace any matching values in the target container
|
||||
+ * @throws NullPointerException if the provided target container is null
|
||||
+ */
|
||||
+ void copyTo(@NotNull PersistentDataContainer other, boolean replace);
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/persistence/PersistentDataType.java b/src/main/java/org/bukkit/persistence/PersistentDataType.java
|
||||
index 0af00a2485cbb3fccd689dea56f0a705d0034782..56b77d1193c9f39592dccf5afec30365dd34ffab 100644
|
||||
--- a/src/main/java/org/bukkit/persistence/PersistentDataType.java
|
||||
+++ b/src/main/java/org/bukkit/persistence/PersistentDataType.java
|
||||
@@ -77,6 +77,11 @@ public interface PersistentDataType<T, Z> {
|
||||
*/
|
||||
PersistentDataType<PersistentDataContainer, PersistentDataContainer> TAG_CONTAINER = new PrimitivePersistentDataType<>(PersistentDataContainer.class);
|
||||
|
||||
+ /*
|
||||
+ Boolean. Paper - stored as a byte primitive.
|
||||
+ */
|
||||
+ PersistentDataType<Byte, Boolean> BOOLEAN = new BooleanPersistentDataType(); // Paper
|
||||
+
|
||||
/**
|
||||
* Returns the primitive data type of this tag.
|
||||
*
|
||||
@@ -155,4 +160,38 @@ public interface PersistentDataType<T, Z> {
|
||||
return primitive;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ // Paper start - byte-backed boolean data type
|
||||
+ /**
|
||||
+ * A {@link PersistentDataType} that stores and retrieves {@link Boolean}
|
||||
+ * values, backed by a {@code byte} primitive ({@code 1} for {@code true},
|
||||
+ * {@code 0} for {@code false}).
|
||||
+ */
|
||||
+ class BooleanPersistentDataType implements PersistentDataType<Byte, Boolean> {
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public Class<Byte> getPrimitiveType() {
|
||||
+ return Byte.class;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public Class<Boolean> getComplexType() {
|
||||
+ return Boolean.class;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public Byte toPrimitive(@NotNull Boolean complex, @NotNull PersistentDataAdapterContext context) {
|
||||
+ return (byte) (complex ? 1 : 0);
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public Boolean fromPrimitive(@NotNull Byte primitive, @NotNull PersistentDataAdapterContext context) {
|
||||
+ return primitive != 0;
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NotCoded <66999075+not-coded@users.noreply.github.com>
|
||||
Date: Mon, 22 Jun 2026 19:16:35 +0200
|
||||
Subject: [PATCH] Backport PrePlayerAttackEntityEvent
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/event/player/PrePlayerAttackEntityEvent.java b/src/main/java/io/papermc/paper/event/player/PrePlayerAttackEntityEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0bb0b49c74c31b81950e4a56f132adccb50ea456
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/event/player/PrePlayerAttackEntityEvent.java
|
||||
@@ -0,0 +1,80 @@
|
||||
+package io.papermc.paper.event.player;
|
||||
+
|
||||
+import org.bukkit.entity.Entity;
|
||||
+import org.bukkit.entity.Player;
|
||||
+import org.bukkit.event.Cancellable;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.player.PlayerEvent;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+/**
|
||||
+ * Called when a player attempts to attack an entity, before any of the attack
|
||||
+ * logic (damage, knockback, durability, etc.) runs.
|
||||
+ * <p>
|
||||
+ * This event will fire before {@link org.bukkit.event.entity.EntityDamageByEntityEvent}
|
||||
+ * and gives plugins a chance to intercept the attack as early as possible.
|
||||
+ * Note that this event may be called even when the attack will not actually do
|
||||
+ * anything (for example because the target cannot be damaged); see
|
||||
+ * {@link #willAttack()}.
|
||||
+ * <p>
|
||||
+ * Cancelling this event will prevent the attack from being processed.
|
||||
+ */
|
||||
+public class PrePlayerAttackEntityEvent extends PlayerEvent implements Cancellable {
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
+
|
||||
+ private final Entity attacked;
|
||||
+ private final boolean willAttack;
|
||||
+
|
||||
+ private boolean cancelled;
|
||||
+
|
||||
+ public PrePlayerAttackEntityEvent(@NotNull Player player, @NotNull Entity attacked, boolean willAttack) {
|
||||
+ super(player);
|
||||
+ this.attacked = attacked;
|
||||
+ this.willAttack = willAttack;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the entity that was attacked by the player.
|
||||
+ *
|
||||
+ * @return the attacked entity
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public Entity getAttacked() {
|
||||
+ return this.attacked;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets whether the attack will go through the regular attack logic, dealing
|
||||
+ * damage and applying knockback to {@link #getAttacked()}.
|
||||
+ * <p>
|
||||
+ * If this returns {@code false}, cancelling this event has no further effect
|
||||
+ * as the attack would not have done anything regardless.
|
||||
+ *
|
||||
+ * @return whether the entity will actually be attacked
|
||||
+ */
|
||||
+ public boolean willAttack() {
|
||||
+ return this.willAttack;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isCancelled() {
|
||||
+ return this.cancelled;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setCancelled(boolean cancel) {
|
||||
+ this.cancelled = cancel;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+}
|
||||
@@ -0,0 +1,31 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NotCoded <66999075+not-coded@users.noreply.github.com>
|
||||
Date: Mon, 22 Jun 2026 19:16:35 +0200
|
||||
Subject: [PATCH] Backport Plugin#getComponentLogger
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java
|
||||
index 79890c68f1ad31f951dfdbd9a16dac500ec58c40..6b1bd4a795406a533c1202a192251fc370e7462d 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/Plugin.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/Plugin.java
|
||||
@@ -173,6 +173,21 @@ public interface Plugin extends TabExecutor {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
+ // Paper start - Add ComponentLogger
|
||||
+ /**
|
||||
+ * Returns the {@link net.kyori.adventure.text.logger.slf4j.ComponentLogger ComponentLogger}
|
||||
+ * associated with this plugin. Unlike {@link #getLogger()}, this logger can log
|
||||
+ * {@link net.kyori.adventure.text.Component Components} directly, rendering colours and
|
||||
+ * formatting to the console.
|
||||
+ *
|
||||
+ * @return the ComponentLogger associated with this plugin
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ default net.kyori.adventure.text.logger.slf4j.ComponentLogger getComponentLogger() {
|
||||
+ return net.kyori.adventure.text.logger.slf4j.ComponentLogger.logger(getLogger().getName());
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Returns the name of the plugin.
|
||||
* <p>
|
||||
@@ -0,0 +1,28 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NotCoded <66999075+not-coded@users.noreply.github.com>
|
||||
Date: Mon, 22 Jun 2026 19:21:58 +0200
|
||||
Subject: [PATCH] Backport PersistentDataContainer#copyTo
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java
|
||||
index a4c888236bf09a25f234831a041ca5a4a2c972ef..8a428a6fd964b685cdeda1c35788c0248f77a772 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java
|
||||
@@ -160,5 +160,18 @@ public final class CraftPersistentDataContainer implements PersistentDataContain
|
||||
public void clear() {
|
||||
this.customDataTags.clear();
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public void copyTo(PersistentDataContainer other, boolean replace) {
|
||||
+ Validate.notNull(other, "The target container cannot be null");
|
||||
+ Validate.isTrue(other instanceof CraftPersistentDataContainer, "Cannot copy to a non-CraftPersistentDataContainer");
|
||||
+
|
||||
+ CraftPersistentDataContainer target = (CraftPersistentDataContainer) other;
|
||||
+ for (Entry<String, NBTBase> entry : this.customDataTags.entrySet()) {
|
||||
+ if (replace || !target.customDataTags.containsKey(entry.getKey())) {
|
||||
+ target.customDataTags.put(entry.getKey(), entry.getValue().clone());
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
// Paper end
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NotCoded <66999075+not-coded@users.noreply.github.com>
|
||||
Date: Mon, 22 Jun 2026 19:21:59 +0200
|
||||
Subject: [PATCH] Backport PrePlayerAttackEntityEvent
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
index 6a330fedef502a79bd4334d11fdd63572f8be642..931014d45b52ffbe26fb31fe934593721f154214 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
@@ -2415,7 +2415,17 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
return;
|
||||
}
|
||||
|
||||
- this.player.attack(entity);
|
||||
+ // Paper start - PrePlayerAttackEntityEvent
|
||||
+ // The target has passed the invalid-entity checks above, so the attack will be
|
||||
+ // processed here as it was before; willAttack is therefore always true and the
|
||||
+ // event is purely additive (only a cancellation changes existing behaviour).
|
||||
+ final io.papermc.paper.event.player.PrePlayerAttackEntityEvent prePlayerAttackEntityEvent = new io.papermc.paper.event.player.PrePlayerAttackEntityEvent(
|
||||
+ this.getPlayer(), entity.getBukkitEntity(), true
|
||||
+ );
|
||||
+ if (prePlayerAttackEntityEvent.callEvent()) {
|
||||
+ this.player.attack(entity);
|
||||
+ }
|
||||
+ // Paper end - PrePlayerAttackEntityEvent
|
||||
|
||||
// CraftBukkit start
|
||||
if (!itemInHand.isEmpty() && itemInHand.getCount() <= -1) {
|
||||
@@ -0,0 +1,36 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NotCoded <66999075+not-coded@users.noreply.github.com>
|
||||
Date: Mon, 22 Jun 2026 19:21:59 +0200
|
||||
Subject: [PATCH] Backport ComponentLogger console provider
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/adventure/PaperComponentLoggerProvider.java b/src/main/java/io/papermc/paper/adventure/PaperComponentLoggerProvider.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..7e6ba53f010bf8e1b0c7202584f620f84d3339a4
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/adventure/PaperComponentLoggerProvider.java
|
||||
@@ -0,0 +1,18 @@
|
||||
+package io.papermc.paper.adventure;
|
||||
+
|
||||
+import net.kyori.adventure.text.logger.slf4j.ComponentLogger;
|
||||
+import net.kyori.adventure.text.logger.slf4j.ComponentLoggerProvider;
|
||||
+import org.slf4j.LoggerFactory;
|
||||
+
|
||||
+/**
|
||||
+ * Renders {@link net.kyori.adventure.text.Component Components} logged through a
|
||||
+ * {@link ComponentLogger} to legacy section-sign strings so the server console
|
||||
+ * appender can colourise them, instead of the plain-text fallback Adventure ships.
|
||||
+ */
|
||||
+public final class PaperComponentLoggerProvider implements ComponentLoggerProvider {
|
||||
+
|
||||
+ @Override
|
||||
+ public ComponentLogger logger(final LoggerHelper helper, final String name) {
|
||||
+ return helper.delegating(LoggerFactory.getLogger(name), PaperAdventure.LEGACY_SECTION_UXRC::serialize);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/resources/META-INF/services/net.kyori.adventure.text.logger.slf4j.ComponentLoggerProvider b/src/main/resources/META-INF/services/net.kyori.adventure.text.logger.slf4j.ComponentLoggerProvider
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..6d5d7d23a25b4d549e86386323fb82591202b700
|
||||
--- /dev/null
|
||||
+++ b/src/main/resources/META-INF/services/net.kyori.adventure.text.logger.slf4j.ComponentLoggerProvider
|
||||
@@ -0,0 +1 @@
|
||||
+io.papermc.paper.adventure.PaperComponentLoggerProvider
|
||||
@@ -0,0 +1,21 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NotCoded <66999075+not-coded@users.noreply.github.com>
|
||||
Date: Mon, 22 Jun 2026 19:21:59 +0200
|
||||
Subject: [PATCH] Allow running on modern Java
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index ecd1f0784493dfc758483b7912ce086c3b0d7aa0..dbeea8398d1efb6c77bda752dcdb5fe6fee866ea 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -217,11 +217,6 @@ public class Main {
|
||||
return;
|
||||
}
|
||||
|
||||
- float javaVersion = Float.parseFloat(System.getProperty("java.class.version"));
|
||||
- if (javaVersion > 60.0) {
|
||||
- System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 16 is supported.");
|
||||
- if (!Boolean.getBoolean("Paper.IgnoreJavaVersion")) return; // Paper
|
||||
- }
|
||||
|
||||
try {
|
||||
// Paper start - Handled by TerminalConsoleAppender
|
||||
@@ -0,0 +1,18 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NotCoded <66999075+not-coded@users.noreply.github.com>
|
||||
Date: Mon, 22 Jun 2026 19:21:59 +0200
|
||||
Subject: [PATCH] Bump ASM to 9.8 for modern Java support
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 48495ad71339c142a62839824a98c02011645207..d65aa099f02d5954fd16ad9317349f9d77d53bf7 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -98,7 +98,7 @@
|
||||
<dependency>
|
||||
<groupId>org.ow2.asm</groupId>
|
||||
<artifactId>asm</artifactId>
|
||||
- <version>9.1</version>
|
||||
+ <version>9.8</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
Reference in new issue
Block a user