Scissors/patches/api/0001-AdvancedSlimePaper-API-Changes.patch

48 lines
2.1 KiB
Diff
Raw Normal View History

2023-08-21 19:00:03 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
Date: Mon, 26 Dec 2022 12:08:15 -0500
Subject: [PATCH] AdvancedSlimePaper API Changes
AdvancedSlimePaper
Copyright (C) 2023 InfernalSuite
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/build.gradle.kts b/build.gradle.kts
index 8045f92ffdfb4164bcbef99c41359590c45f9006..51e49260927f6840c3640275ff26e7398ec72b89 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -27,6 +27,7 @@ configurations.api {
dependencies {
// api dependencies are listed transitively to API consumers
+ api(project(":aswm-api")) // ASWM
api("com.google.guava:guava:31.1-jre")
api("com.google.code.gson:gson:2.10")
api("net.md-5:bungeecord-chat:$bungeeCordChatVersion-deprecated+build.14") // Paper
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index 13da387d3b59bc67c0d73e3fbd3a4034b1281527..8678af261060575e2c138b84dc7c198e8d9cf1a9 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -251,7 +251,9 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
// Paper end
super.close();
} finally {
+ if (this.plugin == null || !this.plugin.getName().equals("SlimeWorldManager")) { // ASWM - Don't close
jar.close();
+ } // ASWM - Don't close
}
}