Archiviert
13
0

Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
9a793cce Remove no longer applicable caveats to setPlayerListName
7137829e SPIGOT-4496: Undeprecate MapView.getId and make int
de33ade0 Remove some draft API designations
a35fa838 SPIGOT-4472: Add Consumer scheduler methods

CraftBukkit Changes:
8cd538e6 SPIGOT-4498: Crash on startup
b4ee04ba SPIGOT-4496: Undeprecate MapView.getId and make int
ec937d0e SPIGOT-4472: Add Consumer scheduler methods

Spigot Changes:
a1f2566f Use monotonic time for watchdog
bc4adcbf SPIGOT-4498: Crash on startup
bb387e6c Rebuild patches
Dieser Commit ist enthalten in:
Shane Freeder 2018-11-24 05:28:04 +00:00
Ursprung e73ace252e
Commit 29a01de126
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: A3F61EA5A085289C
25 geänderte Dateien mit 286 neuen und 309 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From 0ea9ab16a027e3e06f6e2bd3eb45f2c110664fa4 Mon Sep 17 00:00:00 2001
From 3bdfef7c20a6506b0a133f7de68973203f1612ba Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 29 Feb 2016 18:48:17 -0600
Subject: [PATCH] Timings v2
@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2
diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java
new file mode 100644
index 00000000..98079dc0
index 000000000..98079dc0c
--- /dev/null
+++ b/src/main/java/co/aikar/timings/FullServerTickHandler.java
@@ -0,0 +1,82 @@
@ -94,7 +94,7 @@ index 00000000..98079dc0
+}
diff --git a/src/main/java/co/aikar/timings/NullTimingHandler.java b/src/main/java/co/aikar/timings/NullTimingHandler.java
new file mode 100644
index 00000000..8c43e206
index 000000000..8c43e2061
--- /dev/null
+++ b/src/main/java/co/aikar/timings/NullTimingHandler.java
@@ -0,0 +1,61 @@
@ -161,7 +161,7 @@ index 00000000..8c43e206
+}
diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java
new file mode 100644
index 00000000..feddcdbd
index 000000000..feddcdbd4
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimedEventExecutor.java
@@ -0,0 +1,81 @@
@ -248,7 +248,7 @@ index 00000000..feddcdbd
+}
diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java
new file mode 100644
index 00000000..b2260104
index 000000000..b2260104c
--- /dev/null
+++ b/src/main/java/co/aikar/timings/Timing.java
@@ -0,0 +1,76 @@
@ -330,7 +330,7 @@ index 00000000..b2260104
+}
diff --git a/src/main/java/co/aikar/timings/TimingData.java b/src/main/java/co/aikar/timings/TimingData.java
new file mode 100644
index 00000000..f222d6b7
index 000000000..f222d6b7d
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingData.java
@@ -0,0 +1,120 @@
@ -456,7 +456,7 @@ index 00000000..f222d6b7
+}
diff --git a/src/main/java/co/aikar/timings/TimingHandler.java b/src/main/java/co/aikar/timings/TimingHandler.java
new file mode 100644
index 00000000..521c985e
index 000000000..521c985e6
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingHandler.java
@@ -0,0 +1,200 @@
@ -662,7 +662,7 @@ index 00000000..521c985e
+}
diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java
new file mode 100644
index 00000000..28d0954a
index 000000000..28d0954a3
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingHistory.java
@@ -0,0 +1,345 @@
@ -1013,7 +1013,7 @@ index 00000000..28d0954a
+}
diff --git a/src/main/java/co/aikar/timings/TimingHistoryEntry.java b/src/main/java/co/aikar/timings/TimingHistoryEntry.java
new file mode 100644
index 00000000..0e114eb3
index 000000000..0e114eb32
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingHistoryEntry.java
@@ -0,0 +1,55 @@
@ -1074,7 +1074,7 @@ index 00000000..0e114eb3
+}
diff --git a/src/main/java/co/aikar/timings/TimingIdentifier.java b/src/main/java/co/aikar/timings/TimingIdentifier.java
new file mode 100644
index 00000000..a7f1f44d
index 000000000..a7f1f44d7
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingIdentifier.java
@@ -0,0 +1,106 @@
@ -1186,7 +1186,7 @@ index 00000000..a7f1f44d
+}
diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java
new file mode 100644
index 00000000..f907649b
index 000000000..f907649ba
--- /dev/null
+++ b/src/main/java/co/aikar/timings/Timings.java
@@ -0,0 +1,284 @@
@ -1476,7 +1476,7 @@ index 00000000..f907649b
+}
diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java
new file mode 100644
index 00000000..56b10e89
index 000000000..56b10e898
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsCommand.java
@@ -0,0 +1,119 @@
@ -1601,7 +1601,7 @@ index 00000000..56b10e89
+}
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
new file mode 100644
index 00000000..df7f4259
index 000000000..df7f42595
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
@@ -0,0 +1,342 @@
@ -1949,7 +1949,7 @@ index 00000000..df7f4259
+}
diff --git a/src/main/java/co/aikar/timings/TimingsManager.java b/src/main/java/co/aikar/timings/TimingsManager.java
new file mode 100644
index 00000000..f63e7033
index 000000000..f63e7033c
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsManager.java
@@ -0,0 +1,187 @@
@ -2142,7 +2142,7 @@ index 00000000..f63e7033
+}
diff --git a/src/main/java/co/aikar/timings/TimingsReportListener.java b/src/main/java/co/aikar/timings/TimingsReportListener.java
new file mode 100644
index 00000000..e7c389c0
index 000000000..e7c389c05
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsReportListener.java
@@ -0,0 +1,72 @@
@ -2220,7 +2220,7 @@ index 00000000..e7c389c0
+}
diff --git a/src/main/java/co/aikar/timings/UnsafeTimingHandler.java b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java
new file mode 100644
index 00000000..5edaba12
index 000000000..5edaba128
--- /dev/null
+++ b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java
@@ -0,0 +1,51 @@
@ -2277,7 +2277,7 @@ index 00000000..5edaba12
+}
diff --git a/src/main/java/co/aikar/util/Counter.java b/src/main/java/co/aikar/util/Counter.java
new file mode 100644
index 00000000..23ac07f2
index 000000000..23ac07f2c
--- /dev/null
+++ b/src/main/java/co/aikar/util/Counter.java
@@ -0,0 +1,35 @@
@ -2318,7 +2318,7 @@ index 00000000..23ac07f2
+}
diff --git a/src/main/java/co/aikar/util/JSONUtil.java b/src/main/java/co/aikar/util/JSONUtil.java
new file mode 100644
index 00000000..96274975
index 000000000..962749750
--- /dev/null
+++ b/src/main/java/co/aikar/util/JSONUtil.java
@@ -0,0 +1,129 @@
@ -2453,7 +2453,7 @@ index 00000000..96274975
+}
diff --git a/src/main/java/co/aikar/util/LoadingIntMap.java b/src/main/java/co/aikar/util/LoadingIntMap.java
new file mode 100644
index 00000000..24eae4be
index 000000000..24eae4bea
--- /dev/null
+++ b/src/main/java/co/aikar/util/LoadingIntMap.java
@@ -0,0 +1,71 @@
@ -2530,7 +2530,7 @@ index 00000000..24eae4be
+}
diff --git a/src/main/java/co/aikar/util/LoadingMap.java b/src/main/java/co/aikar/util/LoadingMap.java
new file mode 100644
index 00000000..9a4f9dca
index 000000000..9a4f9dca8
--- /dev/null
+++ b/src/main/java/co/aikar/util/LoadingMap.java
@@ -0,0 +1,339 @@
@ -2875,7 +2875,7 @@ index 00000000..9a4f9dca
+}
diff --git a/src/main/java/co/aikar/util/MRUMapCache.java b/src/main/java/co/aikar/util/MRUMapCache.java
new file mode 100644
index 00000000..df592d85
index 000000000..df592d855
--- /dev/null
+++ b/src/main/java/co/aikar/util/MRUMapCache.java
@@ -0,0 +1,102 @@
@ -2982,7 +2982,7 @@ index 00000000..df592d85
+ }
+}
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 2ce17440..7fdd1a08 100644
index 2ce174401..7fdd1a084 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -568,7 +568,6 @@ public final class Bukkit {
@ -2994,7 +2994,7 @@ index 2ce17440..7fdd1a08 100644
/**
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 63392d5e..0e7a81c8 100644
index 63392d5e7..0e7a81c88 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1150,12 +1150,27 @@ public interface Server extends PluginMessageRecipient {
@ -3028,7 +3028,7 @@ index 63392d5e..0e7a81c8 100644
*
diff --git a/src/main/java/org/bukkit/command/BufferedCommandSender.java b/src/main/java/org/bukkit/command/BufferedCommandSender.java
new file mode 100644
index 00000000..fd452bce
index 000000000..fd452bce4
--- /dev/null
+++ b/src/main/java/org/bukkit/command/BufferedCommandSender.java
@@ -0,0 +1,18 @@
@ -3051,7 +3051,7 @@ index 00000000..fd452bce
+ }
+}
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
index 4c931f18..4a479627 100644
index 4c931f186..4a479627d 100644
--- a/src/main/java/org/bukkit/command/Command.java
+++ b/src/main/java/org/bukkit/command/Command.java
@@ -33,7 +33,8 @@ public abstract class Command {
@ -3081,7 +3081,7 @@ index 4c931f18..4a479627 100644
return true;
}
diff --git a/src/main/java/org/bukkit/command/FormattedCommandAlias.java b/src/main/java/org/bukkit/command/FormattedCommandAlias.java
index 50257883..9c80f464 100644
index 502578837..9c80f4640 100644
--- a/src/main/java/org/bukkit/command/FormattedCommandAlias.java
+++ b/src/main/java/org/bukkit/command/FormattedCommandAlias.java
@@ -9,6 +9,7 @@ public class FormattedCommandAlias extends Command {
@ -3104,7 +3104,7 @@ index 50257883..9c80f464 100644
}
diff --git a/src/main/java/org/bukkit/command/MessageCommandSender.java b/src/main/java/org/bukkit/command/MessageCommandSender.java
new file mode 100644
index 00000000..5527e7c8
index 000000000..5527e7c86
--- /dev/null
+++ b/src/main/java/org/bukkit/command/MessageCommandSender.java
@@ -0,0 +1,105 @@
@ -3214,7 +3214,7 @@ index 00000000..5527e7c8
+
+}
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
index d9183db2..43e52a77 100644
index d9183db2f..43e52a77a 100644
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -29,7 +29,7 @@ public class SimpleCommandMap implements CommandMap {
@ -3249,7 +3249,7 @@ index d9183db2..43e52a77 100644
// Note: we don't return the result of target.execute as thats success / failure, we return handled (true) or not handled (false)
diff --git a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
deleted file mode 100644
index bba914d7..00000000
index bba914d7f..000000000
--- a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
+++ /dev/null
@@ -1,253 +0,0 @@
@ -3507,10 +3507,10 @@ index bba914d7..00000000
- // Spigot end
-}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index bff56f48..fc9a32ce 100644
index 5054276ff..0993f31b1 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1591,6 +1591,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1575,6 +1575,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
throw new UnsupportedOperationException("Not supported yet.");
}
@ -3523,7 +3523,7 @@ index bff56f48..fc9a32ce 100644
@Override
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index 8b130abb..80c152ba 100644
index 8b130abb7..80c152ba9 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -293,7 +293,6 @@ public final class SimplePluginManager implements PluginManager {
@ -3580,7 +3580,7 @@ index 8b130abb..80c152ba 100644
}
}
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index 113b899c..81b42822 100644
index 113b899cc..81b428222 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -40,7 +40,6 @@ import org.bukkit.plugin.PluginLoader;
@ -3629,7 +3629,7 @@ index 113b899c..81b42822 100644
eventSet.add(new TimedRegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled()));
} else {
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index af8af8ef..44093af2 100644
index af8af8ef0..44093af29 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -23,7 +23,8 @@ import org.bukkit.plugin.PluginDescriptionFile;
@ -3643,7 +3643,7 @@ index af8af8ef..44093af2 100644
private final Map<String, Class<?>> classes = new java.util.concurrent.ConcurrentHashMap<String, Class<?>>(); // Spigot
private final PluginDescriptionFile description;
diff --git a/src/main/java/org/bukkit/util/CachedServerIcon.java b/src/main/java/org/bukkit/util/CachedServerIcon.java
index 5ca863b3..04804706 100644
index 5ca863b36..048047067 100644
--- a/src/main/java/org/bukkit/util/CachedServerIcon.java
+++ b/src/main/java/org/bukkit/util/CachedServerIcon.java
@@ -12,4 +12,6 @@ import org.bukkit.event.server.ServerListPingEvent;
@ -3655,7 +3655,7 @@ index 5ca863b3..04804706 100644
+ public String getData(); // Spigot
+}
diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java
index 8d982974..e9f76006 100644
index 8d982974e..e9f76006e 100644
--- a/src/main/java/org/spigotmc/CustomTimingsHandler.java
+++ b/src/main/java/org/spigotmc/CustomTimingsHandler.java
@@ -1,165 +1,105 @@

Datei anzeigen

@ -1,14 +1,14 @@
From 35f1ddc77e007fa75ef13cce62b922bc8dbaab97 Mon Sep 17 00:00:00 2001
From 08ca43a01ec41fc1f62acc5ee776299736289727 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Mon, 29 Feb 2016 17:22:34 -0600
Subject: [PATCH] Player affects spawning API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index fc9a32ce7..d9680af01 100644
index 0993f31b1..a631529df 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1484,6 +1484,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1468,6 +1468,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public String getLocale();

Datei anzeigen

@ -1,14 +1,14 @@
From a8ce84c2a0455c326c6e569cb07b36b931815077 Mon Sep 17 00:00:00 2001
From 61bfc392c8504daea86a2eb450c57e4975dec044 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Mon, 29 Feb 2016 18:05:37 -0600
Subject: [PATCH] Add player view distance API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index d9680af01..be78cb64f 100644
index a631529df..4208b0d2c 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1508,6 +1508,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1492,6 +1492,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void updateCommands();

Datei anzeigen

@ -1,4 +1,4 @@
From be81a0b2cb871e4e376040817021dd947c57b00a Mon Sep 17 00:00:00 2001
From 36623d7f4638ade865cac295f0e70254df2ba482 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 19:54:32 -0600
Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses
@ -6,7 +6,7 @@ Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses
Change Javadoc to be accurate
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 32db4b77..0119a2cd 100644
index 32db4b77d..0119a2cda 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -285,6 +285,26 @@ public final class Bukkit {
@ -37,7 +37,7 @@ index 32db4b77..0119a2cd 100644
* Gets the name of the update folder. The update folder is used to safely
* update plugins at the right moment on a plugin load.
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 10ee377a..6ad830d7 100644
index 10ee377a9..6ad830d72 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -233,6 +233,26 @@ public interface Server extends PluginMessageRecipient {
@ -68,10 +68,10 @@ index 10ee377a..6ad830d7 100644
* Gets the name of the update folder. The update folder is used to safely
* update plugins at the right moment on a plugin load.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index be78cb64..c763277d 100644
index 4208b0d2c..fc2d4da89 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -428,6 +428,36 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -414,6 +414,36 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void sendMap(MapView map);

Datei anzeigen

@ -1,4 +1,4 @@
From 220b260a9a931229d3cb17bfa979d10fa05e0787 Mon Sep 17 00:00:00 2001
From 5ce4dce9f8fb84d51fb88716b3d48ae1ba77e9ce Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Mon, 29 Feb 2016 20:02:40 -0600
Subject: [PATCH] Player Tab List and Title APIs
@ -369,7 +369,7 @@ index 000000000..3c2b63db4
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index c763277d3..95d686c6f 100644
index fc2d4da89..b57b6981d 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2,6 +2,7 @@ package org.bukkit.entity;
@ -380,7 +380,7 @@ index c763277d3..95d686c6f 100644
import org.bukkit.Achievement;
import org.bukkit.ChatColor;
import org.bukkit.Effect;
@@ -456,6 +457,116 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -442,6 +443,116 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
spigot().sendMessage(position, components);
}

Datei anzeigen

@ -1,4 +1,4 @@
From 8756efbf55d92fb7e4272f3c818cd35f4778d920 Mon Sep 17 00:00:00 2001
From 4f2293cad7b7ebfdea3f2d98d6de482f59bc9fff Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Tue, 8 Mar 2016 13:05:59 -0800
Subject: [PATCH] Add BaseComponent sendMessage methods to CommandSender
@ -40,10 +40,10 @@ index abf68a2c7..fcb03b830 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 95d686c6f..d6ad55468 100644
index b57b6981d..2096656ee 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -435,6 +435,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -421,6 +421,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param component the components to send
*/
@ -51,7 +51,7 @@ index 95d686c6f..d6ad55468 100644
public default void sendMessage(net.md_5.bungee.api.chat.BaseComponent component) {
spigot().sendMessage(component);
}
@@ -444,6 +445,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -430,6 +431,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param components the components to send
*/

Datei anzeigen

@ -1,14 +1,14 @@
From 7d5bb565021f2fe65c31e71f849bdf882a0d72a4 Mon Sep 17 00:00:00 2001
From c9dd0e23a824050ebaecbfc09332e663b89d438e Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 4 Apr 2015 22:59:54 -0400
Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index d6ad55468..9011c690d 100644
index 2096656ee..a9163a5f6 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1242,7 +1242,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1228,7 +1228,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException Thrown if the URL is null.
* @throws IllegalArgumentException Thrown if the URL is too long. The
* length restriction is an implementation specific arbitrary value.
@ -18,7 +18,7 @@ index d6ad55468..9011c690d 100644
public void setResourcePack(String url);
/**
@@ -1665,6 +1667,60 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1649,6 +1651,60 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void setViewDistance(int viewDistance);

Datei anzeigen

@ -1,14 +1,14 @@
From 77e4331a608f29656cddeb6ec5b151d6a4c96da8 Mon Sep 17 00:00:00 2001
From a8cbfca459051cee3f377582c8d5057c70a96d30 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 20 Dec 2016 15:55:55 -0500
Subject: [PATCH] Add String based Action Bar API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 9011c690d..4b0caae51 100644
index a9163a5f6..d10e3f99d 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -430,6 +430,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -416,6 +416,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public void sendMap(MapView map);
// Paper start
@ -35,7 +35,7 @@ index 9011c690d..4b0caae51 100644
/**
* Sends the component to the player
*
@@ -453,9 +473,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -439,9 +459,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Sends an array of components as a single message to the specified screen position of this player
*
@ -47,7 +47,7 @@ index 9011c690d..4b0caae51 100644
public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
spigot().sendMessage(position, components);
}
@@ -1804,9 +1826,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1788,9 +1810,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Sends the component to the specified screen position of this player
*
@ -59,7 +59,7 @@ index 9011c690d..4b0caae51 100644
public void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent component) {
throw new UnsupportedOperationException("Not supported yet.");
}
@@ -1814,9 +1838,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1798,9 +1822,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Sends an array of components as a single message to the specified screen position of this player
*

Datei anzeigen

@ -1,4 +1,4 @@
From 92e96b7704bba384e2967231145548974b1d5cbe Mon Sep 17 00:00:00 2001
From 4263686098d71b1b539cb79fc04f04d0994c21c5 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 10 Jun 2017 16:59:40 -0500
Subject: [PATCH] Fix upstream javadoc warnings and errors
@ -6,7 +6,7 @@ Subject: [PATCH] Fix upstream javadoc warnings and errors
Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues.
diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
index 43239f84..fe8d3468 100644
index 43239f844..fe8d34685 100644
--- a/src/main/java/org/bukkit/NamespacedKey.java
+++ b/src/main/java/org/bukkit/NamespacedKey.java
@@ -38,8 +38,8 @@ public final class NamespacedKey {
@ -21,7 +21,7 @@ index 43239f84..fe8d3468 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 06bcee03..849ad2cb 100644
index 06bcee03b..849ad2cbb 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1567,6 +1567,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@ -89,7 +89,7 @@ index 06bcee03..849ad2cb 100644
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force);
diff --git a/src/main/java/org/bukkit/entity/AbstractHorse.java b/src/main/java/org/bukkit/entity/AbstractHorse.java
index 10757454..6d5410ea 100644
index 107574546..6d5410eab 100644
--- a/src/main/java/org/bukkit/entity/AbstractHorse.java
+++ b/src/main/java/org/bukkit/entity/AbstractHorse.java
@@ -22,7 +22,7 @@ public interface AbstractHorse extends Animals, Vehicle, InventoryHolder, Tameab
@ -102,7 +102,7 @@ index 10757454..6d5410ea 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/entity/AreaEffectCloud.java b/src/main/java/org/bukkit/entity/AreaEffectCloud.java
index 9a569d3a..8c5efd17 100644
index 9a569d3a3..8c5efd17e 100644
--- a/src/main/java/org/bukkit/entity/AreaEffectCloud.java
+++ b/src/main/java/org/bukkit/entity/AreaEffectCloud.java
@@ -138,6 +138,7 @@ public interface AreaEffectCloud extends Entity {
@ -114,7 +114,7 @@ index 9a569d3a..8c5efd17 100644
<T> void setParticle(Particle particle, T data);
diff --git a/src/main/java/org/bukkit/entity/Guardian.java b/src/main/java/org/bukkit/entity/Guardian.java
index 98af0563..ec6890ae 100644
index 98af0563c..ec6890ae6 100644
--- a/src/main/java/org/bukkit/entity/Guardian.java
+++ b/src/main/java/org/bukkit/entity/Guardian.java
@@ -12,7 +12,7 @@ public interface Guardian extends Monster {
@ -127,7 +127,7 @@ index 98af0563..ec6890ae 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/entity/Horse.java b/src/main/java/org/bukkit/entity/Horse.java
index cfce8fa5..8660070b 100644
index cfce8fa57..8660070bb 100644
--- a/src/main/java/org/bukkit/entity/Horse.java
+++ b/src/main/java/org/bukkit/entity/Horse.java
@@ -151,7 +151,7 @@ public interface Horse extends AbstractHorse {
@ -140,10 +140,10 @@ index cfce8fa5..8660070b 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 4b0caae5..45690a2f 100644
index d10e3f99d..49de086e3 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -445,7 +445,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -431,7 +431,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* Use supplied alternative character to the section symbol to represent legacy color codes.
*
@ -152,7 +152,7 @@ index 4b0caae5..45690a2f 100644
* @param message The message to send
*/
public void sendActionBar(char alternateChar, String message);
@@ -512,6 +512,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -498,6 +498,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Update the subtitle of titles displayed to the player
*
@ -160,7 +160,7 @@ index 4b0caae5..45690a2f 100644
* @deprecated Use {@link #updateTitle(Title)}
*/
@Deprecated
@@ -520,6 +521,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -506,6 +507,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Update the subtitle of titles displayed to the player
*
@ -168,7 +168,7 @@ index 4b0caae5..45690a2f 100644
* @deprecated Use {@link #updateTitle(Title)}
*/
@Deprecated
@@ -528,6 +530,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -514,6 +516,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Show the given title to the player, along with the last subtitle set, using the last set times
*
@ -176,7 +176,7 @@ index 4b0caae5..45690a2f 100644
* @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)}
*/
@Deprecated
@@ -536,6 +539,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -522,6 +525,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Show the given title to the player, along with the last subtitle set, using the last set times
*
@ -184,7 +184,7 @@ index 4b0caae5..45690a2f 100644
* @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)}
*/
@Deprecated
@@ -1456,6 +1460,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1442,6 +1446,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param count the number of particles
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -192,7 +192,7 @@ index 4b0caae5..45690a2f 100644
*/
public <T> void spawnParticle(Particle particle, Location location, int count, T data);
@@ -1471,6 +1476,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1457,6 +1462,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param count the number of particles
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -200,7 +200,7 @@ index 4b0caae5..45690a2f 100644
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, T data);
@@ -1520,6 +1526,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1506,6 +1512,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param offsetZ the maximum random offset on the Z axis
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -208,7 +208,7 @@ index 4b0caae5..45690a2f 100644
*/
public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, T data);
@@ -1539,6 +1546,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1525,6 +1532,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param offsetZ the maximum random offset on the Z axis
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -216,7 +216,7 @@ index 4b0caae5..45690a2f 100644
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data);
@@ -1594,6 +1602,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1580,6 +1588,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* particle used (normally speed)
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -224,7 +224,7 @@ index 4b0caae5..45690a2f 100644
*/
public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data);
@@ -1615,6 +1624,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1601,6 +1610,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* particle used (normally speed)
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -233,7 +233,7 @@ index 4b0caae5..45690a2f 100644
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data);
diff --git a/src/main/java/org/bukkit/entity/Skeleton.java b/src/main/java/org/bukkit/entity/Skeleton.java
index 2a02ab85..e33d00b3 100644
index 2a02ab855..e33d00b30 100644
--- a/src/main/java/org/bukkit/entity/Skeleton.java
+++ b/src/main/java/org/bukkit/entity/Skeleton.java
@@ -15,6 +15,7 @@ public interface Skeleton extends Monster {
@ -245,7 +245,7 @@ index 2a02ab85..e33d00b3 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/entity/Zombie.java b/src/main/java/org/bukkit/entity/Zombie.java
index cf53ea22..62923379 100644
index cf53ea22f..629233796 100644
--- a/src/main/java/org/bukkit/entity/Zombie.java
+++ b/src/main/java/org/bukkit/entity/Zombie.java
@@ -29,14 +29,14 @@ public interface Zombie extends Monster {
@ -266,7 +266,7 @@ index cf53ea22..62923379 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
index 6532c24f..ee0b1273 100644
index 6532c24fe..ee0b12736 100644
--- a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
@@ -28,6 +28,7 @@ public class PlayerLoginEvent extends PlayerEvent {
@ -286,7 +286,7 @@ index 6532c24f..ee0b1273 100644
public PlayerLoginEvent(final Player player, String hostname, final InetAddress address, final Result result, final String message, final InetAddress realAddress) { // Spigot
this(player, hostname, address, realAddress); // Spigot
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index 762c43d6..ec2b8b8e 100644
index 762c43d69..ec2b8b8ed 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -126,10 +126,10 @@ public interface ItemFactory {
@ -304,7 +304,7 @@ index 762c43d6..ec2b8b8e 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/inventory/Merchant.java b/src/main/java/org/bukkit/inventory/Merchant.java
index c8e68570..45431b36 100644
index c8e68570f..45431b360 100644
--- a/src/main/java/org/bukkit/inventory/Merchant.java
+++ b/src/main/java/org/bukkit/inventory/Merchant.java
@@ -32,7 +32,7 @@ public interface Merchant {
@ -326,7 +326,7 @@ index c8e68570..45431b36 100644
void setRecipe(int i, MerchantRecipe recipe) throws IndexOutOfBoundsException;
diff --git a/src/main/java/org/bukkit/potion/Potion.java b/src/main/java/org/bukkit/potion/Potion.java
index 1413b361..b4a8051c 100644
index 1413b361b..b4a8051cc 100644
--- a/src/main/java/org/bukkit/potion/Potion.java
+++ b/src/main/java/org/bukkit/potion/Potion.java
@@ -78,6 +78,7 @@ public class Potion {
@ -338,7 +338,7 @@ index 1413b361..b4a8051c 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/potion/PotionBrewer.java b/src/main/java/org/bukkit/potion/PotionBrewer.java
index 40f8d12b..33d19228 100644
index 40f8d12b9..33d192287 100644
--- a/src/main/java/org/bukkit/potion/PotionBrewer.java
+++ b/src/main/java/org/bukkit/potion/PotionBrewer.java
@@ -34,6 +34,8 @@ public interface PotionBrewer {
@ -351,7 +351,7 @@ index 40f8d12b..33d19228 100644
*/
public Collection<PotionEffect> getEffects(PotionType type, boolean upgraded, boolean extended);
diff --git a/src/main/java/org/bukkit/potion/PotionType.java b/src/main/java/org/bukkit/potion/PotionType.java
index 034421a7..f1a54c23 100644
index 034421a76..f1a54c23c 100644
--- a/src/main/java/org/bukkit/potion/PotionType.java
+++ b/src/main/java/org/bukkit/potion/PotionType.java
@@ -68,6 +68,7 @@ public enum PotionType {
@ -381,7 +381,7 @@ index 034421a7..f1a54c23 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java
index ab71f3c3..358ea386 100644
index ab71f3c31..358ea386b 100644
--- a/src/main/java/org/bukkit/scoreboard/Team.java
+++ b/src/main/java/org/bukkit/scoreboard/Team.java
@@ -84,7 +84,7 @@ public interface Team {

Datei anzeigen

@ -1,4 +1,4 @@
From 31449a899a71af0d14ad3781233e26ed634f220a Mon Sep 17 00:00:00 2001
From 1537081482d80ea6cf1266b73f1c6c75d7f557a4 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 20 Dec 2017 17:38:07 -0500
Subject: [PATCH] Ability to apply mending to XP API
@ -10,10 +10,10 @@ of giving the player experience points.
Both an API To standalone mend, and apply mending logic to .giveExp has been added.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 7434203a4..575791cf7 100644
index 79c0e598a..5f3e085e3 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -952,12 +952,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -938,12 +938,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void resetPlayerWeather();

Datei anzeigen

@ -1,4 +1,4 @@
From 493eccb7661a318e36ec70b8fe8162a2a136db14 Mon Sep 17 00:00:00 2001
From ee7e882548af6130d040e4a16132a155e44be107 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 18 Mar 2018 12:28:55 -0400
Subject: [PATCH] Player.setPlayerProfile API
@ -6,7 +6,7 @@ Subject: [PATCH] Player.setPlayerProfile API
This can be useful for changing name or skins after a player has logged in.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 575791cf7..6f87abb91 100644
index 5f3e085e3..1e349066d 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3,6 +3,7 @@ package org.bukkit.entity;
@ -17,7 +17,7 @@ index 575791cf7..6f87abb91 100644
import org.bukkit.Achievement;
import org.bukkit.ChatColor;
import org.bukkit.Effect;
@@ -1772,6 +1773,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1756,6 +1757,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED}
*/
boolean hasResourcePack();

Datei anzeigen

@ -1,4 +1,4 @@
From f8d4bb2005c7020b83b96410fc20803a644a6c3a Mon Sep 17 00:00:00 2001
From 366c846839d73d5acaee73780f2cd046519e6b2d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 28 Apr 2018 10:28:50 -0400
Subject: [PATCH] Add Ban Methods to Player Objects
@ -69,7 +69,7 @@ index d82790717..658eac264 100644
/**
* Checks if this player is whitelisted or not
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 6f87abb91..bd8f8ff10 100644
index 1e349066d..c9f027f99 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1,10 +1,14 @@
@ -87,7 +87,7 @@ index 6f87abb91..bd8f8ff10 100644
import org.bukkit.ChatColor;
import org.bukkit.Effect;
import org.bukkit.GameMode;
@@ -431,6 +435,139 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -417,6 +421,139 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public void sendMap(MapView map);
// Paper start

Datei anzeigen

@ -1,14 +1,14 @@
From ddd94060db4fce582cb293b2a7d01b4cdeae9451 Mon Sep 17 00:00:00 2001
From fa58997c542e7d960489559b70bc4219db6dbd5c Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Tue, 4 Sep 2018 15:01:54 -0500
Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index bd8f8ff10..f10a9e958 100644
index c9f027f99..7f6ae5d16 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1923,6 +1923,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1907,6 +1907,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param profile The new profile to use
*/
void setPlayerProfile(PlayerProfile profile);

Datei anzeigen

@ -1,4 +1,4 @@
From 29bc7615f76685aa18d27102d95cfaf6e5231da1 Mon Sep 17 00:00:00 2001
From defa2a27d1a177cc507dfc570d2f1959e952aeb0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2
@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
new file mode 100644
index 000000000..a6292f1d7
index 0000000000..66d02e048b
--- /dev/null
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
@@ -0,0 +1,132 @@
@ -51,7 +51,7 @@ index 000000000..a6292f1d7
+ public static final Timing antiXrayUpdateTimer = Timings.ofSafe("anti-xray - update");
+ public static final Timing antiXrayObfuscateTimer = Timings.ofSafe("anti-xray - obfuscate");
+
+ private static final Map<Class<? extends Runnable>, String> taskNameCache = new MapMaker().weakKeys().makeMap();
+ private static final Map<Class<?>, String> taskNameCache = new MapMaker().weakKeys().makeMap();
+
+ private MinecraftTimings() {}
+
@ -67,9 +67,9 @@ index 000000000..a6292f1d7
+ }
+ Plugin plugin;
+
+ Runnable task = ((CraftTask) bukkitTask).task;
+ CraftTask craftTask = (CraftTask) bukkitTask;
+
+ final Class<? extends Runnable> taskClass = task.getClass();
+ final Class<?> taskClass = craftTask.getTaskClass();
+ if (bukkitTask.getOwner() != null) {
+ plugin = bukkitTask.getOwner();
+ } else {
@ -144,7 +144,7 @@ index 000000000..a6292f1d7
+}
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
new file mode 100644
index 000000000..145cb274b
index 0000000000..145cb274b0
--- /dev/null
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
@@ -0,0 +1,104 @@
@ -253,7 +253,7 @@ index 000000000..145cb274b
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 87a7b6980..2f17e5219 100644
index 87a7b69800..2f17e5219c 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit;
@ -297,7 +297,7 @@ index 87a7b6980..2f17e5219 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index dfcb285df..bb8b450ac 100644
index dfcb285df5..bb8b450ac4 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -23,6 +23,15 @@ public class Block implements IMaterial {
@ -317,7 +317,7 @@ index dfcb285df..bb8b450ac 100644
private final float frictionFactor;
protected final BlockStateList<Block, IBlockData> blockStateList;
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index e634325ba..68ba638c6 100644
index e634325ba8..68ba638c6b 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -842,6 +842,7 @@ public class Chunk implements IChunkAccess {
@ -337,7 +337,7 @@ index e634325ba..68ba638c6 100644
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/ChunkMap.java b/src/main/java/net/minecraft/server/ChunkMap.java
index 85a065f03..4b8b77710 100644
index 85a065f039..4b8b77710b 100644
--- a/src/main/java/net/minecraft/server/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/ChunkMap.java
@@ -14,6 +14,7 @@ public class ChunkMap extends Long2ObjectOpenHashMap<Chunk> {
@ -357,7 +357,7 @@ index 85a065f03..4b8b77710 100644
return chunk1;
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 5819e86f3..7239f5437 100644
index 5819e86f32..7239f54377 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -90,7 +90,7 @@ public class ChunkProviderServer implements IChunkProvider {
@ -398,7 +398,7 @@ index 5819e86f3..7239f5437 100644
this.chunkLoader.saveChunk(this.world, ichunkaccess, unloaded); // Spigot
} catch (IOException ioexception) {
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 71c0e069a..e53e40e43 100644
index 71c0e069a6..e53e40e439 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -1,5 +1,6 @@
@ -445,7 +445,7 @@ index 71c0e069a..e53e40e43 100644
}
diff --git a/src/main/java/net/minecraft/server/CustomFunction.java b/src/main/java/net/minecraft/server/CustomFunction.java
index b7cdc495a..8b9b076de 100644
index b7cdc495a3..8b9b076ded 100644
--- a/src/main/java/net/minecraft/server/CustomFunction.java
+++ b/src/main/java/net/minecraft/server/CustomFunction.java
@@ -13,12 +13,22 @@ public class CustomFunction {
@ -472,7 +472,7 @@ index b7cdc495a..8b9b076de 100644
return this.b;
}
diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java
index 4d7e15179..40ff72f72 100644
index 4d7e151793..40ff72f725 100644
--- a/src/main/java/net/minecraft/server/CustomFunctionData.java
+++ b/src/main/java/net/minecraft/server/CustomFunctionData.java
@@ -109,7 +109,7 @@ public class CustomFunctionData implements ITickable, IResourcePackListener {
@ -485,7 +485,7 @@ index 4d7e15179..40ff72f72 100644
int j = 0;
CustomFunction.c[] acustomfunction_c = customfunction.b();
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 7f56df0b6..b488178d5 100644
index 7f56df0b66..b488178d5b 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -29,7 +29,7 @@ import org.apache.logging.log4j.Level;
@ -538,7 +538,7 @@ index 7f56df0b6..b488178d5 100644
return waitable.get();
} catch (java.util.concurrent.ExecutionException e) {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index fde9d4d51..c765b5cf3 100644
index fde9d4d517..c765b5cf32 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender;
@ -577,7 +577,7 @@ index fde9d4d51..c765b5cf3 100644
protected float ab() {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 03cd1db36..dec9d2d08 100644
index 03cd1db365..dec9d2d08c 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -32,7 +32,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -653,7 +653,7 @@ index 03cd1db36..dec9d2d08 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java
index ae31935c4..70c9b1f50 100644
index ae31935c48..70c9b1f50c 100644
--- a/src/main/java/net/minecraft/server/EntityTracker.java
+++ b/src/main/java/net/minecraft/server/EntityTracker.java
@@ -168,7 +168,7 @@ public class EntityTracker {
@ -684,7 +684,7 @@ index ae31935c4..70c9b1f50 100644
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index bdbd24b6b..2d812b024 100644
index bdbd24b6b5..2d812b0242 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1,5 +1,6 @@
@ -837,7 +837,7 @@ index bdbd24b6b..2d812b024 100644
this.methodProfiler.e();
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 15194bd63..12a8fec29 100644
index 15194bd635..12a8fec29a 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1,5 +1,6 @@
@ -931,7 +931,7 @@ index 15194bd63..12a8fec29 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 358e7429b..784b62c7c 100644
index 358e7429b3..784b62c7c8 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -59,6 +59,7 @@ import org.bukkit.inventory.CraftingInventory;
@ -986,7 +986,7 @@ index 358e7429b..784b62c7c 100644
// this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s);
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
index 616797dc6..3a5daf670 100644
index 616797dc6e..3a5daf6705 100644
--- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
+++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
@@ -1,10 +1,16 @@
@ -1007,7 +1007,7 @@ index 616797dc6..3a5daf670 100644
throw CancelledPacketHandleException.INSTANCE;
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 393c4c118..4d800957a 100644
index 17b4245417..85947fb678 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1,5 +1,6 @@
@ -1031,7 +1031,7 @@ index 393c4c118..4d800957a 100644
public WhiteList getWhitelist() {
diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java
index a07895935..ee5c2421b 100644
index a07895935e..ee5c2421bb 100644
--- a/src/main/java/net/minecraft/server/TickListServer.java
+++ b/src/main/java/net/minecraft/server/TickListServer.java
@@ -24,13 +24,19 @@ public class TickListServer<T> implements TickList<T> {
@ -1085,7 +1085,7 @@ index a07895935..ee5c2421b 100644
}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index c69209497..68ac014aa 100644
index c69209497b..68ac014aab 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -4,12 +4,13 @@ import javax.annotation.Nullable;
@ -1105,7 +1105,7 @@ index c69209497..68ac014aa 100644
private final TileEntityTypes<?> e; public TileEntityTypes getTileEntityType() { return e; } // Paper - OBFHELPER
protected World world;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 433d0ad96..759fa98c4 100644
index 433d0ad96a..759fa98c45 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1,5 +1,6 @@
@ -1220,7 +1220,7 @@ index 433d0ad96..759fa98c4 100644
public boolean a(@Nullable Entity entity, VoxelShape voxelshape) {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 74a61f300..d10fb980d 100644
index 74a61f300c..d10fb980dd 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1,5 +1,6 @@
@ -1327,7 +1327,7 @@ index 74a61f300..d10fb980d 100644
// CraftBukkit start
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f1813f3d5..174605b6e 100644
index f1813f3d5a..174605b6e1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1946,12 +1946,31 @@ public final class CraftServer implements Server {
@ -1364,10 +1364,10 @@ index f1813f3d5..174605b6e 100644
org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
deleted file mode 100644
index 666d1eb9e..000000000
index 2ab4b11a8d..0000000000
--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
+++ /dev/null
@@ -1,175 +0,0 @@
@@ -1,173 +0,0 @@
-package org.bukkit.craftbukkit;
-
-import com.google.common.collect.Maps;
@ -1433,8 +1433,6 @@ index 666d1eb9e..000000000
-
- if (task.getOwner() != null) {
- plugin = task.getOwner().getDescription().getFullName();
- } else if (ctask.timingName != null) {
- plugin = "CraftScheduler";
- } else {
- plugin = "Unknown";
- }
@ -1544,7 +1542,7 @@ index 666d1eb9e..000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
index 413dd35f0..52a8c48fa 100644
index 413dd35f06..52a8c48fa4 100644
--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
@@ -1,6 +1,8 @@
@ -1580,7 +1578,7 @@ index 413dd35f0..52a8c48fa 100644
public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b1a5937b1..b5afd5d1c 100644
index b1a5937b1e..b5afd5d1c7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1720,6 +1720,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -1599,18 +1597,18 @@ index b1a5937b1..b5afd5d1c 100644
public Player.Spigot spigot()
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index f11bd7545..93b9134d6 100644
index b0f1f83728..9dec941fb7 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -14,6 +14,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
@@ -15,6 +15,7 @@ import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Consumer;
import java.util.logging.Level;
+import co.aikar.timings.MinecraftTimings; // Paper
import org.apache.commons.lang.Validate;
import org.bukkit.plugin.IllegalPluginAccessException;
import org.bukkit.plugin.Plugin;
@@ -193,7 +194,7 @@ public class CraftScheduler implements BukkitScheduler {
@@ -246,7 +247,7 @@ public class CraftScheduler implements BukkitScheduler {
}
}
return false;
@ -1619,7 +1617,7 @@ index f11bd7545..93b9134d6 100644
handle(task, 0L);
for (CraftTask taskPending = head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
if (taskPending == task) {
@@ -226,7 +227,7 @@ public class CraftScheduler implements BukkitScheduler {
@@ -280,7 +281,7 @@ public class CraftScheduler implements BukkitScheduler {
}
}
}
@ -1628,16 +1626,7 @@ index f11bd7545..93b9134d6 100644
handle(task, 0L);
for (CraftTask taskPending = head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
if (taskPending == task) {
@@ -258,7 +259,7 @@ public class CraftScheduler implements BukkitScheduler {
CraftScheduler.this.pending.clear();
CraftScheduler.this.temp.clear();
}
- });
+ }){{this.timings=co.aikar.timings.MinecraftTimings.getCancelTasksTimer();}}; // Paper
handle(task, 0L);
for (CraftTask taskPending = head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
if (taskPending == task) {
@@ -357,9 +358,7 @@ public class CraftScheduler implements BukkitScheduler {
@@ -387,9 +388,7 @@ public class CraftScheduler implements BukkitScheduler {
if (task.isSync()) {
currentTask = task;
try {
@ -1647,7 +1636,7 @@ index f11bd7545..93b9134d6 100644
} catch (final Throwable throwable) {
task.getOwner().getLogger().log(
Level.WARNING,
@@ -386,8 +385,10 @@ public class CraftScheduler implements BukkitScheduler {
@@ -416,8 +415,10 @@ public class CraftScheduler implements BukkitScheduler {
runners.remove(task.getTaskId());
}
}
@ -1658,7 +1647,7 @@ index f11bd7545..93b9134d6 100644
debugHead = debugHead.getNextHead(currentTick);
}
@@ -419,6 +420,7 @@ public class CraftScheduler implements BukkitScheduler {
@@ -450,6 +451,7 @@ public class CraftScheduler implements BukkitScheduler {
}
private void parsePending() {
@ -1666,7 +1655,7 @@ index f11bd7545..93b9134d6 100644
CraftTask head = this.head;
CraftTask task = head.getNext();
CraftTask lastTask = head;
@@ -437,6 +439,7 @@ public class CraftScheduler implements BukkitScheduler {
@@ -468,6 +470,7 @@ public class CraftScheduler implements BukkitScheduler {
task.setNext(null);
}
this.head = lastTask;
@ -1675,12 +1664,12 @@ index f11bd7545..93b9134d6 100644
private boolean isReady(final int currentTick) {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
index 7e7ce9a81..46029ce24 100644
index 3ec0f393ed..7490a187ec 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
@@ -1,8 +1,8 @@
package org.bukkit.craftbukkit.scheduler;
@@ -2,8 +2,8 @@ package org.bukkit.craftbukkit.scheduler;
import java.util.function.Consumer;
import org.bukkit.Bukkit;
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
-import org.spigotmc.CustomTimingsHandler; // Spigot
@ -1689,12 +1678,14 @@ index 7e7ce9a81..46029ce24 100644
import org.bukkit.plugin.Plugin;
import org.bukkit.scheduler.BukkitTask;
@@ -25,11 +25,11 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
@@ -26,12 +26,12 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
*/
private volatile long period;
private long nextRun;
- private final Runnable task;
+ public final Runnable task; // Paper
- private final Runnable rTask;
- private final Consumer<BukkitTask> cTask;
+ public final Runnable rTask; // Paper
+ public final Consumer<BukkitTask> cTask; // Paper
+ public Timing timings; // Paper
private final Plugin plugin;
private final int id;
@ -1703,61 +1694,59 @@ index 7e7ce9a81..46029ce24 100644
CraftTask() {
this(null, null, CraftTask.NO_REPEATING, CraftTask.NO_REPEATING);
}
@@ -38,26 +38,12 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
@@ -40,7 +40,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
this(null, task, CraftTask.NO_REPEATING, CraftTask.NO_REPEATING);
}
- // Spigot start
- public String timingName = null;
- CraftTask(String timingName) {
- this(timingName, null, null, -1, -1);
- }
- CraftTask(String timingName, final Runnable task) {
- this(timingName, null, task, -1, -1);
- }
- CraftTask(String timingName, final Plugin plugin, final Runnable task, final int id, final long period) {
+ CraftTask(final Plugin plugin, final Runnable task, final int id, final long period) { // Paper
- CraftTask(final Plugin plugin, final Object task, final int id, final long period) {
+ CraftTask(final Plugin plugin, final Object task, final int id, final long period) { // Paper
this.plugin = plugin;
this.task = task;
if (task instanceof Runnable) {
this.rTask = (Runnable) task;
@@ -57,7 +57,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
}
this.id = id;
this.period = period;
- this.timingName = timingName == null && task == null ? "Unknown" : timingName;
- timings = this.isSync() ? SpigotTimings.getPluginTaskTimings(this, period) : null;
- }
-
- CraftTask(final Plugin plugin, final Runnable task, final int id, final long period) {
- this(null, plugin, task, id, period);
- // Spigot end
- this.timings = this.isSync() ? SpigotTimings.getPluginTaskTimings(this, period) : null; // Spigot
+ timings = task != null ? MinecraftTimings.getPluginTaskTimings(this, period) : null; // Paper
}
public final int getTaskId() {
@@ -73,7 +59,9 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
}
@Override
@@ -77,11 +77,13 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
@Override
public void run() {
+ if (timings != null && isSync()) timings.startTiming(); // Paper
task.run();
if (rTask != null) {
rTask.run();
} else {
cTask.accept(this);
}
+ if (timings != null && isSync()) timings.stopTiming(); // Paper
}
long getPeriod() {
@@ -122,13 +110,4 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
setPeriod(CraftTask.CANCEL);
@@ -108,7 +110,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
this.next = next;
}
- Class<?> getTaskClass() {
+ public Class<?> getTaskClass() {
return (rTask != null) ? rTask.getClass() : ((cTask != null) ? cTask.getClass() : null);
}
@@ -132,9 +134,4 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
return true;
}
-
- // Spigot start
- public String getTaskName() {
- if (timingName != null) {
- return timingName;
- }
- return task.getClass().getName();
- return (getTaskClass() == null) ? "Unknown" : getTaskClass().getName();
- }
- // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
index e52ef47b7..3d90b3426 100644
index e52ef47b78..3d90b34268 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
@@ -5,6 +5,7 @@ import org.bukkit.util.CachedServerIcon;
@ -1769,7 +1758,7 @@ index e52ef47b7..3d90b3426 100644
this.value = value;
}
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index c1071c92e..a99c0cea0 100644
index c1071c92ee..a99c0cea0f 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -30,7 +30,7 @@ import net.minecraft.server.EntityWither;

Datei anzeigen

@ -1,4 +1,4 @@
From 1cb9cbce47d2a6c4e187a443c62e989183d70575 Mon Sep 17 00:00:00 2001
From dee7b0281b97ab14ed3dbd83a24dfbe776ff782e Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 14:32:43 -0600
Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
@ -6,7 +6,7 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java
index b64cac252..526f3af51 100644
index b64cac2523..526f3af516 100644
--- a/src/main/java/net/minecraft/server/EULA.java
+++ b/src/main/java/net/minecraft/server/EULA.java
@@ -49,7 +49,7 @@ public class EULA {
@ -19,7 +19,7 @@ index b64cac252..526f3af51 100644
a.warn("Failed to save {}", this.b, exception);
} finally {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2d812b024..8a6589d95 100644
index 2d812b0242..8a6589d95d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1213,7 +1213,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
@ -32,7 +32,7 @@ index 2d812b024..8a6589d95 100644
public CrashReport b(CrashReport crashreport) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 174605b6e..29b016e17 100644
index 174605b6e1..29b016e174 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -162,7 +162,7 @@ import org.bukkit.event.server.TabCompleteEvent;
@ -45,7 +45,7 @@ index 174605b6e..29b016e17 100644
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 28a34b54e..1ce1a2435 100644
index 28a34b54e0..1ce1a2435d 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -200,12 +200,25 @@ public class Main {
@ -76,7 +76,7 @@ index 28a34b54e..1ce1a2435 100644
MinecraftServer.main(options);
} catch (Throwable t) {
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 94a3d4237..91b8aa6a1 100644
index 14a1084aa2..21316d67f1 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -19,7 +19,7 @@ public class WatchdogThread extends Thread
@ -88,19 +88,25 @@ index 94a3d4237..91b8aa6a1 100644
this.timeoutTime = timeoutTime;
this.restart = restart;
}
@@ -56,9 +56,9 @@ public class WatchdogThread extends Thread
@@ -61,14 +61,14 @@ public class WatchdogThread extends Thread
{
Logger log = Bukkit.getServer().getLogger();
log.log( Level.SEVERE, "The server has stopped responding!" );
- log.log( Level.SEVERE, "Please report this to http://www.spigotmc.org/" );
+ log.log( Level.SEVERE, "Please report this to https://github.com/PaperMC/Paper/issues" );
log.log( Level.SEVERE, "------------------------------" );
- log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Spigot bug." );
+ log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Paper bug." ); // Paper
log.log( Level.SEVERE, "If you see a plugin in the Server thread dump below, then please report it to that author" );
log.log( Level.SEVERE, "\t *Especially* if it looks like HTTP or MySQL operations are occurring" );
log.log( Level.SEVERE, "If you see a world save or edit, then it means you did far more than your server can handle at once" );
log.log( Level.SEVERE, "\t If this is the case, consider increasing timeout-time in spigot.yml but note that this will replace the crash with LARGE lag spikes" );
- log.log( Level.SEVERE, "If you are unsure or still think this is a Spigot bug, please report to https://www.spigotmc.org/" );
+ log.log( Level.SEVERE, "If you are unsure or still think this is a Paper bug, please report this to https://github.com/PaperMC/Paper/issues" );
log.log( Level.SEVERE, "Be sure to include ALL relevant console errors and Minecraft crash reports" );
- log.log( Level.SEVERE, "Spigot version: " + Bukkit.getServer().getVersion() );
+ log.log( Level.SEVERE, "Paper version: " + Bukkit.getServer().getVersion() );
//
if(net.minecraft.server.World.haveWeSilencedAPhysicsCrash)
{
@@ -68,7 +68,7 @@ public class WatchdogThread extends Thread
@@ -78,7 +78,7 @@ public class WatchdogThread extends Thread
}
//
log.log( Level.SEVERE, "------------------------------" );

Datei anzeigen

@ -1,11 +1,11 @@
From 8ee594b1a78673a0e5929c629d3c540d48a5e515 Mon Sep 17 00:00:00 2001
From 28f85cba59d14521010bd7034f77d446210f32ab Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 02:48:12 -0600
Subject: [PATCH] Add velocity warnings
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index cd17cdcf3..71bdbac13 100644
index cd17cdcf38..71bdbac134 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -199,6 +199,7 @@ public final class CraftServer implements Server {
@ -17,7 +17,7 @@ index cd17cdcf3..71bdbac13 100644
private final class BooleanWrapper {
private boolean value = true;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index df7c77e9a..2858f11ee 100644
index df7c77e9aa..2858f11eef 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -265,12 +265,44 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@ -66,10 +66,10 @@ index df7c77e9a..2858f11ee 100644
public double getHeight() {
return getHandle().length;
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 91b8aa6a1..0c106ea9c 100644
index 21316d67f1..5d03191c80 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -66,7 +66,19 @@ public class WatchdogThread extends Thread
@@ -76,7 +76,19 @@ public class WatchdogThread extends Thread
log.log( Level.SEVERE, "During the run of the server, a physics stackoverflow was supressed" );
log.log( Level.SEVERE, "near " + net.minecraft.server.World.blockLocation);
}

Datei anzeigen

@ -1,4 +1,4 @@
From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001
From 825c761eae146d5af538b56bc5b6c81ee911e698 Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 03:15:41 -0600
Subject: [PATCH] Add exception reporting event
@ -6,7 +6,7 @@ Subject: [PATCH] Add exception reporting event
diff --git a/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java
new file mode 100644
index 7ac07ac07ac0..7ac07ac07ac0
index 0000000000..93397188b7
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java
@@ -0,0 +1,38 @@
@ -50,7 +50,7 @@ index 7ac07ac07ac0..7ac07ac07ac0
+}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index d8ea5c1b5d..11fd68f597 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1,5 +1,6 @@
@ -89,7 +89,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
}
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 709d384e95..a03748f738 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -15,6 +15,7 @@ import java.util.function.BooleanSupplier;
@ -118,7 +118,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
}
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 1d830dff64..58d971cf20 100644
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
@@ -1,5 +1,6 @@
@ -145,7 +145,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index f991fddf7d..e888c9bdba 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -1,5 +1,6 @@
@ -172,7 +172,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
}
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index d18921271f..e5115863ec 100644
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
@@ -1,5 +1,6 @@
@ -191,7 +191,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
}
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index b919226bbf..ec43086ad1 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -10,6 +10,7 @@ import org.apache.logging.log4j.LogManager;
@ -219,7 +219,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
}
diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index e649d662ae..560edb523f 100644
--- a/src/main/java/net/minecraft/server/VillageSiege.java
+++ b/src/main/java/net/minecraft/server/VillageSiege.java
@@ -1,5 +1,7 @@
@ -239,7 +239,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 051259cf80..a25c90518f 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1,6 +1,8 @@
@ -276,7 +276,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
this.tileEntityListTick.remove(tileTickPosition--);
continue;
diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index b21f7073f1..882b8fe4f1 100644
--- a/src/main/java/net/minecraft/server/WorldPersistentData.java
+++ b/src/main/java/net/minecraft/server/WorldPersistentData.java
@@ -138,6 +138,7 @@ public class WorldPersistentData {
@ -288,10 +288,10 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
throw throwable1;
} finally {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 9dec941fb7..3f43d9eeab 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -15,6 +15,9 @@ import java.util.concurrent.atomic.AtomicReference;
@@ -16,6 +16,9 @@ import java.util.function.Consumer;
import java.util.logging.Level;
import co.aikar.timings.MinecraftTimings; // Paper
@ -301,7 +301,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
import org.apache.commons.lang.Validate;
import org.bukkit.plugin.IllegalPluginAccessException;
import org.bukkit.plugin.Plugin;
@@ -360,20 +363,26 @@ public class CraftScheduler implements BukkitScheduler {
@@ -390,20 +393,26 @@ public class CraftScheduler implements BukkitScheduler {
try {
task.run();
} catch (final Throwable throwable) {

Datei anzeigen

@ -1,22 +1,22 @@
From eb5ad71f7aec293a9a071dfabcc1fa76d74230b3 Mon Sep 17 00:00:00 2001
From 69b58525c617618b2d24eb146c728d67a0ab680d Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 12 May 2016 23:02:58 -0500
Subject: [PATCH] System property for disabling watchdoge
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 0c106ea9c5..57a4748a30 100644
index 5d03191c80..ed5f46bf6f 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -52,7 +52,7 @@ public class WatchdogThread extends Thread
@@ -57,7 +57,7 @@ public class WatchdogThread extends Thread
while ( !stopping )
{
//
- if ( lastTick != 0 && System.currentTimeMillis() > lastTick + timeoutTime )
+ if ( lastTick != 0 && System.currentTimeMillis() > lastTick + timeoutTime && !Boolean.getBoolean("disable.watchdog")) // Paper - Add property to disable
- if ( lastTick != 0 && monotonicMillis() > lastTick + timeoutTime )
+ if ( lastTick != 0 && monotonicMillis() > lastTick + timeoutTime && !Boolean.getBoolean("disable.watchdog")) // Paper - Add property to disable
{
Logger log = Bukkit.getServer().getLogger();
log.log( Level.SEVERE, "The server has stopped responding!" );
log.log( Level.SEVERE, "------------------------------" );
--
2.19.0
2.19.1

Datei anzeigen

@ -1,4 +1,4 @@
From 33c49da2b7dbc7302550853833adb693e2a4d438 Mon Sep 17 00:00:00 2001
From f5086788419d64e74ca4647a8e34d439837a6f65 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 5 Feb 2017 00:04:04 -0500
Subject: [PATCH] Remove CraftScheduler Async Task Debugger
@ -9,10 +9,10 @@ One report of a suspected memory leak with the system.
This adds additional overhead to asynchronous task dispatching
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 26753fac5e..a2fadaf82c 100644
index 3f43d9eeab..5f228373e3 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -84,8 +84,8 @@ public class CraftScheduler implements BukkitScheduler {
@@ -85,8 +85,8 @@ public class CraftScheduler implements BukkitScheduler {
private volatile CraftTask currentTask = null;
private volatile int currentTick = -1;
private final Executor executor = Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("Craft Scheduler Thread - %1$d").build()); // Spigot
@ -23,7 +23,7 @@ index 26753fac5e..a2fadaf82c 100644
private static final int RECENT_TICKS;
static {
@@ -381,7 +381,7 @@ public class CraftScheduler implements BukkitScheduler {
@@ -411,7 +411,7 @@ public class CraftScheduler implements BukkitScheduler {
}
parsePending();
} else {
@ -32,7 +32,7 @@ index 26753fac5e..a2fadaf82c 100644
executor.execute(new ServerSchedulerReportingWrapper(task)); // Paper
// We don't need to parse pending
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
@@ -398,7 +398,7 @@ public class CraftScheduler implements BukkitScheduler {
@@ -428,7 +428,7 @@ public class CraftScheduler implements BukkitScheduler {
pending.addAll(temp);
temp.clear();
MinecraftTimings.bukkitSchedulerFinishTimer.stopTiming();
@ -41,7 +41,7 @@ index 26753fac5e..a2fadaf82c 100644
}
private void addTask(final CraftTask task) {
@@ -457,10 +457,15 @@ public class CraftScheduler implements BukkitScheduler {
@@ -488,10 +488,15 @@ public class CraftScheduler implements BukkitScheduler {
@Override
public String toString() {
@ -58,5 +58,5 @@ index 26753fac5e..a2fadaf82c 100644
@Deprecated
--
2.19.0
2.19.1

Datei anzeigen

@ -1,4 +1,4 @@
From 219b0871a8f1b93075b7ca410a4663b67771ee1c Mon Sep 17 00:00:00 2001
From e84041324c9d6f185d71c400f96f22715e6df8ce Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 16 Mar 2018 22:59:43 -0400
Subject: [PATCH] Improved Async Task Scheduler
@ -32,10 +32,10 @@ operations are decoupled from the sync tasks queue.
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncScheduler.java
new file mode 100644
index 0000000000..eaf8692877
index 0000000000..3c1992e212
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncScheduler.java
@@ -0,0 +1,127 @@
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2018 Daniel Ennis (Aikar) MIT License
+ *
@ -149,11 +149,6 @@ index 0000000000..eaf8692877
+ }
+ }
+
+ @Override
+ public synchronized void cancelAllTasks() {
+ cancelTasks(null);
+ }
+
+ /**
+ * Task is not cancelled
+ * @param runningTask
@ -164,10 +159,10 @@ index 0000000000..eaf8692877
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index a2fadaf82c..223afc7edc 100644
index 5f228373e3..a9107ce5d2 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -15,7 +15,6 @@ import java.util.concurrent.atomic.AtomicReference;
@@ -16,7 +16,6 @@ import java.util.function.Consumer;
import java.util.logging.Level;
import co.aikar.timings.MinecraftTimings; // Paper
@ -175,7 +170,7 @@ index a2fadaf82c..223afc7edc 100644
import com.destroystokyo.paper.event.server.ServerExceptionEvent;
import com.destroystokyo.paper.exception.ServerSchedulerException;
import org.apache.commons.lang.Validate;
@@ -61,7 +60,7 @@ public class CraftScheduler implements BukkitScheduler {
@@ -62,7 +61,7 @@ public class CraftScheduler implements BukkitScheduler {
/**
* Main thread logic only
*/
@ -184,7 +179,7 @@ index a2fadaf82c..223afc7edc 100644
new Comparator<CraftTask>() {
public int compare(final CraftTask o1, final CraftTask o2) {
int value = Long.compare(o1.getNextRun(), o2.getNextRun());
@@ -77,13 +76,13 @@ public class CraftScheduler implements BukkitScheduler {
@@ -78,13 +77,13 @@ public class CraftScheduler implements BukkitScheduler {
/**
* These are tasks that are currently active. It's provided for 'viewing' the current state.
*/
@ -201,10 +196,11 @@ index a2fadaf82c..223afc7edc 100644
//private CraftAsyncDebugger debugHead = new CraftAsyncDebugger(-1, null, null) {@Override StringBuilder debugTo(StringBuilder string) {return string;}}; // Paper
//private CraftAsyncDebugger debugTail = debugHead; // Paper
private static final int RECENT_TICKS;
@@ -92,6 +91,23 @@ public class CraftScheduler implements BukkitScheduler {
@@ -93,6 +92,23 @@ public class CraftScheduler implements BukkitScheduler {
RECENT_TICKS = 30;
}
+
+ // Paper start
+ private final CraftScheduler asyncScheduler;
+ private final boolean isAsyncScheduler;
@ -221,11 +217,10 @@ index a2fadaf82c..223afc7edc 100644
+ }
+ }
+ // Paper end
+
@Override
public int scheduleSyncDelayedTask(final Plugin plugin, final Runnable task) {
return this.scheduleSyncDelayedTask(plugin, task, 0L);
}
@@ -158,7 +174,7 @@ public class CraftScheduler implements BukkitScheduler {
@@ -209,7 +225,7 @@ public class CraftScheduler implements BukkitScheduler {
} else if (period < CraftTask.NO_REPEATING) {
period = CraftTask.NO_REPEATING;
}
@ -233,8 +228,8 @@ index a2fadaf82c..223afc7edc 100644
+ return handle(new CraftAsyncTask(this.asyncScheduler.runners, plugin, runnable, nextId(), period), delay); // Paper
}
public <T> Future<T> callSyncMethod(final Plugin plugin, final Callable<T> task) {
@@ -172,6 +188,11 @@ public class CraftScheduler implements BukkitScheduler {
@Override
@@ -225,6 +241,11 @@ public class CraftScheduler implements BukkitScheduler {
if (taskId <= 0) {
return;
}
@ -246,8 +241,8 @@ index a2fadaf82c..223afc7edc 100644
CraftTask task = runners.get(taskId);
if (task != null) {
task.cancel0();
@@ -211,6 +232,11 @@ public class CraftScheduler implements BukkitScheduler {
@@ -265,6 +286,11 @@ public class CraftScheduler implements BukkitScheduler {
@Override
public void cancelTasks(final Plugin plugin) {
Validate.notNull(plugin, "Cannot cancel tasks of null plugin");
+ // Paper start
@ -258,21 +253,9 @@ index a2fadaf82c..223afc7edc 100644
final CraftTask task = new CraftTask(
new Runnable() {
public void run() {
@@ -248,6 +274,11 @@ public class CraftScheduler implements BukkitScheduler {
}
public void cancelAllTasks() {
+ // Paper start
+ if (!this.isAsyncScheduler) {
+ this.asyncScheduler.cancelAllTasks();
+ }
+ // Paper end
final CraftTask task = new CraftTask(
new Runnable() {
public void run() {
@@ -276,6 +307,13 @@ public class CraftScheduler implements BukkitScheduler {
}
@@ -303,6 +329,13 @@ public class CraftScheduler implements BukkitScheduler {
@Override
public boolean isCurrentlyRunning(final int taskId) {
+ // Paper start
+ if (!isAsyncScheduler) {
@ -284,7 +267,7 @@ index a2fadaf82c..223afc7edc 100644
final CraftTask task = runners.get(taskId);
if (task == null) {
return false;
@@ -293,6 +331,11 @@ public class CraftScheduler implements BukkitScheduler {
@@ -321,6 +354,11 @@ public class CraftScheduler implements BukkitScheduler {
if (taskId <= 0) {
return false;
}
@ -296,9 +279,9 @@ index a2fadaf82c..223afc7edc 100644
for (CraftTask task = head.getNext(); task != null; task = task.getNext()) {
if (task.getTaskId() == taskId) {
return task.getPeriod() >= CraftTask.NO_REPEATING; // The task will run
@@ -303,6 +346,12 @@ public class CraftScheduler implements BukkitScheduler {
}
@@ -332,6 +370,12 @@ public class CraftScheduler implements BukkitScheduler {
@Override
public List<BukkitWorker> getActiveWorkers() {
+ // Paper start
+ if (!isAsyncScheduler) {
@ -309,7 +292,7 @@ index a2fadaf82c..223afc7edc 100644
final ArrayList<BukkitWorker> workers = new ArrayList<BukkitWorker>();
for (final CraftTask taskObj : runners.values()) {
// Iterator will be a best-effort (may fail to grab very new values) if called from an async thread
@@ -339,6 +388,11 @@ public class CraftScheduler implements BukkitScheduler {
@@ -369,6 +413,11 @@ public class CraftScheduler implements BukkitScheduler {
pending.add(task);
}
}
@ -321,7 +304,7 @@ index a2fadaf82c..223afc7edc 100644
return pending;
}
@@ -346,6 +400,11 @@ public class CraftScheduler implements BukkitScheduler {
@@ -376,6 +425,11 @@ public class CraftScheduler implements BukkitScheduler {
* This method is designed to never block or wait for locks; an immediate execution of all current tasks.
*/
public void mainThreadHeartbeat(final int currentTick) {
@ -333,7 +316,7 @@ index a2fadaf82c..223afc7edc 100644
this.currentTick = currentTick;
final List<CraftTask> temp = this.temp;
parsePending();
@@ -382,7 +441,7 @@ public class CraftScheduler implements BukkitScheduler {
@@ -412,7 +466,7 @@ public class CraftScheduler implements BukkitScheduler {
parsePending();
} else {
//debugTail = debugTail.setNext(new CraftAsyncDebugger(currentTick + RECENT_TICKS, task.getOwner(), task.getTaskClass())); // Paper
@ -342,7 +325,7 @@ index a2fadaf82c..223afc7edc 100644
// We don't need to parse pending
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
}
@@ -401,7 +460,7 @@ public class CraftScheduler implements BukkitScheduler {
@@ -431,7 +485,7 @@ public class CraftScheduler implements BukkitScheduler {
//debugHead = debugHead.getNextHead(currentTick); // Paper
}
@ -351,7 +334,7 @@ index a2fadaf82c..223afc7edc 100644
final AtomicReference<CraftTask> tail = this.tail;
CraftTask tailTask = tail.get();
while (!tail.compareAndSet(tailTask, task)) {
@@ -410,7 +469,13 @@ public class CraftScheduler implements BukkitScheduler {
@@ -440,7 +494,13 @@ public class CraftScheduler implements BukkitScheduler {
tailTask.setNext(task);
}
@ -366,7 +349,7 @@ index a2fadaf82c..223afc7edc 100644
task.setNextRun(currentTick + delay);
addTask(task);
return task;
@@ -428,8 +493,8 @@ public class CraftScheduler implements BukkitScheduler {
@@ -459,8 +519,8 @@ public class CraftScheduler implements BukkitScheduler {
return ids.incrementAndGet();
}
@ -377,7 +360,7 @@ index a2fadaf82c..223afc7edc 100644
CraftTask head = this.head;
CraftTask task = head.getNext();
CraftTask lastTask = head;
@@ -448,7 +513,7 @@ public class CraftScheduler implements BukkitScheduler {
@@ -479,7 +539,7 @@ public class CraftScheduler implements BukkitScheduler {
task.setNext(null);
}
this.head = lastTask;
@ -387,5 +370,5 @@ index a2fadaf82c..223afc7edc 100644
private boolean isReady(final int currentTick) {
--
2.19.0
2.19.1

Datei anzeigen

@ -1,4 +1,4 @@
From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001
From 92edd7342e31fb32f8cb5249c30aefb8570cd12b Mon Sep 17 00:00:00 2001
From: miclebrick <miclebrick@outlook.com>
Date: Wed, 8 Aug 2018 15:30:52 -0400
Subject: [PATCH] Add Early Warning Feature to WatchDog
@ -9,7 +9,7 @@ thread dumps at an interval until the point of crash.
This will help diagnose what was going on in that time before the crash.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index fad2f8f822..4061073b22 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -25,6 +25,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
@ -36,7 +36,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
public static int tabSpamLimit = 500;
private static void tabSpamLimiters() {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 498a0c4504..1166209840 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -796,6 +796,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
@ -48,7 +48,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
long start = System.nanoTime(), curTime, wait, tickSection = start; // Paper - Further improve server tick loop
lastTick = start - TICK_TIME; // Paper
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index eed96c60c5..496c5cbdff 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -226,7 +226,7 @@ public class SpigotConfig
@ -61,7 +61,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
public static boolean bungee;
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index ed5f46bf6f..9dba9510f5 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -5,6 +5,7 @@ import java.lang.management.MonitorInfo;
@ -91,30 +91,29 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
+ earlyWarningDelay = Math.min(PaperConfig.watchdogPrintEarlyWarningDelay, timeoutTime); // Paper
}
public static void doStart(int timeoutTime, boolean restart)
@@ -51,10 +58,19 @@ public class WatchdogThread extends Thread
private static long monotonicMillis()
@@ -56,10 +63,17 @@ public class WatchdogThread extends Thread
{
while ( !stopping )
{
- //
- if ( lastTick != 0 && System.currentTimeMillis() > lastTick + timeoutTime && !Boolean.getBoolean("disable.watchdog")) // Paper - Add property to disable
- if ( lastTick != 0 && monotonicMillis() > lastTick + timeoutTime && !Boolean.getBoolean("disable.watchdog")) // Paper - Add property to disable
+ // Paper start
+ long currentTime = System.currentTimeMillis();
+ Logger log = Bukkit.getServer().getLogger();
+ long currentTime = monotonicMillis();
+ if ( lastTick != 0 && currentTime > lastTick + earlyWarningEvery && !Boolean.getBoolean("disable.watchdog") )
{
- Logger log = Bukkit.getServer().getLogger();
+ boolean isLongTimeout = currentTime > lastTick + timeoutTime;
+ // Don't spam early warning dumps
+ if ( !isLongTimeout && (earlyWarningEvery <= 0 || !hasStarted || currentTime < lastEarlyWarning + earlyWarningEvery || currentTime < lastTick + earlyWarningDelay)) continue;
+ lastEarlyWarning = currentTime;
+ if (isLongTimeout) {
+ // Paper end
Logger log = Bukkit.getServer().getLogger();
+ // Paper start - Different message when it's a short timeout
+ if ( isLongTimeout )
+ {
log.log( Level.SEVERE, "The server has stopped responding!" );
log.log( Level.SEVERE, "Please report this to https://github.com/PaperMC/Paper/issues" );
log.log( Level.SEVERE, "Be sure to include ALL relevant console errors and Minecraft crash reports" );
@@ -79,29 +95,46 @@ public class WatchdogThread extends Thread
log.log( Level.SEVERE, "------------------------------" );
log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Paper bug." ); // Paper
log.log( Level.SEVERE, "If you see a plugin in the Server thread dump below, then please report it to that author" );
@@ -89,29 +103,46 @@ public class WatchdogThread extends Thread
}
}
// Paper end

Datei anzeigen

@ -1,4 +1,4 @@
From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001
From 1327dba7574aab69be1fae6afa1bd0a01503682e Mon Sep 17 00:00:00 2001
From: Zach Brown <zach@zachbr.io>
Date: Wed, 3 Oct 2018 20:09:18 -0400
Subject: [PATCH] Hook into CB plugin rewrites
@ -8,7 +8,7 @@ our own relocation. Also lets us rewrite NMS calls for when we're
debugging in an IDE pre-relocate.
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 24d608399f..212a50c88e 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -6,7 +6,9 @@ import java.io.FileOutputStream;
@ -171,10 +171,10 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
if ( modern )
{
super.visitFieldInsn( opcode, owner, name, desc );
@@ -199,6 +317,14 @@ public class Commodore
@Override
public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf)
{
@@ -207,6 +325,14 @@ public class Commodore
return;
}
+ // Paper start - Rewrite plugins
+ owner = getOriginalOrRewrite( owner) ;
+ if (desc != null)

@ -1 +1 @@
Subproject commit 689f15654dbcf994a9482d59066e3847cd6baf95
Subproject commit 9a793cce8c9257ce85069c531486f369ad6328f1

@ -1 +1 @@
Subproject commit f489f0f745f54783835475b980a3aee4b5cdfcf0
Subproject commit 8cd538e66144bd93f9139574b179b2413ee5dd62

@ -1 +1 @@
Subproject commit 9b4b0a21848d0f3a4bdf66bad7aea28af2281cd1
Subproject commit a1f2566f6906c2d67514cc6473ababaf3986f9ac