From 527cff6aeb0ce7a5669d9344472327d965218a59 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Wed, 17 Jun 2020 00:14:41 +0200 Subject: [PATCH] Fix interact / trigger sign problems; resolves #793 --- .../de/erethon/dungeonsxl/sign/passive/InteractSign.java | 9 ++++++++- .../de/erethon/dungeonsxl/sign/rocker/TriggerSign.java | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/passive/InteractSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/passive/InteractSign.java index 787bf075..dafff4cb 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/passive/InteractSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/passive/InteractSign.java @@ -28,6 +28,7 @@ import java.util.HashSet; import java.util.Set; import org.bukkit.ChatColor; import org.bukkit.block.Sign; +import org.bukkit.scheduler.BukkitRunnable; /** * @author Milan Albrecht, Daniel Saukel @@ -90,7 +91,13 @@ public class InteractSign extends Passive { } } - getSign().setLine(1, String.valueOf(id)); + new BukkitRunnable() { + @Override + public void run() { + getSign().setLine(1, String.valueOf(id)); + getSign().update(true); + } + }.runTaskLater(api, 1L); return true; } diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/rocker/TriggerSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/rocker/TriggerSign.java index eed2b5d9..c702cafb 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/rocker/TriggerSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/rocker/TriggerSign.java @@ -34,7 +34,7 @@ import org.bukkit.scheduler.BukkitRunnable; */ public class TriggerSign extends Rocker { - private int id = 1; + private int id = 0; public TriggerSign(DungeonsAPI api, Sign sign, String[] lines, InstanceWorld instance) { super(api, sign, lines, instance);