geforkt von Mirrors/Paper
0b20f94297
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: 96340858 PR-938: Various Sound API improvements cbfe0ff0 PR-937: Minor improvements to World#rayTrace documentation e979ee95 PR-935: Change Consumer and Predicates to super 27ae46dc SPIGOT-3641, SPIGOT-7479, PR-931: Add missing values to EntityEffect 0616ec8b Add eclipse .factorypath file to .gitignore CraftBukkit Changes: 8e162d008 PR-1301: Various Sound API improvements eeb7dfc2d SPIGOT-7520: Attribute LootTableSeed missing for generated containers with attached LootTable d433f086d PR-1297: Change Consumer and Predicates to super 864f616da SPIGOT-7518: Fix NullPointerException when calling Block#applyBoneMeal() 5a2d905af Add eclipse .factorypath file to .gitignore 7c6bf15d4 Fix SkullMeta configuration serialization / deserialization with note block sound Spigot Changes: 7de1049b 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 11b64a94457c1c64e8557bfe3e1ba6387ca9abe6..9b820f607142808859262770cb38e8a1afdffd9f 100644
|
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
|
@@ -3202,6 +3202,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
|