mirror of
https://github.com/PaperMC/Paper.git
synced 2025-04-01 12:11:45 +02:00
Re-enable multi-release plugin JARs (#9001)
This commit is contained in:
parent
055f7228f0
commit
510082222b
192 changed files with 9 additions and 28 deletions
patches/api
0008-Paper-Plugins.patch0230-Enable-multi-release-plugin-jars.patch0230-Player-Chunk-Load-Unload-Events.patch0231-Expose-LivingEntity-hurt-direction.patch0232-Add-OBSTRUCTED-reason-to-BedEnterResult.patch0233-Added-PlayerTradeEvent.patch0234-Add-TargetHitEvent-API.patch0235-Additional-Block-Material-API-s.patch0236-Add-API-to-get-Material-from-Boats-and-Minecarts.patch0237-Add-PlayerFlowerPotManipulateEvent.patch0238-Zombie-API-breaking-doors.patch0239-Add-EntityLoadCrossbowEvent.patch0240-Added-WorldGameRuleChangeEvent.patch0241-Added-ServerResourcesReloadedEvent.patch0242-Add-BlockFailedDispenseEvent.patch0243-Added-PlayerLecternPageChangeEvent.patch0244-Added-PlayerLoomPatternSelectEvent.patch0245-Add-API-to-get-exact-interaction-point-in-PlayerInte.patch0246-Add-sendOpLevel-API.patch0247-Add-PaperRegistry.patch0248-Add-StructuresLocateEvent.patch0249-Return-chat-component-with-empty-text-instead-of-thr.patch0250-Add-BlockPreDispenseEvent.patch0251-Added-missing-vanilla-tags.patch0252-Added-PlayerChangeBeaconEffectEvent.patch0253-Added-PlayerStonecutterRecipeSelectEvent.patch0254-Add-dropLeash-variable-to-EntityUnleashEvent.patch0255-add-DragonEggFormEvent.patch0256-EntityMoveEvent.patch0257-Allow-adding-items-to-BlockDropItemEvent.patch0258-Add-getMainThreadExecutor-to-BukkitScheduler.patch0259-living-entity-allow-attribute-registration.patch0260-Add-missing-effects.patch0261-Expose-Tracked-Players.patch0262-Cache-the-result-of-Material-isBlock.patch0263-Add-worldborder-events.patch0264-added-PlayerNameEntityEvent.patch0265-Add-recipe-to-cook-events.patch0266-Add-Block-isValidTool.patch0267-Expand-world-key-API.patch0268-Item-Rarity-API.patch0269-Expose-protocol-version.patch0270-add-isDeeplySleeping-to-HumanEntity.patch0271-add-consumeFuel-to-FurnaceBurnEvent.patch0272-add-get-set-drop-chance-to-EntityEquipment.patch0273-Added-PlayerDeepSleepEvent.patch0274-More-World-API.patch0275-Added-PlayerBedFailEnterEvent.patch0276-Introduce-beacon-activation-deactivation-events.patch0277-PlayerMoveEvent-Improvements.patch0278-add-RespawnFlags-to-PlayerRespawnEvent.patch0279-Add-more-WanderingTrader-API.patch0280-Add-EntityBlockStorage-clearEntities.patch0281-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch0282-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch0283-Inventory-close.patch0284-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch0285-Add-basic-Datapack-API.patch0286-additions-to-PlayerGameModeChangeEvent.patch0287-ItemStack-repair-check-API.patch0288-More-Enchantment-API.patch0289-Add-Mob-lookAt-API.patch0290-ItemStack-editMeta.patch0291-Add-EntityInsideBlockEvent.patch0292-Attributes-API-for-item-defaults.patch0293-Add-cause-to-Weather-ThunderChangeEvents.patch0294-More-Lidded-Block-API.patch0295-Add-PlayerKickEvent-causes.patch0296-Add-PufferFishStateChangeEvent.patch0297-Add-BellRevealRaiderEvent.patch0298-Add-ElderGuardianAppearanceEvent.patch0299-Add-more-line-of-sight-methods.patch0300-Add-WaterBottleSplashEvent.patch0301-Add-more-LimitedRegion-API.patch0302-Missing-Entity-Behavior-API.patch0303-Adds-PlayerArmSwingEvent.patch0304-Add-PlayerSignCommandPreprocessEvent.patch0305-fix-empty-array-elements-in-command-arguments.patch0306-Stinger-API.patch0307-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch0308-Add-PlayerSetSpawnEvent.patch0309-Added-EntityDamageItemEvent.patch0310-Make-EntityUnleashEvent-cancellable.patch0311-Change-EnderEye-target-without-changing-other-things.patch0312-Add-BlockBreakBlockEvent.patch0313-Add-helpers-for-left-right-click-to-Action.patch0314-Option-to-prevent-NBT-copy-in-smithing-recipes.patch0315-More-CommandBlock-API.patch0316-Add-missing-team-sidebar-display-slots.patch0317-add-back-EntityPortalExitEvent.patch0318-Add-methods-to-find-targets-for-lightning-strikes.patch0319-Get-entity-default-attributes.patch0320-Left-handed-API.patch0321-Add-more-advancement-API.patch0322-Add-ItemFactory-getSpawnEgg-API.patch0323-Add-critical-damage-API.patch0324-Fix-issues-with-mob-conversion.patch0325-Add-isCollidable-methods-to-various-places.patch0326-Goat-ram-API.patch0327-Add-API-for-resetting-a-single-score.patch
|
@ -5,7 +5,7 @@ Subject: [PATCH] Paper Plugins
|
|||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index d95b3d504ddc9ed76fc86cd45fa922d68e597827..9d6e604c7667985dc8107a5df9d36c53e8006326 100644
|
||||
index bb1f3b3d5a22ca391f4362e5d4cf016e7e9be0e3..f900b73c52971fe682171e7f99246afdb8b080f3 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -45,7 +45,7 @@ dependencies {
|
||||
|
@ -2040,7 +2040,7 @@ 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 2f74ec96ece706de23156ebabfe493211bc05391..2d2fa6ce5200eb5c75a733f9f54f400113cc22b0 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
|
||||
@@ -29,7 +29,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
@ -2067,7 +2067,7 @@ index 2f74ec96ece706de23156ebabfe493211bc05391..2d2fa6ce5200eb5c75a733f9f54f4001
|
|||
|
||||
- PluginClassLoader(@NotNull final JavaPluginLoader loader, @Nullable final ClassLoader parent, @NotNull final PluginDescriptionFile description, @NotNull final File dataFolder, @NotNull final File file, @Nullable ClassLoader libraryLoader) throws IOException, InvalidPluginException, MalformedURLException {
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
+ public PluginClassLoader(@Nullable final ClassLoader parent, @NotNull final PluginDescriptionFile description, @NotNull final File dataFolder, @NotNull final File file, @Nullable ClassLoader libraryLoader, @Nullable JarFile jarFile, io.papermc.paper.plugin.provider.entrypoint.DependencyContext dependencyContext) throws IOException, InvalidPluginException, MalformedURLException { // Paper // Paper - use JarFile provided by SpigotPluginProvider
|
||||
+ public PluginClassLoader(@Nullable final ClassLoader parent, @NotNull final PluginDescriptionFile description, @NotNull final File dataFolder, @NotNull final File file, @Nullable ClassLoader libraryLoader, JarFile jarFile, io.papermc.paper.plugin.provider.entrypoint.DependencyContext dependencyContext) throws IOException, InvalidPluginException, MalformedURLException { // Paper // Paper - use JarFile provided by SpigotPluginProvider
|
||||
super(new URL[] {file.toURI().toURL()}, parent);
|
||||
- Preconditions.checkArgument(loader != null, "Loader cannot be null");
|
||||
+ this.loader = null; // Paper - pass null into loader field
|
||||
|
@ -2077,7 +2077,7 @@ index 2f74ec96ece706de23156ebabfe493211bc05391..2d2fa6ce5200eb5c75a733f9f54f4001
|
|||
this.dataFolder = dataFolder;
|
||||
this.file = file;
|
||||
- this.jar = new JarFile(file);
|
||||
+ this.jar = jarFile == null ? new JarFile(file) : jarFile; // Paper - use JarFile provided by SpigotPluginProvider
|
||||
+ this.jar = jarFile; // Paper - use JarFile provided by SpigotPluginProvider
|
||||
this.manifest = jar.getManifest();
|
||||
this.url = file.toURI().toURL();
|
||||
this.libraryLoader = libraryLoader;
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Kyle Wood <kyle@denwav.dev>
|
||||
Date: Fri, 4 Dec 2020 15:53:19 -0800
|
||||
Subject: [PATCH] Enable multi-release plugin jars
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
index 5c5aadc15c8198e0e79b4ac0f043a45720aef002..942b313d9cee8abc7a5c9948e9e94d4d30741434 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
@@ -60,7 +60,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
|
||||
this.description = description;
|
||||
this.dataFolder = dataFolder;
|
||||
this.file = file;
|
||||
- this.jar = jarFile == null ? new JarFile(file) : jarFile; // Paper - use JarFile provided by SpigotPluginProvider
|
||||
+ this.jar = jarFile == null ? new JarFile(file, true, java.util.zip.ZipFile.OPEN_READ, JarFile.runtimeVersion()) : jarFile; // Paper - use JarFile provided by SpigotPluginProvider // Paper - enable multi-release jars for Java 9+
|
||||
this.manifest = jar.getManifest();
|
||||
this.url = file.toURI().toURL();
|
||||
this.libraryLoader = libraryLoader;
|
|
@ -5,13 +5,13 @@ Subject: [PATCH] Rewrite LogEvents to contain the source jars in stack traces
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
index 942b313d9cee8abc7a5c9948e9e94d4d30741434..a22b47d452cca95fdd5e468ef61a7f9347cc4b98 100644
|
||||
index 576df38b745c0ef0ed927e960f3f8baaff784593..efcfef28b26622454a26b99cd52e0bafb69f6549 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
@@ -54,7 +54,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
|
||||
|
||||
@org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public PluginClassLoader(@Nullable final ClassLoader parent, @NotNull final PluginDescriptionFile description, @NotNull final File dataFolder, @NotNull final File file, @Nullable ClassLoader libraryLoader, @Nullable JarFile jarFile, io.papermc.paper.plugin.provider.entrypoint.DependencyContext dependencyContext) throws IOException, InvalidPluginException, MalformedURLException { // Paper // Paper - use JarFile provided by SpigotPluginProvider
|
||||
public PluginClassLoader(@Nullable final ClassLoader parent, @NotNull final PluginDescriptionFile description, @NotNull final File dataFolder, @NotNull final File file, @Nullable ClassLoader libraryLoader, JarFile jarFile, io.papermc.paper.plugin.provider.entrypoint.DependencyContext dependencyContext) throws IOException, InvalidPluginException, MalformedURLException { // Paper // Paper - use JarFile provided by SpigotPluginProvider
|
||||
- super(new URL[] {file.toURI().toURL()}, parent);
|
||||
+ super(file.getName(), new URL[] {file.toURI().toURL()}, parent);
|
||||
this.loader = null; // Paper - pass null into loader field
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue