diff options
author | Nassim Jahnke <[email protected]> | 2024-02-23 14:37:33 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-02-23 14:37:33 +0100 |
commit | 71c84c8132a463ca26978b852bbbf33ae42cd4ce (patch) | |
tree | bbdde5e8056d16ba6778e56165db39b1f6d44468 /patches/api/0385-Add-Player-Warden-Warning-API.patch | |
parent | 3ea95efdebba7254e842dec66214f71de4721993 (diff) | |
download | Paper-71c84c8132a463ca26978b852bbbf33ae42cd4ce.tar.gz Paper-71c84c8132a463ca26978b852bbbf33ae42cd4ce.zip |
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10277)
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:
9a80d38c SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, PR-722: Add EntityRemoveEvent
258086d9 SPIGOT-7417, PR-967: Add Sign#getTargetSide and Sign#getAllowedEditor
ffaba051 SPIGOT-7584: Add missing Tag.ITEMS_NON_FLAMMABLE_WOOD
CraftBukkit Changes:
98b6c1ac7 SPIGOT-7589 Fix NullPointerException when bans expire
a2736ddb0 SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, PR-1008: Add EntityRemoveEvent
5bf12cb89 SPIGOT-7565: Throw a more descriptive error message when a developer tries to spawn an entity from a CraftBukkit class
76d95fe7e SPIGOT-7417, PR-1343: Add Sign#getTargetSide and Sign#getAllowedEditor
Spigot Changes:
e9ec5485 Rebuild patches
f1b62e0c Rebuild patches
Diffstat (limited to 'patches/api/0385-Add-Player-Warden-Warning-API.patch')
-rw-r--r-- | patches/api/0385-Add-Player-Warden-Warning-API.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/patches/api/0385-Add-Player-Warden-Warning-API.patch b/patches/api/0385-Add-Player-Warden-Warning-API.patch new file mode 100644 index 0000000000..1bc7d6a95a --- /dev/null +++ b/patches/api/0385-Add-Player-Warden-Warning-API.patch @@ -0,0 +1,70 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: dawon <[email protected]> +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 ada7cfe2070eae77591b3138b88d389fbaab281a..8a862dbf093ca0812aa1ce8def1e650380c303d0 100644 +--- a/src/main/java/org/bukkit/entity/Player.java ++++ b/src/main/java/org/bukkit/entity/Player.java +@@ -3480,6 +3480,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 |