-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Glow effect limited for one player still show for others #22
Comments
I think it's all about the glow.hideFromEveryone() call. Haven't tested your case yet, but this is the only place where this effect can appear. Please, try testing your plugin without calling this method and post the results here. for(Object obj: ObjectList)) {
LivingEntity entity = (LivingEntity) someWorld.spawnEntity(someLocation, Entity.someEntity);
entity.setAI(false); entity.setSilent(true); entity.setPersistent(true); entity.setInvulnerable(true); entity.setInvisible(true);
Glow glow = null; //I also tried creating a placeholder Glow object with the builder or by creating a new Glow Instance (the result remains the same)
if(stuff) glow = Glow.builder().color(Color).name(String.valueOf(entity.getEnitityId()).build();
else if(stuff) glow = Glow.builder().color(Color).name(String.valueOf(entity.getEnitityId()).build();
//I also tried creating a new Glow instance instead of using the builder (the result remains the same)
else if(stuff) [...]
//at the end of all those conditions, there is no way that the glow variable should be null anyway
glow.addHolders(entity);
glow.display(theIntendedPlayer)
} |
I've tried it and unfortunately no, the glow effect is still visible for other players without colors even if I remove this call. What I've also observed is that the glowing effect will only be visible for other players at the end of the |
I've been investigating the issue, to try to be helpful and tell you some other particularities... What I've done so far is create a command that summon an entity cast into a if(BlaBlaBla) {
LivingEntity entityL = (LivingEntity) p.getWorld().spawnEntity(p.getLocation(), EntityType.CREEPER);
entityL.setAI(false);
Glow glow = new Glow(ChatColor.RED,"test");
glow.display(p);
glow.addHolders(entityL);
BukkitTask task = new BukkitRunnable() {
@Override
public void run() {
entityL.remove();
}
}.runTaskLater(JavaPlugin.getPlugin(Main.class), 100L);
} What I discovered is that one account can see the glowing effect correctly applied: The creeper that is summoned by this account is glowing red On the other hand, the second account can see the glowing effect applied wrongly: The creeper that is summoned by this account is glowing red I don't know if this can be useful for you, let me know how things goes ;) |
Hey, thank you so much for a job well done. Yesterday I tried to reproduce the bug and find out what might be causing it. Unfortunately, the main part of the day is taken away from me by the main work. I'll try to release a fix as soon as possible. |
XGlow Version: 1.0.8 (latest)
ProtocolLib Version: 4.8.0 (latest)
Minecraft Server Version: Paper 1.18.1-160
JDK Version: 16.0.2
Description
While applying the glow effect on multiple entities (one glow effect per entities) with different colors and then restrict the viewer to only one player, other players can sometimes see the glowing effect on those entities, without the colors applied (The glow effect shows in white)
How to reproduce
Here is a pseudo code of what I did if it can help:
What is happening
With this code, what is intended to happen works perfectly:
theIntendedPlayer
can see the glow effect onentity
with the right color applied on it.However, other players that are unintended viewers can see the glow effect on some spawned entities but the effect only appears white.
Hope you'll see what's wrong, thank you for your time and support ! :)
The text was updated successfully, but these errors were encountered: