aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0745-Elder-Guardian-appearance-API.patch
blob: b7e5065d43d086fbf33ee03d9a4078a800c4e965 (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 2aaf9e87a7322392d713bd869b0bdddae88db7ff..dc09ddfb8e695606fe4dfd2594d75ab312ee9b78 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3322,6 +3322,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;