aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0823-Correctly-handle-ArmorStand-invisibility.patch
blob: ea22d2900687196d95ddaccadea52ca5780055cb (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
25
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Sun, 5 Mar 2023 14:38:21 -0800
Subject: [PATCH] Correctly handle ArmorStand invisibility


diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
index 2c16cedf8cb2e4047415e056c419ed9c33c80e93..ccda0d7a96c201905f0f62dcb0e5b278a51dee9f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
@@ -152,6 +152,14 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
         this.getHandle().noPhysics = !gravity;
     }
 
+    // Paper start - Armor Stand has its own invisible field
+    @Override
+    public void setInvisible(final boolean invisible) {
+        this.getHandle().setInvisible(invisible);
+        super.setInvisible(invisible);
+    }
+    // Paper end
+
     @Override
     public boolean isVisible() {
         return !this.getHandle().isInvisible();