geforkt von Mirrors/Paper
29b17a892d
Upstream has released updates that appear 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: 5efeb7bd Also update compiler version c13b867a Update some Maven plugin versions deb28d9f PR-837: Add more bell API e938d62a PR-819: Allow Player#sendBlockDamage() to specify a source entity 0e75532c PR-818: Add more Guardian API, particularly for its laser a10155aa PR-839: Add BlockData#rotate and BlockData#mirror 77e690b4 PR-836: Add missing API for explosive minecarts 60722059 PR-832: Allow getting chunks without generating them and optimize chunk data request for ungenerated chunks 0a2c4b4b PR-834: Add Player#sendHurtAnimation() CraftBukkit Changes: be8682aa8 Also update compiler version 08e305f5b Update some Maven plugin versions 187bdd463 PR-1160: Add more bell API 2f8e5bc7c PR-1145: Allow Player#sendBlockDamage() to specify a source entity bcbb61b36 PR-1144: Add more Guardian API, particularly for its laser 722ddff6d PR-1162: Add BlockData#rotate and BlockData#mirror 80998277c PR-1159: Add missing API for explosive minecarts 1fddefce1 PR-1155: Allow getting chunks without generating them and optimize chunk data request for ungenerated chunks 20e8a486f PR-1157: Add Player#sendHurtAnimation() Spigot Changes: b31949f2 Rebuild patches
71 Zeilen
2.5 KiB
Diff
71 Zeilen
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: dawon <dawon@dawon.eu>
|
|
Date: Sat, 15 Oct 2022 00:46:32 +0200
|
|
Subject: [PATCH] Add Player Warden Warning API
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
|
index 63c4c2d96a3c508a92a6404911de47b2cc83dc45..9e2116c121704602c2702414db39b5d1bd559c3d 100644
|
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
|
@@ -2914,6 +2914,59 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
|
* @param silent whether sound should be silenced
|
|
*/
|
|
void showElderGuardian(boolean silent);
|
|
+
|
|
+ /**
|
|
+ * Returns the player's cooldown in ticks until the next Warden warning can occur.
|
|
+ *
|
|
+ * @return ticks until next Warden warning can occur. 0 means there is no cooldown left.
|
|
+ */
|
|
+ int getWardenWarningCooldown();
|
|
+
|
|
+ /**
|
|
+ * Sets the player's cooldown in ticks until next Warden warning can occur.
|
|
+ *
|
|
+ * @param cooldown ticks until next Warden warning can occur. 0 means there is no cooldown left. Values less than 0 are set to 0.
|
|
+ */
|
|
+ void setWardenWarningCooldown(int cooldown);
|
|
+
|
|
+ /**
|
|
+ * Returns time since last Warden warning in ticks.
|
|
+ *
|
|
+ * @return ticks since last Warden warning
|
|
+ */
|
|
+ int getWardenTimeSinceLastWarning();
|
|
+
|
|
+ /**
|
|
+ * Sets time since last Warden warning in ticks.
|
|
+ *
|
|
+ * @param time ticks since last Warden warning
|
|
+ */
|
|
+ void setWardenTimeSinceLastWarning(int time);
|
|
+
|
|
+ /**
|
|
+ * Returns the player's current Warden warning level.
|
|
+ *
|
|
+ * @return current Warden warning level
|
|
+ */
|
|
+ int getWardenWarningLevel();
|
|
+
|
|
+ /**
|
|
+ * Sets the player's Warden warning level.
|
|
+ * <p>
|
|
+ * <b>Note:</b> This will not actually spawn the Warden.
|
|
+ * Even if the warning level is over threshold, the player still needs to activate a Shrieker in order to summon the Warden.
|
|
+ *
|
|
+ * @param warningLevel player's Warden warning level. The warning level is internally limited to valid values.
|
|
+ */
|
|
+ void setWardenWarningLevel(int warningLevel);
|
|
+
|
|
+ /**
|
|
+ * Increases the player's Warden warning level if possible and not on cooldown.
|
|
+ * <p>
|
|
+ * <b>Note:</b> This will not actually spawn the Warden.
|
|
+ * Even if the warning level is over threshold, the player still needs to activate a Shrieker in order to summon the Warden.
|
|
+ */
|
|
+ void increaseWardenWarningLevel();
|
|
// Paper end
|
|
|
|
@NotNull
|