Paper/patches/api/0382-Elder-Guardian-appearance-API.patch
Jake Potrebic e105354330
Fix incorrect new blockdata in EntityChangeBlockEvent (#9445)
Also fixes EntityBreakDoorEvent not having the correct 'to' block data

Also standardizes how to handle EntityChangeBlockEvent before a removeBlock or destroyBlock
call. Always use 'state.getFluidState().createLegacyBlock()' to get the new state instead of
just using the 'air' state.
2023-07-07 10:25:36 -07:00

36 lines
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: SoSeDiK <mrsosedik@gmail.com>
Date: Tue, 11 Oct 2022 20:38:47 +0300
Subject: [PATCH] Elder Guardian appearance API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 2018df5aff5042034b8d982844d28e71936700dc..4e43793a57ecf78a04972168b5a9a116ff18e30a 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3020,6 +3020,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
void lookAt(@NotNull org.bukkit.entity.Entity entity, @NotNull io.papermc.paper.entity.LookAnchor playerAnchor, @NotNull io.papermc.paper.entity.LookAnchor entityAnchor);
// Paper end - Teleport API
+ // Paper start
+ /**
+ * Displays elder guardian effect with a sound
+ *
+ * @see #showElderGuardian(boolean)
+ */
+ default void showElderGuardian() {
+ showElderGuardian(false);
+ }
+
+ /**
+ * Displays elder guardian effect and optionally plays a sound
+ *
+ * @param silent whether sound should be silenced
+ */
+ void showElderGuardian(boolean silent);
+ // Paper end
+
@NotNull
@Override
Spigot spigot();