TNTPrimed setCustomName does not refresh.
Observed Behavior
I want to use this method to show the explosion time of TNT. However, if the player does not use the right click with the TNT entity, it's name will not be update. The issue seems to exist only in TNT.
Code:
TNTPrimed tnt = e.getBlock().getLocation().getWorld().spawn(e.getBlock().getLocation().add(0.5, 0, 0.5), TNTPrimed.class);
tnt.setFuseTicks(45);
tnt.setCustomNameVisible(true);
new BukkitRunnable() {
@Override
public void run() {
tnt.setCustomName("§c" + (tnt.getFuseTicks() / 20.0) + " s");
if (!tnt.isValid() || tnt.getFuseTicks() <= 0) {
cancel();
}
}
}.runTaskTimer(plugin, 0, 1);
Expected Behavior
TNT's name will be refresh when the tick update.
Steps To Reproduce
Execute the code.
Plugin List
No response
Server Version
This server is running NachoSpigot version git-NachoSpigot-"f526249" (MC: 1.8.8) (Implementing API version 1.8.8-R0.2-SNAPSHOT)
Other
No response
Agreements
- [X] You were able to find this issue on the latest version of NachoSpigot.
- [X] You have confirmed that there aren’t any issues open regarding this bug.
Looks like it's related to 'faster-cannon-tracker' option. With that option enabled metadata is sent only when TNT is changing position. Most likely that's the problem
Observed Behavior
I want to use this method to show the explosion time of TNT. However, if the player does not use the right click with the TNT entity, it's name will not be update. The issue seems to exist only in TNT.
As @outofmem13 said, disabling faster-cannon-tracker should fix this issue