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

NPC is already shown to player. #96

Open
zPurge opened this issue Jun 27, 2020 · 2 comments
Open

NPC is already shown to player. #96

zPurge opened this issue Jun 27, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@zPurge
Copy link

zPurge commented Jun 27, 2020

Describe the bug
Sometimes if you join, the NPC doesn't show because it's already "shown", but it's just invisibile.

NPCLib usage option
Maven dependency

NPCLib JAR name
E.g. npclib-plugin-2.0.1-SNAPSHOT.jar

Server version
Paper version git-Paper-1104 (MC: 1.11.2) (Implementing API version 1.11.2-R0.1-SNAPSHOT)

To Reproduce
Join the server a few times and it should happen.

Expected behavior
The API trying to hide the npc and show it again.

ERROR:

[VultexHub] Task #167 for VultexHub v1.0.0 generated an exception java.lang.IllegalArgumentException: NPC is already shown to player at net.jitse.npclib.internal.NPCBase.show(NPCBase.java:183) ~[?:?] at net.jitse.npclib.internal.NPCBase.show(NPCBase.java:172) ~[?:?] at nl.diszy.vultex.Hub.NPC.NPCManager.lambda$2(NPCManager.java:177) ~[?:?] at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftTask.run(CraftTask.java:58) ~[server.jar:git-Paper-1104] at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:356) [server.ja r:git-Paper-1104] at net.minecraft.server.v1_11_R1.MinecraftServer.D(MinecraftServer.java:829) [server.jar:git-Paper-1104] at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:403) [server.jar:git-Paper-1104] at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:763) [server.jar:git-Paper-1104] at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:661) [server.jar:git-Paper-1104] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]

Line 177 in NPCManager from my plugin:
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(Vultex.plugin, () -> { potpvp.show(event.getPlayer()); ffa.show(event.getPlayer()); eventnpc.show(event.getPlayer()); }, 30L);

@zPurge zPurge added the bug Something isn't working label Jun 27, 2020
@Jocke155
Copy link

I have a similar issue after a reload. Sometimes when the NPCs spawn they are correctly visible, sometimes they are visible but not interactable, and sometimes they are working like they should. Teleporting to myself or relogging works, then they are all visible again.

@JitseB
Copy link
Owner

JitseB commented Feb 3, 2021

As posted in pre-release 2.12-SNAPSHOT, I will be redesigning the auto show hide mechanics using information provided in #101. Hopefully this issue will be resolved thereafter.

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

3 participants