diff options
author | Spottedleaf <[email protected]> | 2024-10-25 12:47:52 -0700 |
---|---|---|
committer | Spottedleaf <[email protected]> | 2024-10-25 13:05:26 -0700 |
commit | e4efb590e49d30c9abe606838572aa5b4e9b5572 (patch) | |
tree | 9b60f27fd5f94daa2ea0a24edef90eb52c5811ea /patches/api/0419-Add-player-idle-duration-API.patch | |
parent | 2e76d3f1e200c567e62337e0d50ddcb01e3ea895 (diff) | |
download | Paper-e4efb590e49d30c9abe606838572aa5b4e9b5572.tar.gz Paper-e4efb590e49d30c9abe606838572aa5b4e9b5572.zip |
fix compile issues
Diffstat (limited to 'patches/api/0419-Add-player-idle-duration-API.patch')
-rw-r--r-- | patches/api/0419-Add-player-idle-duration-API.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/patches/api/0419-Add-player-idle-duration-API.patch b/patches/api/0419-Add-player-idle-duration-API.patch new file mode 100644 index 0000000000..ac250c0760 --- /dev/null +++ b/patches/api/0419-Add-player-idle-duration-API.patch @@ -0,0 +1,41 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: booky10 <[email protected]> +Date: Sat, 14 Oct 2023 03:11:11 +0200 +Subject: [PATCH] Add player idle duration API + +Implements API for getting and resetting a player's idle duration. + +diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java +index e128750b1175ab8bbe9b23fdd931665262c8d75e..4297a893799fe39b80029b97f6b5581d543afa8a 100644 +--- a/src/main/java/org/bukkit/entity/Player.java ++++ b/src/main/java/org/bukkit/entity/Player.java +@@ -3782,6 +3782,29 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + void increaseWardenWarningLevel(); + // Paper end + ++ // Paper start ++ /** ++ * The idle duration is reset when the player ++ * sends specific action packets. ++ * <p> ++ * After the idle duration exceeds {@link org.bukkit.Bukkit#getIdleTimeout()}, the ++ * player will be kicked for {@link org.bukkit.event.player.PlayerKickEvent.Cause#IDLING}. ++ * ++ * @return the current idle duration of this player ++ */ ++ @NotNull Duration getIdleDuration(); ++ ++ /** ++ * Resets this player's idle duration. ++ * <p> ++ * After the idle duration exceeds {@link org.bukkit.Bukkit#getIdleTimeout()}, the ++ * player will be kicked for {@link org.bukkit.event.player.PlayerKickEvent.Cause#IDLING}. ++ * ++ * @see #getIdleDuration() ++ */ ++ void resetIdleDuration(); ++ // Paper end ++ + @NotNull + @Override + Spigot spigot(); |