Fix interact / trigger sign problems; resolves #793

This commit is contained in:
Daniel Saukel 2020-06-17 00:14:41 +02:00
parent c7240462c0
commit 527cff6aeb
2 changed files with 9 additions and 2 deletions

View File

@ -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 {
}
}
new BukkitRunnable() {
@Override
public void run() {
getSign().setLine(1, String.valueOf(id));
getSign().update(true);
}
}.runTaskLater(api, 1L);
return true;
}

View File

@ -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);