mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: 8ce3dd5f [CI-SKIP] Fix Mojang API Brigadier dep - THIS IS NOT A NEW BUILD 00d760a5 Fix build due to spigot changing the build timestamp process 842e040c Updated Upstream (Bukkit/CraftBukkit/Spigot) c03260a2 Add getter and setter for villager's numberOfRestocksToday (#3231) fe366fbe null check tracker for entity metadata update - Fixes #3070 fdf41b74 Implement Brigadier Mojang API e0ea2e0e Entity Activation Range 2.0! Major improvements to restoring behavior 10396d28 Fix Tracking Range mismatch on Vehicle/Passenger checks
This commit is contained in:
2
Paper
2
Paper
Submodule Paper updated: 68994c64ec...8ce3dd5f71
@@ -1 +1 @@
|
||||
1.15.2--73d4a9197286e07b101b41db39a9f0f6ff7d9a84
|
||||
1.15.2--c9e081d4d8646f1eaaa1af769caf0a183a2df4b2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 8f788f0d088dedfb7407566e489b3c13ede8b4f4 Mon Sep 17 00:00:00 2001
|
||||
From 10b95b9628987e16178899813700bf285e061904 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 4 May 2019 00:57:16 -0500
|
||||
Subject: [PATCH] Rebrand
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH] Rebrand
|
||||
1 file changed, 6 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 2cb971408..58a1f7d07 100644
|
||||
index 0629e1aa..920e904f 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -3,18 +3,17 @@
|
||||
@@ -43,7 +43,7 @@ index 2cb971408..58a1f7d07 100644
|
||||
+ <defaultGoal>clean install javadoc:javadoc</defaultGoal>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<groupId>net.md-5</groupId>
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From a6ae43a653ae0fbe98bc01c3d5c55900a4009e07 Mon Sep 17 00:00:00 2001
|
||||
From 37efa9e3cdecabc0f10d35dc501ef4cafa164080 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 10 Aug 2019 22:19:56 -0500
|
||||
Subject: [PATCH] Implement AFK API
|
||||
@@ -6,13 +6,12 @@ Subject: [PATCH] Implement AFK API
|
||||
---
|
||||
.../net/pl3x/purpur/event/PlayerAFKEvent.java | 70 +++++++++++++++++++
|
||||
src/main/java/org/bukkit/entity/Player.java | 21 ++++++
|
||||
.../org/bukkit/event/player/PlayerEvent.java | 2 +-
|
||||
3 files changed, 92 insertions(+), 1 deletion(-)
|
||||
2 files changed, 91 insertions(+)
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/event/PlayerAFKEvent.java
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/event/PlayerAFKEvent.java b/src/main/java/net/pl3x/purpur/event/PlayerAFKEvent.java
|
||||
new file mode 100644
|
||||
index 000000000..0c8b3e5e4
|
||||
index 00000000..0c8b3e5e
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/event/PlayerAFKEvent.java
|
||||
@@ -0,0 +1,70 @@
|
||||
@@ -87,7 +86,7 @@ index 000000000..0c8b3e5e4
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 787bb144b..edc481170 100644
|
||||
index 787bb144..edc48117 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1830,4 +1830,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -116,19 +115,6 @@ index 787bb144b..edc481170 100644
|
||||
+ void resetIdleTimer();
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerEvent.java b/src/main/java/org/bukkit/event/player/PlayerEvent.java
|
||||
index 793b661b6..ad79d0db6 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/PlayerEvent.java
|
||||
@@ -14,7 +14,7 @@ public abstract class PlayerEvent extends Event {
|
||||
player = who;
|
||||
}
|
||||
|
||||
- PlayerEvent(@NotNull final Player who, boolean async) {
|
||||
+ public PlayerEvent(@NotNull final Player who, boolean async) { // Purpur - package-private -> public
|
||||
super(async);
|
||||
player = who;
|
||||
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 2fd95e5365c391f673bbf88e24cb3bc5c954260c Mon Sep 17 00:00:00 2001
|
||||
From bc0eb5d1698988e0434827cfb36e16b19f169df1 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Mon, 7 Oct 2019 00:15:28 -0500
|
||||
Subject: [PATCH] Add API for Villager#resetOffers()
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] Add API for Villager#resetOffers()
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
|
||||
index ef48ad9b2..2bb9f768b 100644
|
||||
index d1579153..14434ca8 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Villager.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Villager.java
|
||||
@@ -96,6 +96,13 @@ public interface Villager extends AbstractVillager {
|
||||
@@ -110,6 +110,13 @@ public interface Villager extends AbstractVillager {
|
||||
*/
|
||||
public void wakeup();
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 935889653a8c30f88b6df8e688115f955b4dcde8 Mon Sep 17 00:00:00 2001
|
||||
From 49c857402f8682d8b5e6da6e30af1fbdcd3fb221 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 4 May 2019 01:02:11 -0500
|
||||
Subject: [PATCH] Rebrand
|
||||
@@ -15,7 +15,7 @@ Subject: [PATCH] Rebrand
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/PurpurVersionFetcher.java
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 55679af92..a7ee9396a 100644
|
||||
index fd417a9ee..cdb556405 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -1,11 +1,11 @@
|
||||
@@ -33,7 +33,7 @@ index 55679af92..a7ee9396a 100644
|
||||
|
||||
<properties>
|
||||
<!-- <skipTests>true</skipTests> Paper - This [was] not going to end well -->
|
||||
@@ -21,16 +21,16 @@
|
||||
@@ -18,16 +18,16 @@
|
||||
</properties>
|
||||
|
||||
<parent>
|
||||
@@ -54,7 +54,7 @@ index 55679af92..a7ee9396a 100644
|
||||
<version>${project.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
@@ -40,6 +40,20 @@
|
||||
@@ -43,6 +43,20 @@
|
||||
<version>${minecraft.version}-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
@@ -75,7 +75,7 @@ index 55679af92..a7ee9396a 100644
|
||||
<dependency>
|
||||
<groupId>net.minecrell</groupId>
|
||||
<artifactId>terminalconsoleappender</artifactId>
|
||||
@@ -143,7 +157,7 @@
|
||||
@@ -146,7 +160,7 @@
|
||||
|
||||
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
|
||||
<build>
|
||||
@@ -84,7 +84,7 @@ index 55679af92..a7ee9396a 100644
|
||||
<defaultGoal>clean install</defaultGoal> <!-- Paper -->
|
||||
<plugins>
|
||||
<plugin>
|
||||
@@ -151,7 +165,7 @@
|
||||
@@ -154,7 +168,7 @@
|
||||
<artifactId>gitdescribe-maven-plugin</artifactId>
|
||||
<version>1.3</version>
|
||||
<configuration>
|
||||
@@ -241,10 +241,10 @@ index 000000000..d8b408f06
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index dcc44be61..146d40a6e 100644
|
||||
index f49193d9d..d98011b6e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -203,7 +203,7 @@ import javax.annotation.Nullable; // Paper
|
||||
@@ -204,7 +204,7 @@ import javax.annotation.Nullable; // Paper
|
||||
import javax.annotation.Nonnull; // Paper
|
||||
|
||||
public final class CraftServer implements Server {
|
||||
|
||||
@@ -1,43 +1,48 @@
|
||||
From cc20b9003b0b7dbc01173445f4a2a8ad6a326795 Mon Sep 17 00:00:00 2001
|
||||
From e008b74695e3e9846fce63c0db40959ec7683784 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 9 May 2019 18:09:43 -0500
|
||||
Subject: [PATCH] Purpur config files
|
||||
|
||||
---
|
||||
.../com/destroystokyo/paper/PaperConfig.java | 2 +
|
||||
.../net/minecraft/server/DedicatedServer.java | 9 +
|
||||
src/main/java/net/minecraft/server/World.java | 4 +-
|
||||
src/main/java/net/pl3x/purpur/Metrics.java | 598 ++++++++++++++++++
|
||||
.../java/net/pl3x/purpur/PurpurConfig.java | 136 ++++
|
||||
.../net/pl3x/purpur/PurpurWorldConfig.java | 67 ++
|
||||
.../pl3x/purpur/command/PurpurCommand.java | 67 ++
|
||||
.../org/bukkit/craftbukkit/CraftServer.java | 15 +
|
||||
.../java/org/bukkit/craftbukkit/Main.java | 8 +
|
||||
9 files changed, 904 insertions(+), 2 deletions(-)
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/Metrics.java
|
||||
.../java/com/destroystokyo/paper/Metrics.java | 6 +-
|
||||
.../net/minecraft/server/DedicatedServer.java | 9 ++
|
||||
src/main/java/net/minecraft/server/World.java | 2 +
|
||||
.../java/net/pl3x/purpur/PurpurConfig.java | 130 ++++++++++++++++++
|
||||
.../net/pl3x/purpur/PurpurWorldConfig.java | 67 +++++++++
|
||||
.../pl3x/purpur/command/PurpurCommand.java | 67 +++++++++
|
||||
.../org/bukkit/craftbukkit/CraftServer.java | 15 ++
|
||||
.../java/org/bukkit/craftbukkit/Main.java | 8 ++
|
||||
8 files changed, 301 insertions(+), 3 deletions(-)
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/command/PurpurCommand.java
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 1c4cd36351..cb8bac539d 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -97,10 +97,12 @@ public class PaperConfig {
|
||||
MinecraftServer.getServer().server.getCommandMap().register(entry.getKey(), "Paper", entry.getValue());
|
||||
}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
index e257d6b36..a6cd76fa5 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
@@ -578,7 +578,7 @@ public class Metrics {
|
||||
boolean logFailedRequests = config.getBoolean("logFailedRequests", false);
|
||||
// Only start Metrics, if it's enabled in the config
|
||||
if (config.getBoolean("enabled", true)) {
|
||||
- Metrics metrics = new Metrics("Paper", serverUUID, logFailedRequests, Bukkit.getLogger());
|
||||
+ Metrics metrics = new Metrics("Purpur", serverUUID, logFailedRequests, Bukkit.getLogger()); // Purpur
|
||||
|
||||
+ /* // Purpur - Replace with our own
|
||||
if (!metricsStarted) {
|
||||
Metrics.PaperMetrics.startMetrics();
|
||||
metricsStarted = true;
|
||||
}
|
||||
+ */ // Purpur end
|
||||
}
|
||||
metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> {
|
||||
String minecraftVersion = Bukkit.getVersion();
|
||||
@@ -587,8 +587,8 @@ public class Metrics {
|
||||
}));
|
||||
|
||||
static void readConfig(Class<?> clazz, Object instance) {
|
||||
metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size()));
|
||||
- metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() ? "online" : "offline"));
|
||||
- metrics.addCustomChart(new Metrics.SimplePie("paper_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown"));
|
||||
+ metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() ? "online" : (Bukkit.spigot().getSpigotConfig().getBoolean("settings.bungeecord") ? "bungee" : "offline"))); // Purpur
|
||||
+ metrics.addCustomChart(new Metrics.SimplePie("purpur_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); // Purpur
|
||||
|
||||
metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> {
|
||||
Map<String, Map<String, Integer>> map = new HashMap<>();
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
index 1ef7890da5..e614570d33 100644
|
||||
index e62ca0543..018def64a 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -192,6 +192,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
@@ -57,22 +62,18 @@ index 1ef7890da5..e614570d33 100644
|
||||
// Paper end
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index d554d4cf0f..618f115ca9 100644
|
||||
index 899c535c4..d0896d944 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -78,10 +78,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
public long ticksPerAmbientSpawns;
|
||||
@@ -85,6 +85,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
public boolean populating;
|
||||
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
|
||||
-
|
||||
|
||||
+ public final net.pl3x.purpur.PurpurWorldConfig purpurConfig; // Purpur
|
||||
public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper
|
||||
public final ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
|
||||
-
|
||||
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
|
||||
public static BlockPosition lastPhysicsProblem; // Spigot
|
||||
private org.spigotmc.TickLimiter entityLimiter;
|
||||
@@ -130,6 +129,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
||||
@@ -136,6 +137,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
protected World(WorldData worlddata, DimensionManager dimensionmanager, BiFunction<World, WorldProvider, IChunkProvider> bifunction, GameProfilerFiller gameprofilerfiller, boolean flag, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) {
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot
|
||||
this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(worlddata.getName(), this.spigotConfig); // Paper
|
||||
@@ -80,616 +81,12 @@ index d554d4cf0f..618f115ca9 100644
|
||||
this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this.paperConfig) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
|
||||
this.generator = gen;
|
||||
this.world = new CraftWorld((WorldServer) this, gen, env);
|
||||
diff --git a/src/main/java/net/pl3x/purpur/Metrics.java b/src/main/java/net/pl3x/purpur/Metrics.java
|
||||
new file mode 100644
|
||||
index 0000000000..9210afab6d
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/Metrics.java
|
||||
@@ -0,0 +1,598 @@
|
||||
+package net.pl3x.purpur;
|
||||
+
|
||||
+import com.google.gson.JsonArray;
|
||||
+import com.google.gson.JsonObject;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.bukkit.configuration.file.YamlConfiguration;
|
||||
+
|
||||
+import javax.net.ssl.HttpsURLConnection;
|
||||
+import java.io.ByteArrayOutputStream;
|
||||
+import java.io.DataOutputStream;
|
||||
+import java.io.File;
|
||||
+import java.io.IOException;
|
||||
+import java.net.URL;
|
||||
+import java.nio.charset.StandardCharsets;
|
||||
+import java.util.ArrayList;
|
||||
+import java.util.HashMap;
|
||||
+import java.util.List;
|
||||
+import java.util.Map;
|
||||
+import java.util.Timer;
|
||||
+import java.util.TimerTask;
|
||||
+import java.util.UUID;
|
||||
+import java.util.concurrent.Callable;
|
||||
+import java.util.logging.Level;
|
||||
+import java.util.logging.Logger;
|
||||
+import java.util.regex.Matcher;
|
||||
+import java.util.regex.Pattern;
|
||||
+import java.util.zip.GZIPOutputStream;
|
||||
+
|
||||
+/**
|
||||
+ * bStats collects some data for plugin authors.
|
||||
+ * <p>
|
||||
+ * Check out https://bStats.org/ to learn more about bStats!
|
||||
+ */
|
||||
+public class Metrics {
|
||||
+ public static final int B_STATS_VERSION = 1;
|
||||
+ private static final String URL = "https://bStats.org/submitData/server-implementation";
|
||||
+ private static boolean logFailedRequests = false;
|
||||
+ private static Logger logger = Logger.getLogger("bStats");
|
||||
+ private final String name;
|
||||
+ private final String serverUUID;
|
||||
+ private final List<CustomChart> charts = new ArrayList<>();
|
||||
+
|
||||
+ /**
|
||||
+ * Class constructor.
|
||||
+ *
|
||||
+ * @param name The name of the server software.
|
||||
+ * @param serverUUID The uuid of the server.
|
||||
+ * @param logFailedRequests Whether failed requests should be logged or not.
|
||||
+ * @param logger The logger for the failed requests.
|
||||
+ */
|
||||
+ public Metrics(String name, String serverUUID, boolean logFailedRequests, Logger logger) {
|
||||
+ this.name = name;
|
||||
+ this.serverUUID = serverUUID;
|
||||
+ Metrics.logFailedRequests = logFailedRequests;
|
||||
+ Metrics.logger = logger;
|
||||
+
|
||||
+ startSubmitting();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Adds a custom chart.
|
||||
+ *
|
||||
+ * @param chart The chart to add.
|
||||
+ */
|
||||
+ public void addCustomChart(CustomChart chart) {
|
||||
+ if (chart == null) {
|
||||
+ throw new IllegalArgumentException("Chart cannot be null!");
|
||||
+ }
|
||||
+ charts.add(chart);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Starts the Scheduler which submits our data every 30 minutes.
|
||||
+ */
|
||||
+ private void startSubmitting() {
|
||||
+ final Timer timer = new Timer(true);
|
||||
+ timer.scheduleAtFixedRate(new TimerTask() {
|
||||
+ @Override
|
||||
+ public void run() {
|
||||
+ submitData();
|
||||
+ }
|
||||
+ }, 1000 * 60 * 5, 1000 * 60 * 30);
|
||||
+ // Submit the data every 30 minutes, first time after 5 minutes to give other plugins enough time to start
|
||||
+ // WARNING: Changing the frequency has no effect but your plugin WILL be blocked/deleted!
|
||||
+ // WARNING: Just don't do it!
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the plugin specific data.
|
||||
+ * This method is called using Reflection.
|
||||
+ *
|
||||
+ * @return The plugin specific data.
|
||||
+ */
|
||||
+ public JsonObject getPluginData() {
|
||||
+ JsonObject data = new JsonObject();
|
||||
+
|
||||
+ data.addProperty("pluginName", name); // Append the name of the plugin
|
||||
+
|
||||
+ JsonArray customCharts = new JsonArray();
|
||||
+ for (CustomChart customChart : charts) {
|
||||
+ JsonObject chart = customChart.getRequestJsonObject();
|
||||
+ if (chart != null) {
|
||||
+ customCharts.add(chart);
|
||||
+ }
|
||||
+ }
|
||||
+ data.add("customCharts", customCharts);
|
||||
+
|
||||
+ return data;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the server specific data.
|
||||
+ *
|
||||
+ * @return The server specific data.
|
||||
+ */
|
||||
+ private JsonObject getServerData() {
|
||||
+ JsonObject data = new JsonObject();
|
||||
+
|
||||
+ data.addProperty("serverUUID", serverUUID);
|
||||
+
|
||||
+ data.addProperty("osName", System.getProperty("os.name"));
|
||||
+ data.addProperty("osArch", System.getProperty("os.arch"));
|
||||
+ data.addProperty("osVersion", System.getProperty("os.version"));
|
||||
+ data.addProperty("coreCount", Runtime.getRuntime().availableProcessors());
|
||||
+
|
||||
+ return data;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Collects the data and sends it afterwards.
|
||||
+ */
|
||||
+ private void submitData() {
|
||||
+ final JsonObject data = getServerData();
|
||||
+
|
||||
+ JsonArray pluginData = new JsonArray();
|
||||
+ pluginData.add(getPluginData());
|
||||
+ data.add("plugins", pluginData);
|
||||
+
|
||||
+ try {
|
||||
+ sendData(data);
|
||||
+ } catch (Exception e) {
|
||||
+ if (logFailedRequests) {
|
||||
+ logger.log(Level.WARNING, "Could not submit plugin stats of " + name, e);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sends the data to the bStats server.
|
||||
+ *
|
||||
+ * @param data The data to send.
|
||||
+ * @throws Exception If the request failed.
|
||||
+ */
|
||||
+ private static void sendData(JsonObject data) throws Exception {
|
||||
+ if (data == null) {
|
||||
+ throw new IllegalArgumentException("Data cannot be null!");
|
||||
+ }
|
||||
+ HttpsURLConnection connection = (HttpsURLConnection) new URL(URL).openConnection();
|
||||
+
|
||||
+ // Compress the data to save bandwidth
|
||||
+ byte[] compressedData = compress(data.toString());
|
||||
+
|
||||
+ // Add headers
|
||||
+ connection.setRequestMethod("POST");
|
||||
+ connection.addRequestProperty("Accept", "application/json");
|
||||
+ connection.addRequestProperty("Connection", "close");
|
||||
+ connection.addRequestProperty("Content-Encoding", "gzip"); // We gzip our request
|
||||
+ connection.addRequestProperty("Content-Length", String.valueOf(compressedData.length));
|
||||
+ connection.setRequestProperty("Content-Type", "application/json"); // We send our data in JSON format
|
||||
+ connection.setRequestProperty("User-Agent", "MC-Server/" + B_STATS_VERSION);
|
||||
+
|
||||
+ // Send data
|
||||
+ connection.setDoOutput(true);
|
||||
+ DataOutputStream outputStream = new DataOutputStream(connection.getOutputStream());
|
||||
+ outputStream.write(compressedData);
|
||||
+ outputStream.flush();
|
||||
+ outputStream.close();
|
||||
+
|
||||
+ connection.getInputStream().close();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gzips the given String.
|
||||
+ *
|
||||
+ * @param str The string to gzip.
|
||||
+ * @return The gzipped String.
|
||||
+ * @throws IOException If the compression failed.
|
||||
+ */
|
||||
+ private static byte[] compress(final String str) throws IOException {
|
||||
+ if (str == null) {
|
||||
+ return null;
|
||||
+ }
|
||||
+ ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
||||
+ GZIPOutputStream gzip = new GZIPOutputStream(outputStream);
|
||||
+ gzip.write(str.getBytes(StandardCharsets.UTF_8));
|
||||
+ gzip.close();
|
||||
+ return outputStream.toByteArray();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Represents a custom chart.
|
||||
+ */
|
||||
+ public static abstract class CustomChart {
|
||||
+
|
||||
+ // The id of the chart
|
||||
+ final String chartId;
|
||||
+
|
||||
+ /**
|
||||
+ * Class constructor.
|
||||
+ *
|
||||
+ * @param chartId The id of the chart.
|
||||
+ */
|
||||
+ CustomChart(String chartId) {
|
||||
+ if (chartId == null || chartId.isEmpty()) {
|
||||
+ throw new IllegalArgumentException("ChartId cannot be null or empty!");
|
||||
+ }
|
||||
+ this.chartId = chartId;
|
||||
+ }
|
||||
+
|
||||
+ private JsonObject getRequestJsonObject() {
|
||||
+ JsonObject chart = new JsonObject();
|
||||
+ chart.addProperty("chartId", chartId);
|
||||
+ try {
|
||||
+ JsonObject data = getChartData();
|
||||
+ if (data == null) {
|
||||
+ // If the data is null we don't send the chart.
|
||||
+ return null;
|
||||
+ }
|
||||
+ chart.add("data", data);
|
||||
+ } catch (Throwable t) {
|
||||
+ if (logFailedRequests) {
|
||||
+ Bukkit.getLogger().log(Level.WARNING, "Failed to get data for custom chart with id " + chartId, t);
|
||||
+ }
|
||||
+ return null;
|
||||
+ }
|
||||
+ return chart;
|
||||
+ }
|
||||
+
|
||||
+ protected abstract JsonObject getChartData() throws Exception;
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Represents a custom simple pie.
|
||||
+ */
|
||||
+ public static class SimplePie extends CustomChart {
|
||||
+
|
||||
+ private final Callable<String> callable;
|
||||
+
|
||||
+ /**
|
||||
+ * Class constructor.
|
||||
+ *
|
||||
+ * @param chartId The id of the chart.
|
||||
+ * @param callable The callable which is used to request the chart data.
|
||||
+ */
|
||||
+ public SimplePie(String chartId, Callable<String> callable) {
|
||||
+ super(chartId);
|
||||
+ this.callable = callable;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected JsonObject getChartData() throws Exception {
|
||||
+ JsonObject data = new JsonObject();
|
||||
+ String value = callable.call();
|
||||
+ if (value == null || value.isEmpty()) {
|
||||
+ // Null = skip the chart
|
||||
+ return null;
|
||||
+ }
|
||||
+ data.addProperty("value", value);
|
||||
+ return data;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Represents a custom advanced pie.
|
||||
+ */
|
||||
+ public static class AdvancedPie extends CustomChart {
|
||||
+
|
||||
+ private final Callable<Map<String, Integer>> callable;
|
||||
+
|
||||
+ /**
|
||||
+ * Class constructor.
|
||||
+ *
|
||||
+ * @param chartId The id of the chart.
|
||||
+ * @param callable The callable which is used to request the chart data.
|
||||
+ */
|
||||
+ public AdvancedPie(String chartId, Callable<Map<String, Integer>> callable) {
|
||||
+ super(chartId);
|
||||
+ this.callable = callable;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected JsonObject getChartData() throws Exception {
|
||||
+ JsonObject data = new JsonObject();
|
||||
+ JsonObject values = new JsonObject();
|
||||
+ Map<String, Integer> map = callable.call();
|
||||
+ if (map == null || map.isEmpty()) {
|
||||
+ // Null = skip the chart
|
||||
+ return null;
|
||||
+ }
|
||||
+ boolean allSkipped = true;
|
||||
+ for (Map.Entry<String, Integer> entry : map.entrySet()) {
|
||||
+ if (entry.getValue() == 0) {
|
||||
+ continue; // Skip this invalid
|
||||
+ }
|
||||
+ allSkipped = false;
|
||||
+ values.addProperty(entry.getKey(), entry.getValue());
|
||||
+ }
|
||||
+ if (allSkipped) {
|
||||
+ // Null = skip the chart
|
||||
+ return null;
|
||||
+ }
|
||||
+ data.add("values", values);
|
||||
+ return data;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Represents a custom drilldown pie.
|
||||
+ */
|
||||
+ public static class DrilldownPie extends CustomChart {
|
||||
+
|
||||
+ private final Callable<Map<String, Map<String, Integer>>> callable;
|
||||
+
|
||||
+ /**
|
||||
+ * Class constructor.
|
||||
+ *
|
||||
+ * @param chartId The id of the chart.
|
||||
+ * @param callable The callable which is used to request the chart data.
|
||||
+ */
|
||||
+ public DrilldownPie(String chartId, Callable<Map<String, Map<String, Integer>>> callable) {
|
||||
+ super(chartId);
|
||||
+ this.callable = callable;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public JsonObject getChartData() throws Exception {
|
||||
+ JsonObject data = new JsonObject();
|
||||
+ JsonObject values = new JsonObject();
|
||||
+ Map<String, Map<String, Integer>> map = callable.call();
|
||||
+ if (map == null || map.isEmpty()) {
|
||||
+ // Null = skip the chart
|
||||
+ return null;
|
||||
+ }
|
||||
+ boolean reallyAllSkipped = true;
|
||||
+ for (Map.Entry<String, Map<String, Integer>> entryValues : map.entrySet()) {
|
||||
+ JsonObject value = new JsonObject();
|
||||
+ boolean allSkipped = true;
|
||||
+ for (Map.Entry<String, Integer> valueEntry : map.get(entryValues.getKey()).entrySet()) {
|
||||
+ value.addProperty(valueEntry.getKey(), valueEntry.getValue());
|
||||
+ allSkipped = false;
|
||||
+ }
|
||||
+ if (!allSkipped) {
|
||||
+ reallyAllSkipped = false;
|
||||
+ values.add(entryValues.getKey(), value);
|
||||
+ }
|
||||
+ }
|
||||
+ if (reallyAllSkipped) {
|
||||
+ // Null = skip the chart
|
||||
+ return null;
|
||||
+ }
|
||||
+ data.add("values", values);
|
||||
+ return data;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Represents a custom single line chart.
|
||||
+ */
|
||||
+ public static class SingleLineChart extends CustomChart {
|
||||
+
|
||||
+ private final Callable<Integer> callable;
|
||||
+
|
||||
+ /**
|
||||
+ * Class constructor.
|
||||
+ *
|
||||
+ * @param chartId The id of the chart.
|
||||
+ * @param callable The callable which is used to request the chart data.
|
||||
+ */
|
||||
+ public SingleLineChart(String chartId, Callable<Integer> callable) {
|
||||
+ super(chartId);
|
||||
+ this.callable = callable;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected JsonObject getChartData() throws Exception {
|
||||
+ JsonObject data = new JsonObject();
|
||||
+ int value = callable.call();
|
||||
+ if (value == 0) {
|
||||
+ // Null = skip the chart
|
||||
+ return null;
|
||||
+ }
|
||||
+ data.addProperty("value", value);
|
||||
+ return data;
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Represents a custom multi line chart.
|
||||
+ */
|
||||
+ public static class MultiLineChart extends CustomChart {
|
||||
+
|
||||
+ private final Callable<Map<String, Integer>> callable;
|
||||
+
|
||||
+ /**
|
||||
+ * Class constructor.
|
||||
+ *
|
||||
+ * @param chartId The id of the chart.
|
||||
+ * @param callable The callable which is used to request the chart data.
|
||||
+ */
|
||||
+ public MultiLineChart(String chartId, Callable<Map<String, Integer>> callable) {
|
||||
+ super(chartId);
|
||||
+ this.callable = callable;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected JsonObject getChartData() throws Exception {
|
||||
+ JsonObject data = new JsonObject();
|
||||
+ JsonObject values = new JsonObject();
|
||||
+ Map<String, Integer> map = callable.call();
|
||||
+ if (map == null || map.isEmpty()) {
|
||||
+ // Null = skip the chart
|
||||
+ return null;
|
||||
+ }
|
||||
+ boolean allSkipped = true;
|
||||
+ for (Map.Entry<String, Integer> entry : map.entrySet()) {
|
||||
+ if (entry.getValue() == 0) {
|
||||
+ continue; // Skip this invalid
|
||||
+ }
|
||||
+ allSkipped = false;
|
||||
+ values.addProperty(entry.getKey(), entry.getValue());
|
||||
+ }
|
||||
+ if (allSkipped) {
|
||||
+ // Null = skip the chart
|
||||
+ return null;
|
||||
+ }
|
||||
+ data.add("values", values);
|
||||
+ return data;
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Represents a custom simple bar chart.
|
||||
+ */
|
||||
+ public static class SimpleBarChart extends CustomChart {
|
||||
+
|
||||
+ private final Callable<Map<String, Integer>> callable;
|
||||
+
|
||||
+ /**
|
||||
+ * Class constructor.
|
||||
+ *
|
||||
+ * @param chartId The id of the chart.
|
||||
+ * @param callable The callable which is used to request the chart data.
|
||||
+ */
|
||||
+ public SimpleBarChart(String chartId, Callable<Map<String, Integer>> callable) {
|
||||
+ super(chartId);
|
||||
+ this.callable = callable;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected JsonObject getChartData() throws Exception {
|
||||
+ JsonObject data = new JsonObject();
|
||||
+ JsonObject values = new JsonObject();
|
||||
+ Map<String, Integer> map = callable.call();
|
||||
+ if (map == null || map.isEmpty()) {
|
||||
+ // Null = skip the chart
|
||||
+ return null;
|
||||
+ }
|
||||
+ for (Map.Entry<String, Integer> entry : map.entrySet()) {
|
||||
+ JsonArray categoryValues = new JsonArray();
|
||||
+ categoryValues.add(entry.getValue());
|
||||
+ values.add(entry.getKey(), categoryValues);
|
||||
+ }
|
||||
+ data.add("values", values);
|
||||
+ return data;
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Represents a custom advanced bar chart.
|
||||
+ */
|
||||
+ public static class AdvancedBarChart extends CustomChart {
|
||||
+
|
||||
+ private final Callable<Map<String, int[]>> callable;
|
||||
+
|
||||
+ /**
|
||||
+ * Class constructor.
|
||||
+ *
|
||||
+ * @param chartId The id of the chart.
|
||||
+ * @param callable The callable which is used to request the chart data.
|
||||
+ */
|
||||
+ public AdvancedBarChart(String chartId, Callable<Map<String, int[]>> callable) {
|
||||
+ super(chartId);
|
||||
+ this.callable = callable;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected JsonObject getChartData() throws Exception {
|
||||
+ JsonObject data = new JsonObject();
|
||||
+ JsonObject values = new JsonObject();
|
||||
+ Map<String, int[]> map = callable.call();
|
||||
+ if (map == null || map.isEmpty()) {
|
||||
+ // Null = skip the chart
|
||||
+ return null;
|
||||
+ }
|
||||
+ boolean allSkipped = true;
|
||||
+ for (Map.Entry<String, int[]> entry : map.entrySet()) {
|
||||
+ if (entry.getValue().length == 0) {
|
||||
+ continue; // Skip this invalid
|
||||
+ }
|
||||
+ allSkipped = false;
|
||||
+ JsonArray categoryValues = new JsonArray();
|
||||
+ for (int categoryValue : entry.getValue()) {
|
||||
+ categoryValues.add(categoryValue);
|
||||
+ }
|
||||
+ values.add(entry.getKey(), categoryValues);
|
||||
+ }
|
||||
+ if (allSkipped) {
|
||||
+ // Null = skip the chart
|
||||
+ return null;
|
||||
+ }
|
||||
+ data.add("values", values);
|
||||
+ return data;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ static class PurpurMetrics {
|
||||
+ static void startMetrics() {
|
||||
+ File configFile = new File(new File((File) MinecraftServer.getServer().options.valueOf("plugins"), "bStats"), "config.yml");
|
||||
+ YamlConfiguration config = YamlConfiguration.loadConfiguration(configFile);
|
||||
+ if (!config.isSet("serverUuid")) {
|
||||
+ config.addDefault("enabled", true);
|
||||
+ config.addDefault("serverUuid", UUID.randomUUID().toString());
|
||||
+ config.addDefault("logFailedRequests", false);
|
||||
+ config.options().header(
|
||||
+ "bStats collects some data for plugin authors like how many servers are using their plugins.\n" +
|
||||
+ "To honor their work, you should not disable it.\n" +
|
||||
+ "This has nearly no effect on the server performance!\n" +
|
||||
+ "Check out https://bStats.org/ to learn more :)"
|
||||
+ ).copyDefaults(true);
|
||||
+ try {
|
||||
+ config.save(configFile);
|
||||
+ } catch (IOException ignored) {
|
||||
+ }
|
||||
+ }
|
||||
+ String serverUUID = config.getString("serverUuid");
|
||||
+ boolean logFailedRequests = config.getBoolean("logFailedRequests", false);
|
||||
+ if (config.getBoolean("enabled", true)) {
|
||||
+ Metrics metrics = new Metrics("Purpur", serverUUID, logFailedRequests, Bukkit.getLogger());
|
||||
+
|
||||
+ metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> {
|
||||
+ String minecraftVersion = Bukkit.getVersion();
|
||||
+ minecraftVersion = minecraftVersion.substring(minecraftVersion.indexOf("MC: ") + 4, minecraftVersion.length() - 1);
|
||||
+ return minecraftVersion;
|
||||
+ }));
|
||||
+
|
||||
+ metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size()));
|
||||
+ metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() ? "online" : (Bukkit.spigot().getSpigotConfig().getBoolean("settings.bungeecord") ? "bungee" : "offline")));
|
||||
+ metrics.addCustomChart(new Metrics.SimplePie("purpur_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown"));
|
||||
+
|
||||
+ metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> {
|
||||
+ Map<String, Map<String, Integer>> map = new HashMap<>();
|
||||
+ String javaVersion = System.getProperty("java.version");
|
||||
+ Map<String, Integer> entry = new HashMap<>();
|
||||
+ entry.put(javaVersion, 1);
|
||||
+
|
||||
+ // http://openjdk.java.net/jeps/223
|
||||
+ // Java decided to change their versioning scheme and in doing so modified the java.version system
|
||||
+ // property to return $major[.$minor][.$secuity][-ea], as opposed to 1.$major.0_$identifier
|
||||
+ // we can handle pre-9 by checking if the "major" is equal to "1", otherwise, 9+
|
||||
+ String majorVersion = javaVersion.split("\\.")[0];
|
||||
+ String release;
|
||||
+
|
||||
+ int indexOf = javaVersion.lastIndexOf('.');
|
||||
+
|
||||
+ if (majorVersion.equals("1")) {
|
||||
+ release = "Java " + javaVersion.substring(0, indexOf);
|
||||
+ } else {
|
||||
+ // of course, it really wouldn't be all that simple if they didn't add a quirk, now would it
|
||||
+ // valid strings for the major may potentially include values such as -ea to deannotate a pre release
|
||||
+ Matcher versionMatcher = Pattern.compile("\\d+").matcher(majorVersion);
|
||||
+ if (versionMatcher.find()) {
|
||||
+ majorVersion = versionMatcher.group(0);
|
||||
+ }
|
||||
+ release = "Java " + majorVersion;
|
||||
+ }
|
||||
+ map.put(release, entry);
|
||||
+
|
||||
+ return map;
|
||||
+ }));
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
new file mode 100644
|
||||
index 0000000000..83466b5837
|
||||
index 000000000..333c880bf
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -0,0 +1,136 @@
|
||||
@@ -0,0 +1,130 @@
|
||||
+package net.pl3x.purpur;
|
||||
+
|
||||
+import com.google.common.base.Throwables;
|
||||
@@ -724,7 +121,6 @@ index 0000000000..83466b5837
|
||||
+ public static YamlConfiguration config;
|
||||
+
|
||||
+ private static Map<String, Command> commands;
|
||||
+ private static boolean metricsStarted;
|
||||
+
|
||||
+ static int version;
|
||||
+ static boolean verbose;
|
||||
@@ -766,11 +162,6 @@ index 0000000000..83466b5837
|
||||
+ for (Map.Entry<String, Command> entry : commands.entrySet()) {
|
||||
+ MinecraftServer.getServer().server.getCommandMap().register(entry.getKey(), "Purpur", entry.getValue());
|
||||
+ }
|
||||
+
|
||||
+ if (!metricsStarted) {
|
||||
+ Metrics.PurpurMetrics.startMetrics();
|
||||
+ metricsStarted = true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ static void readConfig(Class<?> clazz, Object instance) {
|
||||
@@ -828,7 +219,7 @@ index 0000000000..83466b5837
|
||||
+}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
new file mode 100644
|
||||
index 0000000000..eda37fa43f
|
||||
index 000000000..eda37fa43
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -0,0 +1,67 @@
|
||||
@@ -901,7 +292,7 @@ index 0000000000..eda37fa43f
|
||||
+}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/command/PurpurCommand.java b/src/main/java/net/pl3x/purpur/command/PurpurCommand.java
|
||||
new file mode 100644
|
||||
index 0000000000..7d983d9a54
|
||||
index 000000000..7d983d9a5
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/command/PurpurCommand.java
|
||||
@@ -0,0 +1,67 @@
|
||||
@@ -973,10 +364,10 @@ index 0000000000..7d983d9a54
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 76fbbb620c..aa084a56b2 100644
|
||||
index d98011b6e..0d0058c94 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -806,6 +806,7 @@ public final class CraftServer implements Server {
|
||||
@@ -807,6 +807,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||
com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper
|
||||
@@ -984,7 +375,7 @@ index 76fbbb620c..aa084a56b2 100644
|
||||
for (WorldServer world : console.getWorlds()) {
|
||||
world.worldData.setDifficulty(config.difficulty);
|
||||
world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals);
|
||||
@@ -834,6 +835,7 @@ public final class CraftServer implements Server {
|
||||
@@ -835,6 +836,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
world.spigotConfig.init(); // Spigot
|
||||
world.paperConfig.init(); // Paper
|
||||
@@ -992,7 +383,7 @@ index 76fbbb620c..aa084a56b2 100644
|
||||
}
|
||||
|
||||
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
|
||||
@@ -852,6 +854,7 @@ public final class CraftServer implements Server {
|
||||
@@ -853,6 +855,7 @@ public final class CraftServer implements Server {
|
||||
reloadData();
|
||||
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
||||
com.destroystokyo.paper.PaperConfig.registerCommands(); // Paper
|
||||
@@ -1000,7 +391,7 @@ index 76fbbb620c..aa084a56b2 100644
|
||||
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
||||
@@ -2092,6 +2095,18 @@ public final class CraftServer implements Server {
|
||||
@@ -2093,6 +2096,18 @@ public final class CraftServer implements Server {
|
||||
return com.destroystokyo.paper.PaperConfig.config;
|
||||
}
|
||||
|
||||
@@ -1020,7 +411,7 @@ index 76fbbb620c..aa084a56b2 100644
|
||||
public void restart() {
|
||||
org.spigotmc.RestartCommand.restart();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index cb60310e63..fc2c313901 100644
|
||||
index 093dbeae2..e05bfa352 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -138,6 +138,14 @@ public class Main {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 70383ed7cde19a9d417b1c1f0defb4784ab5ef7f Mon Sep 17 00:00:00 2001
|
||||
From 219ff737bfd7175c99cc7ab05733cd32ebee471d Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Thu, 26 Mar 2020 13:17:09 -0500
|
||||
Subject: [PATCH] Add language asset purpur.lang
|
||||
@@ -12,10 +12,10 @@ Subject: [PATCH] Add language asset purpur.lang
|
||||
create mode 100644 src/main/resources/purpur.lang
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 079ddc71..1d921212 100644
|
||||
index 0f9bca8b8..90c5dc1d6 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1558,6 +1558,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1560,6 +1560,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
|
||||
public void a(IChatBaseComponent ichatbasecomponent, ChatMessageType chatmessagetype) {
|
||||
@@ -24,7 +24,7 @@ index 079ddc71..1d921212 100644
|
||||
if (!future.isSuccess() && (chatmessagetype == ChatMessageType.GAME_INFO || chatmessagetype == ChatMessageType.SYSTEM)) {
|
||||
boolean flag = true;
|
||||
diff --git a/src/main/java/net/minecraft/server/LocaleLanguage.java b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||
index 60127393..75707adc 100644
|
||||
index 601273933..75707adcd 100644
|
||||
--- a/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||
+++ b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||
@@ -15,18 +15,41 @@ import java.util.Map.Entry;
|
||||
@@ -104,7 +104,7 @@ index 60127393..75707adc 100644
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/command/PurpurCommand.java b/src/main/java/net/pl3x/purpur/command/PurpurCommand.java
|
||||
index 7d983d9a..36260e0e 100644
|
||||
index 7d983d9a5..36260e0ec 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/command/PurpurCommand.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/command/PurpurCommand.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@@ -125,7 +125,7 @@ index 7d983d9a..36260e0e 100644
|
||||
for (WorldServer world : console.getWorlds()) {
|
||||
diff --git a/src/main/resources/purpur.lang b/src/main/resources/purpur.lang
|
||||
new file mode 100644
|
||||
index 00000000..0967ef42
|
||||
index 000000000..0967ef424
|
||||
--- /dev/null
|
||||
+++ b/src/main/resources/purpur.lang
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From c86a00013a0ea39096208b3be3d88f744018dc4c Mon Sep 17 00:00:00 2001
|
||||
From 7401e76df06e0028a842fa4415106ec401a9bc3a Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Tue, 18 Feb 2020 20:38:34 -0600
|
||||
Subject: [PATCH] Host our own timings
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] Host our own timings
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 83466b5837..ccc80a00d0 100644
|
||||
index 333c880bf..2673de821 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -133,4 +133,8 @@ public class PurpurConfig {
|
||||
@@ -127,4 +127,8 @@ public class PurpurConfig {
|
||||
config.addDefault(path, def);
|
||||
return config.getString(path, config.getString(path));
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 316bdb85e6f5f5596abc3d5cd031d2f307b83871 Mon Sep 17 00:00:00 2001
|
||||
From 7c346b610d849a6e4c336cfce086c7935af9b3c2 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Thu, 6 Feb 2020 19:53:59 -0600
|
||||
Subject: [PATCH] Ridables
|
||||
@@ -198,7 +198,7 @@ index 816d301f1..f7344d3ae 100644
|
||||
this.C = true;
|
||||
return this;
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index a69969f46..46d802a2f 100644
|
||||
index 14ba037c1..f630edb37 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -79,7 +79,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -316,7 +316,7 @@ index a69969f46..46d802a2f 100644
|
||||
public void l(float f) {}
|
||||
|
||||
public boolean bA() {
|
||||
@@ -3435,4 +3453,43 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -3437,4 +3455,43 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
void accept(Entity entity, double d0, double d1, double d2);
|
||||
}
|
||||
@@ -2282,7 +2282,7 @@ index 5782a25ec..c87fc523f 100644
|
||||
+ protected void ez() { if (world.purpurConfig.zombieHorseCanSwim) goalSelector.a(0, new PathfinderGoalFloat(this)); } // Purpur
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index 2e186134e..16ccabfd5 100644
|
||||
index 7df24be46..27cfc6654 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -374,9 +374,21 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -2350,7 +2350,7 @@ index 81b7cd06f..3e6722cfc 100644
|
||||
this.targetSelector.a(2, (new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)).a(300));
|
||||
this.targetSelector.a(3, (new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)).a(300));
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index 1991cee43..d0a5687f0 100644
|
||||
index 5aca7a913..cbbbc875b 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -28,7 +28,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -2497,7 +2497,7 @@ index 7f6a56776..288a043fb 100644
|
||||
float f1 = 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.2F;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index dfb9421a1..53925d526 100644
|
||||
index 3fc2360a1..58aa2a9a3 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -75,7 +75,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2512,7 +2512,7 @@ index dfb9421a1..53925d526 100644
|
||||
@@ -92,9 +92,9 @@ public abstract class EntityLiving extends Entity {
|
||||
protected int aW; protected int getKillCount() { return this.aW; } // Paper - OBFHELPER
|
||||
public float lastDamage;
|
||||
public boolean jumping; // Paper - protected -> public
|
||||
public boolean jumping; // Paper
|
||||
- public float aZ;
|
||||
- public float ba;
|
||||
- public float bb;
|
||||
@@ -2531,7 +2531,7 @@ index dfb9421a1..53925d526 100644
|
||||
}
|
||||
|
||||
protected void cD() {
|
||||
@@ -2085,12 +2085,12 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2098,12 +2098,12 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2547,7 +2547,7 @@ index dfb9421a1..53925d526 100644
|
||||
|
||||
if (this.hasEffect(MobEffects.JUMP)) {
|
||||
f += 0.1F * (float) (this.getEffect(MobEffects.JUMP).getAmplifier() + 1);
|
||||
@@ -2098,6 +2098,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2111,6 +2111,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
Vec3D vec3d = this.getMot();
|
||||
|
||||
@@ -2555,7 +2555,7 @@ index dfb9421a1..53925d526 100644
|
||||
this.setMot(vec3d.x, (double) f, vec3d.z);
|
||||
if (this.isSprinting()) {
|
||||
float f1 = this.yaw * 0.017453292F;
|
||||
@@ -2316,11 +2317,11 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2329,11 +2330,11 @@ public abstract class EntityLiving extends Entity {
|
||||
return this.onGround ? this.dt() * (0.21600002F / (f * f * f)) : this.aM;
|
||||
}
|
||||
|
||||
@@ -3387,10 +3387,10 @@ index 0357c9da9..98a657cec 100644
|
||||
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true));
|
||||
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false));
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 1d921212c..8404fc4e3 100644
|
||||
index 90c5dc1d6..db54bcc7e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1289,6 +1289,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1291,6 +1291,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
|
||||
public void a(float f, float f1, boolean flag, boolean flag1) {
|
||||
@@ -3398,7 +3398,7 @@ index 1d921212c..8404fc4e3 100644
|
||||
if (this.isPassenger()) {
|
||||
if (f >= -1.0F && f <= 1.0F) {
|
||||
this.aZ = f;
|
||||
@@ -1301,7 +1302,6 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1303,7 +1304,6 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
this.jumping = flag;
|
||||
this.setSneaking(flag1);
|
||||
}
|
||||
@@ -4593,7 +4593,7 @@ index cf274666c..d919f44ab 100644
|
||||
Vec3D vec3d = new Vec3D(this.b - EntityVex.this.locX(), this.c - EntityVex.this.locY(), this.d - EntityVex.this.locZ());
|
||||
double d0 = vec3d.f();
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
index 6e0020ae0..3eaac031f 100644
|
||||
index ef2ee68cd..c78a77a4a 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
@@ -68,6 +68,28 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@@ -5260,10 +5260,10 @@ index 0c7f094e5..62a081006 100644
|
||||
return new Vec3D(this.x * d0, this.y * d1, this.z * d2);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 5a8271e31..2735b5252 100644
|
||||
index d0896d944..28c8fd3d4 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -977,6 +977,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -985,6 +985,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5271,7 +5271,7 @@ index 5a8271e31..2735b5252 100644
|
||||
public boolean a(AxisAlignedBB axisalignedbb, Material material) {
|
||||
int i = MathHelper.floor(axisalignedbb.minX);
|
||||
int j = MathHelper.f(axisalignedbb.maxX);
|
||||
@@ -1612,4 +1613,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -1620,4 +1621,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@Override public BiomeManager d() {
|
||||
return this.biomeManager;
|
||||
}
|
||||
@@ -6523,10 +6523,10 @@ index 000000000..6e50344c0
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index dfa15372b..350aa6754 100644
|
||||
index ff60568ce..ef64cfade 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1057,4 +1057,31 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -1059,4 +1059,31 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return getHandle().spawnReason;
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From deaf74d47f71b21d051c46207f2c6ca6877e93a4 Mon Sep 17 00:00:00 2001
|
||||
From 52c4f9df3b07759bf0646e895f9955d822707ae0 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 19 Oct 2019 00:52:12 -0500
|
||||
Subject: [PATCH] Logger settings (suppressing pointless logs)
|
||||
@@ -11,7 +11,7 @@ Subject: [PATCH] Logger settings (suppressing pointless logs)
|
||||
4 files changed, 12 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/GenericAttributes.java b/src/main/java/net/minecraft/server/GenericAttributes.java
|
||||
index 469e293c25..ca58302cf7 100644
|
||||
index 469e293c2..ca58302cf 100644
|
||||
--- a/src/main/java/net/minecraft/server/GenericAttributes.java
|
||||
+++ b/src/main/java/net/minecraft/server/GenericAttributes.java
|
||||
@@ -79,6 +79,7 @@ public class GenericAttributes {
|
||||
@@ -23,7 +23,7 @@ index 469e293c25..ca58302cf7 100644
|
||||
} else {
|
||||
a(attributeinstance, nbttagcompound);
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldGenFeatureConfigured.java b/src/main/java/net/minecraft/server/WorldGenFeatureConfigured.java
|
||||
index 73402f2b5a..1c2320cc54 100644
|
||||
index 73402f2b5..1c2320cc5 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldGenFeatureConfigured.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldGenFeatureConfigured.java
|
||||
@@ -47,6 +47,7 @@ public class WorldGenFeatureConfigured<FC extends WorldGenFeatureConfiguration,
|
||||
@@ -35,10 +35,10 @@ index 73402f2b5a..1c2320cc54 100644
|
||||
return new WorldGenFeatureConfigured<>(WorldGenerator.NO_OP, WorldGenFeatureEmptyConfiguration.e);
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index ccc80a00d0..3ddd11219d 100644
|
||||
index 2673de821..852bbf8b8 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -134,6 +134,15 @@ public class PurpurConfig {
|
||||
@@ -128,6 +128,15 @@ public class PurpurConfig {
|
||||
return config.getString(path, config.getString(path));
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ index ccc80a00d0..3ddd11219d 100644
|
||||
getString("settings.timings.url", "https://timings.pl3x.net");
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java b/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java
|
||||
index 049e9f98de..1d179cd5bc 100644
|
||||
index 049e9f98d..1d179cd5b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java
|
||||
@@ -254,6 +254,7 @@ public final class CraftLegacy {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 610c69409a91f4e0ce7064b6de652df2375d81e9 Mon Sep 17 00:00:00 2001
|
||||
From f93e01c96967071c18cd68ba86a5e21168256f73 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 15 Dec 2019 12:53:59 -0600
|
||||
Subject: [PATCH] Disable outdated build check
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH] Disable outdated build check
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index fc2c313901..7b7e1475b3 100644
|
||||
index e05bfa352..9f61c266c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -220,7 +220,7 @@ public class Main {
|
||||
@@ -17,7 +17,7 @@ index fc2c313901..7b7e1475b3 100644
|
||||
|
||||
- if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
|
||||
+ if (false) { // Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { // Purpur
|
||||
Date buildDate = new SimpleDateFormat("yyyyMMdd-HHmm").parse(Main.class.getPackage().getImplementationVendor());
|
||||
Date buildDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").parse(Main.class.getPackage().getImplementationVendor()); // Paper
|
||||
|
||||
Calendar deadline = Calendar.getInstance();
|
||||
--
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 59166b4adddd81bd0000487ca5d07c6f360a8c90 Mon Sep 17 00:00:00 2001
|
||||
From ee88642c8335366ee44406a6fe24d5f9ffebf436 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 4 May 2019 01:10:30 -0500
|
||||
Subject: [PATCH] Cows eat mushrooms
|
||||
@@ -11,7 +11,7 @@ Subject: [PATCH] Cows eat mushrooms
|
||||
4 files changed, 77 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 46d802a2f..d91c54fa9 100644
|
||||
index f630edb37..3e9406b15 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1081,6 +1081,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -124,10 +124,10 @@ index 723a9fa1e..f56fd7c01 100644
|
||||
public EntityCow createChild(EntityAgeable entityageable) {
|
||||
return (EntityCow) EntityTypes.COW.a(this.world);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 53925d526..01c0919f6 100644
|
||||
index 58aa2a9a3..ea245de18 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -2818,8 +2818,9 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2831,8 +2831,9 @@ public abstract class EntityLiving extends Entity {
|
||||
this.aK = f;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From e54170b6d577a2181df7e086192d6ce36f2b2e1e Mon Sep 17 00:00:00 2001
|
||||
From 568d19020fef0517534ac04e78c4c28e6eff977b Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 6 Jun 2019 17:40:30 -0500
|
||||
Subject: [PATCH] Signs allow color codes
|
||||
@@ -11,10 +11,10 @@ Subject: [PATCH] Signs allow color codes
|
||||
4 files changed, 25 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 8404fc4e3..51933a490 100644
|
||||
index db54bcc7e..192ec4378 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1129,6 +1129,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1131,6 +1131,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@Override
|
||||
public void openSign(TileEntitySign tileentitysign) {
|
||||
tileentitysign.a((EntityHuman) this);
|
||||
@@ -23,10 +23,10 @@ index 8404fc4e3..51933a490 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index b62535ba0..3c37d032c 100644
|
||||
index fb5cd5822..1a6cb78c5 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -2581,6 +2581,14 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -2588,6 +2588,14 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From d4b3b26b599b3d303639c11b0acde523a9c518b7 Mon Sep 17 00:00:00 2001
|
||||
From 0df012f549c0e7424ebd2f19a31c43f8a995a651 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 19 May 2019 18:11:53 -0500
|
||||
Subject: [PATCH] Campfires have regen effect
|
||||
@@ -25,10 +25,10 @@ index 6303be944..65f8d803b 100644
|
||||
public static final BlockStateDirection e = BlockProperties.N;
|
||||
private static final VoxelShape f = Block.a(6.0D, 0.0D, 6.0D, 10.0D, 16.0D, 10.0D);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 01c0919f6..fdc32d986 100644
|
||||
index ea245de18..10c222ddb 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -2778,10 +2778,19 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2791,10 +2791,19 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
public boolean hasLineOfSight(Entity entity) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From c40b22f93084636469edffdd4fd697c371d85e6a Mon Sep 17 00:00:00 2001
|
||||
From b4c47eaa925f8d7de7aa66f7d2791d0ebd8145a5 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 6 Jul 2019 17:00:04 -0500
|
||||
Subject: [PATCH] Dont send useless entity packets
|
||||
@@ -66,10 +66,10 @@ index e5da2b19c..5b1d95935 100644
|
||||
protected boolean h;
|
||||
protected boolean i;
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 3ddd11219..c8940f52b 100644
|
||||
index 852bbf8b8..c9cf6f3bb 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -143,6 +143,11 @@ public class PurpurConfig {
|
||||
@@ -137,6 +137,11 @@ public class PurpurConfig {
|
||||
loggerSuppressWorldGenFeatureDeserializationError = getBoolean("settings.logger.suppress-world-gen-feature-deserialization-errors", loggerSuppressWorldGenFeatureDeserializationError);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 4788da0f8b7426b22c442457a2259c85b151b02a Mon Sep 17 00:00:00 2001
|
||||
From e0d27800ad2634b7b2dc0ed66dca4b664c9fe5d6 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 8 Aug 2019 15:29:15 -0500
|
||||
Subject: [PATCH] Implement AFK API
|
||||
@@ -18,7 +18,7 @@ Subject: [PATCH] Implement AFK API
|
||||
11 files changed, 111 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 478ddf34e..7658d257d 100644
|
||||
index 153596b94..eed7878a4 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1420,6 +1420,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -30,7 +30,7 @@ index 478ddf34e..7658d257d 100644
|
||||
double d3 = this.locX() - d0;
|
||||
double d4 = this.locY() - d1;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index 16ccabfd5..5ac3c4641 100644
|
||||
index 27cfc6654..d62174e9c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -86,6 +86,15 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -50,10 +50,10 @@ index 16ccabfd5..5ac3c4641 100644
|
||||
super(EntityTypes.PLAYER, world);
|
||||
this.bV = ItemStack.a;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index ea5dc1c4e..a99eb77b0 100644
|
||||
index 192ec4378..40a2308e4 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1622,8 +1622,51 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1624,8 +1624,51 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
public void resetIdleTimer() {
|
||||
this.cj = SystemUtils.getMonotonicMillis();
|
||||
@@ -171,7 +171,7 @@ index 1398c47a2..0bf1a14b7 100644
|
||||
public static Predicate<Entity> a(double d0, double d1, double d2, double d3) {
|
||||
double d4 = d3 * d3;
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 3c37d032c..c1a4697ae 100644
|
||||
index 1a6cb78c5..80770d1ef 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -224,6 +224,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -250,7 +250,7 @@ index d6405b2ec..41dd1b861 100644
|
||||
public boolean batRidableInWater = false;
|
||||
public boolean batRequireShiftToMount = true;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index b76379a17..b7571d086 100644
|
||||
index 3515b7268..00f7fc3ec 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2079,4 +2079,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -276,10 +276,10 @@ index b76379a17..b7571d086 100644
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 795817177..17c4d7ec9 100644
|
||||
index 92f19fcbb..7b1b0c767 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -146,6 +146,7 @@ public class ActivationRange
|
||||
@@ -216,6 +216,7 @@ public class ActivationRange
|
||||
{
|
||||
|
||||
player.activatedTick = MinecraftServer.currentTick;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From b2e5b630186b78d553acbafa04382372ab65536d Mon Sep 17 00:00:00 2001
|
||||
From b92e256e7ef06b9ac02a78cd870f085556d9008d Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 21 Jul 2019 18:01:46 -0500
|
||||
Subject: [PATCH] Players should not cram to death
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] Players should not cram to death
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index a021c111c..28bbed560 100644
|
||||
index 40a2308e4..2453f0149 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1102,7 +1102,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1104,7 +1104,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
@Override
|
||||
public boolean isInvulnerable(DamageSource damagesource) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 8e2baf041cd18abd2f9179aea815ebd782ba3b45 Mon Sep 17 00:00:00 2001
|
||||
From f645248ee974a8387fa60bc2256f0d751f78b287 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 25 Jul 2019 18:07:37 -0500
|
||||
Subject: [PATCH] Implement elytra settings
|
||||
@@ -13,10 +13,10 @@ Subject: [PATCH] Implement elytra settings
|
||||
6 files changed, 49 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index cf222a9a1..53f018232 100644
|
||||
index 21b5bc47d..c1cc24cf1 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -2645,9 +2645,16 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2658,9 +2658,16 @@ public abstract class EntityLiving extends Entity {
|
||||
if (itemstack.getItem() == Items.ELYTRA && ItemElytra.e(itemstack)) {
|
||||
flag = true;
|
||||
if (!this.world.isClientSide && (this.bm + 1) % 20 == 0) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 7b2ee274cd45ac5c65e7091dc948002c918f508f Mon Sep 17 00:00:00 2001
|
||||
From f004dc243cc99e23afb84fb4a81290463484fd90 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Tue, 23 Jul 2019 10:07:16 -0500
|
||||
Subject: [PATCH] Implement lagging threshold
|
||||
@@ -30,10 +30,10 @@ index 8207e7f8a..4d25bd747 100644
|
||||
}
|
||||
midTickChunksTasksRan = 0; // Paper
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index c8940f52b..d3729c089 100644
|
||||
index c9cf6f3bb..08d8e321b 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -143,6 +143,11 @@ public class PurpurConfig {
|
||||
@@ -137,6 +137,11 @@ public class PurpurConfig {
|
||||
loggerSuppressWorldGenFeatureDeserializationError = getBoolean("settings.logger.suppress-world-gen-feature-deserialization-errors", loggerSuppressWorldGenFeatureDeserializationError);
|
||||
}
|
||||
|
||||
@@ -46,10 +46,10 @@ index c8940f52b..d3729c089 100644
|
||||
private static void dontSendUselessEntityPackets() {
|
||||
dontSendUselessEntityPackets = getBoolean("settings.dont-send-useless-entity-packets", dontSendUselessEntityPackets);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 9cb658748..588481688 100644
|
||||
index 0d0058c94..1d684a5e4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2238,4 +2238,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2239,4 +2239,11 @@ public final class CraftServer implements Server {
|
||||
return net.minecraft.server.MinecraftServer.getServer().hasStopped();
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From be6b447ecf903d1dddac136fdcdfb5de06a5c475 Mon Sep 17 00:00:00 2001
|
||||
From 01f528231a8963f906674a5e0f567d0853d07472 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 21 Jul 2019 18:06:20 -0500
|
||||
Subject: [PATCH] Climbing should not bypass cramming gamerule
|
||||
@@ -17,7 +17,7 @@ Subject: [PATCH] Climbing should not bypass cramming gamerule
|
||||
10 files changed, 26 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index ac814f4ab..8304b42cc 100644
|
||||
index 7ca7a148b..a8b1f4892 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1555,6 +1555,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -86,10 +86,10 @@ index e7ba83f32..55e18e4c7 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 53f018232..006b498fd 100644
|
||||
index c1cc24cf1..0f8ba92a8 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -2679,7 +2679,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2692,7 +2692,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return;
|
||||
}
|
||||
// Paper - end don't run getEntities if we're not going to use its result
|
||||
@@ -98,7 +98,7 @@ index 53f018232..006b498fd 100644
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
// Paper - move up
|
||||
@@ -2817,8 +2817,10 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2830,8 +2830,10 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 20877fdbc1796d3c6472796bc64c8516cd69c0b5 Mon Sep 17 00:00:00 2001
|
||||
From ecdb39d9838170d4447e8d16d9f04f726c1d1452 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 23 Aug 2019 21:56:31 -0500
|
||||
Subject: [PATCH] Option for slimes not pushable
|
||||
@@ -47,10 +47,10 @@ index 01f32659d..52ab86f0b 100644
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index d3729c089..391fe7a51 100644
|
||||
index 08d8e321b..622f1a7d8 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -153,6 +153,11 @@ public class PurpurConfig {
|
||||
@@ -147,6 +147,11 @@ public class PurpurConfig {
|
||||
dontSendUselessEntityPackets = getBoolean("settings.dont-send-useless-entity-packets", dontSendUselessEntityPackets);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 0278db5aeb7c163d4d625fea962db96af0fe23d4 Mon Sep 17 00:00:00 2001
|
||||
From 5df02f81feef148287203e7c878c1e827cd206b5 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 26 May 2019 15:19:14 -0500
|
||||
Subject: [PATCH] Bring back server name
|
||||
@@ -21,10 +21,10 @@ index 0c3ec8357..309f5562b 100644
|
||||
public final boolean spawnNpcs = this.getBoolean("spawn-npcs", true);
|
||||
public final boolean pvp = this.getBoolean("pvp", true);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 588481688..6336ee903 100644
|
||||
index 1d684a5e4..963e63271 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2240,6 +2240,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2241,6 +2241,11 @@ public final class CraftServer implements Server {
|
||||
// Paper end
|
||||
|
||||
// Purpur start
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From d74c2c524c0c2e234f1bbbed4b0eefb84e2baadd Mon Sep 17 00:00:00 2001
|
||||
From 39c3398fb9691aab354511301752d4f14a22c399 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 11 Oct 2019 00:17:39 -0500
|
||||
Subject: [PATCH] Alternative Keepalive Handling
|
||||
@@ -22,7 +22,7 @@ index 8e93f1540..470f92c4f 100644
|
||||
return this.a;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index c1a4697ae..7616d3450 100644
|
||||
index 80770d1ef..d6e24f41e 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -74,6 +74,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -55,7 +55,7 @@ index c1a4697ae..7616d3450 100644
|
||||
if (this.isPendingPing()) {
|
||||
if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected
|
||||
PlayerConnection.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getName()); // more info
|
||||
@@ -2618,6 +2634,17 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -2625,6 +2641,17 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
|
||||
@Override
|
||||
public void a(PacketPlayInKeepAlive packetplayinkeepalive) {
|
||||
@@ -74,10 +74,10 @@ index c1a4697ae..7616d3450 100644
|
||||
if (this.awaitingKeepAlive && packetplayinkeepalive.b() == this.h) {
|
||||
int i = (int) (SystemUtils.getMonotonicMillis() - this.lastKeepAlive);
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 391fe7a51..bcd6837d4 100644
|
||||
index 622f1a7d8..f4e73a0b1 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -148,6 +148,11 @@ public class PurpurConfig {
|
||||
@@ -142,6 +142,11 @@ public class PurpurConfig {
|
||||
laggingThreshold = getDouble("settings.lagging-threshold", laggingThreshold);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 2817799d1f627d5209ed009920b175fe7342fdae Mon Sep 17 00:00:00 2001
|
||||
From f14226611026de57b0faaea14f9e3bae07da3c2a Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 1 Feb 2020 22:22:16 -0600
|
||||
Subject: [PATCH] Add moon phase API
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] Add moon phase API
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index f56131e3a..de8c2cd2b 100644
|
||||
index c9e533094..677cb0e46 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -2457,6 +2457,14 @@ public class CraftWorld implements World {
|
||||
@@ -2463,6 +2463,14 @@ public class CraftWorld implements World {
|
||||
|
||||
return new CraftDragonBattle(((WorldProviderTheEnd) worldProvider).o()); // PAIL rename getDragonBattle
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 26632de6df84bea67c2147f2e4e92e59ef6022f1 Mon Sep 17 00:00:00 2001
|
||||
From 881912510a929bed8405b0c2eaa6fd61ff84b0d2 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 8 Feb 2020 23:30:17 -0600
|
||||
Subject: [PATCH] Add getPlacementBlockData to World
|
||||
@@ -66,10 +66,10 @@ index 9c9b93f28..74a722cce 100644
|
||||
public static final Item bZ = a(Blocks.CHEST, CreativeModeTab.c);
|
||||
public static final Item ca = a(Blocks.DIAMOND_ORE, CreativeModeTab.b);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index de8c2cd2b..0f5bd0a17 100644
|
||||
index 677cb0e46..83bd0a95d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -2463,6 +2463,11 @@ public class CraftWorld implements World {
|
||||
@@ -2469,6 +2469,11 @@ public class CraftWorld implements World {
|
||||
public net.pl3x.purpur.MoonPhase getMoonPhase() {
|
||||
return net.pl3x.purpur.MoonPhase.getPhase(getFullTime() / 24000L);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From f624c79c8e312166091064aed96516a7b29565be Mon Sep 17 00:00:00 2001
|
||||
From 4e404003c45a0bf8fbd2caac8d7673ce2c9a6b93 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 23 May 2019 21:50:37 -0500
|
||||
Subject: [PATCH] Barrels have 6 rows
|
||||
@@ -40,7 +40,7 @@ index 1e27abbea..ca3b6c9aa 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index bcd6837d4..7ce48323a 100644
|
||||
index f4e73a0b1..a1ba98a1f 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -7,6 +7,7 @@ import org.bukkit.Bukkit;
|
||||
@@ -51,7 +51,7 @@ index bcd6837d4..7ce48323a 100644
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -158,8 +159,16 @@ public class PurpurConfig {
|
||||
@@ -152,8 +153,16 @@ public class PurpurConfig {
|
||||
dontSendUselessEntityPackets = getBoolean("settings.dont-send-useless-entity-packets", dontSendUselessEntityPackets);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ index bcd6837d4..7ce48323a 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||
index 4f43f87cd..9f05b76ff 100644
|
||||
index 454ec3c76..d295821c5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||
@@ -195,8 +195,10 @@ public class CraftContainer extends Container {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 99b883897a80f23e309dd7b6769b5ef0f9350432 Mon Sep 17 00:00:00 2001
|
||||
From c2b7ff7ccd7b1f91deb5c4229a5f061192aedf8c Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 23 Jun 2019 17:01:26 -0500
|
||||
Subject: [PATCH] Enderchest 6 rows (plus permissions)
|
||||
@@ -58,10 +58,10 @@ index fd31b9a6d..903c02e9e 100644
|
||||
// CraftBukkit end
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 7ce48323a..16f5c9d37 100644
|
||||
index a1ba98a1f..a05c85be0 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -161,14 +161,22 @@ public class PurpurConfig {
|
||||
@@ -155,14 +155,22 @@ public class PurpurConfig {
|
||||
|
||||
public static boolean barrelSixRows = false;
|
||||
public static boolean slimeBlocksNotPushable = false;
|
||||
@@ -85,7 +85,7 @@ index 7ce48323a..16f5c9d37 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||
index 9f05b76ff..4dc632d91 100644
|
||||
index d295821c5..610cbbe85 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||
@@ -195,7 +195,7 @@ public class CraftContainer extends Container {
|
||||
@@ -98,7 +98,7 @@ index 9f05b76ff..4dc632d91 100644
|
||||
case BARREL:
|
||||
delegate = new ContainerChest(net.pl3x.purpur.PurpurConfig.barrelSixRows ? Containers.GENERIC_9X6 : Containers.GENERIC_9X3, windowId, bottom, top, top.getSize() / 9); // Purpur
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
||||
index 026a0c399..d2c06cff2 100644
|
||||
index 47827fbf1..0f5819a40 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
||||
@@ -81,7 +81,7 @@ public class CraftInventory implements Inventory {
|
||||
@@ -111,7 +111,7 @@ index 026a0c399..d2c06cff2 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java b/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java
|
||||
index d936b9284..d7b1b56d9 100644
|
||||
index 525ebf961..ee90b92af 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java
|
||||
@@ -17,6 +17,14 @@ public final class CraftDefaultPermissions {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 7e4cb3692a876a403dad9dbdf2d2a191b52c59cd Mon Sep 17 00:00:00 2001
|
||||
From 3c13882923a180b10da8aec04b8d71f6386a68a1 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 28 Jul 2019 01:27:37 -0500
|
||||
Subject: [PATCH] Add 5 second tps average in /tps
|
||||
@@ -10,7 +10,7 @@ Subject: [PATCH] Add 5 second tps average in /tps
|
||||
3 files changed, 11 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 8e46749e3..1c2153e1b 100644
|
||||
index 4d25bd747..7a7c9213d 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -183,7 +183,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -52,10 +52,10 @@ index 8e46749e3..1c2153e1b 100644
|
||||
lagging = recentTps[0] < net.pl3x.purpur.PurpurConfig.laggingThreshold; // Purpur
|
||||
tickSection = curTime;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 6336ee903..39e8a5b14 100644
|
||||
index 963e63271..4916bdce4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2050,6 +2050,7 @@ public final class CraftServer implements Server {
|
||||
@@ -2051,6 +2051,7 @@ public final class CraftServer implements Server {
|
||||
@Override
|
||||
public double[] getTPS() {
|
||||
return new double[] {
|
||||
@@ -64,7 +64,7 @@ index 6336ee903..39e8a5b14 100644
|
||||
net.minecraft.server.MinecraftServer.getServer().tps5.getAverage(),
|
||||
net.minecraft.server.MinecraftServer.getServer().tps15.getAverage()
|
||||
diff --git a/src/main/java/org/spigotmc/TicksPerSecondCommand.java b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
|
||||
index 6d21c3269..2eed9d0a4 100644
|
||||
index 387af9d5c..650f74ba3 100644
|
||||
--- a/src/main/java/org/spigotmc/TicksPerSecondCommand.java
|
||||
+++ b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
|
||||
@@ -30,7 +30,7 @@ public class TicksPerSecondCommand extends Command
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 6a896c990bd53be67e99f1d797397c4af71bbc2f Mon Sep 17 00:00:00 2001
|
||||
From 5eba98dc95a0d3f676125a712aa916ec6531031e Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Mon, 7 Oct 2019 00:15:37 -0500
|
||||
Subject: [PATCH] Add API for Villager#resetOffers()
|
||||
@@ -35,10 +35,10 @@ index 9b75c67c7..ddd19aa2f 100644
|
||||
|
||||
protected void a(MerchantRecipeList merchantrecipelist, VillagerTrades.IMerchantRecipeOption[] avillagertrades_imerchantrecipeoption, int i) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
index a73ebaa75..ac89ed937 100644
|
||||
index a8384081c..f78a23e42 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
@@ -112,4 +112,11 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
|
||||
@@ -124,4 +124,11 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
|
||||
public static VillagerProfession bukkitToNmsProfession(Profession bukkit) {
|
||||
return IRegistry.VILLAGER_PROFESSION.get(CraftNamespacedKey.toMinecraft(bukkit.getKey()));
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 2adf96c0f743957fecd4e8bb4bd47c7b02182a8a Mon Sep 17 00:00:00 2001
|
||||
From 3d083e02e266b26cc31944bf3df22bc1823e4b8d Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 19 Oct 2019 01:42:50 -0500
|
||||
Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases
|
||||
2 files changed, 11 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 2735b5252..2c940b42d 100644
|
||||
index 28c8fd3d4..0c4aae6ce 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1419,8 +1419,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -1427,8 +1427,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
return blockposition;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ index 2735b5252..2c940b42d 100644
|
||||
|
||||
public boolean a(EntityHuman entityhuman, BlockPosition blockposition) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 0f5bd0a17..b9b23c980 100644
|
||||
index 83bd0a95d..05d3a0dcc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -383,12 +383,16 @@ public class CraftWorld implements World {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 71159c88e6b9e9af5880fb437dc45b1b6928eec1 Mon Sep 17 00:00:00 2001
|
||||
From 79f43a500717fdc8e061212aff96adaaf6f543a8 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 30 Nov 2019 03:30:17 -0600
|
||||
Subject: [PATCH] Add sleep options
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] Add sleep options
|
||||
2 files changed, 21 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index 5ac3c4641..ed0a559f9 100644
|
||||
index d62174e9c..22e17e3de 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -143,6 +143,21 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -43,7 +43,7 @@ index 5ac3c4641..ed0a559f9 100644
|
||||
this.wakeup(false, true);
|
||||
}
|
||||
} else if (this.sleepTicks > 0) {
|
||||
@@ -1338,7 +1353,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -1334,7 +1349,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
return Either.left(EntityHuman.EnumBedResult.NOT_POSSIBLE_HERE);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From e77c9cf935556cb76bd3173aba0a3f69e504745f Mon Sep 17 00:00:00 2001
|
||||
From add580a44ba97074cfef1eab62e1175a452beea2 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Thu, 26 Dec 2019 22:08:37 -0600
|
||||
Subject: [PATCH] Add player death exp control options
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] Add player death exp control options
|
||||
2 files changed, 16 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index ed0a559f9..8c6556feb 100644
|
||||
index 22e17e3de..14b57d678 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -1866,9 +1866,18 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -1862,9 +1862,18 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@Override
|
||||
protected int getExpValue(EntityHuman entityhuman) {
|
||||
if (!this.world.getGameRules().getBoolean(GameRules.KEEP_INVENTORY) && !this.isSpectator()) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 94127dca0a0963c23bb5528cf16734421885c60a Mon Sep 17 00:00:00 2001
|
||||
From bc52f2bbaf2e74b173968089b5ddcac97876285a Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 3 Oct 2019 18:08:03 -0500
|
||||
Subject: [PATCH] Allow leashing villagers
|
||||
@@ -11,7 +11,7 @@ Subject: [PATCH] Allow leashing villagers
|
||||
4 files changed, 19 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index 84f208b8c..6a9d0ef0e 100644
|
||||
index bf9d044b0..3adc3434e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -1062,6 +1062,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -23,13 +23,13 @@ index 84f208b8c..6a9d0ef0e 100644
|
||||
if (CraftEventFactory.callPlayerUnleashEntityEvent(this, entityhuman).isCancelled()) {
|
||||
((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutAttachEntity(this, this.getLeashHolder()));
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
index b31f614e6..315440b3f 100644
|
||||
index ec457de62..f67195de9 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
@@ -1006,4 +1006,11 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
|
||||
return optional.isPresent() && optional1.isPresent() ? i - ((MinecraftSerializableLong) optional.get()).a() < 24000L && i - ((MinecraftSerializableLong) optional1.get()).a() < 36000L : false;
|
||||
@@ -1015,4 +1015,11 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
this.bL = restocksToday;
|
||||
}
|
||||
// Paper end
|
||||
+
|
||||
+ // Purpur - start
|
||||
+ @Override
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From b59a16c67762f6139144c954e6b48a40c9635b76 Mon Sep 17 00:00:00 2001
|
||||
From 1486feb57f39fb72713ab88f489a41494c80239d Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Wed, 22 Jan 2020 20:13:40 -0600
|
||||
Subject: [PATCH] UPnP Port Forwarding Service
|
||||
@@ -14,10 +14,10 @@ Subject: [PATCH] UPnP Port Forwarding Service
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/gui/info/UPnPComponent.java
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index a7ee9396a..93fba088f 100644
|
||||
index cdb556405..760a4bc46 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -53,6 +53,12 @@
|
||||
@@ -56,6 +56,12 @@
|
||||
<version>1.7.7.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
@@ -30,7 +30,7 @@ index a7ee9396a..93fba088f 100644
|
||||
<!-- Purpur end -->
|
||||
<dependency>
|
||||
<groupId>net.minecrell</groupId>
|
||||
@@ -146,6 +152,10 @@
|
||||
@@ -149,6 +155,10 @@
|
||||
<id>spigotmc-public</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
|
||||
</repository>
|
||||
@@ -78,7 +78,7 @@ index fe474e4eb..18fdaf53e 100644
|
||||
// this.a((PlayerList) (new DedicatedPlayerList(this))); // Spigot - moved up
|
||||
server.loadPlugins();
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 1c2153e1b..1b27382c6 100644
|
||||
index 7a7c9213d..971466e2a 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -187,6 +187,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -106,10 +106,10 @@ index 1c2153e1b..1b27382c6 100644
|
||||
if (this.server != null) {
|
||||
this.server.disablePlugins();
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 16f5c9d37..c4ec51555 100644
|
||||
index a05c85be0..1822c896f 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -154,6 +154,11 @@ public class PurpurConfig {
|
||||
@@ -148,6 +148,11 @@ public class PurpurConfig {
|
||||
useAlternateKeepAlive = getBoolean("settings.use-alternate-keepalive", useAlternateKeepAlive);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From e0c2438434c3e3b2379bade6ebe637efb260b0cc Mon Sep 17 00:00:00 2001
|
||||
From 301bd8817bb0f8d018ec49bba53191ed155acd56 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Tue, 11 Feb 2020 21:56:48 -0600
|
||||
Subject: [PATCH] Implement EntityMoveEvent
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH] Implement EntityMoveEvent
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index c6a6befdc..e69b09aa1 100644
|
||||
index d6751e3cc..08ae190b0 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -17,6 +17,7 @@ import java.util.Random;
|
||||
@@ -19,7 +19,7 @@ index c6a6befdc..e69b09aa1 100644
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -2635,6 +2636,20 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2648,6 +2649,20 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
this.collideNearby();
|
||||
this.world.getMethodProfiler().exit();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 0dfc812a84d86c520ee760cbb0dacafbb82b01cc Mon Sep 17 00:00:00 2001
|
||||
From 097e37ea5cea8ea5ab46607e92477b4523d062a0 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 6 Mar 2020 13:37:26 -0600
|
||||
Subject: [PATCH] Fix the dead lagging the server
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] Fix the dead lagging the server
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 22033b82d..62ce72fd1 100644
|
||||
index f2fb5404a..bff644763 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1389,7 +1389,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -22,10 +22,10 @@ index 22033b82d..62ce72fd1 100644
|
||||
|
||||
public void setPositionRotation(BlockPosition blockposition, float f, float f1) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index e69b09aa1..19e281bec 100644
|
||||
index 08ae190b0..e9ef6d00c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -2385,7 +2385,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2398,7 +2398,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
From 7ca9653eb3cec1fa76d11e9e32da8009a3e741bb Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 8 Mar 2020 20:54:44 -0500
|
||||
Subject: [PATCH] Add flying mobs to entity activation range settings
|
||||
|
||||
---
|
||||
src/main/java/org/spigotmc/ActivationRange.java | 16 +++++++++++++++-
|
||||
.../java/org/spigotmc/SpigotWorldConfig.java | 2 ++
|
||||
2 files changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 17c4d7ec9..88ae15bc4 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -12,6 +12,9 @@ import net.minecraft.server.EntityAmbient;
|
||||
import net.minecraft.server.EntityAnimal;
|
||||
import net.minecraft.server.EntityArrow;
|
||||
import net.minecraft.server.EntityBee;
|
||||
+import net.minecraft.server.EntityBat; // Purpur
|
||||
+import net.minecraft.server.EntityBird; // Purpur
|
||||
+import net.minecraft.server.EntityBlaze; // Purpur
|
||||
import net.minecraft.server.EntityComplexPart;
|
||||
import net.minecraft.server.EntityCreature;
|
||||
import net.minecraft.server.EntityCreeper;
|
||||
@@ -34,6 +37,7 @@ import net.minecraft.server.EntitySlice;
|
||||
import net.minecraft.server.EntitySlime;
|
||||
import net.minecraft.server.EntityTNTPrimed;
|
||||
import net.minecraft.server.EntityThrownTrident;
|
||||
+import net.minecraft.server.EntityVex; // Purpur
|
||||
import net.minecraft.server.EntityVillager;
|
||||
import net.minecraft.server.EntityWither;
|
||||
import net.minecraft.server.MathHelper;
|
||||
@@ -52,6 +56,7 @@ public class ActivationRange
|
||||
|
||||
public enum ActivationType
|
||||
{
|
||||
+ FLYING, // Purpur
|
||||
WATER, // Paper
|
||||
MONSTER,
|
||||
ANIMAL,
|
||||
@@ -72,6 +77,7 @@ public class ActivationRange
|
||||
*/
|
||||
public static ActivationType initializeEntityActivationType(Entity entity)
|
||||
{
|
||||
+ if (isFlyingMob(entity)) { return ActivationType.FLYING; } // Purpur
|
||||
if (entity instanceof EntityWaterAnimal) { return ActivationType.WATER; } // Paper
|
||||
if ( entity instanceof EntityRaider )
|
||||
{
|
||||
@@ -135,6 +141,7 @@ public class ActivationRange
|
||||
final int animalActivationRange = world.spigotConfig.animalActivationRange;
|
||||
final int monsterActivationRange = world.spigotConfig.monsterActivationRange;
|
||||
final int waterActivationRange = world.spigotConfig.waterActivationRange; // Paper
|
||||
+ final int flyingActivationRange = world.spigotConfig.flyingActivationRange; // Purpur
|
||||
final ChunkProviderServer chunkProvider = (ChunkProviderServer) world.getChunkProvider(); // Paper
|
||||
|
||||
int maxRange = Math.max( monsterActivationRange, animalActivationRange );
|
||||
@@ -153,6 +160,7 @@ public class ActivationRange
|
||||
ActivationType.ANIMAL.boundingBox = player.getBoundingBox().grow( animalActivationRange, 256, animalActivationRange );
|
||||
ActivationType.MONSTER.boundingBox = player.getBoundingBox().grow( monsterActivationRange, 256, monsterActivationRange );
|
||||
ActivationType.WATER.boundingBox = player.getBoundingBox().grow( waterActivationRange, 256, waterActivationRange ); // Paper
|
||||
+ ActivationType.FLYING.boundingBox = player.getBoundingBox().grow( flyingActivationRange, 256, flyingActivationRange ); // Purpur
|
||||
|
||||
|
||||
int i = MathHelper.floor( maxBB.minX / 16.0D );
|
||||
@@ -214,7 +222,7 @@ public class ActivationRange
|
||||
}
|
||||
if ( !( entity instanceof EntityArrow ) )
|
||||
{
|
||||
- if ( (!entity.onGround && !(entity instanceof EntityFlying)) || !entity.passengers.isEmpty() || entity.isPassenger() ) // Paper
|
||||
+ if ( (!entity.onGround && !isFlyingMob(entity)) || !entity.passengers.isEmpty() || entity.isPassenger() ) // Paper // Purpur
|
||||
{
|
||||
return 10; // Paper
|
||||
}
|
||||
@@ -327,4 +335,10 @@ public class ActivationRange
|
||||
}
|
||||
return isActive;
|
||||
}
|
||||
+
|
||||
+ // Purpur start
|
||||
+ public static boolean isFlyingMob(Entity entity) {
|
||||
+ return entity instanceof EntityBat || entity instanceof EntityBird || entity instanceof EntityFlying || entity instanceof EntityBlaze || entity instanceof EntityVex;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index 1b42ba94c..c9864d3f5 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -181,6 +181,7 @@ public class SpigotWorldConfig
|
||||
public int raiderActivationRange = 48;
|
||||
public int miscActivationRange = 16;
|
||||
public int waterActivationRange = 16; // Paper
|
||||
+ public int flyingActivationRange = 128; // Purpur
|
||||
public boolean tickInactiveVillagers = true;
|
||||
private void activationRange()
|
||||
{
|
||||
@@ -189,6 +190,7 @@ public class SpigotWorldConfig
|
||||
raiderActivationRange = getInt( "entity-activation-range.raiders", raiderActivationRange );
|
||||
miscActivationRange = getInt( "entity-activation-range.misc", miscActivationRange );
|
||||
waterActivationRange = getInt( "entity-activation-range.water", waterActivationRange ); // Paper
|
||||
+ flyingActivationRange = getInt( "entity-activation-range.flying", flyingActivationRange ); // Purpur
|
||||
tickInactiveVillagers = getBoolean( "entity-activation-range.tick-inactive-villagers", tickInactiveVillagers );
|
||||
log( "Entity Activation Range: An " + animalActivationRange + " / Mo " + monsterActivationRange + " / Ra " + raiderActivationRange + " / Mi " + miscActivationRange + " / Tiv " + tickInactiveVillagers );
|
||||
}
|
||||
--
|
||||
2.24.0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 5dbaaaa2e7e12d166d0397841ed165be802af00e Mon Sep 17 00:00:00 2001
|
||||
From 33b3a1802b3ec6fe87ef39a9273203b75d5b4d4c Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 13 Mar 2020 22:29:10 -0500
|
||||
Subject: [PATCH] Add /ping command
|
||||
@@ -30,7 +30,7 @@ index 39a6a9ac0..5568649b7 100644
|
||||
List<EntityPlayer> list = ((EntitySelector) commandcontext.getArgument(s, EntitySelector.class)).d((CommandListenerWrapper) commandcontext.getSource());
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
index 2414b0a55..6a755df64 100644
|
||||
index 2d512aa4f..5aa10d16b 100644
|
||||
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
@@ -30,7 +30,7 @@ import org.bukkit.event.server.ServerCommandEvent;
|
||||
@@ -50,7 +50,7 @@ index 2414b0a55..6a755df64 100644
|
||||
}
|
||||
|
||||
this.b.findAmbiguities((commandnode, commandnode1, commandnode2, collection) -> {
|
||||
@@ -330,10 +331,12 @@ public class CommandDispatcher {
|
||||
@@ -332,10 +333,12 @@ public class CommandDispatcher {
|
||||
|
||||
}
|
||||
|
||||
@@ -64,10 +64,10 @@ index 2414b0a55..6a755df64 100644
|
||||
return RequiredArgumentBuilder.argument(s, argumenttype);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/CommandListenerWrapper.java b/src/main/java/net/minecraft/server/CommandListenerWrapper.java
|
||||
index 0b23a0548..ab0cf8b56 100644
|
||||
index c988c929f..5c980b70c 100644
|
||||
--- a/src/main/java/net/minecraft/server/CommandListenerWrapper.java
|
||||
+++ b/src/main/java/net/minecraft/server/CommandListenerWrapper.java
|
||||
@@ -159,6 +159,7 @@ public class CommandListenerWrapper implements ICompletionProvider {
|
||||
@@ -178,6 +178,7 @@ public class CommandListenerWrapper implements ICompletionProvider, com.destroys
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From d604e471861aeec7b32a31a04d3114d548d3d911 Mon Sep 17 00:00:00 2001
|
||||
From bbfe3cf9cb6abd67a230035f4fabf1c29d8c48de Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Thu, 19 Mar 2020 19:39:34 -0500
|
||||
Subject: [PATCH] Add option to allow loyalty on tridents to work in the void
|
||||
@@ -1,4 +1,4 @@
|
||||
From c29b3168f151e762a11330ded7a0bcb0d0cb21e8 Mon Sep 17 00:00:00 2001
|
||||
From 4e8c4f58a721e72004b2bdb229e593b1c3c52314 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 21 Mar 2020 11:47:39 -0500
|
||||
Subject: [PATCH] Configurable server mod name
|
||||
@@ -22,10 +22,10 @@ index 971466e2a..1b76ce463 100644
|
||||
|
||||
public CrashReport b(CrashReport crashreport) {
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index c4ec51555..dd3afd4a5 100644
|
||||
index 1822c896f..429c583be 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -185,6 +185,11 @@ public class PurpurConfig {
|
||||
@@ -179,6 +179,11 @@ public class PurpurConfig {
|
||||
slimeBlocksNotPushable = getBoolean("settings.blocks.slime.not-movable-by-piston", slimeBlocksNotPushable);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From cd72595fb41e924ab2d4622bf5d7f6cf08725dc2 Mon Sep 17 00:00:00 2001
|
||||
From 52ae95b4469b0133754c9b1b349a094471ae8373 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 21 Mar 2020 18:33:05 -0500
|
||||
Subject: [PATCH] End gateway should check if entity can use portal
|
||||
@@ -1,4 +1,4 @@
|
||||
From 74d63117eb825338195946010890180778313db9 Mon Sep 17 00:00:00 2001
|
||||
From 9f04ce50fce43677a049219a9684992b7d205207 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Thu, 26 Mar 2020 19:06:22 -0500
|
||||
Subject: [PATCH] Configurable TPS Catchup
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] Configurable TPS Catchup
|
||||
2 files changed, 12 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f7c82f519..5606e080f 100644
|
||||
index 1b76ce463..e9f1fd78a 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -964,6 +964,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -27,10 +27,10 @@ index f7c82f519..5606e080f 100644
|
||||
this.methodProfiler.exit();
|
||||
this.methodProfiler.b();
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index dd3afd4a5..c55e5c1f2 100644
|
||||
index 429c583be..a9ae5190e 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -159,6 +159,11 @@ public class PurpurConfig {
|
||||
@@ -153,6 +153,11 @@ public class PurpurConfig {
|
||||
useUPnP = getBoolean("settings.upnp-port-forwarding", useUPnP);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From ae0eea483459759cf76e7bd1e3cc95a7e50675d2 Mon Sep 17 00:00:00 2001
|
||||
From 10b40f405d9f0066cc195e16f9350063505246a7 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Thu, 26 Mar 2020 19:46:44 -0500
|
||||
Subject: [PATCH] Breedable Polar Bears
|
||||
@@ -1,4 +1,4 @@
|
||||
From 091faa57defbd852c9422e28a2ff4436a752e61c Mon Sep 17 00:00:00 2001
|
||||
From 7b2819198b6658649fbe0a72ba58bf8adf0676fb Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Thu, 26 Mar 2020 21:39:32 -0500
|
||||
Subject: [PATCH] Configurable jockey options
|
||||
@@ -1,4 +1,4 @@
|
||||
From 74d64cd2ad283a2ac92ec976dfe4368aca133fb5 Mon Sep 17 00:00:00 2001
|
||||
From 8482481275e0e1410010ea0345623bf43bef961a Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Wed, 1 Apr 2020 17:21:42 -0500
|
||||
Subject: [PATCH] Configurable enchantment max level
|
||||
@@ -740,7 +740,7 @@ index 4571cdf02..aa3cbd523 100644
|
||||
public float a(int i, EnumMonsterType enummonstertype) {
|
||||
return this.a == 0 ? 1.0F + (float) Math.max(0, i - 1) * 0.5F : (this.a == 1 && enummonstertype == EnumMonsterType.UNDEAD ? (float) i * 2.5F : (this.a == 2 && enummonstertype == EnumMonsterType.ARTHROPOD ? (float) i * 2.5F : 0.0F));
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index c55e5c1f2..e09cc7778 100644
|
||||
index a9ae5190e..8827b9d0d 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -1,6 +1,8 @@
|
||||
@@ -752,7 +752,7 @@ index c55e5c1f2..e09cc7778 100644
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.pl3x.purpur.command.PurpurCommand;
|
||||
import org.bukkit.Bukkit;
|
||||
@@ -198,4 +200,12 @@ public class PurpurConfig {
|
||||
@@ -192,4 +194,12 @@ public class PurpurConfig {
|
||||
private static void timingsSettings() {
|
||||
getString("settings.timings.url", "https://timings.pl3x.net");
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
From 7947ca0180d3beaf024a2beb16f284b00c3f2cef Mon Sep 17 00:00:00 2001
|
||||
From 79ef32663e1f4603d8011e36d58552f05c7cc5cb Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Thu, 2 Apr 2020 00:28:06 -0500
|
||||
Subject: [PATCH] Optimize Chunk Ticks
|
||||
@@ -135,7 +135,7 @@ index 3ed7fa324..7f236585d 100644
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index c1a036e88..5f482208e 100644
|
||||
index aabb9220d..b0c95aebf 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -1386,28 +1386,28 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1,4 +1,4 @@
|
||||
From f539adeab76742c9fb014ddb3c0b67981f1dc540 Mon Sep 17 00:00:00 2001
|
||||
From d38651d25c27259325825dbce895586947a00ca4 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Thu, 2 Apr 2020 03:39:34 -0500
|
||||
Subject: [PATCH] Add configurable beehive generation chance
|
||||
@@ -1,4 +1,4 @@
|
||||
From 1e9e1b0a650d5d777278516091495530cd0b0a7d Mon Sep 17 00:00:00 2001
|
||||
From 1767f61d72f43905c9c69f8a39ba2fed1990a8aa Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 4 Apr 2020 02:36:45 -0500
|
||||
Subject: [PATCH] Add more timings timers
|
||||
@@ -45,7 +45,7 @@ index 37341d2d2..918eaf0c6 100644
|
||||
|
||||
private MinecraftTimings() {}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index 6a9d0ef0e..15a5fb713 100644
|
||||
index 3adc3434e..eb0befb35 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -1,5 +1,7 @@
|
||||
@@ -98,10 +98,10 @@ index 6a9d0ef0e..15a5fb713 100644
|
||||
this.K();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 19e281bec..5bf8a2ba2 100644
|
||||
index e9ef6d00c..29b60e287 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -2385,7 +2385,9 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2398,7 +2398,9 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ index 19e281bec..5bf8a2ba2 100644
|
||||
double d0 = this.locX() - this.lastX;
|
||||
double d1 = this.locZ() - this.lastZ;
|
||||
float f = (float) (d0 * d0 + d1 * d1);
|
||||
@@ -2592,18 +2594,23 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2605,18 +2607,23 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
this.setMot(d4, d5, d6);
|
||||
this.world.getMethodProfiler().enter("ai");
|
||||
@@ -135,7 +135,7 @@ index 19e281bec..5bf8a2ba2 100644
|
||||
if (this.jumping) {
|
||||
if (this.N > 0.0D && (!this.onGround || this.N > 0.4D)) {
|
||||
this.c(TagsFluid.WATER);
|
||||
@@ -2619,22 +2626,27 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2632,22 +2639,27 @@ public abstract class EntityLiving extends Entity {
|
||||
this.jumpTicks = 0;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 0630a14a583fb53ddcb82eabd93971d746d3b33f Mon Sep 17 00:00:00 2001
|
||||
From 2d10905145f57d597c943aead99cb8b78640c650 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 4 Apr 2020 03:07:59 -0500
|
||||
Subject: [PATCH] Skip events if there's no listeners
|
||||
@@ -8,18 +8,18 @@ Subject: [PATCH] Skip events if there's no listeners
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
index 6a755df64..5ece5c4ee 100644
|
||||
index 5aa10d16b..3b61298fa 100644
|
||||
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
@@ -274,6 +274,7 @@ public class CommandDispatcher {
|
||||
@@ -275,6 +275,7 @@ public class CommandDispatcher {
|
||||
}
|
||||
|
||||
private void runSync(EntityPlayer entityplayer, Collection<String> bukkit, RootCommandNode<ICompletionProvider> rootcommandnode) {
|
||||
+ if (PlayerCommandSendEvent.getHandlerList().getRegisteredListeners().length > 0) { // Purpur - skip all this crap if there's nothing listening
|
||||
// Paper end - Async command map building
|
||||
new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent<CommandListenerWrapper>(entityplayer.getBukkitEntity(), (RootCommandNode) rootcommandnode, false).callEvent(); // Paper
|
||||
PlayerCommandSendEvent event = new PlayerCommandSendEvent(entityplayer.getBukkitEntity(), new LinkedHashSet<>(bukkit));
|
||||
event.getPlayer().getServer().getPluginManager().callEvent(event);
|
||||
@@ -285,6 +286,7 @@ public class CommandDispatcher {
|
||||
@@ -287,6 +288,7 @@ public class CommandDispatcher {
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -1,4 +1,4 @@
|
||||
From ef986adbfb080101340356a3077f14b00dae280a Mon Sep 17 00:00:00 2001
|
||||
From b70ef6b222343737404e4ae6190743e1a2993c6b Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 4 Apr 2020 17:16:30 -0500
|
||||
Subject: [PATCH] Debug stick should not update neighbors
|
||||
@@ -1,4 +1,4 @@
|
||||
From 2422eb999f076057c56730aea8c7f10125bce5a5 Mon Sep 17 00:00:00 2001
|
||||
From b36111ba69cee74184c535937b1e5b0450d8de7c Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 12 Apr 2020 13:19:34 -0500
|
||||
Subject: [PATCH] Chickens can retaliate
|
||||
@@ -1,4 +1,4 @@
|
||||
From da20e0679ace0b7eaeda46a07b45c6fbc6f42fd7 Mon Sep 17 00:00:00 2001
|
||||
From 0480f8f2291ede2dee7dd039eba0200dff9352f7 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 21 Feb 2020 17:04:51 -0600
|
||||
Subject: [PATCH] MC-125757 Fix - Always increment arrow despawn counter
|
||||
@@ -1,4 +1,4 @@
|
||||
From d4f324a177591396fb10607966a9cbb9df7517a0 Mon Sep 17 00:00:00 2001
|
||||
From 2e92177486778152b0b39ef788c8ce6bf011f6e8 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 6 Jun 2019 22:15:46 -0500
|
||||
Subject: [PATCH] MC-168772 Fix - Add turtle egg block options
|
||||
@@ -1,4 +1,4 @@
|
||||
From 0e973218573b264686c93bc7b2b09fac4f9ba5a0 Mon Sep 17 00:00:00 2001
|
||||
From 028466f677b2b428af4e8edb61776d22c5f67c8d Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 6 Jul 2019 21:12:58 -0500
|
||||
Subject: [PATCH] MC-4 Fix - Item position desync
|
||||
@@ -44,10 +44,10 @@ index 5b1d95935..0010448e3 100644
|
||||
return (new Vec3D((double) i, (double) j, (double) k)).a(2.44140625E-4D);
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index e09cc7778..4d7795c93 100644
|
||||
index 8827b9d0d..be6baf299 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -167,8 +167,10 @@ public class PurpurConfig {
|
||||
@@ -161,8 +161,10 @@ public class PurpurConfig {
|
||||
}
|
||||
|
||||
public static boolean dontSendUselessEntityPackets = false;
|
||||
@@ -1,4 +1,4 @@
|
||||
From 706f84b4e67f75b70f04a00e9a669cc6193805b6 Mon Sep 17 00:00:00 2001
|
||||
From 48fcbd27cb3e1c00b556eb3176c834c0c8044218 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Tue, 9 Jul 2019 20:56:47 -0500
|
||||
Subject: [PATCH] MC-56653 Fix - pig zombies aggro
|
||||
@@ -1,4 +1,4 @@
|
||||
From 9f61ced4cf69cbcf15bb72b3eb5757d6136cd39e Mon Sep 17 00:00:00 2001
|
||||
From 065dd032021686d0e4f41a026d36d5c3abdcc463 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 20 Jul 2013 22:40:56 -0400
|
||||
Subject: [PATCH] EMC - MonsterEggSpawn Event
|
||||
@@ -1,4 +1,4 @@
|
||||
From b06b8b8acc0905e168f95ed9121673337b70bd7f Mon Sep 17 00:00:00 2001
|
||||
From d530e207870e846e8d39556d4fa5341f5ae32c86 Mon Sep 17 00:00:00 2001
|
||||
From: Eearslya Sleiarion <eearslya@gmail.com>
|
||||
Date: Mon, 24 Jun 2019 21:27:32 -0700
|
||||
Subject: [PATCH] PaperPR - Add BellRingEvent
|
||||
@@ -1,4 +1,4 @@
|
||||
From da1579cb7a9491c0198daccaa813079447cf2018 Mon Sep 17 00:00:00 2001
|
||||
From ed64d76ed3cc08b9fc4edc418830b5ada0195b7d Mon Sep 17 00:00:00 2001
|
||||
From: chase <chasewhip20@gmail.com>
|
||||
Date: Sun, 15 Mar 2020 18:32:22 -0600
|
||||
Subject: [PATCH] PaperPR - Per World Spawn limits
|
||||
@@ -31,7 +31,7 @@ index 9d56de22b..fa92f92b2 100644
|
||||
public boolean batRidableInWater = false;
|
||||
public boolean batRequireShiftToMount = true;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index b9b23c980..46de7d232 100644
|
||||
index 05d3a0dcc..e44cc3755 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -332,6 +332,13 @@ public class CraftWorld implements World {
|
||||
@@ -1,4 +1,4 @@
|
||||
From d1338ae8d4e0b7404717c5c77f9bd4d01d41d786 Mon Sep 17 00:00:00 2001
|
||||
From 7ed9c2447cdcbe031c8c57e56eeb441907d591d6 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Fri, 25 Oct 2019 02:11:30 -0700
|
||||
Subject: [PATCH] Tuinity - Delay chunk unloads
|
||||
@@ -185,7 +185,7 @@ index 6e0d0a54a..07f77dbb8 100644
|
||||
public static <T> TicketType<T> a(String s, Comparator<T> comparator) {
|
||||
return new TicketType<>(s, comparator, 0L);
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 4d7795c93..a13cb072b 100644
|
||||
index be6baf299..ba2ac70ca 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -4,6 +4,7 @@ import com.google.common.base.Throwables;
|
||||
@@ -196,7 +196,7 @@ index 4d7795c93..a13cb072b 100644
|
||||
import net.pl3x.purpur.command.PurpurCommand;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
@@ -210,4 +211,12 @@ public class PurpurConfig {
|
||||
@@ -204,4 +205,12 @@ public class PurpurConfig {
|
||||
enchantment.setMaxLevel(maxLevel);
|
||||
}
|
||||
}
|
||||
@@ -210,10 +210,10 @@ index 4d7795c93..a13cb072b 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 46de7d232..efc9e5230 100644
|
||||
index e44cc3755..68cc7bf66 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -485,6 +485,7 @@ public class CraftWorld implements World {
|
||||
@@ -487,6 +487,7 @@ public class CraftWorld implements World {
|
||||
net.minecraft.server.IChunkAccess chunk = world.getChunkProvider().getChunkAtIfLoadedImmediately(x, z); // Paper
|
||||
if (chunk != null) {
|
||||
world.getChunkProvider().removeTicket(TicketType.PLUGIN, chunk.getPos(), 1, Unit.INSTANCE);
|
||||
@@ -1,4 +1,4 @@
|
||||
From 3d7a3fe532407b0711763e320060afd9bd30a550 Mon Sep 17 00:00:00 2001
|
||||
From 402374f0f10f47c0432fe4a35e4a7fa4f0237fac Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <spottedleaf@spottedleaf.dev>
|
||||
Date: Fri, 3 Apr 2020 02:21:13 -0700
|
||||
Subject: [PATCH] Tuinity - Always able to execute tasks on the main server
|
||||
@@ -1,4 +1,4 @@
|
||||
From ce2e8df7fa26ea757e54f95f2a370e5228abae53 Mon Sep 17 00:00:00 2001
|
||||
From d47ce430a2c700345b0bdbc107996f77a2745a61 Mon Sep 17 00:00:00 2001
|
||||
From: tr7zw <tr7zw@live.de>
|
||||
Date: Thu, 5 Mar 2020 23:08:01 +0100
|
||||
Subject: [PATCH] YAPFA - Disable mojang profiler
|
||||
@@ -147,7 +147,7 @@ index 000000000..b32a5418f
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 7b7e1475b..1136a0a26 100644
|
||||
index 9f61c266c..b7046e7e2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -144,6 +144,8 @@ public class Main {
|
||||
@@ -1,4 +1,4 @@
|
||||
From dd6301f66647999a2f68a9bed9b3fafa3a20177e Mon Sep 17 00:00:00 2001
|
||||
From fd938ddd4e59b2a4be5cecddf376911cc7e6656b Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 19 Apr 2020 00:17:56 -0500
|
||||
Subject: [PATCH] More anvil controls
|
||||
@@ -1,4 +1,4 @@
|
||||
From 3a2fd1eec0a16da2d4b7c46770bf261055d9a7f3 Mon Sep 17 00:00:00 2001
|
||||
From af3cd5ffa01ba64385f406055fce4fb330e6a401 Mon Sep 17 00:00:00 2001
|
||||
From: KennyTV <kennytv@t-online.de>
|
||||
Date: Mon, 20 Apr 2020 13:57:06 +0200
|
||||
Subject: [PATCH] PlayerItemCooldownEvent
|
||||
@@ -1,4 +1,4 @@
|
||||
From 05f18eb35eccb106ab1751d5f0571af690044434 Mon Sep 17 00:00:00 2001
|
||||
From ff1db34db12d20251bb1301e66d937f12856b9f7 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 24 Apr 2020 09:33:11 -0500
|
||||
Subject: [PATCH] Entities pick up loot bypass mob-griefing gamerule
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] Entities pick up loot bypass mob-griefing gamerule
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index 15a5fb713..6e37acaa4 100644
|
||||
index eb0befb35..4e5b71046 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -525,7 +525,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -1,4 +1,4 @@
|
||||
From d1c239c1ca012787901034918cd6a5b9949c9903 Mon Sep 17 00:00:00 2001
|
||||
From df9c90766759ccbc38522a5cba84ce36d99ec377 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 24 Apr 2020 09:37:29 -0500
|
||||
Subject: [PATCH] Villagers farming can bypass mob-griefing gamerule
|
||||
@@ -1,4 +1,4 @@
|
||||
From 8fb8e949daeebc6eeed7beef40512ed1319444a4 Mon Sep 17 00:00:00 2001
|
||||
From ad3d48f144a189b9339a15e3a1d6073b9d9aeb9e Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 26 Apr 2020 16:28:38 -0500
|
||||
Subject: [PATCH] Add enderman and creeper griefing controls
|
||||
Reference in New Issue
Block a user