diff --git a/patches/server/0013-AFK-API.patch b/patches/server/0013-AFK-API.patch index de168e48f..f6fbea6bb 100644 --- a/patches/server/0013-AFK-API.patch +++ b/patches/server/0013-AFK-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] AFK API diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 0c4ccba73aab8a000d9cf1342aca4509383ac96f..c2a136d3f1ced0c42aae800e849ee704ddb6ce87 100644 +index 8207208d6fb3f982e9909add9e74a0dda69e8120..5e8a5e8e4120420a170c4733ae217e7948cef46c 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -2621,8 +2621,68 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple @@ -223,7 +223,7 @@ index 5d7a6e4b73f032db356e7ec369b150013e940ee6..e164833de0c29eed9025dd4af3f2bb74 if (range < 0.0 || d < range * range) { return true; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c5bd2a45b32e8dff83c148379544db125684622a..1016578c06d549683982dccfdce905d84d05eb83 100644 +index c5bd2a45b32e8dff83c148379544db125684622a..16671636da1b6da62a0bdf0daab745fcd89143b7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -584,10 +584,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -243,11 +243,11 @@ index c5bd2a45b32e8dff83c148379544db125684622a..1016578c06d549683982dccfdce905d8 if (this.getHandle().connection == null) return; // Paper - Updates are possible before the player has fully joined for (ServerPlayer player : (List) this.server.getHandle().players) { if (player.getBukkitEntity().canSee(this)) { -@@ -3571,5 +3576,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - public boolean usesPurpurClient() { +@@ -3572,4 +3577,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return getHandle().purpurClient; } -+ + // Purpur end - Purpur client support ++ // Purpur start - AFK API + @Override + public boolean isAfk() { + return getHandle().isAfk(); @@ -262,7 +262,7 @@ index c5bd2a45b32e8dff83c148379544db125684622a..1016578c06d549683982dccfdce905d8 + public void resetIdleTimer() { + getHandle().resetLastActionTime(); + } - // Purpur end - Purpur client support ++ // Purpur end - AFK API } diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java index 1321955eb23272d96e3028c1c46e75f6c1eaade0..82f0ae89ef3f0dc614edb4ccd3caa66cb387044c 100644 diff --git a/patches/server/0253-Debug-Marker-API.patch b/patches/server/0253-Debug-Marker-API.patch index 4e6e38de7..0da233ca6 100644 --- a/patches/server/0253-Debug-Marker-API.patch +++ b/patches/server/0253-Debug-Marker-API.patch @@ -101,13 +101,13 @@ index f1e85d6c745397fe012f1ae0fd6f64353eac65a7..5d7af6c1ec557d2a2813b87a64b8c8a9 @Override public Collection getStructures(int x, int z) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 29571c771c18387ee2a9be1fccad5f717f7b4021..84f184f366ac56956f9d290678c5684a9c957eb0 100644 +index da20ebe8858b4ab5bf8ac62aeac1942320bfa91c..95d011d48c312f247d766650b33d2366a774e5bf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3614,5 +3614,44 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - public void resetIdleTimer() { +@@ -3616,4 +3616,43 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getHandle().resetLastActionTime(); } + // Purpur end - AFK API + // Purpur start - Debug Marker API + @Override + public void sendBlockHighlight(Location location, int duration) { @@ -147,5 +147,4 @@ index 29571c771c18387ee2a9be1fccad5f717f7b4021..84f184f366ac56956f9d290678c5684a + this.getHandle().connection.send(new net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket(new net.minecraft.network.protocol.common.custom.GameTestClearMarkersDebugPayload())); + } + // Purpur end - Debug Marker API - // Purpur end - Purpur client support } diff --git a/patches/server/0256-Add-death-screen-API.patch b/patches/server/0256-Add-death-screen-API.patch index 8f6398a0a..82b325cc5 100644 --- a/patches/server/0256-Add-death-screen-API.patch +++ b/patches/server/0256-Add-death-screen-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add death screen API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 84f184f366ac56956f9d290678c5684a9c957eb0..be78f020bb5dc57366d5eee84805a3fa75ae27db 100644 +index 95d011d48c312f247d766650b33d2366a774e5bf..df6fc6e6f4d1587dad704f609a854c5d996cf358 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3653,5 +3653,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3655,4 +3655,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().connection.send(new net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket(new net.minecraft.network.protocol.common.custom.GameTestClearMarkersDebugPayload())); } // Purpur end - Debug Marker API @@ -19,5 +19,4 @@ index 84f184f366ac56956f9d290678c5684a9c957eb0..be78f020bb5dc57366d5eee84805a3fa + this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundPlayerCombatKillPacket(getEntityId(), io.papermc.paper.adventure.PaperAdventure.asVanilla(message))); + } + // Purpur end - Add death screen API - // Purpur end - Purpur client support }