forked from InventivetalentDev/GlowAPI
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
What steps will reproduce the problem?
https://media.giphy.com/media/j6AVCfAzs4E4JpP583/giphy.gif
This is happening only with spamming
What were you expecting to happen? What happened instead?
Sometimes the color is white, while it supposed to be colored.
What version of the plugin are you using?
latest v2
What Spigot version are you using?
tested with spigot and paper latest
What plugins are you using? Type /plugins
only protocollib and my plugin
Do you have an error log?
With paper spigot I can get an error not with spigot:
https://hastebin.com/ejitozivip.md
Did your client crash? Upload errors in .minecraft/logs/latest.log as well
My client is kicked
Additional information?
I tried multiple code from the api, async, not async, entity list ect... same error
I have tested with the official glowapi version and everything is fine :)
My code with the official glowapi is (almost the same I used for your plugin):
`
List<Entity> entities = new ArrayList<>();
private ChatColor color;
@Override
public void description() {
super.description();
Item3D i = getLastSelected();
this.color = ChatColor.valueOf(ChatColor.stripColor(i.getDisplayName().getTitle().toUpperCase()));
List<Projector> list = nightClub.getProjectors(color);
list.forEach(pr -> entities.add(pr.getProjector().getBukkitEntity()));
GlowAPI.setGlowing(entities,GlowAPI.Color.valueOf(color.name()), player);
}
@Override
public void undescription() {
super.undescription();
if(color != null)
entities.forEach(e -> {
GlowAPI.setGlowing(e,false,player);
});
entities.clear();
color = null;
}
@Override
public void closeGui() {
super.closeGui();
if(color != null)
entities.forEach(e -> {
GlowAPI.setGlowing(e,false,player);
});
entities.clear();
color = null;
}`
Metadata
Metadata
Assignees
Labels
No labels