Move version command update checking to the implementation

This makes it easier for downstream projects (forks) to replace the
version fetching system with their own. It is as simple as implementing
an interface and overriding the default implementation of
org.bukkit.UnsafeValues#getVersionFetcher()

It also makes it easier for us to organize things like the version
history feature.

Lastly I have updated the paper implementation to check against the site
API rather than against jenkins.
This commit is contained in:
Zach Brown 2019-05-27 04:13:41 -05:00
parent 7fb12d787e
commit 70ce6ce831
No known key found for this signature in database
GPG Key ID: CC9DA35FC5450B76
475 changed files with 1472 additions and 1338 deletions

View File

@ -1,154 +0,0 @@
From e3823b8eaaa1f54104e13a283aab7a682fdb6cdb Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 17:58:01 -0600
Subject: [PATCH] Check Paper versions
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
index cbce52444..4f9042e23 100644
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
@@ -25,6 +25,14 @@ import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.util.StringUtil;
import org.jetbrains.annotations.NotNull;
+// Paper start
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+import org.json.simple.parser.ParseException;
+// Paper end
+
public class VersionCommand extends BukkitCommand {
public VersionCommand(@NotNull String name) {
super(name);
@@ -150,7 +158,7 @@ public class VersionCommand extends BukkitCommand {
private void sendVersion(@NotNull CommandSender sender) {
if (hasVersion) {
- if (System.currentTimeMillis() - lastCheck > 21600000) {
+ if (System.currentTimeMillis() - lastCheck > 7200000) { // Paper - Lower to 2 hours
lastCheck = System.currentTimeMillis();
hasVersion = false;
} else {
@@ -181,24 +189,28 @@ public class VersionCommand extends BukkitCommand {
}
}
+ // Paper start
private void obtainVersion() {
String version = Bukkit.getVersion();
if (version == null) version = "Custom";
- if (version.startsWith("git-Spigot-")) {
- String[] parts = version.substring("git-Spigot-".length()).split("-");
- int cbVersions = getDistance("craftbukkit", parts[1].substring(0, parts[1].indexOf(' ')));
- int spigotVersions = getDistance("spigot", parts[0]);
- if (cbVersions == -1 || spigotVersions == -1) {
- setVersionMessage("Error obtaining version information");
- } else {
- if (cbVersions == 0 && spigotVersions == 0) {
+ if (version.startsWith("git-Paper-")) {
+ String[] parts = version.substring("git-Paper-".length()).split("[-\\s]");
+ int distance = getDistance(null, parts[0]);
+ switch (distance) {
+ case -1:
+ setVersionMessage("Error obtaining version information");
+ break;
+ case 0:
setVersionMessage("You are running the latest version");
- } else {
- setVersionMessage("You are " + (cbVersions + spigotVersions) + " version(s) behind");
- }
+ break;
+ case -2:
+ setVersionMessage("Unknown version");
+ break;
+ default:
+ setVersionMessage("You are " + distance + " version(s) behind");
}
-
} else if (version.startsWith("git-Bukkit-")) {
+ // Paper end
version = version.substring("git-Bukkit-".length());
int cbVersions = getDistance("craftbukkit", version.substring(0, version.indexOf(' ')));
if (cbVersions == -1) {
@@ -231,8 +243,16 @@ public class VersionCommand extends BukkitCommand {
}
}
- private static int getDistance(@NotNull String repo, @NotNull String hash) {
+ // Paper start
+ private static int getDistance(@NotNull String repo, @NotNull String verInfo) {
try {
+ int currentVer = Integer.decode(verInfo);
+ return getFromJenkins(currentVer);
+ } catch (NumberFormatException ex) {
+ verInfo = verInfo.replace("\"", "");
+ return getFromRepo("PaperMC/Paper", "master", verInfo);
+ }
+ /*
BufferedReader reader = Resources.asCharSource(
new URL("https://hub.spigotmc.org/stash/rest/api/1.0/projects/SPIGOT/repos/" + repo + "/commits?since=" + URLEncoder.encode(hash, "UTF-8") + "&withCounts=true"),
Charsets.UTF_8
@@ -246,9 +266,57 @@ public class VersionCommand extends BukkitCommand {
} finally {
reader.close();
}
+ */
+ }
+
+ private static int getFromJenkins(int currentVer) {
+ try {
+ BufferedReader reader = Resources.asCharSource(
+ new URL("https://ci.destroystokyo.com/job/Paper-1.14/lastSuccessfulBuild/buildNumber"), // Paper
+ Charsets.UTF_8
+ ).openBufferedStream();
+ try {
+ int newVer = Integer.decode(reader.readLine());
+ return newVer - currentVer;
+ } catch (NumberFormatException ex) {
+ ex.printStackTrace();
+ return -2;
+ } finally {
+ reader.close();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ return -1;
+ }
+ }
+
+ // Contributed by Techcable <Techcable@outlook.com> in GH PR #65
+ private static int getFromRepo(String repo, String branch, String hash) {
+ try {
+ HttpURLConnection connection = (HttpURLConnection) new URL("https://api.github.com/repos/" + repo + "/compare/" + branch + "..." + hash).openConnection();
+ connection.connect();
+ if (connection.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) return -2; // Unknown commit
+ try (
+ BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), Charsets.UTF_8))
+ ) {
+ JSONObject obj = (JSONObject) new JSONParser().parse(reader);
+ String status = (String) obj.get("status");
+ switch (status) {
+ case "identical":
+ return 0;
+ case "behind":
+ return ((Number) obj.get("behind_by")).intValue();
+ default:
+ return -1;
+ }
+ } catch (ParseException | NumberFormatException e) {
+ e.printStackTrace();
+ return -1;
+ }
} catch (IOException e) {
e.printStackTrace();
return -1;
}
}
+ // Paper end
}
--
2.21.0

View File

@ -0,0 +1,180 @@
From b96066e41b3d03c005b1e571dd042769b787725c Mon Sep 17 00:00:00 2001
From: Zach Brown <zach@zachbr.io>
Date: Mon, 27 May 2019 01:10:06 -0500
Subject: [PATCH] Version Command 2.0
diff --git a/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java b/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java
new file mode 100644
index 00000000..2a265129
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java
@@ -0,0 +1,44 @@
+package com.destroystokyo.paper.util;
+
+import org.bukkit.Bukkit;
+import org.jetbrains.annotations.NotNull;
+
+public interface VersionFetcher {
+ /**
+ * Amount of time to cache results for in milliseconds
+ * <p>
+ * Negative values will never cache.
+ *
+ * @return cache time
+ */
+ long getCacheTime();
+
+ /**
+ * Gets the version message to cache and show to command senders. Multiple messages can be sent using newlines (\n)
+ * in the string. The string will be split on these newlines and sent as individual messages.
+ * <p>
+ * NOTE: This is run in a new thread separate from that of the command processing thread
+ *
+ * @param serverVersion the current version of the server (will match {@link Bukkit#getVersion()})
+ * @return the message to show when requesting a version
+ */
+ @NotNull
+ String getVersionMessage(@NotNull String serverVersion);
+
+ class DummyVersionFetcher implements VersionFetcher {
+
+ @Override
+ public long getCacheTime() {
+ return -1;
+ }
+
+ @NotNull
+ @Override
+ public String getVersionMessage(@NotNull String serverVersion) {
+ Bukkit.getLogger().warning("Version provider has not been set, cannot check for updates!");
+ Bukkit.getLogger().info("Override the default implementation of org.bukkit.UnsafeValues#getVersionFetcher()");
+ new Throwable().printStackTrace();
+ return "Unable to check for updates. No version provider set.";
+ }
+ }
+}
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 72c5501e..c0ff133d 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -76,5 +76,12 @@ public interface UnsafeValues {
* @return name
*/
String getTimingsServerName();
+
+ /**
+ * Called once by the version command on first use, then cached.
+ */
+ default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
+ return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher();
+ }
// Paper end
}
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
index cbce5244..0486abd1 100644
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
@@ -1,5 +1,6 @@
package org.bukkit.command.defaults;
+import com.destroystokyo.paper.util.VersionFetcher; // Paper - version supplier
import com.google.common.base.Charsets;
import com.google.common.collect.ImmutableList;
import com.google.common.io.Resources;
@@ -26,6 +27,15 @@ import org.bukkit.util.StringUtil;
import org.jetbrains.annotations.NotNull;
public class VersionCommand extends BukkitCommand {
+ private VersionFetcher versionFetcher;
+ private VersionFetcher getVersionFetcher() { // lazy load because unsafe isn't available at command registration
+ if (versionFetcher == null) {
+ versionFetcher = Bukkit.getUnsafe().getVersionFetcher();
+ }
+
+ return versionFetcher;
+ }
+
public VersionCommand(@NotNull String name) {
super(name);
@@ -150,18 +160,18 @@ public class VersionCommand extends BukkitCommand {
private void sendVersion(@NotNull CommandSender sender) {
if (hasVersion) {
- if (System.currentTimeMillis() - lastCheck > 21600000) {
+ if (System.currentTimeMillis() - lastCheck > getVersionFetcher().getCacheTime()) { // Paper - use version supplier
lastCheck = System.currentTimeMillis();
hasVersion = false;
} else {
- sender.sendMessage(versionMessage);
+ sendMessages(versionMessage, sender); // Paper - allow \n for multiple messages
return;
}
}
versionLock.lock();
try {
if (hasVersion) {
- sender.sendMessage(versionMessage);
+ sendMessages(versionMessage, sender); // Paper - allow \n for multiple messages
return;
}
versionWaiters.add(sender);
@@ -183,7 +193,12 @@ public class VersionCommand extends BukkitCommand {
private void obtainVersion() {
String version = Bukkit.getVersion();
- if (version == null) version = "Custom";
+ // Paper start
+ if (version.startsWith("null")) { // running from ide?
+ setVersionMessage("Unknown version, custom build?");
+ return;
+ }
+ /*
if (version.startsWith("git-Spigot-")) {
String[] parts = version.substring("git-Spigot-".length()).split("-");
int cbVersions = getDistance("craftbukkit", parts[1].substring(0, parts[1].indexOf(' ')));
@@ -213,6 +228,9 @@ public class VersionCommand extends BukkitCommand {
} else {
setVersionMessage("Unknown version, custom build?");
}
+ */
+ setVersionMessage(getVersionFetcher().getVersionMessage(version));
+ // Paper end
}
private void setVersionMessage(@NotNull String msg) {
@@ -222,8 +240,13 @@ public class VersionCommand extends BukkitCommand {
try {
hasVersion = true;
versionTaskStarted = false;
+ // Paper - allow \n for multiple messages
+ String[] messages = versionMessage.split("\n");
for (CommandSender sender : versionWaiters) {
- sender.sendMessage(versionMessage);
+ for (String message : messages) {
+ sender.sendMessage(message);
+ }
+ // Paper end
}
versionWaiters.clear();
} finally {
@@ -231,6 +254,15 @@ public class VersionCommand extends BukkitCommand {
}
}
+ // Paper start
+ private void sendMessages(String toSplit, CommandSender target) {
+ String[] messages = toSplit.split("\n");
+ for (String message : messages) {
+ target.sendMessage(message);
+ }
+ }
+ // Paper end
+
private static int getDistance(@NotNull String repo, @NotNull String hash) {
try {
BufferedReader reader = Resources.asCharSource(
--
2.21.0

View File

@ -1,4 +1,4 @@
From 5448fd27d7cab4be6ee7feed8c87aabfe2044a5c Mon Sep 17 00:00:00 2001
From a1b55ca0684c1e96cb4416abf7f5531e2c20c2f0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 28 Apr 2018 10:28:50 -0400
Subject: [PATCH] Add Ban Methods to Player Objects
@ -74,7 +74,7 @@ index ffc8ad37..222a9a7b 100644
/**
* Checks if this player is whitelisted or not
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 8f87b165..214fe2d9 100644
index ff799ac7..32dc1f86 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1,10 +1,15 @@

View File

@ -1,4 +1,4 @@
From e85a57a343deaa2b201b07c39b29222ed9e73183 Mon Sep 17 00:00:00 2001
From c1828ab1f99a94ec3c39f3aba13319f44cc2e7e4 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 30 Apr 2018 13:14:30 -0400
Subject: [PATCH] EndermanEscapeEvent

View File

@ -1,4 +1,4 @@
From aa578a25fb86af68606e853a0d32821d979fce4c Mon Sep 17 00:00:00 2001
From 2a517ba291f4bce720c9c721a8a9a350741d6e80 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 30 Apr 2018 13:29:15 -0400
Subject: [PATCH] Enderman.teleportRandomly()

View File

@ -1,4 +1,4 @@
From 69b1739f71d3210dcf61ff3cdded512a9830b2dd Mon Sep 17 00:00:00 2001
From 69bf5e553110fa957385964199ece616895b9469 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 30 Apr 2018 17:55:28 -0400
Subject: [PATCH] Additional world.getNearbyEntities API's
@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's
Provides more methods to get nearby entities, and filter by types and predicates
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index d8d42c84..bcf5f8aa 100644
index 2fe46faf..e1e674ba 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1,6 +1,9 @@

View File

@ -1,4 +1,4 @@
From d13ee63c08c1eab492e1863506f5882e9d18c061 Mon Sep 17 00:00:00 2001
From 947a4656a70657d309ba4c02c36a3b5277d5d4c6 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 30 Apr 2018 19:27:31 -0400
Subject: [PATCH] Location.isChunkLoaded() API

View File

@ -1,4 +1,4 @@
From 3f6946a1734c78e66bc72254d58abd3fee9bbb88 Mon Sep 17 00:00:00 2001
From b1e61a261f80eb5ec6ab010c0a9695ddfcd071a7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 29 Aug 2017 23:58:48 -0400
Subject: [PATCH] Expand World.spawnParticle API and add Builder
@ -10,7 +10,7 @@ This adds a new Builder API which is much friendlier to use.
diff --git a/src/main/java/com/destroystokyo/paper/ParticleBuilder.java b/src/main/java/com/destroystokyo/paper/ParticleBuilder.java
new file mode 100644
index 000000000..06f1602f5
index 00000000..06f1602f
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/ParticleBuilder.java
@@ -0,0 +1,478 @@
@ -493,7 +493,7 @@ index 000000000..06f1602f5
+ }
+}
diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java
index 68cb74420..69aae30a3 100644
index 68cb7442..69aae30a 100644
--- a/src/main/java/org/bukkit/Particle.java
+++ b/src/main/java/org/bukkit/Particle.java
@@ -92,6 +92,17 @@ public enum Particle {
@ -515,7 +515,7 @@ index 68cb74420..69aae30a3 100644
* Options which can be applied to redstone dust particles - a particle
* color and size.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index e1e674bab..fbd61137d 100644
index e1e674ba..fbd61137 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -2081,7 +2081,57 @@ public interface World extends PluginMessageRecipient, Metadatable {

View File

@ -1,4 +1,4 @@
From 09083fb373c14a78dc46902e3ddb2763e23f4fea Mon Sep 17 00:00:00 2001
From c773ef768d279a34cf0da370b4de5b0bf3347559 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 1 May 2018 20:17:44 -0400
Subject: [PATCH] EndermanAttackPlayerEvent

View File

@ -1,4 +1,4 @@
From 11d55b78c68da025428c3e85a7bb0fef49112c82 Mon Sep 17 00:00:00 2001
From 63f352493cf36bf80eb1d97a0ea3d897b5766bd3 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 1 May 2018 21:33:35 -0400
Subject: [PATCH] Close Plugin Class Loaders on Disable

View File

@ -1,4 +1,4 @@
From 8ad457fe22064cb95a98d944c39b121fa5d5e9f7 Mon Sep 17 00:00:00 2001
From e454efd84631216d67774e33cabd7cd2e823447f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 16 May 2018 20:26:16 -0400
Subject: [PATCH] WitchConsumePotionEvent

View File

@ -1,4 +1,4 @@
From fc6b5dba1f829790033dc13af8176268da944946 Mon Sep 17 00:00:00 2001
From 5183d6aa6a230ae1cad69fd2a54589f6b82dfee0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 16 May 2018 20:39:09 -0400
Subject: [PATCH] WitchThrowPotionEvent

View File

@ -1,4 +1,4 @@
From 08b2440a26eb1424573216f76e56d4c64423b8b6 Mon Sep 17 00:00:00 2001
From bf76c03cf7730ea8d7f3ae692cb406f28326d9ef Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 24 May 2018 21:01:13 -0400
Subject: [PATCH] Location.toBlockLocation/toCenterLocation()

View File

@ -1,11 +1,11 @@
From 3bcb7a82269c5b46d201e08b1a0f48eef8af6587 Mon Sep 17 00:00:00 2001
From c7a93ea87077c8180f4a4bdb6012b45c63a84543 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 3 Jun 2018 04:10:13 -0400
Subject: [PATCH] PotionEffect clone methods
diff --git a/src/main/java/org/bukkit/potion/PotionEffect.java b/src/main/java/org/bukkit/potion/PotionEffect.java
index a0529fbe..3782d84a 100644
index bbefcd58..0193e075 100644
--- a/src/main/java/org/bukkit/potion/PotionEffect.java
+++ b/src/main/java/org/bukkit/potion/PotionEffect.java
@@ -101,6 +101,33 @@ public class PotionEffect implements ConfigurationSerializable {

View File

@ -1,4 +1,4 @@
From 7d23434a72c7cf227540dea784c7d10998d7ffb7 Mon Sep 17 00:00:00 2001
From 63dc44f5af0bb4d788eee64733e6b673b4c96831 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 5 Jun 2018 22:47:08 -0400
Subject: [PATCH] WitchReadyPotionEvent

View File

@ -1,4 +1,4 @@
From b78d7f7e912c656a7c9abbd6d62adcd19ed2783c Mon Sep 17 00:00:00 2001
From 4ff82e5af876626b15bd1e45fedb42381fc7c7a3 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 5 Jun 2018 22:59:50 -0400
Subject: [PATCH] ItemStack#getMaxItemUseDuration

View File

@ -1,4 +1,4 @@
From 99b0ff6cfea815ea98af9ff7e40946bff0623e33 Mon Sep 17 00:00:00 2001
From 9c461d8d344b0176143af283f8385f567bcc3c2d Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sat, 9 Jun 2018 13:08:21 +0100
Subject: [PATCH] Add EntityTeleportEndGatewayEvent

View File

@ -1,11 +1,11 @@
From 71decde1e8308ca10fd40b21d795c443aa04e5ce Mon Sep 17 00:00:00 2001
From 8ed3dc7a4e8ac87e1972ef34e9b3896603fb69d4 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 16 Jun 2018 01:17:39 -0500
Subject: [PATCH] Make shield blocking delay configurable
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index ffbf3d7a8..e08dfe17f 100644
index ffbf3d7a..e08dfe17 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -523,5 +523,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource

View File

@ -1,4 +1,4 @@
From d703171a91b490c086f656418317449ad3e6896f Mon Sep 17 00:00:00 2001
From 8cff2d98b5379af84aeab9de2dcc13e26d470c03 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 15 Jun 2013 19:52:04 -0400
Subject: [PATCH] EntityShootBowEvent consumeArrow and getArrowItem API
@ -6,7 +6,7 @@ Subject: [PATCH] EntityShootBowEvent consumeArrow and getArrowItem API
Adds ability to get what arrow was shot, and control if it should be consumed.
diff --git a/src/main/java/org/bukkit/event/entity/EntityShootBowEvent.java b/src/main/java/org/bukkit/event/entity/EntityShootBowEvent.java
index 18c5e31ab..37dbc12eb 100644
index 18c5e31a..37dbc12e 100644
--- a/src/main/java/org/bukkit/event/entity/EntityShootBowEvent.java
+++ b/src/main/java/org/bukkit/event/entity/EntityShootBowEvent.java
@@ -2,6 +2,7 @@ package org.bukkit.event.entity;

View File

@ -1,4 +1,4 @@
From d4a8bae91bcb848e431f81908a7d149d6cc87e62 Mon Sep 17 00:00:00 2001
From cd1e5704bdbbc91bb3458ad84aebdb285c6aa1c0 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Mon, 18 Jun 2018 00:41:46 -0500
Subject: [PATCH] Add "getNearbyXXX" methods to Location

View File

@ -1,4 +1,4 @@
From 9f64f378b903f5fe1a7e728c6181ed12d6ec1cfb Mon Sep 17 00:00:00 2001
From 2579ae2f66e730b085f10c3228d6140ad01430ba Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 18 Jun 2018 01:09:27 -0400
Subject: [PATCH] PlayerReadyArrowEvent

View File

@ -1,4 +1,4 @@
From 30f32c15edc8a830818b6427009ed843cd06daae Mon Sep 17 00:00:00 2001
From 0df61b65f48c93c8581c3a9e512e67ceaed88194 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Mon, 18 Jun 2018 15:40:39 +0200
Subject: [PATCH] Add EntityKnockbackByEntityEvent

View File

@ -1,4 +1,4 @@
From 2715b1aea34fcc2ac427535cba59a5f43bcfafe5 Mon Sep 17 00:00:00 2001
From 18333843870e8b62ec99eb21aa3afb70b122d033 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 19 Dec 2017 16:24:42 -0500
Subject: [PATCH] Expand Explosions API
@ -106,7 +106,7 @@ index 5730d5f4..b226d7e4 100644
* Returns a list of entities within a bounding box centered around a Location.
*
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 28afb932..eb5860b2 100644
index fbd61137..8f69dced 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1201,6 +1201,102 @@ public interface World extends PluginMessageRecipient, Metadatable {

View File

@ -1,4 +1,4 @@
From 271d50401e6ae6ba853ae96a2c4172ab8d488435 Mon Sep 17 00:00:00 2001
From f18032a0ddc6bf008b5420f6dc30f06490a7e266 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 22 Jun 2018 22:59:18 -0400
Subject: [PATCH] ItemStack API additions for quantity/flags/lore

View File

@ -1,4 +1,4 @@
From 17fb95b5f4231afd377f2067961a63c8deeb9c0c Mon Sep 17 00:00:00 2001
From c13c50f8c81e38a98d62384277eb84e3ca9a5f44 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 29 Jun 2018 00:19:19 -0400
Subject: [PATCH] LivingEntity Hand Raised/Item Use API
@ -6,7 +6,7 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
How long an entity has raised hands to charge an attack or use an item
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index e08dfe17f..6e3284b20 100644
index e08dfe17..6e3284b2 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -11,6 +11,7 @@ import org.bukkit.attribute.Attributable;

View File

@ -1,4 +1,4 @@
From b4ed810ded91c4e5d07423ad94e4ffc685a89257 Mon Sep 17 00:00:00 2001
From 191d54c0de07b2d996bd755ec0c2cbdbdd52d6ee Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 26 Jun 2018 21:34:40 -0400
Subject: [PATCH] RangedEntity API
@ -79,7 +79,7 @@ index c4385429..d23226cc 100644
/**
* Represents the base color that the llama has.
diff --git a/src/main/java/org/bukkit/entity/Skeleton.java b/src/main/java/org/bukkit/entity/Skeleton.java
index 2ac30c0f..d42a4e12 100644
index 16b12938..1c367f78 100644
--- a/src/main/java/org/bukkit/entity/Skeleton.java
+++ b/src/main/java/org/bukkit/entity/Skeleton.java
@@ -2,11 +2,12 @@ package org.bukkit.entity;
@ -144,7 +144,7 @@ index 3bc332ee..426d3693 100644
+public interface Wither extends Monster, Boss, RangedEntity { // Paper
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 72e268c1..76da06d1 100644
index 690abbba..6d18de76 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -18,7 +18,7 @@ import org.jetbrains.annotations.NotNull;

View File

@ -1,11 +1,11 @@
From e4492ea2ddcebc431c20d0933e4dc7f85090695d Mon Sep 17 00:00:00 2001
From 30e95a4cbd997640b4ad3b63ae46e8b8caf15161 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Tue, 3 Jul 2018 16:07:16 +0200
Subject: [PATCH] Add World.getEntity(UUID) API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index eb5860b2..3f934c80 100644
index 8f69dced..0b328315 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -776,6 +776,17 @@ public interface World extends PluginMessageRecipient, Metadatable {

View File

@ -1,4 +1,4 @@
From 7598e855d8a3861b325248812b427feb4a19160d Mon Sep 17 00:00:00 2001
From da54191d0c80dea58ca857a395d3a39ccfdcc585 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 3 Jul 2018 21:52:52 -0400
Subject: [PATCH] InventoryCloseEvent Reason API
@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers
to "confirm" things based on if it was player triggered close or not.
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
index 04f0e08f..a372c74b 100644
index cdbac95b..f25c7315 100644
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
@@ -152,6 +152,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder

View File

@ -1,4 +1,4 @@
From bd1d9bcc76034a9cdbe655d37b0d55e85af9a520 Mon Sep 17 00:00:00 2001
From 510847f2f98f230e51cd206db7175a8b07f15b67 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 02:25:48 -0400
Subject: [PATCH] Entity#getChunk API

View File

@ -1,4 +1,4 @@
From 809f5b4c1be70938c5b10f4c7639904a499b5951 Mon Sep 17 00:00:00 2001
From c3a4f448b987e671941688fde2af3d1154b9823c Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 19 Jul 2018 15:07:02 -0500
Subject: [PATCH] Add an asterisk to legacy API plugins
@ -7,13 +7,13 @@ Not here to name and shame, only so server admins can be aware of which
plugins have and haven't been updated.
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 72c5501e..71da4a79 100644
index c0ff133d..b173e2ec 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -76,5 +76,9 @@ public interface UnsafeValues {
* @return name
*/
String getTimingsServerName();
@@ -83,5 +83,9 @@ public interface UnsafeValues {
default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher();
}
+
+ static boolean isLegacyPlugin(org.bukkit.plugin.Plugin plugin) {
+ return !"1.13".equals(plugin.getDescription().getAPIVersion()) && !"1.14".equals(plugin.getDescription().getAPIVersion());

View File

@ -1,4 +1,4 @@
From 926e195e6d693c4a3845dde51d876efb8ca25231 Mon Sep 17 00:00:00 2001
From c3dcb41ecc3c27a968a757ea4dda9a9d35c7661f Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 21 Jul 2018 01:51:05 -0500
Subject: [PATCH] EnderDragon Events

View File

@ -1,4 +1,4 @@
From 68bfbd197cb7e1d79da309b3f43ce996b23bab9a Mon Sep 17 00:00:00 2001
From fe1133cb18af58ae0b15203109297df3b233ed5d Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 21 Jul 2018 03:10:50 -0500
Subject: [PATCH] PlayerLaunchProjectileEvent

View File

@ -1,4 +1,4 @@
From dd9a628828a124c4c4f22186b59d2d332c657241 Mon Sep 17 00:00:00 2001
From 210779762b6b255f3c0957958051f6d710eb88fc Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 21 Jul 2018 01:59:53 -0500
Subject: [PATCH] PlayerElytraBoostEvent

View File

@ -1,4 +1,4 @@
From c6e1d0020fdf92be2748e4ddf694c15e7881e6f5 Mon Sep 17 00:00:00 2001
From 213b2c432b14f24689483abbf50f6c3716db4584 Mon Sep 17 00:00:00 2001
From: Anthony MacAllister <anthonymmacallister@gmail.com>
Date: Thu, 26 Jul 2018 15:28:53 -0400
Subject: [PATCH] EntityTransformedEvent

View File

@ -1,4 +1,4 @@
From 3014696abf81408031ce208b526d2d964b3e68c7 Mon Sep 17 00:00:00 2001
From 88132835dadea5f2e73892af9a3985379236fbe7 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Wed, 15 Aug 2018 01:26:03 -0700
Subject: [PATCH] Allow disabling armour stand ticking

View File

@ -1,4 +1,4 @@
From c20b900710f100a5695afa6cd33c30f7d8fae5a1 Mon Sep 17 00:00:00 2001
From 2afe98b5368ce6cb6dd2099aef2f44e685a7c100 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 27 Jul 2018 22:36:17 -0500
Subject: [PATCH] SkeletonHorse Additions

View File

@ -1,4 +1,4 @@
From c807a2cd2c5ce27ece6532433232f8391a84edbe Mon Sep 17 00:00:00 2001
From 2fd4158a4def36728c68bb14c875f8375008ad38 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 25 Jul 2018 01:36:07 -0400
Subject: [PATCH] Expand Location Manipulation API

View File

@ -1,4 +1,4 @@
From 9fb611dc9f3489629214f4962308ef498358ccc9 Mon Sep 17 00:00:00 2001
From ef423f6023541baa719a802f18754ca605e1aaaf Mon Sep 17 00:00:00 2001
From: willies952002 <admin@domnian.com>
Date: Thu, 26 Jul 2018 02:22:44 -0400
Subject: [PATCH] Expand ArmorStand API

View File

@ -1,4 +1,4 @@
From dd237c9ad1f04c98b305173a600865b2dc7e5896 Mon Sep 17 00:00:00 2001
From c0d26c6ba4c12481f34150f71e8602c8a4fadfb5 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 20 Jul 2018 23:36:55 -0500
Subject: [PATCH] AnvilDamageEvent

View File

@ -1,4 +1,4 @@
From 79eb3b353f5f8e4b7f237675a59c0b8139499da3 Mon Sep 17 00:00:00 2001
From 2817ea0cd2b735fcf41d322476b4b1d6c97f39a4 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 9 Sep 2018 00:32:05 -0400
Subject: [PATCH] Remove deadlock risk in firing async events

View File

@ -1,4 +1,4 @@
From 5163c03359615886d54e6541ac60df07f0bb509d Mon Sep 17 00:00:00 2001
From b22b8ad9f32691a305d1ef4fd1d1ab8bdab72e1f Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Thu, 2 Aug 2018 08:44:20 -0500
Subject: [PATCH] Add hand to bucket events

View File

@ -1,4 +1,4 @@
From ef0003fe68b304fe055657557cc65576371ec7ef Mon Sep 17 00:00:00 2001
From 96c816ec45a4ca04d09c5c1c4d13a92d0a5c03ff Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Sun, 15 Jul 2018 22:17:55 +0300
Subject: [PATCH] Add TNTPrimeEvent

View File

@ -1,4 +1,4 @@
From d8ab6185814520370886f17aa53e2cbe4cbeac13 Mon Sep 17 00:00:00 2001
From 264c6b1962030a6be05560d8ec5feca1ad5912a1 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 4 Aug 2018 19:37:35 -0400
Subject: [PATCH] Provide Chunk Coordinates as a Long API
@ -7,7 +7,7 @@ Allows you to easily access the chunks X/z as a long, and a method
to look up by the long key too.
diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java
index e583f86d..7302b6e3 100644
index aab292e1..fe77e33a 100644
--- a/src/main/java/org/bukkit/Chunk.java
+++ b/src/main/java/org/bukkit/Chunk.java
@@ -24,6 +24,32 @@ public interface Chunk {
@ -44,7 +44,7 @@ index e583f86d..7302b6e3 100644
* Gets the world containing this chunk
*
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 3f934c80..dd0ab741 100644
index 0b328315..32be5210 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -157,6 +157,22 @@ public interface World extends PluginMessageRecipient, Metadatable {

View File

@ -1,4 +1,4 @@
From 52ee3c6a80ac54dc5ecd9a5518f008da2fb1d9fc Mon Sep 17 00:00:00 2001
From aec44c58717f140b7090af2f2620b84834a1a8c5 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 29 Feb 2016 17:43:33 -0600
Subject: [PATCH] Async Chunks API
@ -8,7 +8,7 @@ Adds API's to load or generate chunks asynchronously.
Also adds utility methods to Entity to teleport asynchronously.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index dd0ab741..a06d7a0d 100644
index 32be5210..0981675d 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -171,6 +171,358 @@ public interface World extends PluginMessageRecipient, Metadatable {

View File

@ -1,11 +1,11 @@
From a01c59bfa5adbd1f5587c65ea8a8cd02a9055e03 Mon Sep 17 00:00:00 2001
From 30650b84b3420d53f9cc3fabb31dfdb7502d0874 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 10 Aug 2018 22:08:34 -0400
Subject: [PATCH] Make EnderDragon extend Mob
diff --git a/src/main/java/org/bukkit/entity/EnderDragon.java b/src/main/java/org/bukkit/entity/EnderDragon.java
index fa13b38d..e800259a 100644
index 16199b3e..ddef550b 100644
--- a/src/main/java/org/bukkit/entity/EnderDragon.java
+++ b/src/main/java/org/bukkit/entity/EnderDragon.java
@@ -5,7 +5,7 @@ import org.jetbrains.annotations.NotNull;

View File

@ -1,11 +1,11 @@
From bc07cddc9c670f92b31bbfecca2042f85e2ca753 Mon Sep 17 00:00:00 2001
From e6a44197c43bc5f8f1284bcaf5eead766ceabf07 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 15 Aug 2018 01:04:58 -0400
Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots
diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java
index 893300a7..22ff63e5 100644
index fe77e33a..6d45a421 100644
--- a/src/main/java/org/bukkit/Chunk.java
+++ b/src/main/java/org/bukkit/Chunk.java
@@ -99,13 +99,26 @@ public interface Chunk {

View File

@ -1,11 +1,11 @@
From 812ce8fc0b825ddf9b7ec78cbf6982a799cf26bc Mon Sep 17 00:00:00 2001
From 458a068274864314ed1431505a754d8c26efdc7b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 15 Aug 2018 01:19:37 -0400
Subject: [PATCH] Don't use snapshots for Timings Tile Entity reports
diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java
index 04369523..99815866 100644
index ddaed812..203cda0f 100644
--- a/src/main/java/co/aikar/timings/TimingHistory.java
+++ b/src/main/java/co/aikar/timings/TimingHistory.java
@@ -119,7 +119,7 @@ public class TimingHistory {

View File

@ -1,4 +1,4 @@
From 5c9c0c19bf8ed9ca04c795ad49f5ceeb04d505f7 Mon Sep 17 00:00:00 2001
From 2aad459cfeca77582f8f789f4f0b8c45fa215cf3 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Tue, 14 Aug 2018 21:42:10 -0700
Subject: [PATCH] Allow Blocks to be accessed via a long key
@ -48,7 +48,7 @@ index 884862ab..6dc39989 100644
* @return A new location where X/Y/Z are the center of the block
*/
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index a06d7a0d..4d35efb0 100644
index 0981675d..c840d474 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -88,6 +88,38 @@ public interface World extends PluginMessageRecipient, Metadatable {

View File

@ -1,4 +1,4 @@
From 855e6ce1a9904a0cc12cacec59f86be7a77bec65 Mon Sep 17 00:00:00 2001
From 9d084a90bc57d9c80340084020b529024199e259 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 24 Aug 2018 08:18:27 -0500
Subject: [PATCH] Slime Pathfinder Events

View File

@ -1,4 +1,4 @@
From 4f3dd333bb40e8c41894462cb63dfde6cf8b9bf7 Mon Sep 17 00:00:00 2001
From 315d168b275c290a695675d69d7b354724a6a1ec Mon Sep 17 00:00:00 2001
From: cswhite2000 <18whitechristop@gmail.com>
Date: Tue, 21 Aug 2018 19:39:46 -0700
Subject: [PATCH] isChunkGenerated API
@ -34,7 +34,7 @@ index 6dc39989..4e69f277 100644
/**
* Sets the position of this Location and returns itself
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 4d35efb0..150c5af2 100644
index c840d474..93dd8742 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -204,6 +204,17 @@ public interface World extends PluginMessageRecipient, Metadatable {

View File

@ -1,4 +1,4 @@
From 7b741981e2d04a10c5cc9c8c883aa235481c1a10 Mon Sep 17 00:00:00 2001
From 3c26fbdbcb3bd7ccc1123ba0aac7189c0b7103c1 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 24 Aug 2018 11:50:16 -0500
Subject: [PATCH] Add More Creeper API
@ -65,7 +65,7 @@ index 00000000..ff10251b
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/Creeper.java b/src/main/java/org/bukkit/entity/Creeper.java
index f957d836..b9877fb8 100644
index 32f18a3a..601ba4af 100644
--- a/src/main/java/org/bukkit/entity/Creeper.java
+++ b/src/main/java/org/bukkit/entity/Creeper.java
@@ -50,4 +50,32 @@ public interface Creeper extends Monster {

View File

@ -1,4 +1,4 @@
From 96d56296712254c823bd6ed82e626232ecc1948e Mon Sep 17 00:00:00 2001
From b188e6eab15294ab8d21056780b149632aa13317 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 25 Aug 2018 19:56:42 -0500
Subject: [PATCH] Add PhantomPreSpawnEvent

View File

@ -1,11 +1,11 @@
From a577299608e2fedf76e94d9ae75675133a0cd032 Mon Sep 17 00:00:00 2001
From 76457191674e513142d7e2e289b018cafe854e85 Mon Sep 17 00:00:00 2001
From: Sotr <i@omc.hk>
Date: Thu, 23 Aug 2018 16:14:25 +0800
Subject: [PATCH] Add source block to BlockPhysicsEvent
diff --git a/src/main/java/org/bukkit/event/block/BlockPhysicsEvent.java b/src/main/java/org/bukkit/event/block/BlockPhysicsEvent.java
index 75d4e70f..a28731dc 100644
index e3a5f582..c382f9fc 100644
--- a/src/main/java/org/bukkit/event/block/BlockPhysicsEvent.java
+++ b/src/main/java/org/bukkit/event/block/BlockPhysicsEvent.java
@@ -32,6 +32,13 @@ public class BlockPhysicsEvent extends BlockEvent implements Cancellable {

View File

@ -1,4 +1,4 @@
From 2393a64341d781d5e6101361c029c4866479e66c Mon Sep 17 00:00:00 2001
From f15c9148fdb45e7f951a8621ba7ae96bd2579a6b Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 28 Aug 2018 23:04:06 -0400
Subject: [PATCH] Inventory#removeItemAnySlot

View File

@ -1,4 +1,4 @@
From 6c38f7533ba57e7f607e6552cb73b62714eba0b3 Mon Sep 17 00:00:00 2001
From 246a3f9429755931b2290bb3f50dee71335b5532 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Mon, 3 Sep 2018 18:13:53 -0500
Subject: [PATCH] Add ray tracing methods to LivingEntity
@ -6,7 +6,7 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity
diff --git a/src/main/java/com/destroystokyo/paper/block/TargetBlockInfo.java b/src/main/java/com/destroystokyo/paper/block/TargetBlockInfo.java
new file mode 100644
index 000000000..18a96dbb0
index 00000000..18a96dbb
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/block/TargetBlockInfo.java
@@ -0,0 +1,54 @@
@ -65,7 +65,7 @@ index 000000000..18a96dbb0
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index adae86709..6b2002ceb 100644
index 6e3284b2..9dc0d4ce 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -81,6 +81,77 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource

View File

@ -1,4 +1,4 @@
From 77c90772efb67a42bebfb667c8f04e61354b5762 Mon Sep 17 00:00:00 2001
From 0ef3566b5a658cc35b2a2bc140bbb74461142aaf Mon Sep 17 00:00:00 2001
From: Phoenix616 <mail@moep.tv>
Date: Tue, 21 Aug 2018 01:32:28 +0100
Subject: [PATCH] Improve death events

View File

@ -1,4 +1,4 @@
From 9c3067c801a8c770b06fb8207a01e2378b3cc6cb Mon Sep 17 00:00:00 2001
From ba38e6dbbb812cac523fe052e7ec50e582cf057b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 9 Sep 2018 12:39:06 -0400
Subject: [PATCH] Mob Pathfinding API

View File

@ -1,11 +1,11 @@
From 6e59b914fe8eb9eaed067387f9c727536e429b23 Mon Sep 17 00:00:00 2001
From 4a916b6e1b8261a773ad37167862a35f252b2e57 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Tue, 4 Sep 2018 15:01:54 -0500
Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 32dc1f868..dea6130a6 100644
index 32dc1f86..dea6130a 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1929,6 +1929,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -1,4 +1,4 @@
From e98c081f8db91bfe12856621b2bd9446ad518c76 Mon Sep 17 00:00:00 2001
From 48fae9e9abaaa7d899074299fb920a37fd95d2b0 Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Wed, 12 Sep 2018 18:53:35 +0300
Subject: [PATCH] Add an API for CanPlaceOn and CanDestroy NBT values
@ -199,7 +199,7 @@ index 00000000..28f3fda9
+ }
+}
diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
index f5e3929a..8648e8fb 100644
index 22eca2a1..620a962d 100644
--- a/src/main/java/org/bukkit/NamespacedKey.java
+++ b/src/main/java/org/bukkit/NamespacedKey.java
@@ -18,7 +18,7 @@ import org.jetbrains.annotations.NotNull;
@ -226,7 +226,7 @@ index f5e3929a..8648e8fb 100644
return key;
}
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
index d0e4c8ee..d0221b29 100644
index 4e8c7a8a..595df539 100644
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
@@ -421,4 +421,86 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste

View File

@ -1,4 +1,4 @@
From 92e63fa41726779b8e2673b1ebd5435b8fc954b7 Mon Sep 17 00:00:00 2001
From 31a97ee3841d55754647d0751fed2a488e4139e3 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 13 Sep 2018 20:51:50 -0400
Subject: [PATCH] Performance & Concurrency Improvements to Permissions

View File

@ -1,4 +1,4 @@
From 174bf2456490af968e86a1968c27b57932e52a4a Mon Sep 17 00:00:00 2001
From 6e774a6907d67c987be6902cd85aa7e713d2ad57 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 13 Sep 2018 21:39:26 -0400
Subject: [PATCH] Add ItemStackRecipeChoice Draft API

View File

@ -1,4 +1,4 @@
From 1711a5a14d94328aabd0de48aa52f839741ba279 Mon Sep 17 00:00:00 2001
From 7441129221dd49a2239f47e7d4237683baa56bbd Mon Sep 17 00:00:00 2001
From: Tassu <git@tassu.me>
Date: Thu, 13 Sep 2018 08:45:01 +0300
Subject: [PATCH] Implement furnace cook speed multiplier API

View File

@ -1,4 +1,4 @@
From 067011b9b765658c52b5ceaf8e37a042119d2991 Mon Sep 17 00:00:00 2001
From 1499f72bc455c5b57447ed95902712a585fa204b Mon Sep 17 00:00:00 2001
From: Phoenix616 <mail@moep.tv>
Date: Tue, 18 Sep 2018 23:50:10 +0100
Subject: [PATCH] PreSpawnerSpawnEvent

View File

@ -1,4 +1,4 @@
From a266af8e96aff5e4c85cb8804f27cd44ebae0262 Mon Sep 17 00:00:00 2001
From e718538a8b3799242006d95332319c9de15f4f3b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 22 Sep 2018 18:41:01 -0400
Subject: [PATCH] Remove Precondition on name for AttributeModifier

View File

@ -1,11 +1,11 @@
From d87976c339606180aab0ee21966a692f21fe6c63 Mon Sep 17 00:00:00 2001
From ca41b95550077f665eafda0196e09f76153f6a86 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 6 Oct 2018 21:14:29 -0400
Subject: [PATCH] Material API additions
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index bb694bfb..a982092d 100644
index b9838dc9..9a1c3724 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -80,6 +80,7 @@ import org.jetbrains.annotations.Nullable;

View File

@ -1,4 +1,4 @@
From 6e0a7a9708fd792e32acae5b03dc7d4c3aca021d Mon Sep 17 00:00:00 2001
From ce227832021b02e082e046553625657ca85aed9e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 17 Jul 2018 01:27:15 -0400
Subject: [PATCH] Add Material Tags

View File

@ -1,4 +1,4 @@
From 313d42af8e15482fef26f3b7a600604215cdd5b7 Mon Sep 17 00:00:00 2001
From ad855b07a8a9d5e3ad04f0419e107c4aefa71e23 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 6 Oct 2018 21:47:09 -0500
Subject: [PATCH] Allow setting the vex's summoner

View File

@ -1,4 +1,4 @@
From ff3cac69313d04099bc0005676832b9b92d7fb5e Mon Sep 17 00:00:00 2001
From 04b7f7a20e837a9394b81b148c7b20949846f963 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 22 Sep 2018 00:32:53 -0500
Subject: [PATCH] Add LivingEntity#getTargetEntity
@ -6,7 +6,7 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity
diff --git a/src/main/java/com/destroystokyo/paper/entity/TargetEntityInfo.java b/src/main/java/com/destroystokyo/paper/entity/TargetEntityInfo.java
new file mode 100644
index 000000000..f52644fab
index 00000000..f52644fa
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/entity/TargetEntityInfo.java
@@ -0,0 +1,38 @@
@ -49,7 +49,7 @@ index 000000000..f52644fab
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 6b2002ceb..757cc5826 100644
index 9dc0d4ce..a78f390d 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -150,6 +150,50 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource

View File

@ -1,11 +1,11 @@
From 20baf564f13aaaa1f0ec80f2b1695581523dda2c Mon Sep 17 00:00:00 2001
From 469ebbbf30e5e73921440fc6192dfff2e496916d Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 7 Oct 2018 00:54:15 -0500
Subject: [PATCH] Add sun related API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 150c5af2..951eba31 100644
index 93dd8742..1818e158 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1508,6 +1508,16 @@ public interface World extends PluginMessageRecipient, Metadatable {

View File

@ -1,4 +1,4 @@
From 0a5183f643ec62c7b54a00cd947bd76e8fff4549 Mon Sep 17 00:00:00 2001
From 6337fde419a1700fa22d8e40995c4cfbdb36a124 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 12 Oct 2018 01:37:16 -0500
Subject: [PATCH] Here's Johnny!

View File

@ -1,4 +1,4 @@
From b0207fc37267ae453255af719476006e8c691228 Mon Sep 17 00:00:00 2001
From f789dbd181102df5658bcd4a048056ab55b5b109 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 28 Sep 2018 17:08:09 -0500
Subject: [PATCH] Turtle API

View File

@ -1,4 +1,4 @@
From 4a214392891daf7fd2226846aa79e07b9ab49367 Mon Sep 17 00:00:00 2001
From 3d3e7ad0541aba872975f6aeba753405727211ec Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 6 Oct 2018 20:54:13 -0500
Subject: [PATCH] Implement getters and setters for EntityItem owner and

View File

@ -1,4 +1,4 @@
From 58eb9b3112c67d09fce2461a9ad9cf420d601472 Mon Sep 17 00:00:00 2001
From 4304d246418a14fa2bedc2662bd5f9730dc5358f Mon Sep 17 00:00:00 2001
From: Caleb Bassham <caleb.bassham@gmail.com>
Date: Fri, 28 Sep 2018 02:30:56 -0500
Subject: [PATCH] Add spectator target events

View File

@ -1,4 +1,4 @@
From 4d56256f208eb7e341e808fa2e9c829e1a64cf61 Mon Sep 17 00:00:00 2001
From f3be0787b2990390ac5709f7069844505af7b986 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 12 Oct 2018 03:47:26 -0500
Subject: [PATCH] Add more Witch API

View File

@ -1,4 +1,4 @@
From cb587e0bd55df4951e9a4cb976fc2e48aad27cc5 Mon Sep 17 00:00:00 2001
From ba7c668ff92f66c985ec1aa036f1033d05aefe37 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 18 Nov 2018 19:44:54 +0000
Subject: [PATCH] Make the default permission message configurable

View File

@ -1,4 +1,4 @@
From 75492423338959a60f7831eff9e5e9a737d2f676 Mon Sep 17 00:00:00 2001
From 6b95712581e254062c8447b0a028beb99ff2bb0b Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 18 Nov 2018 15:53:43 +0000
Subject: [PATCH] Support cancellation supression of EntityDismount/VehicleExit

View File

@ -1,11 +1,11 @@
From 7ad724db569c57628ef6ad4199f26140032c3159 Mon Sep 17 00:00:00 2001
From 96132c23c6f6504490d612b90428a3545be7f024 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 7 Oct 2018 04:29:51 -0500
Subject: [PATCH] Add more Zombie API
diff --git a/src/main/java/org/bukkit/entity/Zombie.java b/src/main/java/org/bukkit/entity/Zombie.java
index ee2e70c6..74d6529a 100644
index 6dcac979..fa7a43c3 100644
--- a/src/main/java/org/bukkit/entity/Zombie.java
+++ b/src/main/java/org/bukkit/entity/Zombie.java
@@ -86,4 +86,55 @@ public interface Zombie extends Monster {

View File

@ -1,4 +1,4 @@
From d5abb48e4d10b87de170ca3471261b766960bc61 Mon Sep 17 00:00:00 2001
From b36a48e067fabe4f9108ef31f6ce6d1373627bf5 Mon Sep 17 00:00:00 2001
From: DoNotSpamPls <7570108+DoNotSpamPls@users.noreply.github.com>
Date: Tue, 23 Oct 2018 19:32:55 +0300
Subject: [PATCH] Change the reserved channel check to be sensible

View File

@ -1,4 +1,4 @@
From 97a5ad5bffb496b0895e50927fc43cb4a9909b8f Mon Sep 17 00:00:00 2001
From 46783a8013a1aa82f42a5c84ae431997e3e4aa87 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Sun, 7 Oct 2018 12:05:06 -0700
Subject: [PATCH] Add PlayerConnectionCloseEvent

View File

@ -1,4 +1,4 @@
From 7742ee299c1d018e0f7c0bb73870428e901dc42e Mon Sep 17 00:00:00 2001
From 2cb8c205aecd5cf6721b1732608a91f1ffc647d2 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach@zachbr.io>
Date: Wed, 2 Jan 2019 00:31:12 -0600
Subject: [PATCH] Add APIs to replace OfflinePlayer#getLastPlayed

View File

@ -1,4 +1,4 @@
From e159ad95e45ec024a8a765adc94c3eee46e06467 Mon Sep 17 00:00:00 2001
From 3a8a74faebdfc13c20216048b001baee3de8b0eb Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 6 Feb 2019 00:19:33 -0500
Subject: [PATCH] BlockDestroyEvent

View File

@ -1,4 +1,4 @@
From 2de9aa3c54fb5e949cf3dac28525918527141317 Mon Sep 17 00:00:00 2001
From 1e59893d15dc6efa7eccc010b77adb814e57a6aa Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 28 Jan 2014 19:13:57 -0500
Subject: [PATCH] Add ItemStack Recipe API helper methods

View File

@ -1,4 +1,4 @@
From 80bd01a329efd26892f15e07c3502a4bf66e14e6 Mon Sep 17 00:00:00 2001
From 956695150bce0d2d74ba337fd742a403e2edce7f Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Wed, 13 Mar 2019 20:04:43 +0200
Subject: [PATCH] Add WhitelistToggleEvent

View File

@ -1,11 +1,11 @@
From b336313faa48d320445d797f0057e88e42bb366e Mon Sep 17 00:00:00 2001
From 1a26c0d087846c0ff615263216505475184cf2c4 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 17 Mar 2019 23:04:30 +0000
Subject: [PATCH] Annotation Test changes
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
index dfd6e137..596f2807 100644
index cc6b6e20..328a5a16 100644
--- a/src/test/java/org/bukkit/AnnotationTest.java
+++ b/src/test/java/org/bukkit/AnnotationTest.java
@@ -40,7 +40,17 @@ public class AnnotationTest {

View File

@ -1,4 +1,4 @@
From 33c9867ff8e00e5f2903999c23cd50cd1f826362 Mon Sep 17 00:00:00 2001
From 6eb4f8f6f02a2a720d97c5925953c48b247674eb Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 24 Mar 2019 00:21:23 -0400
Subject: [PATCH] Entity#getEntitySpawnReason

View File

@ -1,4 +1,4 @@
From b3a8a2440a3796371a4450a4e5b464f1f473674e Mon Sep 17 00:00:00 2001
From 8af8a8fbf521cac34d701cd5436545c70e88ccaa Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Sun, 17 Mar 2019 21:46:27 +0200
Subject: [PATCH] Add GS4 Query event

View File

@ -1,4 +1,4 @@
From c8a1fe8d001b65dc3a8c65b81e22e89955cc35bc Mon Sep 17 00:00:00 2001
From f38ffb6d09efb22ea0368e835ed6c4c0fec23773 Mon Sep 17 00:00:00 2001
From: MisterVector <whizkid3000@hotmail.com>
Date: Fri, 26 Oct 2018 21:33:13 -0700
Subject: [PATCH] Add PlayerPostRespawnEvent

View File

@ -1,4 +1,4 @@
From 08595b0bf9dcd0fbeb11f467ff604ae052e1418c Mon Sep 17 00:00:00 2001
From 2927db66363b3ee30a315fd4041bf5a55b2af016 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 24 Mar 2019 18:44:26 -0400
Subject: [PATCH] Ignore package-private methods for nullability annotations
@ -6,7 +6,7 @@ Subject: [PATCH] Ignore package-private methods for nullability annotations
This isn't API
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
index 328a5a163..af2abd47f 100644
index 328a5a16..af2abd47 100644
--- a/src/test/java/org/bukkit/AnnotationTest.java
+++ b/src/test/java/org/bukkit/AnnotationTest.java
@@ -162,7 +162,7 @@ public class AnnotationTest {

View File

@ -1,4 +1,4 @@
From 4227a867264d348f9ba7eecf6e1a5623287a56e2 Mon Sep 17 00:00:00 2001
From fb262f912ed78da8575b03f61868f43dd5d63550 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 24 Mar 2019 18:39:01 -0400
Subject: [PATCH] Flip some Spigot API null annotations
@ -84,7 +84,7 @@ index 1cbb9bc6..27d3b5ad 100644
/**
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index dca77bba..56734f8e 100644
index 3cada348..03ba2265 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -3,6 +3,7 @@ package org.bukkit.inventory;

View File

@ -1,4 +1,4 @@
From ffa7e3f5b074f2785650cbfb172f80444d6a0548 Mon Sep 17 00:00:00 2001
From 5490eac320d59394f00403eec705cbe774f2fd79 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 27 Mar 2019 21:58:55 -0400
Subject: [PATCH] Server Tick Events

View File

@ -1,4 +1,4 @@
From c44389f13850fc2f9f8e5bef6ba3877cd44f5326 Mon Sep 17 00:00:00 2001
From c9d19322171cba500160f8fd9c4373f854f3805c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 11 Mar 2013 20:04:34 -0400
Subject: [PATCH] PlayerDeathEvent#getItemsToKeep

View File

@ -1,4 +1,4 @@
From 3bfd84603554d6cbb91aec86b2a689ffa29cebae Mon Sep 17 00:00:00 2001
From 30b569ca7446323f70c2582de9d0c3998d09ed2e Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Sat, 1 Dec 2018 19:00:36 -0800
Subject: [PATCH] Add Heightmap API
@ -84,7 +84,7 @@ index 2a40da99..3e1ca4c9 100644
* Creates explosion at this location with given power
*
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 951eba31..2da92d39 100644
index 1818e158..65dc8022 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -161,6 +161,79 @@ public interface World extends PluginMessageRecipient, Metadatable {

View File

@ -1,4 +1,4 @@
From 8a7fdc3db38d4b47cc8f1309e7426abfab179799 Mon Sep 17 00:00:00 2001
From 9c1b7b7e74dce4fb6fbbd9e3979f9cd711e38141 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Fri, 19 Apr 2019 12:41:19 -0500
Subject: [PATCH] Mob Spawner API Enhancements

View File

@ -1,22 +0,0 @@
From a5beefed41fd637dfed924034905e153109a350b Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Tue, 7 May 2019 16:44:03 +0100
Subject: [PATCH] Temp track ver/1.14 for version command
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
index 27f0cadd9..ece8d1c8a 100644
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
@@ -268,7 +268,7 @@ public class VersionCommand extends BukkitCommand {
return getFromJenkins(currentVer);
} catch (NumberFormatException ex) {
verInfo = verInfo.replace("\"", "");
- return getFromRepo("PaperMC/Paper", "master", verInfo);
+ return getFromRepo("PaperMC/Paper", "ver/1.14", verInfo); // Just for now
}
/*
BufferedReader reader = Resources.asCharSource(
--
2.21.0

View File

@ -0,0 +1,146 @@
From b90b49851bbceb8edef5dc8d88bdb6633e6c9076 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach@zachbr.io>
Date: Mon, 27 May 2019 03:40:05 -0500
Subject: [PATCH] Implement Paper VersionChecker
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
new file mode 100644
index 000000000..ded51d042
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
@@ -0,0 +1,115 @@
+package com.destroystokyo.paper;
+
+import com.destroystokyo.paper.util.VersionFetcher;
+import com.google.common.base.Charsets;
+import com.google.common.io.Resources;
+import com.google.gson.*;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+public class PaperVersionFetcher implements VersionFetcher {
+ private static final java.util.regex.Pattern VER_PATTERN = java.util.regex.Pattern.compile("^([0-9\\.]*)\\-.*R"); // R is an anchor, will always give '-R' at end
+ private static final String GITHUB_BRANCH_NAME = "ver/1.14";
+ private static @Nullable String mcVer;
+
+ @Override
+ public long getCacheTime() {
+ return 720000;
+ }
+
+ @Nonnull
+ @Override
+ public String getVersionMessage(@Nonnull String serverVersion) {
+ String[] parts = serverVersion.substring("git-Paper-".length()).split("[-\\s]");
+ return getUpdateStatusMessage("PaperMC/Paper", GITHUB_BRANCH_NAME, parts[0]);
+ }
+
+ private static @Nullable String getMinecraftVersion() {
+ if (mcVer == null) {
+ java.util.regex.Matcher matcher = VER_PATTERN.matcher(org.bukkit.Bukkit.getBukkitVersion());
+ if (matcher.find()) {
+ String result = matcher.group();
+ mcVer = result.substring(0, result.length() - 2); // strip 'R' anchor and trailing '-'
+ } else {
+ org.bukkit.Bukkit.getLogger().warning("Unable to match version to pattern! Report to PaperMC!");
+ org.bukkit.Bukkit.getLogger().warning("Pattern: " + VER_PATTERN.toString());
+ org.bukkit.Bukkit.getLogger().warning("Version: " + org.bukkit.Bukkit.getBukkitVersion());
+ }
+ }
+
+ return mcVer;
+ }
+
+ private static String getUpdateStatusMessage(@Nonnull String repo, @Nonnull String branch, @Nonnull String versionInfo) {
+ int distance;
+ try {
+ int jenkinsBuild = Integer.parseInt(versionInfo);
+ distance = fetchDistanceFromSiteApi(jenkinsBuild, getMinecraftVersion());
+ } catch (NumberFormatException ignored) {
+ versionInfo = versionInfo.replace("\"", "");
+ distance = fetchDistanceFromGitHub(repo, branch, versionInfo);
+ }
+
+ switch (distance) {
+ case -1:
+ return "Error obtaining version information";
+ case 0:
+ return "You are running the latest version";
+ case -2:
+ return "Unknown version";
+ default:
+ return "You are " + distance + " version(s) behind";
+ }
+ }
+
+ private static int fetchDistanceFromSiteApi(int jenkinsBuild, @Nullable String siteApiVersion) {
+ if (siteApiVersion == null) { return -1; }
+ try {
+ try (BufferedReader reader = Resources.asCharSource(
+ new URL("https://papermc.io/api/v1/paper/" + siteApiVersion + "/latest"),
+ Charsets.UTF_8
+ ).openBufferedStream()) {
+ JsonObject json = new Gson().fromJson(reader, JsonObject.class);
+ int latest = json.get("build").getAsInt();
+ return latest - jenkinsBuild;
+ } catch (JsonSyntaxException ex) {
+ ex.printStackTrace();
+ return -1;
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ return -1;
+ }
+ }
+
+ // Contributed by Techcable <Techcable@outlook.com> in GH-65
+ private static int fetchDistanceFromGitHub(@Nonnull String repo, @Nonnull String branch, @Nonnull String hash) {
+ try {
+ HttpURLConnection connection = (HttpURLConnection) new URL("https://api.github.com/repos/" + repo + "/compare/" + branch + "..." + hash).openConnection();
+ connection.connect();
+ if (connection.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) return -2; // Unknown commit
+ try (BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), Charsets.UTF_8))) {
+ JsonObject obj = new Gson().fromJson(reader, JsonObject.class);
+ String status = obj.get("status").getAsString();
+ switch (status) {
+ case "identical":
+ return 0;
+ case "behind":
+ return obj.get("behind_by").getAsInt();
+ default:
+ return -1;
+ }
+ } catch (JsonSyntaxException | NumberFormatException e) {
+ e.printStackTrace();
+ return -1;
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ return -1;
+ }
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 6775bf043..bb29b329b 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -276,6 +276,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
public String getTimingsServerName() {
return com.destroystokyo.paper.PaperConfig.timingsServerName;
}
+
+ @Override
+ public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
+ return new com.destroystokyo.paper.PaperVersionFetcher();
+ }
// Paper end
/**
--
2.21.0

View File

@ -1,15 +1,50 @@
From 9ac21215adc9c6fb74467a43ee44d0366de3c0f1 Mon Sep 17 00:00:00 2001
From 5740e3f1fbd1bcad809d4394f437ffffa3b87bed Mon Sep 17 00:00:00 2001
From: Kyle Wood <demonwav@gmail.com>
Date: Thu, 1 Mar 2018 19:37:52 -0600
Subject: [PATCH] Add version history to version command
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
index ded51d042..e0bd79f60 100644
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
@@ -25,7 +25,9 @@ public class PaperVersionFetcher implements VersionFetcher {
@Override
public String getVersionMessage(@Nonnull String serverVersion) {
String[] parts = serverVersion.substring("git-Paper-".length()).split("[-\\s]");
- return getUpdateStatusMessage("PaperMC/Paper", GITHUB_BRANCH_NAME, parts[0]);
+ String updateMessage = getUpdateStatusMessage("PaperMC/Paper", GITHUB_BRANCH_NAME, parts[0]);
+
+ return getHistory() + "\n" + updateMessage;
}
private static @Nullable String getMinecraftVersion() {
@@ -112,4 +114,19 @@ public class PaperVersionFetcher implements VersionFetcher {
return -1;
}
}
+
+ @Nullable
+ private String getHistory() {
+ final VersionHistoryManager.VersionData data = VersionHistoryManager.INSTANCE.getVersionData();
+ if (data == null) {
+ return null;
+ }
+
+ final String oldVersion = data.getOldVersion();
+ if (oldVersion == null) {
+ return null;
+ }
+
+ return "Previous version: " + oldVersion;
+ }
}
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..648b247e
index 000000000..aac3f66cb
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/VersionHistoryManager.java
@@ -0,0 +1,144 @@
@@ -0,0 +1,145 @@
+package com.destroystokyo.paper;
+
+import com.google.common.base.MoreObjects;
@ -27,8 +62,9 @@ index 00000000..648b247e
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.bukkit.Bukkit;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+public enum VersionHistoryManager {
+ INSTANCE;
@ -85,7 +121,7 @@ index 00000000..648b247e
+ }
+ }
+
+ private void writeFile(@NotNull final Path path) {
+ private void writeFile(@Nonnull final Path path) {
+ try (final BufferedWriter writer = Files.newBufferedWriter(
+ path,
+ StandardCharsets.UTF_8,
@ -154,49 +190,18 @@ index 00000000..648b247e
+ }
+ }
+}
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
index 5a1f9504..a36ab04c 100644
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
@@ -31,6 +31,7 @@ import java.net.HttpURLConnection;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
+import com.destroystokyo.paper.VersionHistoryManager;
// Paper end
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 19e2df309..f0e2250cd 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -160,6 +160,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
return false;
}
com.destroystokyo.paper.PaperConfig.registerCommands();
+ com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
// Paper end
public class VersionCommand extends BukkitCommand {
@@ -49,6 +50,7 @@ public class VersionCommand extends BukkitCommand {
if (args.length == 0) {
sender.sendMessage("This server is running " + Bukkit.getName() + " version " + Bukkit.getVersion() + " (Implementing API version " + Bukkit.getBukkitVersion() + ")");
+ tellHistory(sender); // Paper
sendVersion(sender);
} else {
StringBuilder name = new StringBuilder();
@@ -85,6 +87,22 @@ public class VersionCommand extends BukkitCommand {
return true;
}
+ // Paper start - show version history
+ private void tellHistory(final CommandSender sender) {
+ final VersionHistoryManager.VersionData data = VersionHistoryManager.INSTANCE.getVersionData();
+ if (data == null) {
+ return;
+ }
+
+ final String oldVersion = data.getOldVersion();
+ if (oldVersion == null) {
+ return;
+ }
+
+ sender.sendMessage("Previous version: " + oldVersion);
+ }
+ // Paper end
+
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());
this.setSpawnAnimals(dedicatedserverproperties.spawnAnimals);
--
2.21.0

View File

@ -1,4 +1,4 @@
From 72c98e1673f146a01c9e8ea3ca44cbd2e55e4a8c Mon Sep 17 00:00:00 2001
From 49c5bdc934ad55d573f1f70539b1b9a4e38ff4e2 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Tue, 1 Mar 2016 14:47:52 -0600
Subject: [PATCH] Player affects spawning API

View File

@ -1,11 +1,11 @@
From b3eef60e49a65dd67c160fd3fc6d11456b77c44e Mon Sep 17 00:00:00 2001
From 8a87e6f9ebf29d370013a3b135f3ea3f91d96d1a Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 15:08:03 -0600
Subject: [PATCH] Remove invalid mob spawner tile entities
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 4ec0c22233..318035a48e 100644
index 4ec0c2223..318035a48 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -506,6 +506,10 @@ public class Chunk implements IChunkAccess {

View File

@ -1,11 +1,11 @@
From f394769c4ad8881b21c3e2931a2a01c075a241a3 Mon Sep 17 00:00:00 2001
From 04b87f60ac11d2b82bb3ae15c16685042d298c6f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 8 Mar 2015 22:55:25 -0600
Subject: [PATCH] Optimize TileEntity Ticking
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index 271406f8bb..85b450c054 100644
index 271406f8b..85b450c05 100644
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -7,7 +7,7 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
@ -90,7 +90,7 @@ index 271406f8bb..85b450c054 100644
int newPower = Math.max(0, Math.min(15, this.viewingCount));
diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
index 6908f50031..ed5cdf177f 100644
index 6908f5003..ed5cdf177 100644
--- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
@@ -1,6 +1,6 @@

View File

@ -1,4 +1,4 @@
From b4b7ed644739b3d7f7131765ebb7af130ba70248 Mon Sep 17 00:00:00 2001
From 872546911a19e8385a950c600ed0c7a7ddbb0ac3 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 1 Mar 2016 23:09:29 -0600
Subject: [PATCH] Further improve server tick loop
@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly.
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2fc8c192b3..cf7a75b2e2 100644
index 2fc8c192b..cf7a75b2e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -150,7 +150,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -140,7 +140,7 @@ index 2fc8c192b3..cf7a75b2e2 100644
if (this.T) {
this.T = false;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e8a905c815..d97cba9c04 100644
index e8a905c81..d97cba9c0 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1923,6 +1923,17 @@ public final class CraftServer implements Server {
@ -162,7 +162,7 @@ index e8a905c815..d97cba9c04 100644
{
diff --git a/src/main/java/org/spigotmc/TicksPerSecondCommand.java b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
index be2e31deae..6d21c32692 100644
index be2e31dea..6d21c3269 100644
--- a/src/main/java/org/spigotmc/TicksPerSecondCommand.java
+++ b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
@@ -1,8 +1,5 @@

Some files were not shown because too many files have changed in this diff Show More