mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-23 00:49:31 +00:00
1.19.4
still WIP
This commit is contained in:
@@ -5,20 +5,21 @@ Subject: [PATCH] Bump Dependencies
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 1f8ce35cbc0802917d6fb166fe276a22b03835ed..c9c032ff0ff898cd28de231843c2b98f9843cb8b 100644
|
||||
index 8af9efe2dbc9563a2c327002cf05c5d2fd8fc68b..475761fc9ee0ed5c3c7f74fef46b459dd26e3f01 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -24,14 +24,16 @@ configurations.api {
|
||||
@@ -24,15 +24,17 @@ configurations.api {
|
||||
dependencies {
|
||||
// api dependencies are listed transitively to API consumers
|
||||
api("com.google.guava:guava:31.1-jre")
|
||||
- api("com.google.code.gson:gson:2.10")
|
||||
- api("net.md-5:bungeecord-chat:1.16-R0.4-deprecated+build.6") // Paper
|
||||
- api("net.md-5:bungeecord-chat:1.16-R0.4-deprecated+build.9") // Paper
|
||||
+ // Leaf start - Bump Dependencies
|
||||
+ api("com.google.code.gson:gson:2.10.1")
|
||||
+ api("net.md-5:bungeecord-chat:1.19-R0.1-SNAPSHOT") // Paper
|
||||
+ // Leaf end
|
||||
api("org.yaml:snakeyaml:1.33")
|
||||
api("org.joml:joml:1.10.5")
|
||||
// Paper start
|
||||
api("com.googlecode.json-simple:json-simple:1.1.1") {
|
||||
isTransitive = false // includes junit
|
||||
@@ -28,7 +29,7 @@ index 1f8ce35cbc0802917d6fb166fe276a22b03835ed..c9c032ff0ff898cd28de231843c2b98f
|
||||
apiAndDocs(platform("net.kyori:adventure-bom:$adventureVersion"))
|
||||
apiAndDocs("net.kyori:adventure-api")
|
||||
apiAndDocs("net.kyori:adventure-text-minimessage")
|
||||
@@ -39,33 +41,35 @@ dependencies {
|
||||
@@ -40,32 +42,34 @@ dependencies {
|
||||
apiAndDocs("net.kyori:adventure-text-serializer-legacy")
|
||||
apiAndDocs("net.kyori:adventure-text-serializer-plain")
|
||||
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
|
||||
@@ -38,13 +39,11 @@ index 1f8ce35cbc0802917d6fb166fe276a22b03835ed..c9c032ff0ff898cd28de231843c2b98f
|
||||
+ api("org.apache.logging.log4j:log4j-api:2.20.0")
|
||||
+ api("org.slf4j:slf4j-api:2.0.6")
|
||||
|
||||
- implementation("org.ow2.asm:asm:9.2")
|
||||
- implementation("org.ow2.asm:asm-commons:9.2")
|
||||
+ implementation("org.ow2.asm:asm:9.4")
|
||||
+ implementation("org.ow2.asm:asm-commons:9.4")
|
||||
implementation("org.ow2.asm:asm:9.4")
|
||||
implementation("org.ow2.asm:asm-commons:9.4")
|
||||
// Paper end
|
||||
|
||||
- compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||
- api("org.apache.maven:maven-resolver-provider:3.8.5") // Paper, expose
|
||||
- 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
|
||||
@@ -70,14 +69,12 @@ index 1f8ce35cbc0802917d6fb166fe276a22b03835ed..c9c032ff0ff898cd28de231843c2b98f
|
||||
testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
- testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
- testImplementation("org.ow2.asm:asm-tree:9.3")
|
||||
+ testImplementation("org.hamcrest:hamcrest-library:2.2")
|
||||
+ testImplementation("org.ow2.asm:asm-tree:9.4")
|
||||
+ // Leaf end
|
||||
testImplementation("org.ow2.asm:asm-tree:9.4")
|
||||
}
|
||||
|
||||
configure<PublishingExtension> {
|
||||
@@ -111,9 +115,11 @@ tasks.withType<Javadoc> {
|
||||
@@ -112,9 +116,11 @@ tasks.withType<Javadoc> {
|
||||
options.use()
|
||||
options.isDocFilesSubDirs = true
|
||||
options.links(
|
||||
@@ -90,8 +87,8 @@ index 1f8ce35cbc0802917d6fb166fe276a22b03835ed..c9c032ff0ff898cd28de231843c2b98f
|
||||
+ // Leaf end
|
||||
// Paper start
|
||||
//"https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/", // don't link to bungee chat
|
||||
"https://jd.adventure.kyori.net/api/$adventureVersion/",
|
||||
@@ -153,6 +159,9 @@ val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks.
|
||||
"https://jd.advntr.dev/api/$adventureVersion/",
|
||||
@@ -154,6 +160,9 @@ val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks.
|
||||
jarToScan.set(tasks.jar.flatMap { it.archiveFile })
|
||||
classpath.from(configurations.compileClasspath)
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ Original license: MIT
|
||||
Original project: https://github.com/PurpurMC/Purpur
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/ChatColor.java b/src/main/java/org/bukkit/ChatColor.java
|
||||
index f6eb30f53dad684f156102cf7147b2f00c82c71e..f1239a2618b08fa92e0e20692d1c3d20d1558502 100644
|
||||
index e3f185dc982d1c38195a4e01ddd485c13ffa58c0..98c2f73ee5c921dab506fc933a0acff400201537 100644
|
||||
--- a/src/main/java/org/bukkit/ChatColor.java
|
||||
+++ b/src/main/java/org/bukkit/ChatColor.java
|
||||
@@ -3,6 +3,7 @@ package org.bukkit;
|
||||
@@ -18,7 +18,7 @@ index f6eb30f53dad684f156102cf7147b2f00c82c71e..f1239a2618b08fa92e0e20692d1c3d20
|
||||
import java.util.regex.Pattern;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -413,4 +414,77 @@ public enum ChatColor {
|
||||
@@ -454,4 +455,77 @@ public enum ChatColor {
|
||||
BY_CHAR.put(color.code, color);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Parker Hawke <hawkeboyz2@hotmail.com>
|
||||
Date: Sat, 27 Jun 2020 18:43:37 -0400
|
||||
Subject: [PATCH] Purpur: Spigot - Improve output of plugins command
|
||||
|
||||
Original license: MIT
|
||||
Original project: https://github.com/PurpurMC/Purpur
|
||||
|
||||
Co-authored-by: Oharass <oharass@bk.ru>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
|
||||
index 1aa58c59e1e8738bbdc77752885ff3b18b29de42..46525191653e4ac0e0366c0357f368c0b709f20d 100644
|
||||
--- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
|
||||
+++ b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
|
||||
@@ -11,6 +11,14 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
+// Spigot start
|
||||
+import net.kyori.adventure.text.Component;
|
||||
+import net.kyori.adventure.text.TextComponent;
|
||||
+import net.kyori.adventure.text.format.NamedTextColor;
|
||||
+import net.kyori.adventure.text.event.ClickEvent;
|
||||
+import org.bukkit.entity.Player;
|
||||
+import org.bukkit.plugin.PluginDescriptionFile;
|
||||
+// Spigot end
|
||||
|
||||
public class PluginsCommand extends BukkitCommand {
|
||||
public PluginsCommand(@NotNull String name) {
|
||||
@@ -25,7 +33,13 @@ public class PluginsCommand extends BukkitCommand {
|
||||
public boolean execute(@NotNull CommandSender sender, @NotNull String currentAlias, @NotNull String[] args) {
|
||||
if (!testPermission(sender)) return true;
|
||||
|
||||
- sender.sendMessage("Plugins " + getPluginList());
|
||||
+ // Spigot start
|
||||
+ if (sender instanceof Player && sender.hasPermission("bukkit.command.version")) {
|
||||
+ sender.sendMessage(getPluginListSpigot());
|
||||
+ } else {
|
||||
+ sender.sendMessage("Plugins " + getPluginList());
|
||||
+ }
|
||||
+ // Spigot end
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -71,4 +85,73 @@ public class PluginsCommand extends BukkitCommand {
|
||||
// Paper end
|
||||
}
|
||||
|
||||
+ // Spigot start
|
||||
+ @NotNull
|
||||
+ private TextComponent getPluginListSpigot() {
|
||||
+ Plugin[] plugins = Bukkit.getPluginManager().getPlugins();
|
||||
+ TextComponent.Builder builder = Component.text();
|
||||
+ builder.append(Component.text("Plugins (" + plugins.length + "): "));
|
||||
+
|
||||
+ int index = 0;
|
||||
+ for (Plugin plugin : plugins) {
|
||||
+ if (index++ > 0) {
|
||||
+ builder.append(Component.text(", ", NamedTextColor.WHITE));
|
||||
+ }
|
||||
+
|
||||
+ // Event components
|
||||
+ PluginDescriptionFile description = plugin.getDescription();
|
||||
+ TextComponent.Builder hover = Component.text();
|
||||
+ hover.append(Component.text("Version: ", NamedTextColor.WHITE)).append(Component.text(description.getVersion(), NamedTextColor.GREEN));
|
||||
+
|
||||
+ if (description.getDescription() != null) {
|
||||
+ hover.append(Component.newline())
|
||||
+ .append(Component.text("Description: ", NamedTextColor.WHITE))
|
||||
+ .append(Component.text(description.getDescription(), NamedTextColor.GREEN));
|
||||
+ }
|
||||
+
|
||||
+ if (description.getWebsite() != null) {
|
||||
+ hover.append(Component.newline())
|
||||
+ .append(Component.text("Website: ", NamedTextColor.WHITE))
|
||||
+ .append(Component.text(description.getWebsite(), NamedTextColor.GREEN));
|
||||
+ }
|
||||
+
|
||||
+ if (!description.getAuthors().isEmpty()) {
|
||||
+ hover.append(Component.newline());
|
||||
+ if (description.getAuthors().size() == 1) {
|
||||
+ hover.append(Component.text("Author: "));
|
||||
+ } else {
|
||||
+ hover.append(Component.text("Authors: "));
|
||||
+ }
|
||||
+
|
||||
+ hover.append(getAuthors(description));
|
||||
+ }
|
||||
+
|
||||
+ // Plugin list entry
|
||||
+ builder.append(Component.text(plugin.getDescription().getName(), plugin.isEnabled() ? NamedTextColor.GREEN : NamedTextColor.RED)
|
||||
+ .hoverEvent(hover.build()).clickEvent(ClickEvent.suggestCommand("/version " + description.getName())));
|
||||
+
|
||||
+ if (plugin.getDescription().getProvides().size() > 0) {
|
||||
+ builder.append(Component.text(" (", NamedTextColor.WHITE)).append(Component.text(String.join(", ", plugin.getDescription().getProvides()))).append(Component.text(")"));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return builder.build();
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ private TextComponent getAuthors(@NotNull final PluginDescriptionFile description) {
|
||||
+ TextComponent.Builder builder = Component.text();
|
||||
+ List<String> authors = description.getAuthors();
|
||||
+
|
||||
+ for (int i = 0; i < authors.size(); i++) {
|
||||
+ if (i > 0) {
|
||||
+ builder.append(Component.text(i < authors.size() - 1 ? ", " : " and ", NamedTextColor.WHITE));
|
||||
+ }
|
||||
+
|
||||
+ builder.append(Component.text(authors.get(i), NamedTextColor.GREEN));
|
||||
+ }
|
||||
+
|
||||
+ return builder.build();
|
||||
+ }
|
||||
+ // Spigot end
|
||||
}
|
||||
@@ -24,10 +24,10 @@ index 3b3d9642a8d63798dc28f2f8df77f0466451cbff..8d3605f25e97a375971705c737bc7bac
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 7903554958f567c7b566a47fa4b49852a837898e..730394fd53fdaa90133ee399f86e76da8ccc08e6 100644
|
||||
index 623c683563a5fb5dcf3b8478873ef2a27307b289..e7e7a4b5ed1a1ae7b4f711daec51003514908d86 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -662,11 +662,15 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -640,11 +640,15 @@ public final class SimplePluginManager implements PluginManager {
|
||||
// Gale end - JettPack - skip events without listeners
|
||||
|
||||
// Paper - replace callEvent by merging to below method
|
||||
@@ -7,20 +7,20 @@ Original license: MIT
|
||||
Original project: https://github.com/KeYiMC/KeYi
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 6acdd0c9a6ea65b06ad5dad4758efb64884daaf3..49b7960390cef1f2e00105ed07186608376b4ddf 100644
|
||||
index 15c57f3e4e1c023e0f3168ce03dd770f006cf27b..9b1390c60bb8a5777a93676ad878b3bee1e8fd4e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3,6 +3,9 @@ package org.bukkit.entity;
|
||||
import java.net.InetSocketAddress;
|
||||
@@ -4,7 +4,8 @@ import java.net.InetSocketAddress;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
-
|
||||
+import java.util.concurrent.CompletableFuture;
|
||||
+import java.util.concurrent.Future;
|
||||
+
|
||||
import com.destroystokyo.paper.ClientOption; // Paper
|
||||
import com.destroystokyo.paper.Title; // Paper
|
||||
import net.kyori.adventure.text.Component;
|
||||
@@ -3010,4 +3013,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
+import net.kyori.adventure.text.Component;
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.GameMode;
|
||||
@@ -3012,4 +3013,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@Override
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
@@ -7,10 +7,10 @@ Original license: MIT
|
||||
Original project: https://github.com/Cryptite/Slice
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 49b7960390cef1f2e00105ed07186608376b4ddf..04da082de862bef1d345266fc763d480e3bed0bc 100644
|
||||
index 9b1390c60bb8a5777a93676ad878b3bee1e8fd4e..cc2be9366a671112e30578e5a470bdc4790e05ed 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2873,6 +2873,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2895,6 +2895,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
String getClientBrandName();
|
||||
// Paper end
|
||||
|
||||
@@ -7,10 +7,10 @@ Original license: GPL v3
|
||||
Original project: https://github.com/pufferfish-gg/Pufferfish
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 359050a6f125e16787b4f712aaea463d0014dc63..1b61f96fa04c30b7e25b0dbb24a602def228175c 100644
|
||||
index 475761fc9ee0ed5c3c7f74fef46b459dd26e3f01..fb4e4e4fa637032f4eb315d27a69c297bc0a9d52 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -44,6 +44,7 @@ dependencies {
|
||||
@@ -45,6 +45,7 @@ dependencies {
|
||||
// Leaf start - Bump Dependencies
|
||||
api("org.apache.logging.log4j:log4j-api:2.20.0")
|
||||
api("org.slf4j:slf4j-api:2.0.6")
|
||||
@@ -186,10 +186,10 @@ index 0000000000000000000000000000000000000000..10310fdd53de28efb8a8250f6d3b0c8e
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 730394fd53fdaa90133ee399f86e76da8ccc08e6..17b8d42f8e2897eb019ef12ad772ed0d505f7e84 100644
|
||||
index e7e7a4b5ed1a1ae7b4f711daec51003514908d86..f81a3ac08a80d1a3282844b9e3d9e64e2eed34d9 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -625,7 +625,9 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -584,7 +584,9 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
// Paper start
|
||||
private void handlePluginException(String msg, Throwable ex, Plugin plugin) {
|
||||
@@ -199,7 +199,7 @@ index 730394fd53fdaa90133ee399f86e76da8ccc08e6..17b8d42f8e2897eb019ef12ad772ed0d
|
||||
callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerPluginEnableDisableException(msg, ex, plugin)));
|
||||
}
|
||||
// Paper end
|
||||
@@ -693,9 +695,11 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -671,9 +673,11 @@ public final class SimplePluginManager implements PluginManager {
|
||||
));
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
@@ -212,20 +212,24 @@ index 730394fd53fdaa90133ee399f86e76da8ccc08e6..17b8d42f8e2897eb019ef12ad772ed0d
|
||||
callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerEventException(msg, ex, registration.getPlugin(), registration.getListener(), event)));
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
index 7e5149a21b6747f64425a277c142e69f0ef43b3f..bf93183aa76af005d5daf8cf533f908d535166e8 100644
|
||||
index eaefbb00e9993d54906cc8cf35cf753c0d6c7707..301e82369603f3dd6e6c1bd380da4bacacd7ef6c 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
@@ -370,7 +370,9 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
@@ -336,7 +336,13 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
try {
|
||||
jPlugin.setEnabled(true);
|
||||
} catch (Throwable ex) {
|
||||
+ gg.pufferfish.pufferfish.sentry.SentryContext.setPluginContext(plugin); // Pufferfish
|
||||
server.getLogger().log(Level.SEVERE, "Error occurred while enabling " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
|
||||
+ gg.pufferfish.pufferfish.sentry.SentryContext.removePluginContext(); // Pufferfish
|
||||
// Paper start - Disable plugins that fail to load
|
||||
this.server.getPluginManager().disablePlugin(jPlugin);
|
||||
return;
|
||||
@@ -399,7 +401,9 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
+ // Paper start - Disable plugins that fail to load
|
||||
+ this.server.getPluginManager().disablePlugin(jPlugin);
|
||||
+ return;
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
// Perhaps abort here, rather than continue going, but as it stands,
|
||||
@@ -361,7 +367,9 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
try {
|
||||
jPlugin.setEnabled(false);
|
||||
} catch (Throwable ex) {
|
||||
Reference in New Issue
Block a user