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

Duplication issue #19

Open
ItsHarry opened this issue May 23, 2015 · 10 comments
Open

Duplication issue #19

ItsHarry opened this issue May 23, 2015 · 10 comments
Assignees
Labels

Comments

@ItsHarry
Copy link

Apparently, if you log off while you're in combat, and then very quickly log back in, for some reason the spawned NPC is not removed, so the player can see their own NPC.

When you then kill the NPC, you have duplicated the items.

Any chance this could be fixed?

@Techcable Techcable self-assigned this May 24, 2015
@Techcable Techcable added the bug label May 24, 2015
@Techcable
Copy link
Member

What version are you on?

@ItsHarry
Copy link
Author

It was the one you sent me 21 days ago: http://ci.techcable.net/job/Combat%20Tag/34/

Link doesn't work anymore, but you'll understand what it means =)

@ItsHarry
Copy link
Author

When do you think you'll have this fixed? This is a big problem on my server as players are abusing it to duplicate items.

@Techcable
Copy link
Member

Do you have any idea how your players manage to log in and out fast enough?
I'm not sure if i could click fast enough.

@ItsHarry
Copy link
Author

Sorry, I was told that was the way to do it. I will find out the exact steps to reproduce this and report back.

Apologies again

@ItsHarry
Copy link
Author

Hmm, while trying to test this, no NPC was spawned each time my guinea pig pvplogged. This stack trace was printed:

[08:59:34] [Server thread/ERROR]: Could not pass event PlayerQuitEvent to CombatTag v6.4.1-SNAPSHOT
org.bukkit.event.EventException
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[craftbukkit.jar:git-PaperSpigot-1.7.9-R0.2-266-g6a98d6f]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit.jar:git-PaperSpigot-1.7.9-R0.2-266-g6a98d6f]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:509) [craftbukkit.jar:git-PaperSpigot-1.7.9-R0.2-266-g6a98d6f]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:494) [craftbukkit.jar:git-PaperSpigot-1.7.9-R0.2-266-g6a98d6f]
    at net.minecraft.server.v1_7_R4.PlayerList.disconnect(PlayerList.java:367) [craftbukkit.jar:git-PaperSpigot-1.7.9-R0.2-266-g6a98d6f]
    at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:739) [craftbukkit.jar:git-PaperSpigot-1.7.9-R0.2-266-g6a98d6f]
    at net.minecraft.server.v1_7_R4.ServerConnection.c(ServerConnection.java:77) [craftbukkit.jar:git-PaperSpigot-1.7.9-R0.2-266-g6a98d6f]
    at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:789) [craftbukkit.jar:git-PaperSpigot-1.7.9-R0.2-266-g6a98d6f]
    at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:307) [craftbukkit.jar:git-PaperSpigot-1.7.9-R0.2-266-g6a98d6f]
    at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:638) [craftbukkit.jar:git-PaperSpigot-1.7.9-R0.2-266-g6a98d6f]
    at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:544) [craftbukkit.jar:git-PaperSpigot-1.7.9-R0.2-266-g6a98d6f]
    at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-PaperSpigot-1.7.9-R0.2-266-g6a98d6f]
Caused by: java.lang.IllegalArgumentException: NPC with UUID da083fd9-9188-4737-a654-1f1c7aa61c9c is already created
    at com.trc202.CombatTag.libs.npclib.nms.NMSRegistry.createNPC(NMSRegistry.java:50) ~[?:?]
    at com.trc202.CombatTag.NPCManager.spawnHumanNPC(NPCManager.java:39) ~[?:?]
    at com.trc202.CombatTag.CombatTag.spawnNpc(CombatTag.java:173) ~[?:?]
    at com.trc202.CombatTagListeners.NoPvpPlayerListener.onPlayerQuit(NoPvpPlayerListener.java:81) ~[?:?]
    at sun.reflect.GeneratedMethodAccessor276.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_45]
    at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_45]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:298) ~[craftbukkit.jar:git-PaperSpigot-1.7.9-R0.2-266-g6a98d6f]
    ... 11 more

Could be related? Not sure though.

@Techcable
Copy link
Member

I really have no idea how this could happen. Bukkit events are guaranteed to be executed synchronously. By any chance are you using RedXIII's async entity patch?

@ItsHarry
Copy link
Author

ItsHarry commented Jun 7, 2015

Nope, I do not use it.

You know, if it is too much of a hassle, by all means just leave it. I have since switched to my own plugin anyway which just instakills the players, as I find NPCs to be unreliable.

@Techcable
Copy link
Member

I'm working on a rewrite right now. I'm pretty busy updating cauldron to 1.8 so it may take a while to fix this issue 😢

@Techcable
Copy link
Member

Try build 18 of Combat Tag 7.0.0 beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants