aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0886-Elder-Guardian-appearance-API.patch
blob: e3bd866b081cd1f8947558dfbc04a6968fdeb5ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 27b8dffd5ba6bae22a8a12544d65a00f43394765..6c452b97429930ff3033d8cb74632923e12de2e3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3109,6 +3109,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
     }
     // Paper end
 
+    // Paper start
+    @Override
+    public void showElderGuardian(boolean silent) {
+        if (getHandle().connection != null) getHandle().connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.GUARDIAN_ELDER_EFFECT, silent ? 0F : 1F));
+    }
+    // Paper end
+
     public Player.Spigot spigot()
     {
         return this.spigot;