mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
AFK API
This commit is contained in:
committed by
granny
parent
c5902528c1
commit
fb0d9a1cd6
@@ -1,6 +1,6 @@
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3911,4 +_,13 @@
|
||||
@@ -3911,4 +_,33 @@
|
||||
*/
|
||||
void sendEntityEffect(org.bukkit.@NotNull EntityEffect effect, @NotNull Entity target);
|
||||
// Paper end - entity effect API
|
||||
@@ -12,5 +12,25 @@
|
||||
+ * @return true if player uses PurpurClient
|
||||
+ */
|
||||
+ public boolean usesPurpurClient();
|
||||
+
|
||||
+ /**
|
||||
+ * Check if player is AFK
|
||||
+ *
|
||||
+ * @return True if AFK
|
||||
+ */
|
||||
+ boolean isAfk();
|
||||
+
|
||||
+ /**
|
||||
+ * Set player as AFK
|
||||
+ *
|
||||
+ * @param setAfk Whether to set AFK or not
|
||||
+ */
|
||||
+ void setAfk(boolean setAfk);
|
||||
+
|
||||
+ /**
|
||||
+ * Reset the idle timer back to 0
|
||||
+ * @deprecated Use {@link #resetIdleDuration()} instead
|
||||
+ */
|
||||
+ void resetIdleTimer();
|
||||
+ // Purpur end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user