3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 02:50:09 +01:00

More compile fixes

- Re-removes Bukkit#getServerName - This was (hopefully?) only added back
  for Timings v2. It should be kept in that scope.

- Intend to let PlayerViewDistance API slip. Given the scope of the
  changes in this area it seems best to let this slip past initial
  release. It can be re-added when there is additional time to focus on it
  and the changed systems it relies on. If it is fixed prior to release
  this is implemented as a single shim patch that can be dropped.
Dieser Commit ist enthalten in:
Zach Brown 2019-05-06 03:20:16 -04:00
Ursprung 8dfd5dc0c4
Commit 27c7749f42
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: CC9DA35FC5450B76
56 geänderte Dateien mit 574 neuen und 309 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From 3cb74e805adf6ffb74f73fa3e55b7ad82e12c801 Mon Sep 17 00:00:00 2001
From 0f0f805ffa000c104c0d75167b0071a01ca7e170 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 29 Feb 2016 18:48:17 -0600
Subject: [PATCH] Timings v2
@ -1682,7 +1682,7 @@ index 00000000..c0d8f201
+}
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
new file mode 100644
index 00000000..65d312b0
index 00000000..ea8734c4
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
@@ -0,0 +1,355 @@
@ -1799,7 +1799,7 @@ index 00000000..65d312b0
+ );
+ if (!TimingsManager.privacy) {
+ appendObjectData(parent,
+ pair("server", Bukkit.getServerName()),
+ pair("server", Bukkit.getUnsafe().getTimingsServerName()),
+ pair("motd", Bukkit.getServer().getMotd()),
+ pair("online-mode", Bukkit.getServer().getOnlineMode()),
+ pair("icon", Bukkit.getServer().getServerIcon().getData())
@ -1976,8 +1976,8 @@ index 00000000..65d312b0
+ String hostName = "BrokenHost";
+ try {
+ hostName = InetAddress.getLocalHost().getHostName();
+ } catch(Exception ignored) {}
+ con.setRequestProperty("User-Agent", "Paper/" + Bukkit.getServerName() + "/" + hostName);
+ } catch (Exception ignored) {}
+ con.setRequestProperty("User-Agent", "Paper/" + Bukkit.getUnsafe().getTimingsServerName() + "/" + hostName);
+ con.setRequestMethod("POST");
+ con.setInstanceFollowRedirects(false);
+
@ -3139,28 +3139,10 @@ index 00000000..5989ee21
+ }
+}
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 1c1f650d..d2e47a35 100644
index 1c1f650d..8f46899f 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -189,6 +189,17 @@ public final class Bukkit {
return server.getIp();
}
+ // Paper start - bring back server name
+ /**
+ * Get the name of this server
+ * @return the name of the server
+ */
+ @NotNull
+ public static String getServerName() {
+ return server.getServerName();
+ }
+ // Paper
+
/**
* Get world type (level-type setting) for default world.
*
@@ -574,7 +585,6 @@ public final class Bukkit {
@@ -574,7 +574,6 @@ public final class Bukkit {
*/
public static void reload() {
server.reload();
@ -3169,26 +3151,10 @@ index 1c1f650d..d2e47a35 100644
/**
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 2a55a954..77d993ad 100644
index 2a55a954..0f9e5ba7 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -158,6 +158,15 @@ public interface Server extends PluginMessageRecipient {
@NotNull
public String getIp();
+ // Paper start - bring back server name
+ /**
+ * Get the name of this server
+ * @return the name of the server
+ */
+ @NotNull
+ public String getServerName();
+ // Paper
+
/**
* Get world type (level-type setting) for default world.
*
@@ -1252,6 +1261,26 @@ public interface Server extends PluginMessageRecipient {
@@ -1252,6 +1252,26 @@ public interface Server extends PluginMessageRecipient {
throw new UnsupportedOperationException( "Not supported yet." );
}
@ -3215,6 +3181,23 @@ index 2a55a954..77d993ad 100644
/**
* Sends the component to the player
*
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 247d194f..72c5501e 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -69,4 +69,12 @@ public interface UnsafeValues {
* @return true if a file matching this key was found and deleted
*/
boolean removeAdvancement(NamespacedKey key);
+
+ // Paper start
+ /**
+ * Server name to report to timings v2
+ * @return name
+ */
+ String getTimingsServerName();
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/command/BufferedCommandSender.java b/src/main/java/org/bukkit/command/BufferedCommandSender.java
new file mode 100644
index 00000000..f9a00aec

Datei anzeigen

@ -1,14 +1,14 @@
From f6ba024fcfe38fcdb7c7f5f122e26e3aa3beddba Mon Sep 17 00:00:00 2001
From f14a06e28d6591edd48b1b57a6709a8cf93112c4 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 29 Feb 2016 17:24:57 -0600
Subject: [PATCH] Add getTPS method
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index d2e47a35..97ec6c53 100644
index 8f46899f..62b120ef 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1324,6 +1324,17 @@ public final class Bukkit {
@@ -1313,6 +1313,17 @@ public final class Bukkit {
return server.getEntity(uuid);
}
@ -27,10 +27,10 @@ index d2e47a35..97ec6c53 100644
* Get the advancement specified by this key.
*
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 77d993ad..c94c5d90 100644
index 0f9e5ba7..3912c434 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1107,6 +1107,16 @@ public interface Server extends PluginMessageRecipient {
@@ -1098,6 +1098,16 @@ public interface Server extends PluginMessageRecipient {
@Nullable
Entity getEntity(@NotNull UUID uuid);

Datei anzeigen

@ -1,14 +1,14 @@
From d601b47efb8159c2a7493e065a32ea52e14d1566 Mon Sep 17 00:00:00 2001
From 8359b55e6f3fabe4f725ca31005c4cad376d4a23 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Mon, 29 Feb 2016 19:48:59 -0600
Subject: [PATCH] Expose server CommandMap
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 97ec6c53..218f5fc9 100644
index 62b120ef..e4e1c980 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1498,6 +1498,19 @@ public final class Bukkit {
@@ -1487,6 +1487,19 @@ public final class Bukkit {
return server.getUnsafe();
}
@ -29,10 +29,10 @@ index 97ec6c53..218f5fc9 100644
public static Server.Spigot spigot()
{
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index c94c5d90..c5435c42 100644
index 3912c434..f0850919 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1117,6 +1117,15 @@ public interface Server extends PluginMessageRecipient {
@@ -1108,6 +1108,15 @@ public interface Server extends PluginMessageRecipient {
public double[] getTPS();
// Paper end

Datei anzeigen

@ -1,4 +1,4 @@
From 5208c701f3786837ca72f4973ebb238a47baa9fa Mon Sep 17 00:00:00 2001
From b4534cdb384942daeea67ad698853dfd6749381f Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 19:54:32 -0600
Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses
@ -6,10 +6,10 @@ Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses
Change Javadoc to be accurate
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 218f5fc9..184c024d 100644
index e4e1c980..3c76d5a8 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -285,6 +285,26 @@ public final class Bukkit {
@@ -274,6 +274,26 @@ public final class Bukkit {
return server.broadcastMessage(message);
}
@ -37,10 +37,10 @@ index 218f5fc9..184c024d 100644
* Gets the name of the update folder. The update folder is used to safely
* update plugins at the right moment on a plugin load.
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index c5435c42..246e081b 100644
index f0850919..3359434b 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -234,6 +234,26 @@ public interface Server extends PluginMessageRecipient {
@@ -225,6 +225,26 @@ public interface Server extends PluginMessageRecipient {
*/
public int broadcastMessage(@NotNull String message);

Datei anzeigen

@ -1,4 +1,4 @@
From e94f385e9218282340bf014f7bee495fc6d28444 Mon Sep 17 00:00:00 2001
From 013b14c932a46c9220116f86f42ee2980735e963 Mon Sep 17 00:00:00 2001
From: William <admin@domnian.com>
Date: Fri, 18 Mar 2016 03:28:07 -0400
Subject: [PATCH] Add command to reload permissions.yml and require confirm to
@ -6,10 +6,10 @@ Subject: [PATCH] Add command to reload permissions.yml and require confirm to
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 184c024d..9fe31fab 100644
index 3c76d5a8..d1845cf3 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1529,6 +1529,13 @@ public final class Bukkit {
@@ -1518,6 +1518,13 @@ public final class Bukkit {
public static org.bukkit.command.CommandMap getCommandMap() {
return server.getCommandMap();
}
@ -24,10 +24,10 @@ index 184c024d..9fe31fab 100644
@NotNull
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 246e081b..f6d9720c 100644
index 3359434b..41731a28 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1349,4 +1349,6 @@ public interface Server extends PluginMessageRecipient {
@@ -1340,4 +1340,6 @@ public interface Server extends PluginMessageRecipient {
@NotNull
Spigot spigot();
// Spigot end

Datei anzeigen

@ -1,4 +1,4 @@
From 5054117d47392e633989f9732641c6833311ed4b Mon Sep 17 00:00:00 2001
From 5ecb0a4ced346f99f3fe3b209ec4b6bf6bd7b2c8 Mon Sep 17 00:00:00 2001
From: willies952002 <admin@domnian.com>
Date: Mon, 28 Nov 2016 10:16:39 -0500
Subject: [PATCH] Allow Reloading of Command Aliases
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
Reload the aliases stored in commands.yml
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 9fe31fab..c7f4c6f2 100644
index d1845cf3..bef53644 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1536,6 +1536,15 @@ public final class Bukkit {
@@ -1525,6 +1525,15 @@ public final class Bukkit {
public static void reloadPermissions() {
server.reloadPermissions();
}
@ -26,10 +26,10 @@ index 9fe31fab..c7f4c6f2 100644
@NotNull
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index f6d9720c..f248400e 100644
index 41731a28..54da4d99 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1351,4 +1351,6 @@ public interface Server extends PluginMessageRecipient {
@@ -1342,4 +1342,6 @@ public interface Server extends PluginMessageRecipient {
// Spigot end
void reloadPermissions(); // Paper

Datei anzeigen

@ -1,4 +1,4 @@
From a2729794b8cf80f90163f9a543708914876c6cf2 Mon Sep 17 00:00:00 2001
From 46135ee897ecabd5085a6fbd6c82780ac61731e1 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Fri, 9 Jun 2017 07:24:24 -0700
Subject: [PATCH] Add configuration option to prevent player names from being
@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index c7f4c6f2..411e534b 100644
index bef53644..30142250 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1545,6 +1545,16 @@ public final class Bukkit {
@@ -1534,6 +1534,16 @@ public final class Bukkit {
public static boolean reloadCommandAliases() {
return server.reloadCommandAliases();
}
@ -27,10 +27,10 @@ index c7f4c6f2..411e534b 100644
@NotNull
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index f248400e..2778ce92 100644
index 54da4d99..e91f74b7 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1353,4 +1353,14 @@ public interface Server extends PluginMessageRecipient {
@@ -1344,4 +1344,14 @@ public interface Server extends PluginMessageRecipient {
void reloadPermissions(); // Paper
boolean reloadCommandAliases(); // Paper

Datei anzeigen

@ -1,4 +1,4 @@
From c3fa1c3006bf1c9e6f786581aac8fe876653678c Mon Sep 17 00:00:00 2001
From 950b96830a04000914d9a8dce07953090dccec2f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 15 Jan 2018 21:46:46 -0500
Subject: [PATCH] Basic PlayerProfile API
@ -235,10 +235,10 @@ index 00000000..7b3b6ef5
+ }
+}
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 411e534b..bb235ed6 100644
index 30142250..24b761fe 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1555,6 +1555,40 @@ public final class Bukkit {
@@ -1544,6 +1544,40 @@ public final class Bukkit {
public static boolean suggestPlayerNamesWhenNullTabCompletions() {
return server.suggestPlayerNamesWhenNullTabCompletions();
}
@ -280,10 +280,10 @@ index 411e534b..bb235ed6 100644
@NotNull
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 2778ce92..c1c1d384 100644
index e91f74b7..9b767d7c 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1362,5 +1362,33 @@ public interface Server extends PluginMessageRecipient {
@@ -1353,5 +1353,33 @@ public interface Server extends PluginMessageRecipient {
* @return true if player names should be suggested
*/
boolean suggestPlayerNamesWhenNullTabCompletions();

Datei anzeigen

@ -1,4 +1,4 @@
From a176ce648fe16ef42bd5113e0c853e7b134e26e8 Mon Sep 17 00:00:00 2001
From 9d6cb9777a68d1b778b91e9b4bec65e489b00096 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 22 Mar 2018 01:39:28 -0400
Subject: [PATCH] getPlayerUniqueId API
@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index bb235ed6..db9d3f9a 100644
index 24b761fe..de42be5b 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -434,6 +434,20 @@ public final class Bukkit {
@@ -423,6 +423,20 @@ public final class Bukkit {
return server.getPlayer(id);
}
@ -34,10 +34,10 @@ index bb235ed6..db9d3f9a 100644
* Gets the plugin manager for interfacing with plugins.
*
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index c1c1d384..d7ef680b 100644
index 9b767d7c..9c92517b 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -365,6 +365,18 @@ public interface Server extends PluginMessageRecipient {
@@ -356,6 +356,18 @@ public interface Server extends PluginMessageRecipient {
@Nullable
public Player getPlayer(@NotNull UUID id);

Datei anzeigen

@ -1,4 +1,4 @@
From 0e5e339e31b65bd94e6a94af1d69b504aa59c177 Mon Sep 17 00:00:00 2001
From 13c2ac68421f8cadf0d1bfe0d00095cf882561a0 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,19 +7,18 @@ 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 247d194f..b4c173df 100644
index 72c5501e..9e96e12c 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -69,4 +69,10 @@ public interface UnsafeValues {
* @return true if a file matching this key was found and deleted
@@ -76,5 +76,9 @@ public interface UnsafeValues {
* @return name
*/
boolean removeAdvancement(NamespacedKey key);
String getTimingsServerName();
+
+ // Paper start - Add legacy check util
+ static boolean isLegacyPlugin(org.bukkit.plugin.Plugin plugin) {
+ return !("1.13".equals(plugin.getDescription().getAPIVersion()));
+ }
+ // Paper end
// Paper end
}
diff --git a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
index d4e74d29..6cfd9f3c 100644

Datei anzeigen

@ -1,14 +1,14 @@
From 6ec94f4f8695610e7c6384bae59a3571718ed391 Mon Sep 17 00:00:00 2001
From b0f277640259a7705d3bcdc87349f0c91a93388f 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
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index db9d3f9a..3b883b93 100644
index de42be5b..64955c6e 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1570,6 +1570,15 @@ public final class Bukkit {
@@ -1559,6 +1559,15 @@ public final class Bukkit {
return server.suggestPlayerNamesWhenNullTabCompletions();
}
@ -25,10 +25,10 @@ index db9d3f9a..3b883b93 100644
* Creates a PlayerProfile for the specified uuid, with name as null
* @param uuid UUID to create profile for
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index d7ef680b..63a661bd 100644
index 9c92517b..d0b2ab61 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1375,6 +1375,13 @@ public interface Server extends PluginMessageRecipient {
@@ -1366,6 +1366,13 @@ public interface Server extends PluginMessageRecipient {
*/
boolean suggestPlayerNamesWhenNullTabCompletions();

Datei anzeigen

@ -1,4 +1,4 @@
From d41b85d8d0510fc739f63d301c4f2ceb16ea2d28 Mon Sep 17 00:00:00 2001
From 1ae0dd77c2f3a864593862c9d25c9c9cbc9e1339 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
@ -9,10 +9,10 @@ a ton of noise to plugin developers.
These do not help plugin developers if they bring moise noise than value.
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 3b883b93..9f56e7f8 100644
index 64955c6e..bb03a0f4 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1166,7 +1166,7 @@ public final class Bukkit {
@@ -1155,7 +1155,7 @@ public final class Bukkit {
*
* @return the scoreboard manager or null if no worlds are loaded.
*/
@ -21,7 +21,7 @@ index 3b883b93..9f56e7f8 100644
public static ScoreboardManager getScoreboardManager() {
return server.getScoreboardManager();
}
@@ -1463,7 +1463,7 @@ public final class Bukkit {
@@ -1452,7 +1452,7 @@ public final class Bukkit {
* @param clazz the class of the tag entries
* @return the tag or null
*/
@ -62,10 +62,10 @@ index 4e69f277..2a40da99 100644
if (this.world == null) {
return null;
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 63a661bd..2f2be03f 100644
index d0b2ab61..0e7b48f2 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -973,7 +973,7 @@ public interface Server extends PluginMessageRecipient {
@@ -964,7 +964,7 @@ public interface Server extends PluginMessageRecipient {
*
* @return the scoreboard manager or null if no worlds are loaded.
*/
@ -74,7 +74,7 @@ index 63a661bd..2f2be03f 100644
ScoreboardManager getScoreboardManager();
/**
@@ -1243,7 +1243,7 @@ public interface Server extends PluginMessageRecipient {
@@ -1234,7 +1234,7 @@ public interface Server extends PluginMessageRecipient {
* @param clazz the class of the tag entries
* @return the tag or null
*/

Datei anzeigen

@ -1,4 +1,4 @@
From a7ea633b747bb806e7fcc6077f30fcab76b59d04 Mon Sep 17 00:00:00 2001
From 4577cfa21d449248ee5fa72bd36cc048232636f9 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2
@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
new file mode 100644
index 0000000000..3f9fb6f906
index 000000000..3f9fb6f90
--- /dev/null
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
@@ -0,0 +1,133 @@
@ -145,7 +145,7 @@ index 0000000000..3f9fb6f906
+}
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
new file mode 100644
index 0000000000..d5d3b2a20c
index 000000000..d5d3b2a20
--- /dev/null
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
@@ -0,0 +1,105 @@
@ -255,7 +255,7 @@ index 0000000000..d5d3b2a20c
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 5518ec1e54..7691409f6c 100644
index 5518ec1e5..0c65afccf 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit;
@ -273,11 +273,12 @@ index 5518ec1e54..7691409f6c 100644
public class PaperConfig {
@@ -187,4 +190,24 @@ public class PaperConfig {
@@ -187,4 +190,27 @@ public class PaperConfig {
config.addDefault(path, def);
return config.getString(path, config.getString(path));
}
+
+ public static String timingsServerName;
+ private static void timings() {
+ boolean timings = getBoolean("timings.enabled", true);
+ boolean verboseTimings = getBoolean("timings.verbose", true);
@ -285,6 +286,7 @@ index 5518ec1e54..7691409f6c 100644
+ TimingsManager.hiddenConfigs = getList("timings.hidden-config-entries", Lists.newArrayList("database", "settings.bungeecord-addresses"));
+ int timingHistoryInterval = getInt("timings.history-interval", 300);
+ int timingHistoryLength = getInt("timings.history-length", 3600);
+ timingsServerName = getString("timings.server-name", "Unknown Server");
+
+
+ Timings.setVerboseTimingsEnabled(verboseTimings);
@ -295,11 +297,12 @@ index 5518ec1e54..7691409f6c 100644
+ log("Timings: " + timings +
+ " - Verbose: " + verboseTimings +
+ " - Interval: " + timeSummary(Timings.getHistoryInterval() / 20) +
+ " - Length: " + timeSummary(Timings.getHistoryLength() / 20));
+ " - Length: " + timeSummary(Timings.getHistoryLength() / 20) +
+ " - Server Name: " + timingsServerName);
+ }
}
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index 8b91e27c66..fd23d45346 100644
index 8b91e27c6..fd23d4534 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -24,6 +24,15 @@ public class Block implements IMaterial {
@ -319,7 +322,7 @@ index 8b91e27c66..fd23d45346 100644
private final float frictionFactor;
protected final BlockStateList<Block, IBlockData> blockStateList;
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 9cce929c3e..1a2cc0258a 100644
index 9cce929c3..1a2cc0258 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -89,6 +89,29 @@ public class Chunk implements IChunkAccess {
@ -369,7 +372,7 @@ index 9cce929c3e..1a2cc0258a 100644
}
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 845ad7427b..4f0fbe4a0d 100644
index 845ad7427..4f0fbe4a0 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -186,7 +186,9 @@ public class ChunkProviderServer extends IChunkProvider {
@ -406,7 +409,7 @@ index 845ad7427b..4f0fbe4a0d 100644
@Override
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index d084d24a01..0fed039f34 100644
index d084d24a0..0fed039f3 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -1,5 +1,6 @@
@ -453,7 +456,7 @@ index d084d24a01..0fed039f34 100644
}
diff --git a/src/main/java/net/minecraft/server/CustomFunction.java b/src/main/java/net/minecraft/server/CustomFunction.java
index 46e7737ca3..a3ef943066 100644
index 46e7737ca..a3ef94306 100644
--- a/src/main/java/net/minecraft/server/CustomFunction.java
+++ b/src/main/java/net/minecraft/server/CustomFunction.java
@@ -13,12 +13,22 @@ public class CustomFunction {
@ -480,7 +483,7 @@ index 46e7737ca3..a3ef943066 100644
return this.b;
}
diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java
index 42e01136d9..b7c1d7671e 100644
index 42e01136d..b7c1d7671 100644
--- a/src/main/java/net/minecraft/server/CustomFunctionData.java
+++ b/src/main/java/net/minecraft/server/CustomFunctionData.java
@@ -100,7 +100,7 @@ public class CustomFunctionData implements IResourcePackListener {
@ -493,7 +496,7 @@ index 42e01136d9..b7c1d7671e 100644
int j = 0;
CustomFunction.c[] acustomfunction_c = customfunction.b();
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index b60956218d..19e2df3098 100644
index b60956218..19e2df309 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -31,7 +31,7 @@ import org.apache.logging.log4j.Level;
@ -546,7 +549,7 @@ index b60956218d..19e2df3098 100644
return waitable.get();
} catch (java.util.concurrent.ExecutionException e) {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 14c3f04170..6127f9ba96 100644
index 14c3f0417..6127f9ba9 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender;
@ -585,7 +588,7 @@ index 14c3f04170..6127f9ba96 100644
protected Vec3D a(Vec3D vec3d, EnumMoveType enummovetype) {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index f86e6a4c51..85567a7072 100644
index f86e6a4c5..85567a707 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -35,7 +35,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -661,7 +664,7 @@ index f86e6a4c51..85567a7072 100644
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 4de927416b..4c1c914132 100644
index 4de927416..4c1c91413 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1,5 +1,7 @@
@ -789,7 +792,7 @@ index 4de927416b..4c1c914132 100644
this.methodProfiler.exit();
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 755c0406e1..ee65b01f43 100644
index 755c0406e..ee65b01f4 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1,6 +1,8 @@
@ -880,7 +883,7 @@ index 755c0406e1..ee65b01f43 100644
playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next();
playerchunkmap_entitytracker.track(list);
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 78a090ac75..e07f4a9680 100644
index 78a090ac7..e07f4a968 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -58,6 +58,7 @@ import org.bukkit.inventory.CraftingInventory;
@ -935,7 +938,7 @@ index 78a090ac75..e07f4a9680 100644
// this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s);
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
index cb6d50ea70..9ba03f8ed0 100644
index cb6d50ea7..9ba03f8ed 100644
--- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
+++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
@@ -1,5 +1,8 @@
@ -961,7 +964,7 @@ index cb6d50ea70..9ba03f8ed0 100644
throw CancelledPacketHandleException.INSTANCE;
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 56e36c8668..7a837ec0fc 100644
index 56e36c866..7a837ec0f 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1,5 +1,6 @@
@ -985,7 +988,7 @@ index 56e36c8668..7a837ec0fc 100644
public WhiteList getWhitelist() {
diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java
index 537e610797..b48e5b51a0 100644
index 537e61079..b48e5b51a 100644
--- a/src/main/java/net/minecraft/server/TickListServer.java
+++ b/src/main/java/net/minecraft/server/TickListServer.java
@@ -25,13 +25,19 @@ public class TickListServer<T> implements TickList<T> {
@ -1038,7 +1041,7 @@ index 537e610797..b48e5b51a0 100644
}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 4c811325c3..da30d2cf86 100644
index 4c811325c..da30d2cf8 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -8,11 +8,12 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer;
@ -1057,7 +1060,7 @@ index 4c811325c3..da30d2cf86 100644
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
public final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 83fdea893c..738d9da8ce 100644
index 83fdea893..738d9da8c 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1,5 +1,7 @@
@ -1121,7 +1124,7 @@ index 83fdea893c..738d9da8ce 100644
// Spigot end
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index d08c5fc93b..11cd9003e3 100644
index d08c5fc93..a8527784a 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1,5 +1,7 @@
@ -1153,6 +1156,21 @@ index d08c5fc93b..11cd9003e3 100644
this.I = Sets.newHashSet();
this.siegeManager = new VillageSiege(this);
this.J = new ObjectLinkedOpenHashSet();
@@ -265,12 +266,12 @@ public class WorldServer extends World {
gameprofilerfiller.exitEnter("chunkSource");
this.getChunkProvider().tick(booleansupplier);
gameprofilerfiller.exitEnter("tickPending");
- timings.doTickPending.startTiming(); // Spigot
+ timings.scheduledBlocks.startTiming(); // Spigot
if (this.worldData.getType() != WorldType.DEBUG_ALL_BLOCK_STATES) {
this.nextTickListBlock.a();
this.nextTickListFluid.a();
}
- timings.doTickPending.stopTiming(); // Spigot
+ timings.scheduledBlocks.stopTiming(); // Spigot
gameprofilerfiller.exitEnter("village");
timings.doVillages.startTiming(); // Spigot
@@ -327,6 +328,7 @@ public class WorldServer extends World {
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
@ -1182,7 +1200,7 @@ index d08c5fc93b..11cd9003e3 100644
if (!flag1) {
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
+ try (Timing ignored = timings.worldSave.startTiming()) { //Paper
+ try (co.aikar.timings.Timing ignored = timings.worldSave.startTiming()) { // Paper
if (iprogressupdate != null) {
iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0]));
}
@ -1198,7 +1216,7 @@ index d08c5fc93b..11cd9003e3 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 5dc2bb1246..8e877055c3 100644
index 5dc2bb124..8e877055c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1926,12 +1926,31 @@ public final class CraftServer implements Server {
@ -1235,7 +1253,7 @@ index 5dc2bb1246..8e877055c3 100644
org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
deleted file mode 100644
index 38f211526b..0000000000
index 38f211526..000000000
--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
+++ /dev/null
@@ -1,166 +0,0 @@
@ -1406,7 +1424,7 @@ index 38f211526b..0000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 6806ada495..e45fd0028b 100644
index 6806ada49..e45fd0028 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1728,6 +1728,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -1425,7 +1443,7 @@ index 6806ada495..e45fd0028b 100644
public Player.Spigot spigot()
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index b90979c7ba..8823f94f7b 100644
index b90979c7b..8823f94f7 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -1,5 +1,6 @@
@ -1491,7 +1509,7 @@ index b90979c7ba..8823f94f7b 100644
private boolean isReady(final int currentTick) {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
index 3f55381c15..0d9a466809 100644
index 3f55381c1..0d9a46680 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
@@ -1,9 +1,11 @@
@ -1576,7 +1594,7 @@ index 3f55381c15..0d9a466809 100644
- // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
index e52ef47b78..3d90b34268 100644
index e52ef47b7..3d90b3426 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
@@ -5,6 +5,7 @@ import org.bukkit.util.CachedServerIcon;
@ -1587,8 +1605,26 @@ index e52ef47b78..3d90b34268 100644
public CraftIconCache(final String value) {
this.value = value;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 06728e53d..783676b74 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -271,6 +271,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
return clazz;
}
+ // Paper start
+ @Override
+ public String getTimingsServerName() {
+ return com.destroystokyo.paper.PaperConfig.timingsServerName;
+ }
+ // Paper end
+
/**
* This helper class represents the different NBT Tags.
* <p>
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 76b060a126..bf35950867 100644
index 76b060a12..bf3595086 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -30,7 +30,7 @@ import net.minecraft.server.EntityWither;

Datei anzeigen

@ -1,4 +1,4 @@
From fe3c0cae53d542ce74b4ef691996f63f62e36a90 Mon Sep 17 00:00:00 2001
From d20fbc24184765b10e29fab20f6afae079f13ad4 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 13:17:38 -0400
Subject: [PATCH] Default loading permissions.yml before plugins
@ -16,12 +16,12 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe
A config option has been added for those who depend on the previous behavior, but I don't expect that.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 7691409f6c..809b3a1a4a 100644
index 0c65afccf..6cc99ffe4 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -210,4 +210,9 @@ public class PaperConfig {
" - Interval: " + timeSummary(Timings.getHistoryInterval() / 20) +
" - Length: " + timeSummary(Timings.getHistoryLength() / 20));
@@ -213,4 +213,9 @@ public class PaperConfig {
" - Length: " + timeSummary(Timings.getHistoryLength() / 20) +
" - Server Name: " + timingsServerName);
}
+
+ public static boolean loadPermsBeforePlugins = true;
@ -30,7 +30,7 @@ index 7691409f6c..809b3a1a4a 100644
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 01d5a49cf7..b2861fd0ba 100644
index 93499ad4e..c22d730ee 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -364,6 +364,7 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -1,4 +1,4 @@
From 170024a9cd0f01892a20a900fbaa04583ed590d4 Mon Sep 17 00:00:00 2001
From 0ba1071a0c1c57dde48b29969baecb7dcc5a895e Mon Sep 17 00:00:00 2001
From: Antony Riley <antony@cyberiantiger.org>
Date: Tue, 29 Mar 2016 08:22:55 +0300
Subject: [PATCH] Sanitise RegionFileCache and make configurable.
@ -11,10 +11,10 @@ The implementation uses a LinkedHashMap as an LRU cache (modified from HashMap).
The maximum size of the RegionFileCache is also made configurable.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 809b3a1a4..e929ba452 100644
index 6cc99ffe4..4424f7ef1 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -215,4 +215,9 @@ public class PaperConfig {
@@ -218,4 +218,9 @@ public class PaperConfig {
private static void loadPermsBeforePlugins() {
loadPermsBeforePlugins = getBoolean("settings.load-permissions-yml-before-plugins", true);
}

Datei anzeigen

@ -1,14 +1,14 @@
From 0e050619e109c562ed59cc20e4cca894719f7c41 Mon Sep 17 00:00:00 2001
From 04a5f9fd959b1058a686751059aac1a2982d754d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 13 Apr 2016 02:10:49 -0400
Subject: [PATCH] Configurable Player Collision
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index e929ba4529..033fcf50ea 100644
index 4424f7ef1..69bfe6241 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -220,4 +220,9 @@ public class PaperConfig {
@@ -223,4 +223,9 @@ public class PaperConfig {
private static void regionFileCacheSize() {
regionFileCacheSize = getInt("settings.region-file-cache-size", 256);
}
@ -19,7 +19,7 @@ index e929ba4529..033fcf50ea 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f35289e4ff..e0dde2216a 100644
index f35289e4f..e0dde2216 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -440,6 +440,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -44,7 +44,7 @@ index f35289e4ff..e0dde2216a 100644
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
index b0740965a4..6b1a914d2f 100644
index b0740965a..6b1a914d2 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
@@ -96,7 +96,7 @@ public class PacketPlayOutScoreboardTeam implements Packet<PacketListenerPlayOut
@ -57,7 +57,7 @@ index b0740965a4..6b1a914d2f 100644
packetdataserializer.a(this.c);
packetdataserializer.a(this.d);
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 4f47b245da..882dd07e7f 100644
index 4f47b245d..882dd07e7 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -72,6 +72,7 @@ public abstract class PlayerList {

Datei anzeigen

@ -1,14 +1,14 @@
From dd5edda1525f452645902b8344a46fc617bfe8ed Mon Sep 17 00:00:00 2001
From 19cd9fc8e3f7c2781e39f9d2c39ba5e57bbdb7ba Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 7 May 2016 23:33:08 -0400
Subject: [PATCH] Don't save empty scoreboard teams to scoreboard.dat
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 033fcf50e..a89a9bfcb 100644
index 69bfe6241..20b04e120 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -225,4 +225,9 @@ public class PaperConfig {
@@ -228,4 +228,9 @@ public class PaperConfig {
private static void enablePlayerCollisions() {
enablePlayerCollisions = getBoolean("settings.enable-player-collisions", true);
}

Datei anzeigen

@ -1,11 +1,11 @@
From 4019a8443459dda1b6c7c007d844cd5bce470116 Mon Sep 17 00:00:00 2001
From 6b1783cb318c0f6a3ae12fe201983e2f7d76ad3e Mon Sep 17 00:00:00 2001
From: Gabriele C <sgdc3.mail@gmail.com>
Date: Fri, 5 Aug 2016 01:03:08 +0200
Subject: [PATCH] Add setting for proxy online mode status
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index a89a9bfcb5..1089be17d9 100644
index 20b04e120..3d9dba769 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -22,6 +22,7 @@ import org.bukkit.configuration.InvalidConfigurationException;
@ -16,7 +16,7 @@ index a89a9bfcb5..1089be17d9 100644
public class PaperConfig {
@@ -230,4 +231,13 @@ public class PaperConfig {
@@ -233,4 +234,13 @@ public class PaperConfig {
private static void saveEmptyScoreboardTeams() {
saveEmptyScoreboardTeams = getBoolean("settings.save-empty-scoreboard-teams", false);
}
@ -31,7 +31,7 @@ index a89a9bfcb5..1089be17d9 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
index 61ea2818b1..26c7861061 100644
index 61ea2818b..26c786106 100644
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
@@ -58,7 +58,8 @@ public class NameReferencingFileConverter {
@ -45,7 +45,7 @@ index 61ea2818b1..26c7861061 100644
} else {
String[] astring1 = astring;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index d8ad366341..1f0e63a1c2 100644
index 430ece28b..8717bdb37 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1352,7 +1352,8 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -1,14 +1,14 @@
From 18c845e8e2c155c0fd9a9941ec290b4e47264bed Mon Sep 17 00:00:00 2001
From e2195fe46e824d420abf976e70700119032737db Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 11 Sep 2016 14:30:57 -0500
Subject: [PATCH] Configurable packet in spam threshold
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 1089be17d9..a2e204014f 100644
index 3d9dba769..5c7f17090 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -240,4 +240,13 @@ public class PaperConfig {
@@ -243,4 +243,13 @@ public class PaperConfig {
public static boolean isProxyOnlineMode() {
return Bukkit.getOnlineMode() || (SpigotConfig.bungee && bungeeOnlineMode);
}
@ -23,7 +23,7 @@ index 1089be17d9..a2e204014f 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index a95abdbc6d..d0689953de 100644
index a95abdbc6..d0689953d 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1216,13 +1216,14 @@ public class PlayerConnection implements PacketListenerPlayIn {

Datei anzeigen

@ -1,14 +1,14 @@
From 5f17b7d7f61edeebee71d652cfefc570c3d4f1dd Mon Sep 17 00:00:00 2001
From 4e283b3a1ef77abe48226f455e2241a164fec93f Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Tue, 20 Sep 2016 00:58:01 +0000
Subject: [PATCH] Configurable flying kick messages
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index a2e204014f..7ce370e92f 100644
index 5c7f17090..503e13775 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -249,4 +249,11 @@ public class PaperConfig {
@@ -252,4 +252,11 @@ public class PaperConfig {
}
packetInSpamThreshold = getInt("settings.incoming-packet-spam-threshold", 300);
}
@ -21,7 +21,7 @@ index a2e204014f..7ce370e92f 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index d0689953de..ea62e9bafd 100644
index d0689953d..ea62e9baf 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -144,7 +144,7 @@ public class PlayerConnection implements PacketListenerPlayIn {

Datei anzeigen

@ -1,4 +1,4 @@
From e57454ba4d40b9c6e186851f01eff09cb08ac5eb Mon Sep 17 00:00:00 2001
From b5f8fdb9fed6e54ca13ab872b52442fefd7bb5f9 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Fri, 9 Jun 2017 07:24:34 -0700
Subject: [PATCH] Add configuration option to prevent player names from being
@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 7ce370e92f..1adbb24802 100644
index 503e13775..56cea23b0 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -256,4 +256,9 @@ public class PaperConfig {
@@ -259,4 +259,9 @@ public class PaperConfig {
flyingKickPlayerMessage = getString("messages.kick.flying-player", flyingKickPlayerMessage);
flyingKickVehicleMessage = getString("messages.kick.flying-vehicle", flyingKickVehicleMessage);
}
@ -20,7 +20,7 @@ index 7ce370e92f..1adbb24802 100644
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 2757ed338c..436f10c50a 100644
index 7d05d8757..abbdb1f64 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2081,5 +2081,10 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -1,4 +1,4 @@
From a862ab264571177d979c514e21eafdb472f1b94b Mon Sep 17 00:00:00 2001
From 3cd606e0561f34ef63d799f80b1ab12fbac01227 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Thu, 17 Aug 2017 16:08:20 -0700
Subject: [PATCH] Allow specifying a custom "authentication servers down" kick
@ -6,7 +6,7 @@ Subject: [PATCH] Allow specifying a custom "authentication servers down" kick
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 1adbb2480..a9cf1b8e8 100644
index 56cea23b0..f4d089f3e 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -1,5 +1,6 @@
@ -16,7 +16,7 @@ index 1adbb2480..a9cf1b8e8 100644
import com.google.common.base.Throwables;
import java.io.File;
@@ -261,4 +262,9 @@ public class PaperConfig {
@@ -264,4 +265,9 @@ public class PaperConfig {
private static void suggestPlayersWhenNull() {
suggestPlayersWhenNullTabCompletions = getBoolean("settings.suggest-player-names-when-null-tab-completions", suggestPlayersWhenNullTabCompletions);
}

Datei anzeigen

@ -1,14 +1,14 @@
From 394505f1d4e744131ee86d37952843f997f05eba Mon Sep 17 00:00:00 2001
From de737d42db59cb9f89d22478a16c859d63616196 Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Mon, 26 Mar 2018 18:30:53 +0300
Subject: [PATCH] Make player data saving configurable
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index a9cf1b8e8b..7fba61a6d3 100644
index f4d089f3e..a186b6eb0 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -267,4 +267,13 @@ public class PaperConfig {
@@ -270,4 +270,13 @@ public class PaperConfig {
private static void authenticationServersDownKickMessage() {
authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage));
}
@ -23,7 +23,7 @@ index a9cf1b8e8b..7fba61a6d3 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
index a0254d8e51..e60e10c57d 100644
index a0254d8e5..e60e10c57 100644
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
@@ -138,6 +138,7 @@ public class WorldNBTStorage implements IPlayerFileData {

Datei anzeigen

@ -1,4 +1,4 @@
From 0ec637dda990151cc2a04371f27977c864920a07 Mon Sep 17 00:00:00 2001
From 8eb491a62ea0800705c8e1d23bafc2c3b8855e2c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 15 Jun 2018 00:30:32 -0400
Subject: [PATCH] Configurable Alternative LootPool Luck Formula
@ -36,10 +36,10 @@ This change will result in some major changes to fishing formulas.
I would love to see this change in Vanilla, so Mojang please pull :)
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 7fba61a6d3..c8f9c45e5d 100644
index a186b6eb0..a9b71c85d 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -276,4 +276,12 @@ public class PaperConfig {
@@ -279,4 +279,12 @@ public class PaperConfig {
"such as inventories, experience points, advancements and the like will not be saved when they log out.");
}
}
@ -53,7 +53,7 @@ index 7fba61a6d3..c8f9c45e5d 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java
index 1016325bd7..2c979e0b74 100644
index 1016325bd..2c979e0b7 100644
--- a/src/main/java/net/minecraft/server/LootSelectorEntry.java
+++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java
@@ -13,8 +13,8 @@ import org.apache.commons.lang3.ArrayUtils;

Datei anzeigen

@ -1,4 +1,4 @@
From 41c6a0d5f4270d4099eba24abf87a69ed2cdffc6 Mon Sep 17 00:00:00 2001
From 8ac5f448a3d1bb55990864dc5fba7820bdf9e93f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 29 Jul 2018 15:48:50 -0400
Subject: [PATCH] Provide option to use a versioned world folder for testing
@ -19,7 +19,7 @@ may be some delay there, but region files are only copied on demand.
This is highly experiemental so backup your world before relying on this to not modify it
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index c8f9c45e5d..52adc671e5 100644
index a9b71c85d..8c3880c83 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -13,6 +13,7 @@ import java.util.List;
@ -30,7 +30,7 @@ index c8f9c45e5d..52adc671e5 100644
import java.util.regex.Pattern;
import com.google.common.collect.Lists;
@@ -284,4 +285,27 @@ public class PaperConfig {
@@ -287,4 +288,27 @@ public class PaperConfig {
Bukkit.getLogger().log(Level.INFO, "Using Aikar's Alternative Luck Formula to apply Luck attribute to all loot pool calculations. See https://luckformula.emc.gs");
}
}
@ -59,7 +59,7 @@ index c8f9c45e5d..52adc671e5 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
index c8573a8ee6..1b12a16113 100644
index c8573a8ee..1b12a1611 100644
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
@@ -10,13 +10,41 @@ import java.io.IOException;
@ -163,7 +163,7 @@ index c8573a8ee6..1b12a16113 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
index 350ac42d6b..eaae446861 100644
index 350ac42d6..eaae44686 100644
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
@@ -31,6 +31,58 @@ public class WorldNBTStorage implements IPlayerFileData {

Datei anzeigen

@ -1,4 +1,4 @@
From f157b265de11e1896f3c1b2030f2c505e9e9e585 Mon Sep 17 00:00:00 2001
From 132fe501161e67d736c863d83ac399e2a8e6fe5a Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 29 Jul 2018 05:02:15 +0100
Subject: [PATCH] Break up and make tab spam limits configurable
@ -22,10 +22,10 @@ to take the burden of this into their own hand without having to rely on
plugins doing unsafe things.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 52adc671e5..ef567579ec 100644
index 8c3880c83..d773ef5b0 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -308,4 +308,18 @@ public class PaperConfig {
@@ -311,4 +311,18 @@ public class PaperConfig {
logger.log(Level.INFO, "******************************************************");
}
}
@ -45,7 +45,7 @@ index 52adc671e5..ef567579ec 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 87fc6b6f30..bc04400484 100644
index 87fc6b6f3..bc0440048 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -76,6 +76,7 @@ public class PlayerConnection implements PacketListenerPlayIn {

Datei anzeigen

@ -1,4 +1,4 @@
From 16792e619d00d03fe1e769732a333c78cae274b5 Mon Sep 17 00:00:00 2001
From 441c6e99526e017a629d70d8b155eaeedb938f8e Mon Sep 17 00:00:00 2001
From: miclebrick <miclebrick@outlook.com>
Date: Wed, 8 Aug 2018 15:30:52 -0400
Subject: [PATCH] Add Early Warning Feature to WatchDog
@ -9,7 +9,7 @@ thread dumps at an interval until the point of crash.
This will help diagnose what was going on in that time before the crash.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index ef567579ec..8062054abe 100644
index d773ef5b0..833659bbb 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -25,6 +25,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
@ -20,7 +20,7 @@ index ef567579ec..8062054abe 100644
public class PaperConfig {
@@ -309,6 +310,14 @@ public class PaperConfig {
@@ -312,6 +313,14 @@ public class PaperConfig {
}
}
@ -36,7 +36,7 @@ index ef567579ec..8062054abe 100644
public static int tabSpamLimit = 500;
private static void tabSpamLimiters() {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d3620b18a0..afa6e6644e 100644
index d3620b18a..afa6e6644 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -848,6 +848,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -48,7 +48,7 @@ index d3620b18a0..afa6e6644e 100644
long start = System.nanoTime(), curTime, wait, tickSection = start; // Paper - Further improve server tick loop
lastTick = start - TICK_TIME; // Paper
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 45710c0d2a..e2d2b25dee 100644
index 45710c0d2..e2d2b25de 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -754,6 +754,7 @@ public final class CraftServer implements Server {
@ -68,7 +68,7 @@ index 45710c0d2a..e2d2b25dee 100644
@Override
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 6c5430ff94..4b8581f0ed 100644
index 6c5430ff9..4b8581f0e 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -225,7 +225,7 @@ public class SpigotConfig
@ -81,7 +81,7 @@ index 6c5430ff94..4b8581f0ed 100644
public static boolean bungee;
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 9532aada82..a1d93200e6 100644
index 9532aada8..a1d93200e 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -5,6 +5,7 @@ import java.lang.management.MonitorInfo;

Datei anzeigen

@ -1,4 +1,4 @@
From c3e15a554560950932feab1f18402818cc3fcaf8 Mon Sep 17 00:00:00 2001
From ddba08438bc250dca2d70f64236287a5585d2041 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 26 Aug 2018 20:49:50 -0400
Subject: [PATCH] Optimize RegistryMaterials
@ -8,7 +8,7 @@ Use larger initial sizes to increase bucket capacity on the BiMap
BiMap.get was seen to be using a good bit of CPU time.
diff --git a/src/main/java/net/minecraft/server/RegistryMaterials.java b/src/main/java/net/minecraft/server/RegistryMaterials.java
index f291e05b26..860924f9b0 100644
index f291e05b2..fed38e6ef 100644
--- a/src/main/java/net/minecraft/server/RegistryMaterials.java
+++ b/src/main/java/net/minecraft/server/RegistryMaterials.java
@@ -16,9 +16,9 @@ import org.apache.logging.log4j.Logger;
@ -29,7 +29,7 @@ index f291e05b26..860924f9b0 100644
}
- this.d = collection.toArray(new Object[collection.size()]);
+ this.d = (V[]) collection.toArray(new Object[collection.size()]); // Paper - Decompile fix
+ this.d = (T[]) collection.toArray(new Object[collection.size()]); // Paper - Decompile fix
}
return this.d[random.nextInt(this.d.length)];

Datei anzeigen

@ -1,11 +1,11 @@
From 3da416722a43f5a94a43cddcb902f30f2b29bc1f Mon Sep 17 00:00:00 2001
From e9a2ac21b0c53ee65723f6360ff908f3bab91559 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 25 Aug 2018 19:56:51 -0500
Subject: [PATCH] Add PhantomPreSpawnEvent
diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java
index e5ed5a3dcc..e5d032d02b 100644
index e5ed5a3dc..e5d032d02 100644
--- a/src/main/java/net/minecraft/server/EntityPhantom.java
+++ b/src/main/java/net/minecraft/server/EntityPhantom.java
@@ -129,6 +129,11 @@ public class EntityPhantom extends EntityFlying implements IMonster {
@ -48,7 +48,7 @@ index e5ed5a3dcc..e5d032d02b 100644
private final PathfinderTargetCondition b;
diff --git a/src/main/java/net/minecraft/server/MobSpawnerPhantom.java b/src/main/java/net/minecraft/server/MobSpawnerPhantom.java
index 9f64d81c64..11098cd13e 100644
index 9f64d81c6..1818e7c38 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerPhantom.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerPhantom.java
@@ -50,8 +50,17 @@ public class MobSpawnerPhantom {
@ -56,7 +56,7 @@ index 9f64d81c64..11098cd13e 100644
for (int l = 0; l < k; ++l) {
+ // Paper start
+ com.destroystokyo.paper.event.entity.PhantomPreSpawnEvent event = new com.destroystokyo.paper.event.entity.PhantomPreSpawnEvent(MCUtil.toLocation(world, blockposition1), ((EntityPlayer) entityhuman).getBukkitEntity(), org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL);
+ com.destroystokyo.paper.event.entity.PhantomPreSpawnEvent event = new com.destroystokyo.paper.event.entity.PhantomPreSpawnEvent(MCUtil.toLocation(worldserver, blockposition1), ((EntityPlayer) entityhuman).getBukkitEntity(), org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL);
+ if (!event.callEvent()) {
+ if (event.shouldAbortSpawn()) {
+ break;
@ -71,7 +71,7 @@ index 9f64d81c64..11098cd13e 100644
groupdataentity = entityphantom.prepare(worldserver, difficultydamagescaler, EnumMobSpawn.NATURAL, groupdataentity, (NBTTagCompound) null);
worldserver.addEntity(entityphantom, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
index 9f9ee92390..2b97313694 100644
index 9f9ee9239..2b9731369 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
@@ -35,4 +35,10 @@ public class CraftPhantom extends CraftFlying implements Phantom {

Datei anzeigen

@ -1,4 +1,4 @@
From 15d0b4b256c5e808396fa3e7a22f018386699b16 Mon Sep 17 00:00:00 2001
From 13f345848bcc1fc092ff857b6a973103b85ad092 Mon Sep 17 00:00:00 2001
From: Phoenix616 <mail@moep.tv>
Date: Tue, 21 Aug 2018 01:39:35 +0100
Subject: [PATCH] Improve death events
@ -15,7 +15,7 @@ items and experience which is otherwise only properly possible by using
internal code.
diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java
index 20db76abd7..a148cd437c 100644
index 20db76abd..a148cd437 100644
--- a/src/main/java/net/minecraft/server/CombatTracker.java
+++ b/src/main/java/net/minecraft/server/CombatTracker.java
@@ -175,6 +175,7 @@ public class CombatTracker {
@ -27,7 +27,7 @@ index 20db76abd7..a148cd437c 100644
int i = this.f ? 300 : 100;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 9bfc725a2c..b406dc5232 100644
index 9bfc725a2..b406dc523 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1469,6 +1469,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -47,7 +47,7 @@ index 9bfc725a2c..b406dc5232 100644
protected void i(double d0, double d1, double d2) {
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
index 7031dd0e4c..f6dc96434b 100644
index 7031dd0e4..f6dc96434 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -675,7 +675,8 @@ public class EntityArmorStand extends EntityLiving {
@ -60,8 +60,30 @@ index 7031dd0e4c..f6dc96434b 100644
this.die();
}
diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java
index 917d60350..9ddcc3a89 100644
--- a/src/main/java/net/minecraft/server/EntityFox.java
+++ b/src/main/java/net/minecraft/server/EntityFox.java
@@ -597,7 +597,7 @@ public class EntityFox extends EntityAnimal {
}
@Override
- protected void d(DamageSource damagesource) {
+ protected org.bukkit.event.entity.EntityDeathEvent d(DamageSource damagesource) { // Paper
ItemStack itemstack = this.getEquipment(EnumItemSlot.MAINHAND);
if (!itemstack.isEmpty()) {
@@ -605,7 +605,7 @@ public class EntityFox extends EntityAnimal {
this.setSlot(EnumItemSlot.MAINHAND, ItemStack.a);
}
- super.d(damagesource);
+ return super.d(damagesource); // Paper
}
public static boolean a(EntityFox entityfox, EntityLiving entityliving) {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 78b7ab59b9..4f7ebe3642 100644
index 78b7ab59b..4f7ebe364 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -85,7 +85,7 @@ public abstract class EntityLiving extends Entity {
@ -216,7 +238,7 @@ index 78b7ab59b9..4f7ebe3642 100644
return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F;
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 870ef557a2..a3f5919fe8 100644
index 870ef557a..a3f5919fe 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -75,6 +75,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -267,7 +289,7 @@ index 870ef557a2..a3f5919fe8 100644
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
index 73cb64e09d..9f317ff2e8 100644
index 73cb64e09..9f317ff2e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
@@ -806,6 +806,22 @@ public enum CraftSound {
@ -294,7 +316,7 @@ index 73cb64e09d..9f317ff2e8 100644
this.minecraftKey = minecraftKey;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 53d61790c5..6a390c1146 100644
index 53d61790c..6a390c114 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1713,7 +1713,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -315,7 +337,7 @@ index 53d61790c5..6a390c1146 100644
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 23c4b93466..aafd71d65c 100644
index 23c4b9346..aafd71d65 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -720,9 +720,16 @@ public class CraftEventFactory {

Datei anzeigen

@ -1,4 +1,4 @@
From 8f2e9085a36026d92a1ed969d4ed198eb68e7b76 Mon Sep 17 00:00:00 2001
From b1186b7a08e6001e53378135aee676be3161e346 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 9 Sep 2018 13:30:00 -0400
Subject: [PATCH] Mob Pathfinding API
@ -7,10 +7,10 @@ Implements Pathfinding API for mobs
diff --git a/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java b/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java
new file mode 100644
index 0000000000..ed3d86ddd3
index 000000000..f68a07cb9
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java
@@ -0,0 +1,113 @@
@@ -0,0 +1,111 @@
+package com.destroystokyo.paper.entity;
+
+import net.minecraft.server.EntityInsentient;
@ -96,11 +96,9 @@ index 0000000000..ed3d86ddd3
+
+ @Override
+ public List<Location> getPoints() {
+ int pathCount = path.getPathCount();
+ List<Location> points = new ArrayList<>();
+ PathPoint[] pathPoints = path.getPoints();
+ for (int i = 0; i < pathCount; i++) {
+ points.add(toLoc(pathPoints[i]));
+ for (PathPoint point : path.getPoints()) {
+ points.add(toLoc(point));
+ }
+ return points;
+ }
@ -116,7 +114,7 @@ index 0000000000..ed3d86ddd3
+ if (!path.hasNext()) {
+ return null;
+ }
+ return toLoc(path.getPoints()[path.getNextIndex()]);
+ return toLoc(path.getPoints().get(path.getNextIndex()));
+ }
+ }
+
@ -125,7 +123,7 @@ index 0000000000..ed3d86ddd3
+ }
+}
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
index 0586597e73..583f2c5ada 100644
index 0586597e7..583f2c5ad 100644
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
@@ -69,7 +69,7 @@ public abstract class NavigationAbstract {
@ -172,10 +170,10 @@ index 0586597e73..583f2c5ada 100644
this.pathfindFailures = 0; this.lastFailure = 0; // Paper - Pathfinding optimizations
this.c = null;
diff --git a/src/main/java/net/minecraft/server/PathEntity.java b/src/main/java/net/minecraft/server/PathEntity.java
index d1cb802087..ec6b3a292a 100644
index d1cb80208..c4cdd0965 100644
--- a/src/main/java/net/minecraft/server/PathEntity.java
+++ b/src/main/java/net/minecraft/server/PathEntity.java
@@ -5,11 +5,11 @@ import javax.annotation.Nullable;
@@ -5,11 +5,12 @@ import javax.annotation.Nullable;
public class PathEntity {
@ -186,10 +184,11 @@ index d1cb802087..ec6b3a292a 100644
private PathPoint d;
- private int e;
+ private int e; public int getNextIndex() { return e; } // Paper - OBFHELPER
+ public boolean hasNext() { return getNextIndex() < getPoints().size(); } // Paper
public PathEntity(List<PathPoint> list) {
this.a = list;
@@ -23,8 +23,7 @@ public class PathEntity {
@@ -23,8 +24,7 @@ public class PathEntity {
return this.e >= this.a.size();
}
@ -199,7 +198,7 @@ index d1cb802087..ec6b3a292a 100644
return !this.a.isEmpty() ? (PathPoint) this.a.get(this.a.size() - 1) : null;
}
@@ -72,7 +71,7 @@ public class PathEntity {
@@ -72,7 +72,7 @@ public class PathEntity {
return this.a(entity, this.e);
}
@ -209,7 +208,7 @@ index d1cb802087..ec6b3a292a 100644
return new Vec3D((double) pathpoint.a, (double) pathpoint.b, (double) pathpoint.c);
diff --git a/src/main/java/net/minecraft/server/PathPoint.java b/src/main/java/net/minecraft/server/PathPoint.java
index 0f6e8c51e4..5d445e08a8 100644
index 0f6e8c51e..5d445e08a 100644
--- a/src/main/java/net/minecraft/server/PathPoint.java
+++ b/src/main/java/net/minecraft/server/PathPoint.java
@@ -2,9 +2,9 @@ package net.minecraft.server;
@ -226,7 +225,7 @@ index 0f6e8c51e4..5d445e08a8 100644
public int d = -1;
public float e;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
index 5bf1cd06fa..53c2d154ed 100644
index 5bf1cd06f..53c2d154e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
@@ -12,8 +12,11 @@ import org.bukkit.loot.LootTable;

Datei anzeigen

@ -1,4 +1,4 @@
From a2884dc05101e98fad5ead7fba50fa3786c3c84e Mon Sep 17 00:00:00 2001
From b6db6d1905c89bb16a5ea70a27e127d584ecdb2e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 17 Sep 2018 23:05:31 -0400
Subject: [PATCH] Support Overriding World Seeds
@ -15,7 +15,7 @@ This seed will end up being saved to the world data file, so it is
a permanent change in that it won't go back if you remove it from paper.yml
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 8062054abe..e1bbe142b0 100644
index 833659bbb..ffb18902f 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -11,6 +11,7 @@ import java.lang.reflect.Modifier;
@ -34,7 +34,7 @@ index 8062054abe..e1bbe142b0 100644
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.YamlConfiguration;
import co.aikar.timings.Timings;
@@ -331,4 +333,23 @@ public class PaperConfig {
@@ -334,4 +336,23 @@ public class PaperConfig {
}
tabSpamLimit = getInt("settings.spam-limiter.tab-spam-limit", tabSpamLimit);
}
@ -59,7 +59,7 @@ index 8062054abe..e1bbe142b0 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e5d96bf750..f04d0530f5 100644
index e5d96bf75..f04d0530f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -363,7 +363,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -72,7 +72,7 @@ index e5d96bf750..f04d0530f5 100644
if (j == 0) {
diff --git a/src/main/java/net/minecraft/server/WorldData.java b/src/main/java/net/minecraft/server/WorldData.java
index a794f040e5..ad78f28c42 100644
index a794f040e..ad78f28c4 100644
--- a/src/main/java/net/minecraft/server/WorldData.java
+++ b/src/main/java/net/minecraft/server/WorldData.java
@@ -116,7 +116,7 @@ public class WorldData {
@ -85,7 +85,7 @@ index a794f040e5..ad78f28c42 100644
String s = nbttagcompound.getString("generatorName");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e2d2b25dee..de98e896c2 100644
index e2d2b25de..de98e896c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -985,7 +985,7 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -1,14 +1,14 @@
From 47fa74532d3d36f7b2f74751de87242409ea2630 Mon Sep 17 00:00:00 2001
From 521a691d8f4b9f9cb4d45347a236b426d7a01c47 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Tue, 2 Oct 2018 09:57:50 +0100
Subject: [PATCH] Configurable connection throttle kick message
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index e1bbe142b0..6a2eb12bae 100644
index ffb18902f..2d3861c18 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -272,6 +272,11 @@ public class PaperConfig {
@@ -275,6 +275,11 @@ public class PaperConfig {
authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage));
}
@ -21,7 +21,7 @@ index e1bbe142b0..6a2eb12bae 100644
private static void savePlayerData() {
savePlayerData = getBoolean("settings.save-player-data", savePlayerData);
diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java
index da88978db7..1dad796206 100644
index da88978db..1dad79620 100644
--- a/src/main/java/net/minecraft/server/HandshakeListener.java
+++ b/src/main/java/net/minecraft/server/HandshakeListener.java
@@ -38,7 +38,7 @@ public class HandshakeListener implements PacketHandshakingInListener {

Datei anzeigen

@ -1,4 +1,4 @@
From 439f43ee1ba0c30624f3368ae6573e4103e06cec Mon Sep 17 00:00:00 2001
From de0ac6d4f045984c9bca24554ae2b8b17babcbd7 Mon Sep 17 00:00:00 2001
From: Andrew Steinborn <git@steinborn.me>
Date: Mon, 8 Oct 2018 14:36:14 -0400
Subject: [PATCH] Add Velocity IP Forwarding Support
@ -14,7 +14,7 @@ forwarding, and is integrated into the Minecraft login process by using the 1.13
login plugin message packet.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 6a2eb12bae..ee282cb35c 100644
index 2d3861c18..a79cba50e 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -8,6 +8,7 @@ import java.io.IOException;
@ -25,7 +25,7 @@ index 6a2eb12bae..ee282cb35c 100644
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -243,7 +244,7 @@ public class PaperConfig {
@@ -246,7 +247,7 @@ public class PaperConfig {
}
public static boolean isProxyOnlineMode() {
@ -34,7 +34,7 @@ index 6a2eb12bae..ee282cb35c 100644
}
public static int packetInSpamThreshold = 300;
@@ -357,4 +358,18 @@ public class PaperConfig {
@@ -360,4 +361,18 @@ public class PaperConfig {
}
}
}
@ -55,7 +55,7 @@ index 6a2eb12bae..ee282cb35c 100644
}
diff --git a/src/main/java/com/destroystokyo/paper/proxy/VelocityProxy.java b/src/main/java/com/destroystokyo/paper/proxy/VelocityProxy.java
new file mode 100644
index 0000000000..fdd8708f97
index 000000000..fdd8708f9
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/proxy/VelocityProxy.java
@@ -0,0 +1,67 @@
@ -127,7 +127,7 @@ index 0000000000..fdd8708f97
+ }
+}
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index d4d752ddb4..5d46a975e3 100644
index d4d752ddb..5d46a975e 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -42,6 +42,7 @@ public class LoginListener implements PacketLoginInListener {
@ -203,7 +203,7 @@ index d4d752ddb4..5d46a975e3 100644
}
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
index 6c55448078..38386d5886 100644
index 6c5544807..38386d588 100644
--- a/src/main/java/net/minecraft/server/NetworkManager.java
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
@@ -46,7 +46,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
@ -216,7 +216,7 @@ index 6c55448078..38386d5886 100644
public java.util.UUID spoofedUUID;
public com.mojang.authlib.properties.Property[] spoofedProfile;
diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java
index fa2d3ce8cb..dac560c63f 100644
index fa2d3ce8c..dac560c63 100644
--- a/src/main/java/net/minecraft/server/PacketDataSerializer.java
+++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java
@@ -140,6 +140,7 @@ public class PacketDataSerializer extends ByteBuf {
@ -244,7 +244,7 @@ index fa2d3ce8cb..dac560c63f 100644
int j = this.i();
diff --git a/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java b/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java
index 4d1f441395..c1ca6f9501 100644
index 4d1f44139..c1ca6f950 100644
--- a/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java
+++ b/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java
@@ -4,8 +4,8 @@ import java.io.IOException;
@ -259,7 +259,7 @@ index 4d1f441395..c1ca6f9501 100644
public PacketLoginInCustomPayload() {}
diff --git a/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java b/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java
index ae74dc9e18..7eb230f1b2 100644
index ae74dc9e1..7eb230f1b 100644
--- a/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java
+++ b/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java
@@ -10,6 +10,14 @@ public class PacketLoginOutCustomPayload implements Packet<PacketLoginOutListene

Datei anzeigen

@ -1,4 +1,4 @@
From 77b20bd34533d5f2af72bac439ba33a64339e565 Mon Sep 17 00:00:00 2001
From 9d86c1508b1b4798ae083a405ee2e7101949b161 Mon Sep 17 00:00:00 2001
From: theosib <millerti@172.16.221.1>
Date: Thu, 27 Sep 2018 01:43:35 -0600
Subject: [PATCH] Optimize redstone algorithm
@ -19,7 +19,7 @@ Aside from making the obvious class/function renames and obfhelpers I didn't nee
Just added Bukkit's event system and took a few liberties with dead code and comment misspellings.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index ad793ffa38..ef882b897f 100644
index ad793ffa3..ef882b897 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -439,4 +439,14 @@ public class PaperWorldConfig {
@ -39,7 +39,7 @@ index ad793ffa38..ef882b897f 100644
}
diff --git a/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
new file mode 100644
index 0000000000..21d9d6d7ed
index 000000000..21d9d6d7e
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
@@ -0,0 +1,910 @@
@ -954,7 +954,7 @@ index 0000000000..21d9d6d7ed
+ }
+}
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
index da903f74b6..f8dfc91f28 100644
index da903f74b..aa35e0d06 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
@@ -1,5 +1,7 @@
@ -1036,11 +1036,11 @@ index da903f74b6..f8dfc91f28 100644
+ l = this.getPower(l, worldIn.getType(blockpos));
+ }
+
+ if (worldIn.getType(blockpos).isOccluding() && !worldIn.getType(pos1.up()).isOccluding()) {
+ if (worldIn.getType(blockpos).isOccluding(worldIn, blockpos) && !worldIn.getType(pos1.up()).isOccluding(worldIn, pos1)) {
+ if (flag && pos1.getY() >= pos2.getY()) {
+ l = this.getPower(l, worldIn.getType(blockpos.up()));
+ }
+ } else if (!worldIn.getType(blockpos).isOccluding() && flag && pos1.getY() <= pos2.getY()) {
+ } else if (!worldIn.getType(blockpos).isOccluding(worldIn, blockpos) && flag && pos1.getY() <= pos2.getY()) {
+ l = this.getPower(l, worldIn.getType(blockpos.down()));
+ }
+ }
@ -1122,7 +1122,7 @@ index da903f74b6..f8dfc91f28 100644
c(iblockdata, world, blockposition);
world.a(blockposition, false);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 136727c280..326165468c 100644
index 136727c28..326165468 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -546,6 +546,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose

Datei anzeigen

@ -1,4 +1,4 @@
From d1fb0018d8f42deb5b4a6f5ee596d121c5a1b8cf Mon Sep 17 00:00:00 2001
From 1e27d6d336f262e46c0b8eeaaab92d8d3d71b4ae Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 16 Nov 2018 23:08:50 -0500
Subject: [PATCH] Book Size Limits
@ -6,10 +6,10 @@ Subject: [PATCH] Book Size Limits
Puts some limits on the size of books.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index ee282cb35c..3d6101c4db 100644
index a79cba50e..e5e41c662 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -372,4 +372,11 @@ public class PaperConfig {
@@ -375,4 +375,11 @@ public class PaperConfig {
velocitySecretKey = secret.getBytes(StandardCharsets.UTF_8);
}
}
@ -22,7 +22,7 @@ index ee282cb35c..3d6101c4db 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index e7d3a5479b..6096f309bc 100644
index e7d3a5479..6096f309b 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -14,6 +14,7 @@ import java.util.Iterator;

Datei anzeigen

@ -1,11 +1,11 @@
From d366f5f354176e8666c376cd08df53a9ca95e138 Mon Sep 17 00:00:00 2001
From af2233bf1ab9d5f83b9363524f3b015cbf485320 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 18 Nov 2018 19:49:56 +0000
Subject: [PATCH] Make the default permission message configurable
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 3d6101c4db..010d2a7961 100644
index e5e41c662..8942a06bf 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -21,6 +21,7 @@ import java.util.regex.Pattern;
@ -16,7 +16,7 @@ index 3d6101c4db..010d2a7961 100644
import org.bukkit.command.Command;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.InvalidConfigurationException;
@@ -278,6 +279,11 @@ public class PaperConfig {
@@ -281,6 +282,11 @@ public class PaperConfig {
connectionThrottleKickMessage = getString("messages.kick.connection-throttle", connectionThrottleKickMessage);
}
@ -29,7 +29,7 @@ index 3d6101c4db..010d2a7961 100644
private static void savePlayerData() {
savePlayerData = getBoolean("settings.save-player-data", savePlayerData);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 034716a20a..982dce4800 100644
index 034716a20..982dce480 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2123,6 +2123,11 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -0,0 +1,162 @@
From ca4d62e9d537d9d2bbee183c3730cf5788e3fd20 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 22 Sep 2018 00:33:08 -0500
Subject: [PATCH] Add LivingEntity#getTargetEntity
diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java
index b38fc50bb..d02c77664 100644
--- a/src/main/java/net/minecraft/server/AxisAlignedBB.java
+++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java
@@ -108,6 +108,7 @@ public class AxisAlignedBB {
return this.b(vec3d.x, vec3d.y, vec3d.z);
}
+ public final AxisAlignedBB expand(double x, double y, double z) { return b(x, y, z); } // Paper - OBFHELPER
public AxisAlignedBB b(double d0, double d1, double d2) {
double d3 = this.minX;
double d4 = this.minY;
@@ -137,6 +138,12 @@ public class AxisAlignedBB {
return new AxisAlignedBB(d3, d4, d5, d6, d7, d8);
}
+ // Paper start
+ public AxisAlignedBB grow(double d0) {
+ return grow(d0, d0, d0);
+ }
+ // Paper end
+
public AxisAlignedBB grow(double d0, double d1, double d2) {
double d3 = this.minX - d0;
double d4 = this.minY - d1;
@@ -194,6 +201,7 @@ public class AxisAlignedBB {
return this.minX < d3 && this.maxX > d0 && this.minY < d4 && this.maxY > d1 && this.minZ < d5 && this.maxZ > d2;
}
+ public final boolean contains(Vec3D vec3d) { return c(vec3d); } // Paper - OBFHELPER
public boolean c(Vec3D vec3d) {
return this.e(vec3d.x, vec3d.y, vec3d.z);
}
@@ -226,6 +234,7 @@ public class AxisAlignedBB {
return this.g(-d0);
}
+ public final Optional<Vec3D> calculateIntercept(Vec3D vec3d, Vec3D vec3d1) { return b(vec3d, vec3d1); } // Paper - OBFHELPER
public Optional<Vec3D> b(Vec3D vec3d, Vec3D vec3d1) {
double[] adouble = new double[] { 1.0D};
double d0 = vec3d1.x - vec3d.x;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 506851111..1cb96685a 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1449,6 +1449,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return this.c(f - 90.0F, f1);
}
+ public final Vec3D getEyePosition(float partialTicks) { return j(partialTicks); } // Paper - OBFHELPER
public Vec3D j(float f) {
if (f == 1.0F) {
return new Vec3D(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ);
@@ -2095,6 +2096,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return this.getPassengers().size() < 1;
}
+ public final float getCollisionBorderSize() { return aR(); } // Paper - OBFHELPER
public float aR() {
return 0.0F;
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index a9d7eea36..dacaa16e0 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -3217,6 +3217,37 @@ public abstract class EntityLiving extends Entity {
return world.rayTrace(raytrace);
}
+ public MovingObjectPositionEntity getTargetEntity(int maxDistance) {
+ if (maxDistance < 1 || maxDistance > 120) {
+ throw new IllegalArgumentException("maxDistance must be between 1-120");
+ }
+
+ Vec3D start = this.getEyePosition(1.0F);
+ Vec3D direction = this.getLookDirection();
+ Vec3D end = start.add(direction.x * maxDistance, direction.y * maxDistance, direction.z * maxDistance);
+
+ List<Entity> entityList = world.getEntities(this, getBoundingBox().expand(direction.x * maxDistance, direction.y * maxDistance, direction.z * maxDistance).grow(1.0D, 1.0D, 1.0D), IEntitySelector.notSpectator().and(Entity::isInteractable));
+
+ double distance = 0.0D;
+ MovingObjectPositionEntity result = null;
+
+ for (Entity entity : entityList) {
+ AxisAlignedBB aabb = entity.getBoundingBox().grow((double) entity.getCollisionBorderSize());
+ Optional<Vec3D> rayTraceResult = aabb.calculateIntercept(start, end);
+
+ if (rayTraceResult.isPresent()) {
+ Vec3D rayTrace = rayTraceResult.get();
+ double distanceTo = start.distanceSquared(rayTrace);
+ if (distanceTo < distance || distance == 0.0D) {
+ result = new MovingObjectPositionEntity(entity, rayTrace);
+ distance = distanceTo;
+ }
+ }
+ }
+
+ return result;
+ }
+
public int shieldBlockingDelay = world.paperConfig.shieldBlockingDelay;
public int getShieldBlockingDelay() {
diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java
index 035d70419..2ebcbe17c 100644
--- a/src/main/java/net/minecraft/server/IEntitySelector.java
+++ b/src/main/java/net/minecraft/server/IEntitySelector.java
@@ -18,6 +18,7 @@ public final class IEntitySelector {
public static final Predicate<Entity> e = (entity) -> {
return !(entity instanceof EntityHuman) || !entity.t() && !((EntityHuman) entity).isCreative();
};
+ public static Predicate<Entity> notSpectator() { return f; } // Paper - OBFHELPER
public static final Predicate<Entity> f = (entity) -> {
return !entity.t();
};
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 4233ffe65..b85385ba4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -199,6 +199,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
new com.destroystokyo.paper.block.TargetBlockInfo(org.bukkit.craftbukkit.block.CraftBlock.at(getHandle().world, ((net.minecraft.server.MovingObjectPositionBlock)rayTrace).getBlockPosition()),
net.minecraft.server.MCUtil.toBukkitBlockFace(((net.minecraft.server.MovingObjectPositionBlock)rayTrace).getDirection()));
}
+
+ public Entity getTargetEntity(int maxDistance, boolean ignoreBlocks) {
+ net.minecraft.server.MovingObjectPositionEntity rayTrace = rayTraceEntity(maxDistance, ignoreBlocks);
+ return rayTrace == null ? null : rayTrace.getEntity().getBukkitEntity();
+ }
+
+ public com.destroystokyo.paper.entity.TargetEntityInfo getTargetEntityInfo(int maxDistance, boolean ignoreBlocks) {
+ net.minecraft.server.MovingObjectPositionEntity rayTrace = rayTraceEntity(maxDistance, ignoreBlocks);
+ return rayTrace == null ? null : new com.destroystokyo.paper.entity.TargetEntityInfo(rayTrace.getEntity().getBukkitEntity(), new org.bukkit.util.Vector(rayTrace.getPos().x, rayTrace.getPos().y, rayTrace.getPos().z));
+ }
+
+ public net.minecraft.server.MovingObjectPositionEntity rayTraceEntity(int maxDistance, boolean ignoreBlocks) {
+ net.minecraft.server.MovingObjectPositionEntity rayTrace = getHandle().getTargetEntity(maxDistance);
+ if (rayTrace == null) {
+ return null;
+ }
+ if (!ignoreBlocks) {
+ net.minecraft.server.MovingObjectPosition rayTraceBlocks = getHandle().getRayTrace(maxDistance, net.minecraft.server.RayTrace.FluidCollisionOption.NONE);
+ if (rayTraceBlocks != null) {
+ net.minecraft.server.Vec3D eye = getHandle().getEyePosition(1.0F);
+ if (eye.distanceSquared(rayTraceBlocks.getPos()) <= eye.distanceSquared(rayTrace.getPos())) {
+ return null;
+ }
+ }
+ }
+ return rayTrace;
+ }
// Paper end
@Override
--
2.21.0

Datei anzeigen

@ -1,4 +1,4 @@
From db1960b71a77920e4f9438ee72fe05d26eb106a9 Mon Sep 17 00:00:00 2001
From 914af13a97c42cdb25c0577076f6efc39f1c9b64 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Wed, 20 Mar 2019 21:19:29 -0700
Subject: [PATCH] Use proper max length when serialising BungeeCord text
@ -6,7 +6,7 @@ Subject: [PATCH] Use proper max length when serialising BungeeCord text
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutChat.java b/src/main/java/net/minecraft/server/PacketPlayOutChat.java
index 0ab611564e..f7b2095bb7 100644
index 0ab611564..f7b2095bb 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutChat.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutChat.java
@@ -3,7 +3,7 @@ package net.minecraft.server;

Datei anzeigen

@ -1,4 +1,4 @@
From 856ac69a50a7c1cf74811d1898ffd113df4e23f2 Mon Sep 17 00:00:00 2001
From faab98f0277620b2a58857119f013b3b06e6a313 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 24 Mar 2019 00:24:52 -0400
Subject: [PATCH] Entity#getEntitySpawnReason
@ -10,7 +10,7 @@ persistenting Living Entity, SPAWNER for spawners,
or DEFAULT since data was not stored.
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 5068511111..a1977a873b 100644
index 1cb96685a..23f910187 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -68,6 +68,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -21,7 +21,7 @@ index 5068511111..a1977a873b 100644
// Paper end
static boolean isLevelAtLeast(NBTTagCompound tag, int level) {
return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
@@ -1593,6 +1594,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -1594,6 +1595,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
if (this.origin != null) {
nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ()));
}
@ -31,7 +31,7 @@ index 5068511111..a1977a873b 100644
// Save entity's from mob spawner status
if (spawnedViaMobSpawner) {
nbttagcompound.setBoolean("Paper.FromMobSpawner", true);
@@ -1726,6 +1730,26 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -1727,6 +1731,26 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
spawnedViaMobSpawner = nbttagcompound.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
@ -59,7 +59,7 @@ index 5068511111..a1977a873b 100644
} catch (Throwable throwable) {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 51272a51bb..4bc465ef47 100644
index 51272a51b..4bc465ef4 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -249,7 +249,7 @@ public abstract class PlayerList {
@ -72,7 +72,7 @@ index 51272a51bb..4bc465ef47 100644
});
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index e60fc0d585..20ccd154d1 100644
index a1f5f7b07..bfc3432a8 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -939,6 +939,7 @@ public class WorldServer extends World {
@ -84,7 +84,7 @@ index e60fc0d585..20ccd154d1 100644
if (entity.dead) {
// Paper start
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index af0fc9bd71..f1938695d8 100644
index af0fc9bd7..f1938695d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1053,5 +1053,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {

Datei anzeigen

@ -1,11 +1,11 @@
From 6bad33859781b603900177cd256111ad34a4dd48 Mon Sep 17 00:00:00 2001
From 1ff7126971d1710dfe5d0f9f9e96f0a790089423 Mon Sep 17 00:00:00 2001
From: AgentTroll <woodyc40@gmail.com>
Date: Fri, 22 Mar 2019 22:24:03 -0700
Subject: [PATCH] Update entity Metadata for all tracked players
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
index afd8748da8..17b6ab57c2 100644
index afd8748da..17b6ab57c 100644
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
@@ -379,6 +379,12 @@ public class EntityTrackerEntry {
@ -22,7 +22,7 @@ index afd8748da8..17b6ab57c2 100644
this.f.accept(packet);
if (this.tracker instanceof EntityPlayer) {
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index b3193bc3fa..3587f73e16 100644
index b3193bc3f..3587f73e1 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2020,7 +2020,7 @@ public class PlayerConnection implements PacketListenerPlayIn {

Datei anzeigen

@ -1,11 +1,11 @@
From bb593022fce1020099405f57c50f010d7565654b Mon Sep 17 00:00:00 2001
From 0e53ea4dd57aef9bc1250dc5d34ddceaea53d47b Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Sun, 17 Mar 2019 21:46:56 +0200
Subject: [PATCH] Fire event on GS4 query
diff --git a/src/main/java/net/minecraft/server/RemoteConnectionThread.java b/src/main/java/net/minecraft/server/RemoteConnectionThread.java
index 66bfbcf02b..d821ef9a75 100644
index 66bfbcf02..d821ef9a7 100644
--- a/src/main/java/net/minecraft/server/RemoteConnectionThread.java
+++ b/src/main/java/net/minecraft/server/RemoteConnectionThread.java
@@ -15,7 +15,7 @@ public abstract class RemoteConnectionThread implements Runnable {
@ -26,7 +26,7 @@ index 66bfbcf02b..d821ef9a75 100644
return this.b.getPlayerCount();
}
diff --git a/src/main/java/net/minecraft/server/RemoteStatusListener.java b/src/main/java/net/minecraft/server/RemoteStatusListener.java
index ddb4ba4899..3770334fc4 100644
index ddb4ba489..3770334fc 100644
--- a/src/main/java/net/minecraft/server/RemoteStatusListener.java
+++ b/src/main/java/net/minecraft/server/RemoteStatusListener.java
@@ -21,19 +21,19 @@ public class RemoteStatusListener extends RemoteConnectionThread {
@ -184,7 +184,7 @@ index ddb4ba4899..3770334fc4 100644
}
}
diff --git a/src/main/java/net/minecraft/server/RemoteStatusReply.java b/src/main/java/net/minecraft/server/RemoteStatusReply.java
index 848b5c3f0e..73efea7e13 100644
index 848b5c3f0..73efea7e1 100644
--- a/src/main/java/net/minecraft/server/RemoteStatusReply.java
+++ b/src/main/java/net/minecraft/server/RemoteStatusReply.java
@@ -18,15 +18,27 @@ public class RemoteStatusReply {

Datei anzeigen

@ -1,11 +1,11 @@
From c0286fd277c8e601c3d63bda402548f6e4b7a058 Mon Sep 17 00:00:00 2001
From 3254acb9263fd3571734030983a9b58f0f0a7202 Mon Sep 17 00:00:00 2001
From: MisterVector <whizkid3000@hotmail.com>
Date: Fri, 26 Oct 2018 21:31:00 -0700
Subject: [PATCH] Implement PlayerPostRespawnEvent
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 4bc465ef47..67461cd2ac 100644
index 4bc465ef4..67461cd2a 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -636,9 +636,14 @@ public abstract class PlayerList {

Datei anzeigen

@ -1,4 +1,4 @@
From 94c653b27e6e519f724247ca716f12e054c79e7e Mon Sep 17 00:00:00 2001
From 4767b1bbc871b6a58aed21ca288b15924832fd4c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 24 Mar 2019 18:09:20 -0400
Subject: [PATCH] don't go below 0 for pickupDelay, breaks picking up items
@ -6,7 +6,7 @@ Subject: [PATCH] don't go below 0 for pickupDelay, breaks picking up items
vanilla checks for == 0
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index c5fefa060b..43fc790a61 100644
index c5fefa060..43fc790a6 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -59,6 +59,7 @@ public class EntityItem extends Entity {

Datei anzeigen

@ -1,4 +1,4 @@
From b1578a26215ab6b5bc1f0afc3bc121f7f06629bf Mon Sep 17 00:00:00 2001
From 58ea54af0576c549f575367b2b18c5a796ca684a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 27 Mar 2019 22:48:45 -0400
Subject: [PATCH] Server Tick Events
@ -6,7 +6,7 @@ Subject: [PATCH] Server Tick Events
Fires event at start and end of a server tick
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e612879495..3fc232431a 100644
index e61287949..3fc232431 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1051,6 +1051,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas

Datei anzeigen

@ -1,4 +1,4 @@
From 97466287cd8da038a43e5433a1e6cae4e29d5307 Mon Sep 17 00:00:00 2001
From ed2138f8c4715b48c8e2de76445876c037433ab6 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 27 Mar 2019 23:01:33 -0400
Subject: [PATCH] PlayerDeathEvent#getItemsToKeep
@ -8,7 +8,7 @@ Exposes a mutable array on items a player should keep on death
Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index a18afbcdde..f17e799309 100644
index a18afbcdd..f17e79930 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -508,6 +508,46 @@ public class EntityPlayer extends EntityHuman implements ICrafting {

Datei anzeigen

@ -1,4 +1,4 @@
From aca5c59694a9856f898aba40bad4729b36798ec3 Mon Sep 17 00:00:00 2001
From 43a664a624136553e52ee00ca4b6c59b7ae3f6a8 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 29 Mar 2019 01:25:11 -0400
Subject: [PATCH] Optimize Persistent Data Loading
@ -14,7 +14,7 @@ These files take a long time to convert on large worlds and crashes the server.
Additionally, cache the result of a file being missing so we don't keep spam checking it.
diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java
index 47a4ea9985..62081349f1 100644
index 47a4ea998..62081349f 100644
--- a/src/main/java/net/minecraft/server/WorldPersistentData.java
+++ b/src/main/java/net/minecraft/server/WorldPersistentData.java
@@ -26,6 +26,7 @@ public class WorldPersistentData {

Datei anzeigen

@ -1,4 +1,4 @@
From ef816e0d08a4784078294c63b810c4ae6beca979 Mon Sep 17 00:00:00 2001
From 742bd11b5bddb1ee5ed829051c28834955bffd73 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Sun, 31 Mar 2019 22:02:24 -0700
Subject: [PATCH] Allow login events to fire only after the server plugins are
@ -7,7 +7,7 @@ Subject: [PATCH] Allow login events to fire only after the server plugins are
Event threads will simply block until they're ready to accept.
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index 9e4bc24058..028c23dbe6 100644
index 9e4bc2405..028c23dbe 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -285,6 +285,36 @@ public class LoginListener implements PacketLoginInListener {
@ -56,7 +56,7 @@ index 9e4bc24058..028c23dbe6 100644
java.net.InetAddress address = ((java.net.InetSocketAddress) networkManager.getSocketAddress()).getAddress();
java.util.UUID uniqueId = i.getId();
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3fc232431a..93c014c399 100644
index 3fc232431..93c014c39 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -463,6 +463,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas

Datei anzeigen

@ -1,4 +1,4 @@
From 7e2000b337deb94d91db62d03496e2dfce9f12e5 Mon Sep 17 00:00:00 2001
From 0181c40d113cf2a21c12e5d1016fad735f0dfd82 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Mon, 1 Apr 2019 18:57:32 -0700
Subject: [PATCH] Make region files more reliable to write to
@ -37,7 +37,7 @@ affect save performance if the startup flag is used (especially on
HDDs).
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index 995a893774..66d87d64b5 100644
index 995a89377..66d87d64b 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -29,7 +29,7 @@ public class RegionFile implements AutoCloseable {

Datei anzeigen

@ -1,4 +1,4 @@
From 3891a02b65639d6f88b2ba5edac009af5fdecd94 Mon Sep 17 00:00:00 2001
From 546c830c63daa9ae7f81e577def2390e40ea33a1 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Thu, 4 Apr 2019 17:55:05 -0700
Subject: [PATCH] Optimize GameRules to use LinkedHashMap
@ -6,7 +6,7 @@ Subject: [PATCH] Optimize GameRules to use LinkedHashMap
Previously TreeMap was used which has poor get(K) performance.
diff --git a/src/main/java/net/minecraft/server/GameRules.java b/src/main/java/net/minecraft/server/GameRules.java
index 3de9d264db..c6a8004745 100644
index 3de9d264d..c6a800474 100644
--- a/src/main/java/net/minecraft/server/GameRules.java
+++ b/src/main/java/net/minecraft/server/GameRules.java
@@ -17,7 +17,17 @@ import javax.annotation.Nullable;
@ -49,7 +49,7 @@ index 3de9d264db..c6a8004745 100644
}
diff --git a/src/test/java/org/bukkit/GameRuleTest.java b/src/test/java/org/bukkit/GameRuleTest.java
index 1ed0f4cf2b..40edb8d668 100644
index 1ed0f4cf2..40edb8d66 100644
--- a/src/test/java/org/bukkit/GameRuleTest.java
+++ b/src/test/java/org/bukkit/GameRuleTest.java
@@ -21,7 +21,7 @@ public class GameRuleTest {

Datei anzeigen

@ -1,4 +1,4 @@
From 927bc5edb691c1e5ce6ebe80a87ce80dcf457f87 Mon Sep 17 00:00:00 2001
From 0cde60fff93b54664d47d320334fc5520a32c816 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 6 Apr 2019 10:16:48 -0400
Subject: [PATCH] Optimize Captured TileEntity Lookup
@ -10,7 +10,7 @@ Optimize to check if the captured list even has values in it, and also to
just do a get call since the value can never be null.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 9c26b8d676..1bec5beab4 100644
index 9c26b8d67..1bec5beab 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1049,12 +1049,13 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose

Datei anzeigen

@ -1,11 +1,11 @@
From 8b9290193e5d9a8a5ebd6dad4f644212eed5c96a Mon Sep 17 00:00:00 2001
From 0a9ff885463979090cd6655121057ac03a92d7b4 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Tue, 1 Jan 2019 02:22:01 -0800
Subject: [PATCH] Add Heightmap API
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 1bec5beab4..9f4cf3f1b3 100644
index 1bec5beab..9f4cf3f1b 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -615,8 +615,8 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@ -20,7 +20,7 @@ index 1bec5beab4..9f4cf3f1b3 100644
if (i >= -30000000 && j >= -30000000 && i < 30000000 && j < 30000000) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index ed646bc9db..d2c3ea0dc3 100644
index ed646bc9d..d2c3ea0dc 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -317,6 +317,29 @@ public class CraftWorld implements World {

Datei anzeigen

@ -1,4 +1,4 @@
From 30cf1dca5cb5299cef1d241c7bfe60d05bbbd988 Mon Sep 17 00:00:00 2001
From 92be63d442480866c329fddc6fcee816f6d8541d Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Mon, 15 Apr 2019 02:24:52 +0100
Subject: [PATCH] Handle bad chunks more gracefully
@ -15,7 +15,7 @@ Should Mojang choose to alter this behavior in the future, this change
will simply defer to whatever that new behavior is.
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
index 6893f3cd34..717b0b1f08 100644
index 6893f3cd3..717b0b1f0 100644
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
@@ -171,8 +171,21 @@ public abstract class RegionFileCache implements AutoCloseable {

Datei anzeigen

@ -1,11 +1,11 @@
From 9bd01a1bf43bf841bbfb1ef50ed76b27d8eaf490 Mon Sep 17 00:00:00 2001
From 4f10353936c77034a5064e78f7a68ddb359e4769 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Fri, 19 Apr 2019 12:41:13 -0500
Subject: [PATCH] Mob Spawner API Enhancements
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
index 96080b6c73..c0f5a55120 100644
index 96080b6c7..c0f5a5512 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -46,6 +46,7 @@ public abstract class MobSpawnerAbstract {
@ -82,7 +82,7 @@ index 96080b6c73..c0f5a55120 100644
nbttagcompound.setShort("MaxNearbyEntities", (short) this.maxNearbyEntities);
nbttagcompound.setShort("RequiredPlayerRange", (short) this.requiredPlayerRange);
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
index 5c4c3c70c7..e78e3804ba 100644
index 5c4c3c70c..e78e3804b 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
@@ -121,4 +121,16 @@ public class CraftCreatureSpawner extends CraftBlockEntityState<TileEntityMobSpa

Datei anzeigen

@ -1,4 +1,4 @@
From 6203075a3c3cb373fcb1172eecf84f61527020e5 Mon Sep 17 00:00:00 2001
From 09ff776905a9378d5c0b45fbb0f58e5772bb7533 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Mon, 22 Apr 2019 19:51:14 +0100
Subject: [PATCH] don't NPE on dimensionmanager toString
@ -14,7 +14,7 @@ this is not super elegant, but is the only route that promises not to
break stuff.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 982dce4800..d18a530a4d 100644
index 982dce480..d18a530a4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -997,7 +997,14 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -0,0 +1,64 @@
From 6bc4d42b25c814caec38cd22015bc4e318f20049 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach@zachbr.io>
Date: Mon, 6 May 2019 01:29:25 -0400
Subject: [PATCH] Per-Player View Distance API placeholders
I hope to look at this more in-depth soon. It appears doable.
However this should not block the update.
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
index 3abf89b74..c558661d2 100644
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
@@ -565,9 +565,9 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
// CraftBukkit start - Use relative location for far away sounds
// this.world.b(1028, new BlockPosition(this), 0);
// Paper start
- //int viewDistance = ((WorldServer) this.world).spigotConfig.viewDistance * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API
+ int viewDistance = ((WorldServer) this.world).spigotConfig.viewDistance * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API
for (EntityPlayer player : ((WorldServer)world).getPlayers()) {
- final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch
+ //final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch
// Paper end
double deltaX = this.locX - player.locX;
double deltaZ = this.locZ - player.locZ;
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
index 48b22894a..dbd854206 100644
--- a/src/main/java/net/minecraft/server/EntityWither.java
+++ b/src/main/java/net/minecraft/server/EntityWither.java
@@ -208,9 +208,9 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
// CraftBukkit start - Use relative location for far away sounds
// this.world.b(1023, new BlockPosition(this), 0);
// Paper start
- //int viewDistance = ((WorldServer) this.world).spigotConfig.viewDistance * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API
+ int viewDistance = ((WorldServer) this.world).spigotConfig.viewDistance * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API
for (EntityPlayer player : ((WorldServer)world).getPlayers()) {
- final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch
+ //final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch
// Paper end
double deltaX = this.locX - player.locX;
double deltaZ = this.locZ - player.locZ;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 3bc7a64fa..d94f4c03c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1963,6 +1963,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
super.remove();
}
}
+
+ @Override
+ public int getViewDistance() {
+ throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement"); // TODO
+ }
+
+ @Override
+ public void setViewDistance(int viewDistance) {
+ throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement"); // TODO
+ }
//Paper end
// Spigot start
--
2.21.0