Skip to content
This repository has been archived by the owner on May 29, 2022. It is now read-only.

TNTPrimed setCustomName does not refresh. #377

Open
2 tasks done
Happy-FZM opened this issue Mar 13, 2022 · 2 comments
Open
2 tasks done

TNTPrimed setCustomName does not refresh. #377

Happy-FZM opened this issue Mar 13, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@Happy-FZM
Copy link

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

  • You were able to find this issue on the latest version of NachoSpigot.
  • You have confirmed that there aren’t any issues open regarding this bug.
@Happy-FZM Happy-FZM added the bug Something isn't working label Mar 13, 2022
@outofmem13
Copy link

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

@ghost ghost mentioned this issue Apr 17, 2022
3 tasks
@ghost
Copy link

ghost commented Apr 17, 2022

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants