From f57cdf1a2b42fa15e8c3e5c1a0e6345096cd6bc3 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Wed, 7 Mar 2018 00:14:33 +0100 Subject: [PATCH] #333 Update locked door magic values --- .../io/github/dre2n/dungeonsxl/world/block/LockedDoor.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/dre2n/dungeonsxl/world/block/LockedDoor.java b/src/main/java/io/github/dre2n/dungeonsxl/world/block/LockedDoor.java index f24b3ddc..96bd7ecc 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/world/block/LockedDoor.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/world/block/LockedDoor.java @@ -18,7 +18,9 @@ package io.github.dre2n.dungeonsxl.world.block; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; +import org.bukkit.block.BlockState; import org.bukkit.event.block.BlockBreakEvent; +import org.bukkit.material.Door; /** * A locked door that may be opened with a trigger. @@ -55,7 +57,9 @@ public class LockedDoor extends GameBlock implements MultiBlock { * Opens the door. */ public void open() { - block.setData((byte) (block.getData() + 4)); + BlockState state = block.getState(); + ((Door) state.getData()).setOpen(true); + state.update(true); } }