Skip to content
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

possible bug #158

Open
Endrjuu opened this issue Apr 22, 2021 · 1 comment
Open

possible bug #158

Endrjuu opened this issue Apr 22, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@Endrjuu
Copy link

Endrjuu commented Apr 22, 2021

Describe the bug
NPC is already shown to player, ConcurrentModificationException, NoSuchElementException packet_handler

NPCLib usage option
api

Server version
1.8.8

To Reproduce
join event, refresh

Steps to reproduce the behavior:

  1. https://pastebin.com/N2JPBUhY
  2. https://pastebin.com/1fsFHDaB
  3. https://pastebin.com/A9KqjFnc

My code:
https://pastebin.com/N5Fzkny3
https://pastebin.com/U8ffuRce
https://pastebin.com/dJZAiHaW

@Endrjuu Endrjuu added the bug Something isn't working label Apr 22, 2021
@Mooselk
Copy link
Contributor

Mooselk commented May 10, 2021

  1. I wouldn’t create npcs asynchronously. It causes a lot of issues, one being npcs not showing.
  2. You’re showing them twice, once when you create them and again when you’re joining (it at least that’s what it looks like)
  3. You don’t need a list for your npcs, the library already saves them in a set for you. There’s a static getter in the NPCManager class for this.

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

No branches or pull requests

2 participants