mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-28 02:43:52 -07:00
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Please note that this build includes changes to meet upstreams requirements for nullability annotations. While we aim for a level of accuracy, these might not be 100% correct, if there are any issues, please speak to us on discord, or open an issue on the tracker to discuss. Bukkit Changes: 9a6a1de3 Remove nullability annotations from enum constructors 3f0591ea SPIGOT-2540: Add nullability annotations to entire Bukkit API CraftBukkit Changes:8d8475fc
SPIGOT-4666: Force parameter in HumanEntity#sleep8b1588e2
Fix ExplosionPrimeEvent#setFire not working with EnderCrystals39a287b7
Don't ignore newlines in PlayerListHeader/Footer Spigot Changes: cf694d87 Add nullability annotations
This commit is contained in:
@@ -6,7 +6,7 @@ Subject: [PATCH] Add version history to version command
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/VersionHistoryManager.java b/src/main/java/com/destroystokyo/paper/VersionHistoryManager.java
|
||||
new file mode 100644
|
||||
index 00000000..1daaca2f
|
||||
index 000000000..648b247ef
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/VersionHistoryManager.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -26,8 +26,9 @@ index 00000000..1daaca2f
|
||||
+import java.util.Objects;
|
||||
+import java.util.logging.Level;
|
||||
+import java.util.logging.Logger;
|
||||
+import javax.annotation.Nullable;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+public enum VersionHistoryManager {
|
||||
+ INSTANCE;
|
||||
@@ -84,7 +85,7 @@ index 00000000..1daaca2f
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private void writeFile(final Path path) {
|
||||
+ private void writeFile(@NotNull final Path path) {
|
||||
+ try (final BufferedWriter writer = Files.newBufferedWriter(
|
||||
+ path,
|
||||
+ StandardCharsets.UTF_8,
|
||||
@@ -103,7 +104,7 @@ index 00000000..1daaca2f
|
||||
+ return currentData;
|
||||
+ }
|
||||
+
|
||||
+ public class VersionData {
|
||||
+ public static class VersionData {
|
||||
+ private String oldVersion;
|
||||
+
|
||||
+ private String currentVersion;
|
||||
@@ -135,7 +136,7 @@ index 00000000..1daaca2f
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean equals(Object o) {
|
||||
+ public boolean equals(@Nullable Object o) {
|
||||
+ if (this == o) {
|
||||
+ return true;
|
||||
+ }
|
||||
@@ -154,7 +155,7 @@ index 00000000..1daaca2f
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
index f38f6864..5cebb245 100644
|
||||
index 8e57aa911..746cedd87 100644
|
||||
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
@@ -0,0 +0,0 @@ import org.json.simple.parser.ParseException;
|
||||
@@ -193,7 +194,7 @@ index f38f6864..5cebb245 100644
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
private void describeToSender(Plugin plugin, CommandSender sender) {
|
||||
private void describeToSender(@NotNull Plugin plugin, @NotNull CommandSender sender) {
|
||||
PluginDescriptionFile desc = plugin.getDescription();
|
||||
sender.sendMessage(ChatColor.GREEN + desc.getName() + ChatColor.WHITE + " version " + ChatColor.GREEN + desc.getVersion());
|
||||
--
|
Reference in New Issue
Block a user