#Head rename too many packets
1 messages · Page 1 of 1 (latest)
Im guessing this only happens when you are in creative?
Uh no actually
or wait
ill test in surv
@wispy island nope
its both creative and surv
the message above the thread's message is my code
What i am trying to do:
Whenever my custom skull is renamed, it will set its owner to the name of the skull, now this works, however after a couple times you do this it will go crazy and kick the player for too many packets, here's my current code:
@EventHandler
public void on(PrepareAnvilEvent event) {
ItemStack result = event.getResult();
if(result == null) return;
if(result.getType() == Material.PLAYER_HEAD) {
SkullMeta meta = (SkullMeta) result.getItemMeta();
OfflinePlayer player = Bukkit.getOfflinePlayer(meta.getDisplayName());
meta.setOwningPlayer(player);
result.setItemMeta(meta);
}
}
```(I still need to add the check for my skull, however its just easier to test without it)
That message
This is really weird and ive never seen that.
The fact that its happening for other heads too is interesting.
the fun thing is
i commented the code out
and it still happens
i made sure maven had actually compiled
because sometimes it doesn't
Yea i dont think this listener would have any effects on that