Skip to content

Commit 1996743

Browse files
Merge pull request #1066 from TonytheMacaroni/disguise-block-data
Properly set enderman held block in DisguiseSpell
2 parents bb4f96f + 8c0939d commit 1996743

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

core/src/main/java/com/nisovin/magicspells/spells/buff/ext/DisguiseSpell.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import org.bukkit.entity.Villager;
99
import org.bukkit.entity.LivingEntity;
1010

11+
import io.github.retrooper.packetevents.util.SpigotConversionUtil;
12+
1113
import com.nisovin.magicspells.MagicSpells;
1214
import com.nisovin.magicspells.util.DependsOn;
1315
import com.nisovin.magicspells.util.SpellData;
@@ -153,7 +155,7 @@ public boolean castBuff(SpellData data) {
153155
droppedItemWatcher.setItemStack(entityData.getDroppedItemStack().get(data));
154156

155157
if (watcher instanceof EndermanWatcher endermanWatcher)
156-
endermanWatcher.setItemInMainHand(entityData.getCarriedBlockData().get(data).getMaterial());
158+
endermanWatcher.setHeldBlock(SpigotConversionUtil.fromBukkitBlockData(entityData.getCarriedBlockData().get(data)));
157159

158160
if (watcher instanceof FallingBlockWatcher fallingBlockWatcher)
159161
fallingBlockWatcher.setBlockData(entityData.getFallingBlockData().get(data));

0 commit comments

Comments
 (0)