Giter Site home page Giter Site logo

compactnpclib's Introduction

CompactNPCLib

Build Status GitHub release

Library to create NPCs.

This is a "compact" (& experimental) version of NPCLib, which uses Javassist and Reflection to create NPC classes for any Minecraft entity.

Please check the Wiki or the SpigotMC page for more information.

Maven

<repositories>
    <repository>
        <id>inventive-repo</id>
        <url>https://repo.inventivetalent.org/content/groups/public/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>org.inventivetalent.npc-lib</groupId>
        <artifactId>api</artifactId>
        <version>VERSION</version>
    </dependency>
</dependencies>

Contributing

Please open a new pull request for any feature you think this API could need. Especially for methods you think should be directly available in the NPC classes, without having to call #getBukkitEntiy first.
There are currently also many classes that are not fully documented yet, so feel free to complete those as well ;)

Please also create pull requests for entities currently not available/added in new Minecraft versions. Refer to the Creating custom NPC classes Wiki if you need help.

compactnpclib's People

Contributors

derkades avatar inventivetalentdev avatar null321-jared avatar renovate-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

compactnpclib's Issues

Head yaw issue

What steps will reproduce the problem?

  1. Create PlayerNPC
  2. Update yaw to be the ~opposite of what it spawned at.

Video:
https://youtu.be/mOLTA_BT7mA

What were you expecting to happen? What happened instead?

I expected the head's pitch to update when the body's did, but instead the head oddly stayed with the same pitch, making it backwards at times.

What version of the plugin are you using? Type /version <Plugin Name>

2.1.0

What Spigot version are you using? Type /version

CraftBukkit version git-Spigot-e4d4710-e1ebe52 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)
Also tested and happens on:
CraftBukkit version git-Spigot-7745d45-02d704b (MC: 1.10.2) (Implementing API version 1.10.2-R0.1-SNAPSHOT)

What plugins are you using? Type /plugins

image
LocLog is the one that uses this API.

Do you have an error log? Use pastebin.com. If you're not sure, upload your whole server log

No errors.

Did your client crash? Upload errors in .minecraft/logs/latest.log as well

It did not.

Additional information? (Are you using Bungeecord? Did it work in previous versions? etc.)

No bungeecord, it worked in the 1.x.x versions.
I tried both setting the entity's location with:
Location loc = new Location(world, x, y, z, yaw, pitch); player.getBukkitEntity().teleport(loc);
and I also tried following it with
player.getNpcEntity().setPitch(pitch); player.getNpcEntity().setYaw(yaw);

[ENHANCEMENT] NPC spawn with packet

Is it possible to spawn an NPC just for a specific player ?
Also you're API is compatible with 1.11.2 right ?

When I'm spawning an NPC caver spider and I use pathfindTo the entity isn't looking where she walks :/

This plugin depends on NPCLib

What steps will reproduce the problem?

  1. Download NPCLib From GitHub
  2. Put NPCLibs 2.5.0-SNAPSHOT .jar in plugins
  3. And start server (1GB_RAM_START.bat)

What were you expecting to happen? What happened instead?

plugin murder mysters start. [19:43:55] [Server thread/INFO]: [Murder] Disabling Murder v3.3.1-SNAPSHOT
[19:43:55] [Server thread/INFO]: [Murder] Saving data...

What version of the plugin are you using? Type /version <Plugin Name>

NPCLibs 2.5.0-SNAPSHOT .jar and api-2.5.0-SNAPSHOT.jar

What Spigot version are you using? Type /version

1.10

What plugins are you using? Type /plugins

MenuBuilder_v1.1.0-SNAPSHOT.jar, ResourcePackAPI_v2.2.1.jar, NickNamer_v3.13.3-SNAPSHOT.jar, Murder_v3.3.1-SNAPSHOT.jar

Do you have an error log? Use pastebin.com. If you're not sure, upload your whole server log

https://pastebin.com/g4QdeiKX

Did your client crash? Upload errors in .minecraft/logs/latest.log as well

No.

Additional information? (Are you using Bungeecord? Did it work in previous versions? etc.)

No.

NPC Create Error

What steps will reproduce the problem?

  1. Use /cmdnpc create in-game.

What were you expecting to happen? What happened instead?

I was expecting for it to create an NPC, I got an error and no NPC instead.

What version of the plugin are you using? Type /version <Plugin Name>

CommandNPCS version 1.2.4
NPCLib version 2.2.2
PacketListenerAPI version 3.4.4

What Spigot version are you using? Type /version

1.9.4-R0.1-SNAPSHOT

What plugins are you using? Type /plugins

Not needed?

Do you have an error log? Use pastebin.com. If you're not sure, upload your whole server log

http://hastebin.com/eciseyumip.rb

Did your client crash? Upload errors in .minecraft/logs/latest.log as well

No.

Additional information? (Are you using Bungeecord? Did it work in previous versions? etc.)

I'm not using Bungeecord. Not testing in previous versions.

IronGolem crash

Server crashes when IronGolem NPC takes damage.
Apparently caused by the damageArmor(float) method, which doesn't actually have a @watch annotation.

https://paste.inventivetalent.org/osokirunuy.log

[00:04:13 ERROR]: Encountered an unexpected exception
net.minecraft.server.v1_10_R1.ReportedException: Ticking entity
        at net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:815) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:399) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:672) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:571) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_73]
Caused by: java.lang.RuntimeException: Failed to invoke @Watch method void damageArmor(float) with args: [3.0, SuperSwitch(state=PASS)]
        at org.inventivetalent.npclib.watcher.AnnotatedMethodWatcher.methodCalled(AnnotatedMethodWatcher.java:104) ~[?:?]
        at org.inventivetalent.npclib.generated.entity.NPCEntityIronGolem.methodCalled(NPCEntityIronGolem.java) ~[?:?]
        at org.inventivetalent.npclib.generated.entity.NPCEntityIronGolem.damageArmor(NPCEntityIronGolem.java) ~[?:?]
        at net.minecraft.server.v1_10_R1.EntityLiving.damageEntity0(EntityLiving.java:1253) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at org.inventivetalent.npclib.generated.entity.NPCEntityIronGolem.damageEntity0(NPCEntityIronGolem.java) ~[?:?]
        at net.minecraft.server.v1_10_R1.EntityLiving.damageEntity(EntityLiving.java:834) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at org.inventivetalent.npclib.generated.entity.NPCEntityIronGolem.damageEntity(NPCEntityIronGolem.java) ~[?:?]
        at net.minecraft.server.v1_10_R1.EntityMonster.B(EntityMonster.java:72) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityZombie.B(EntityZombie.java:237) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PathfinderGoalMeleeAttack.a(SourceFile:125) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PathfinderGoalMeleeAttack.e(SourceFile:117) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PathfinderGoalZombieAttack.e(SourceFile:28) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PathfinderGoalSelector.a(SourceFile:129) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityInsentient.doTick(EntityInsentient.java:667) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityLiving.n(EntityLiving.java:1961) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityInsentient.n(EntityInsentient.java:512) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityMonster.n(EntityMonster.java:28) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityZombie.n(EntityZombie.java:176) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityLiving.m(EntityLiving.java:1817) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityInsentient.m(EntityInsentient.java:240) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityMonster.m(EntityMonster.java:32) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityZombie.m(EntityZombie.java:233) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.World.entityJoinedWorld(World.java:1621) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.World.g(World.java:1596) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.World.tickEntities(World.java:1430) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.WorldServer.tickEntities(WorldServer.java:632) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:804) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        ... 4 more
Caused by: java.lang.IllegalArgumentException
        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_73]
        at org.inventivetalent.npclib.watcher.AnnotatedMethodWatcher.methodCalled(AnnotatedMethodWatcher.java:102) ~[?:?]
        at org.inventivetalent.npclib.generated.entity.NPCEntityIronGolem.methodCalled(NPCEntityIronGolem.java) ~[?:?]
        at org.inventivetalent.npclib.generated.entity.NPCEntityIronGolem.damageArmor(NPCEntityIronGolem.java) ~[?:?]
        at net.minecraft.server.v1_10_R1.EntityLiving.damageEntity0(EntityLiving.java:1253) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at org.inventivetalent.npclib.generated.entity.NPCEntityIronGolem.damageEntity0(NPCEntityIronGolem.java) ~[?:?]
        at net.minecraft.server.v1_10_R1.EntityLiving.damageEntity(EntityLiving.java:834) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at org.inventivetalent.npclib.generated.entity.NPCEntityIronGolem.damageEntity(NPCEntityIronGolem.java) ~[?:?]
        at net.minecraft.server.v1_10_R1.EntityMonster.B(EntityMonster.java:72) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityZombie.B(EntityZombie.java:237) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PathfinderGoalMeleeAttack.a(SourceFile:125) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PathfinderGoalMeleeAttack.e(SourceFile:117) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PathfinderGoalZombieAttack.e(SourceFile:28) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PathfinderGoalSelector.a(SourceFile:129) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityInsentient.doTick(EntityInsentient.java:667) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityLiving.n(EntityLiving.java:1961) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityInsentient.n(EntityInsentient.java:512) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityMonster.n(EntityMonster.java:28) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityZombie.n(EntityZombie.java:176) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityLiving.m(EntityLiving.java:1817) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityInsentient.m(EntityInsentient.java:240) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityMonster.m(EntityMonster.java:32) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityZombie.m(EntityZombie.java:233) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.World.entityJoinedWorld(World.java:1621) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.World.g(World.java:1596) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.World.tickEntities(World.java:1430) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.WorldServer.tickEntities(WorldServer.java:632) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:804) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        ... 4 more
[00:04:13 ERROR]:       Cause of unexpected exception was
java.lang.RuntimeException: Failed to invoke @Watch method void damageArmor(float) with args: [3.0, SuperSwitch(state=PASS)]
        at org.inventivetalent.npclib.watcher.AnnotatedMethodWatcher.methodCalled(AnnotatedMethodWatcher.java:104) ~[?:?]
        at org.inventivetalent.npclib.generated.entity.NPCEntityIronGolem.methodCalled(NPCEntityIronGolem.java) ~[?:?]
        at org.inventivetalent.npclib.generated.entity.NPCEntityIronGolem.damageArmor(NPCEntityIronGolem.java) ~[?:?]
        at net.minecraft.server.v1_10_R1.EntityLiving.damageEntity0(EntityLiving.java:1253) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at org.inventivetalent.npclib.generated.entity.NPCEntityIronGolem.damageEntity0(NPCEntityIronGolem.java) ~[?:?]
        at net.minecraft.server.v1_10_R1.EntityLiving.damageEntity(EntityLiving.java:834) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at org.inventivetalent.npclib.generated.entity.NPCEntityIronGolem.damageEntity(NPCEntityIronGolem.java) ~[?:?]
        at net.minecraft.server.v1_10_R1.EntityMonster.B(EntityMonster.java:72) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityZombie.B(EntityZombie.java:237) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PathfinderGoalMeleeAttack.a(SourceFile:125) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PathfinderGoalMeleeAttack.e(SourceFile:117) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PathfinderGoalZombieAttack.e(SourceFile:28) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PathfinderGoalSelector.a(SourceFile:129) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityInsentient.doTick(EntityInsentient.java:667) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityLiving.n(EntityLiving.java:1961) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityInsentient.n(EntityInsentient.java:512) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityMonster.n(EntityMonster.java:28) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityZombie.n(EntityZombie.java:176) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityLiving.m(EntityLiving.java:1817) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityInsentient.m(EntityInsentient.java:240) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityMonster.m(EntityMonster.java:32) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.EntityZombie.m(EntityZombie.java:233) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.World.entityJoinedWorld(World.java:1621) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.World.g(World.java:1596) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.World.tickEntities(World.java:1430) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.WorldServer.tickEntities(WorldServer.java:632) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:804) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:399) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:672) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:571) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_73]
Caused by: java.lang.IllegalArgumentException
        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_73]
        at org.inventivetalent.npclib.watcher.AnnotatedMethodWatcher.methodCalled(AnnotatedMethodWatcher.java:102) ~[?:?]
        ... 30 more

Player NBT support

Players are not written to/read from NBT by default -> add a custom NBT reader&writer to support persistent player NPCs.

CmdNPC/NPCLib Error on Startup [1.7]

What steps will reproduce the problem?

  1. Use this spigot jar (1.7+1.8 protocol hack), NPCLib v2.2.6, CmdNPC v1.2.4, PacketListenerAPI v3.4.4
  2. Start server
  3. (optional) try to create NPC

What were you expecting to happen? What happened instead?

To load my NPCs. An error.

What version of the plugin are you using? Type /version <Plugin Name>

As listed above

What Spigot version are you using? Type /version

git-Spigot-"0d4f6f1" (MC: 1.7.10) (Implementing API version 1.7.10-R0.1-SNAPSHOT)

Do you have an error log? Use pastebin.com. If you're not sure, upload your whole server log

http://pastebin.com/3SAmtm19

Did your client crash? Upload errors in .minecraft/logs/latest.log as well

No

Additional information? (Are you using Bungeecord? Did it work in previous versions? etc.)

Am using bungeecord.

I think to get CmdNPC to work on the versions before (CmdNPC v1.0.9, NPCLib v1.7.2, PacketListenerAPI v2.5.2) I had to recompile against that spigot jar. I can't remember.

Reason I wanted to update from the "working" version is that I hoped it would fix the errors where I had to manually add NPCs via the config and couldn't have multiple NPCs with the same name.

Rabbit Spawn Exception

Rabbit throws exception when trying to spawn

https://paste.inventivetalent.org/iqiliwunok.log

[23:52:07 INFO]: [NPCLib] Injected NPCEntityRabbit as NPCEntityRabbit with id 101
[23:52:07 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing 'spawnnpc RABBIT' in org.inventivetalent.pluginannotations.command.AnnotatedCommand$BukkitCommand(spawnNpc)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:148) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at org.bukkit.craftbukkit.v1_10_R1.CraftServer.dispatchCommand(CraftServer.java:646) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PlayerConnection.handleCommand(PlayerConnection.java:1348) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PlayerConnection.a(PlayerConnection.java:1183) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_73]
        at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_73]
        at net.minecraft.server.v1_10_R1.SystemUtils.a(SourceFile:45) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:733) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:399) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:672) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:571) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_73]
Caused by: org.inventivetalent.pluginannotations.command.exception.UnhandledCommandException: Unhandled exception while invoking command method in org.inventivetalent.npclib.command.SpawnCommands@3f4c58e4#spawnNPC
        at org.inventivetalent.pluginannotations.command.AnnotatedCommand.onCommand(AnnotatedCommand.java:172) ~[?:?]
        at org.inventivetalent.pluginannotations.command.AnnotatedCommand$BukkitCommand.execute(AnnotatedCommand.java:432) ~[?:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        ... 14 more
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: argument type mismatch
        at org.inventivetalent.npclib.registry.NPCRegistry.spawnNPC(NPCRegistry.java:56) ~[?:?]
        at org.inventivetalent.npclib.registry.NPCRegistry.spawnNPC(NPCRegistry.java:69) ~[?:?]
        at org.inventivetalent.npclib.command.SpawnCommands.spawnNPC(SpawnCommands.java:43) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_73]
        at org.inventivetalent.pluginannotations.command.AnnotatedCommand.onCommand(AnnotatedCommand.java:168) ~[?:?]
        at org.inventivetalent.pluginannotations.command.AnnotatedCommand$BukkitCommand.execute(AnnotatedCommand.java:432) ~[?:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        ... 14 more
Caused by: java.lang.IllegalArgumentException: argument type mismatch
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_73]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_73]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_73]
        at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_73]
        at org.inventivetalent.npclib.registry.NPCRegistry.wrapAndInitEntity(NPCRegistry.java:142) ~[?:?]
        at org.inventivetalent.npclib.registry.NPCRegistry.spawnNPC(NPCRegistry.java:54) ~[?:?]
        at org.inventivetalent.npclib.registry.NPCRegistry.spawnNPC(NPCRegistry.java:69) ~[?:?]
        at org.inventivetalent.npclib.command.SpawnCommands.spawnNPC(SpawnCommands.java:43) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_73]
        at org.inventivetalent.pluginannotations.command.AnnotatedCommand.onCommand(AnnotatedCommand.java:168) ~[?:?]
        at org.inventivetalent.pluginannotations.command.AnnotatedCommand$BukkitCommand.execute(AnnotatedCommand.java:432) ~[?:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        ... 14 more

NPCs are not influenced by gravity or velocity.

What steps will reproduce the problem?

  1. Spawn a PlayerNPC
  2. Try to push it
  3. Make it have nothing to stand on so it floats.

What were you expecting to happen? What happened instead?

I expected it to move and fall, instead it just stayed there.

What version of the plugin are you using? Type /version <Plugin Name>

2.2.4

What Spigot version are you using? Type /version

CraftBukkit version git-Spigot-90f61bc-83a9dbd (MC: 1.10.2) (Implementing API version 1.10.2-R0.1-SNAPSHOT)

What plugins are you using? Type /plugins

Plugins (13): WorldEdit, RollbackCore, speedmodifier, PacketListenerApi, ChatControl, custom, PlugMan, NametagEdit, Vault, NickNamer, NPCLib, custom, custom.

Additional information? (Are you using Bungeecord? Did it work in previous versions? etc.)

It is not behind bungeecord. It worked in the 1.x.x version of this plugin, and I cannot find a method to toggle this.

ERROR

What steps will reproduce the problem?

  1. DOWNLOAD THE THIS PLUGIN FROM GITHUB
  2. AND PUT IT ON THE PLUGINS FOLDER
  3. THEN Run java -jar spigot-1.8.8.jar

What were you expecting to happen? What happened instead?

Normal operation. It does not work properly.

What version of the plugin are you using? Type /version <Plugin Name>

2.5.0-SNAPSHOT and 2.4.0-SNAPSHOT

What Spigot version are you using? Type /version

This server is running CraftBukkit version git-Spigot-21fe707-e1ebe52 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)
Checking version, please wait...
You are 837 version(s) behind

What plugins are you using? Type /plugins

its just "WorldEdit, PacketListenerApi, Lobby, NickNamer, NPCLib"
*Lobby plugin is my plugin, controlling the npclib

Do you have an error log? Use pastebin.com. If you're not sure, upload your whole server log

https://pastebin.com/shp8PrAL

Did your client crash? Upload errors in .minecraft/logs/latest.log as well

no

Additional information? (Are you using Bungeecord? Did it work in previous versions? etc.)

I using bungeecord. but this happened when i not using bungeecord

Player NPCs disappear

Player NPCs disappear when too far away.
(Send another playerlist update when the spawn packet is sent)

Crash on version 1.11

What steps will reproduce the problem?

  1. Server loading

What Spigot version are you using? Type /version

Spigot 1.11

Do you have an error log? Use pastebin.com. If you're not sure, upload your whole server log (SORRY. I AM NOT REGISTERED ON PASTEBIN)

[14:36:00] [Server thread/ERROR]: java.lang.RuntimeException: java.lang.NullPointerException initializing NPCLib v2.2.6 (Is it up to date?) java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException at org.inventivetalent.npclib.registry.NPCRegistry.getOrGenerateClass(NPCRegistry.java:92) ~[?:?] at org.inventivetalent.npclib.registry.NPCRegistry.injectClasses(NPCRegistry.java:75) ~[?:?] at org.inventivetalent.npclib.NPCLib.load(NPCLib.java:87) ~[?:?] at org.inventivetalent.apihelper.APIManager.registerAPI(APIManager.java:102) ~[?:?] at org.inventivetalent.apihelper.APIManager.registerAPI(APIManager.java:122) ~[?:?] at org.inventivetalent.npclib.NPCLibPlugin.onLoad(NPCLibPlugin.java:21) ~[?:?] at org.bukkit.craftbukkit.v1_11_R1.CraftServer.loadPlugins(CraftServer.java:305) [spigot-1.11.jar:git-Spigot-f950f8e-c6d6844] at net.minecraft.server.v1_11_R1.DedicatedServer.init(DedicatedServer.java:204) [spigot-1.11.jar:git-Spigot-f950f8e-c6d6844] at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:542) [spigot-1.11.jar:git-Spigot-f950f8e-c6d6844] at java.lang.Thread.run(Unknown Source) [?:1.8.0_92] Caused by: java.lang.RuntimeException: java.lang.NullPointerException at org.inventivetalent.npclib.reflection.resolver.wrapper.FieldWrapper.get(FieldWrapper.java:54) ~[?:?] at org.inventivetalent.npclib.registry.NPCRegistry.injectEntity(NPCRegistry.java:100) ~[?:?] at org.inventivetalent.npclib.registry.NPCRegistry.getOrGenerateClass(NPCRegistry.java:88) ~[?:?] ... 9 more Caused by: java.lang.NullPointerException at org.inventivetalent.npclib.reflection.resolver.wrapper.FieldWrapper.get(FieldWrapper.java:52) ~[?:?] at org.inventivetalent.npclib.registry.NPCRegistry.injectEntity(NPCRegistry.java:100) ~[?:?] at org.inventivetalent.npclib.registry.NPCRegistry.getOrGenerateClass(NPCRegistry.java:88) ~[?:?] ... 9 more

[14:36:01] [Server thread/INFO]: [NPCLib] Enabling NPCLib v2.2.6 [14:36:01] [Server thread/ERROR]: Error occurred while enabling NPCLib v2.2.6 (Is it up to date?) org.inventivetalent.apihelper.exception.MissingHostException: API 'org.inventivetalent.npclib.NPCLib' is disabled, but no other Hosts have been registered at org.inventivetalent.apihelper.RegisteredAPI.getNextHost(RegisteredAPI.java:63) ~[?:?] at org.inventivetalent.apihelper.RegisteredAPI.init(RegisteredAPI.java:83) ~[?:?] at org.inventivetalent.apihelper.APIManager.initAPI(APIManager.java:155) ~[?:?] at org.inventivetalent.apihelper.APIManager.initAPI(APIManager.java:188) ~[?:?] at org.inventivetalent.npclib.NPCLibPlugin.onEnable(NPCLibPlugin.java:31) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:271) ~[spigot-1.11.jar:git-Spigot-f950f8e-c6d6844] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337) [spigot-1.11.jar:git-Spigot-f950f8e-c6d6844] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot-1.11.jar:git-Spigot-f950f8e-c6d6844] at org.bukkit.craftbukkit.v1_11_R1.CraftServer.enablePlugin(CraftServer.java:375) [spigot-1.11.jar:git-Spigot-f950f8e-c6d6844] at org.bukkit.craftbukkit.v1_11_R1.CraftServer.enablePlugins(CraftServer.java:325) [spigot-1.11.jar:git-Spigot-f950f8e-c6d6844] at net.minecraft.server.v1_11_R1.DedicatedServer.init(DedicatedServer.java:205) [spigot-1.11.jar:git-Spigot-f950f8e-c6d6844] at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:542) [spigot-1.11.jar:git-Spigot-f950f8e-c6d6844] at java.lang.Thread.run(Unknown Source) [?:1.8.0_92]

NPCLib doesn't work on Paper Spigot 1.10.2

What steps will reproduce the problem?

  1. NPCLib doesn't work on Paper Spigot

What were you expecting to happen? What happened instead?

What version of the plugin are you using? Type /version <Plugin Name>

NPCLib 2.5.0

What Spigot version are you using? Type /version

Paper Spigot version 1.10.2

What plugins are you using? Type /plugins

All plugins for Murder

Do you have an error log? Use pastebin.com. If you're not sure, upload your whole server log

https://pastebin.com/5vcsPMSB

Did your client crash? Upload errors in .minecraft/logs/latest.log as well

No

Additional information? (Are you using Bungeecord? Did it work in previous versions? etc.)

NBT annotations

Add annotations to save/load variables to/from the entity NBT data.

NPCPlayer#setBodyYaw() and NPCPlayer#setLaying() doesnt work

What steps will reproduce the problem?

  1. If you reload your server the following code doesnt work anymore.
@Override
    public void onEnable() {
        NPCLib.createRegistry(this);
    }
    @Override
    public boolean onCommand(CommandSender sender, Command command,
            String label, String[] args) {
        if(command.getName().equalsIgnoreCase("blabla")){
            Player p = (Player)sender;

                         NPCPlayer npc = NPCRegistry.getRegistry(this).spawnPlayerNPC(p.getLocation(), NPCPlayer.class, UUID.randomUUID(), ChatColor.GRAY + p.getName());
            npc.setPitch(90);
            npc.setBodyYaw(90);
  1. setLaying isnt working neither

What were you expecting to happen? What happened instead?

that player lays down or sets the body yaw. laying down still worked but it corrupts your world files.

What version of the plugin are you using? Type /version <Plugin Name>

2.2.4

What Spigot version are you using? Type /version

[18:59:56] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-e4d4710-e1ebe52 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)

What plugins are you using? Type /plugins

NPCLib, packerlistenerapi, my custom plugin.

Do you have an error log? Use pastebin.com. If you're not sure, upload your whole server log

Laying: http://pastebin.com/434N0T7q
setBodyYaw: http://pastebin.com/fs96ND3h

Did your client crash? Upload errors in .minecraft/logs/latest.log as well

no

Additional information? (Are you using Bungeecord? Did it work in previous versions? etc.)

1.11 support

NPCLib and its dependencies do not support 1.11.

At first it did this when it tried to inject the entities:

[18:20:36] [Server thread/ERROR]: java.lang.RuntimeException: java.lang.NullPointerException initializing NPCLib v2.2.6 (Is it up to date?)
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException
	at org.inventivetalent.npclib.registry.NPCRegistry.getOrGenerateClass(NPCRegistry.java:95) ~[?:?]
	at org.inventivetalent.npclib.registry.NPCRegistry.injectClasses(NPCRegistry.java:78) ~[?:?]
	at org.inventivetalent.npclib.NPCLib.load(NPCLib.java:87) ~[?:?]
	at org.inventivetalent.apihelper.APIManager.registerAPI(APIManager.java:102) ~[?:?]
	at org.inventivetalent.apihelper.APIManager.registerAPI(APIManager.java:122) ~[?:?]
	at org.inventivetalent.npclib.NPCLibPlugin.onLoad(NPCLibPlugin.java:21) ~[?:?]
	at org.bukkit.craftbukkit.v1_11_R1.CraftServer.loadPlugins(CraftServer.java:305) [spigot.jar:git-Spigot-f950f8e-b64d852]
	at net.minecraft.server.v1_11_R1.DedicatedServer.init(DedicatedServer.java:204) [spigot.jar:git-Spigot-f950f8e-b64d852]
	at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:542) [spigot.jar:git-Spigot-f950f8e-b64d852]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_72]
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
	at org.inventivetalent.reflection.resolver.wrapper.FieldWrapper.get(FieldWrapper.java:54) ~[?:?]
	at org.inventivetalent.npclib.registry.NPCRegistry.injectEntity(NPCRegistry.java:103) ~[?:?]
	at org.inventivetalent.npclib.registry.NPCRegistry.getOrGenerateClass(NPCRegistry.java:91) ~[?:?]
	... 9 more
Caused by: java.lang.NullPointerException
	at org.inventivetalent.reflection.resolver.wrapper.FieldWrapper.get(FieldWrapper.java:52) ~[?:?]
	at org.inventivetalent.npclib.registry.NPCRegistry.injectEntity(NPCRegistry.java:103) ~[?:?]
	at org.inventivetalent.npclib.registry.NPCRegistry.getOrGenerateClass(NPCRegistry.java:91) ~[?:?]
	... 9 more

Then I updated it to support 1.11's new way of storing the entitytypes using this code:

static void injectEntity(Class<?> clazz, int id, String name) {
	Class<?> EntityTypes = Reflection.nmsClassResolver.resolveSilent("EntityTypes");
	if(Minecraft.VERSION.newerThan(Minecraft.Version.v1_11_R1)) {
		MethodResolver methodResolver = new MethodResolver(EntityTypes);
		MethodWrapper method = methodResolver.resolveWrapper(new ResolverQuery("a", int.class,
				String.class, Class.class, String.class));
		if(method.exists()) {
			method.getMethod().setAccessible(true);
			method.invoke(null, id, name, clazz, name);
		} else {
			NPCLib.logger.warning("Could not inject " + clazz.getSimpleName() + " as " + name +
					" with id " + id + " due to incompatible Minecraft verson!");
		}
	} else {
		FieldResolver fieldResolver = new FieldResolver(EntityTypes);
		((Map) fieldResolver.resolveWrapper("c").get(null)).put(name, clazz);
		((Map) fieldResolver.resolveWrapper("d").get(null)).put(clazz, name);
		((Map) fieldResolver.resolveWrapper("f").get(null)).put(clazz, Integer.valueOf(id));
	}
	NPCLib.logger.info("Injected " + clazz.getSimpleName() + " as " + name + " with id " + id);
}

(I have no idea if that even works as intended, I don't even know what the injection does! I commented it out and everything appeared to work..)

Then I got this error:

[11:50:30] [Server thread/WARN]: [ReflectionHelper] Failed to find version enum for 'org.bukkit.craftbukkit.v1_11_R1'/'v1_11_R1.'
[11:50:30] [Server thread/INFO]: [ReflectionHelper] Generating dynamic constant...
[11:50:30] [Server thread/INFO]: [ReflectionHelper] Injected dynamic version v1_11_R1 (#10101).
[11:50:30] [Server thread/INFO]: [ReflectionHelper] Please inform inventivetalent about the outdated version, as this is not guaranteed to work.
[11:50:30] [Server thread/INFO]: [ReflectionHelper] Version is v1_11_R1 (10101)
[11:50:31] [Server thread/ERROR]: v1_11_R1 initializing NPCLib v2.2.6 (Is it up to date?)
java.lang.NoSuchFieldError: v1_11_R1
	at org.inventivetalent.npclib.registry.NPCRegistry.injectEntity(NPCRegistry.java:104) ~[?:?]
	at org.inventivetalent.npclib.registry.NPCRegistry.getOrGenerateClass(NPCRegistry.java:94) ~[?:?]
	at org.inventivetalent.npclib.registry.NPCRegistry.injectClasses(NPCRegistry.java:81) ~[?:?]
	at org.inventivetalent.npclib.NPCLib.load(NPCLib.java:87) ~[?:?]
	at org.inventivetalent.apihelper.APIManager.registerAPI(APIManager.java:102) ~[?:?]
	at org.inventivetalent.apihelper.APIManager.registerAPI(APIManager.java:122) ~[?:?]
	at org.inventivetalent.npclib.NPCLibPlugin.onLoad(NPCLibPlugin.java:21) ~[?:?]
	at org.bukkit.craftbukkit.v1_11_R1.CraftServer.loadPlugins(CraftServer.java:305) [spigot.jar:git-Spigot-f950f8e-b64d852]
	at net.minecraft.server.v1_11_R1.DedicatedServer.init(DedicatedServer.java:204) [spigot.jar:git-Spigot-f950f8e-b64d852]
	at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:542) [spigot.jar:git-Spigot-f950f8e-b64d852]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_72]

Then I told it to use the newer version of ReflectionHelper
Then I got:

[12:02:54] [Server thread/ERROR]: null initializing NPCLib v2.2.6 (Is it up to date?)
java.lang.ExceptionInInitializerError
	at org.inventivetalent.npclib.ClassGenerator.generateEntityClass(ClassGenerator.java:26) ~[?:?]
	at org.inventivetalent.npclib.registry.NPCRegistry.getOrGenerateClass(NPCRegistry.java:91) ~[?:?]
	at org.inventivetalent.npclib.registry.NPCRegistry.injectClasses(NPCRegistry.java:81) ~[?:?]
	at org.inventivetalent.npclib.NPCLib.load(NPCLib.java:87) ~[?:?]
	at org.inventivetalent.apihelper.APIManager.registerAPI(APIManager.java:102) ~[?:?]
	at org.inventivetalent.apihelper.APIManager.registerAPI(APIManager.java:122) ~[?:?]
	at org.inventivetalent.npclib.NPCLibPlugin.onLoad(NPCLibPlugin.java:21) ~[?:?]
	at org.bukkit.craftbukkit.v1_11_R1.CraftServer.loadPlugins(CraftServer.java:305) [spigot.jar:git-Spigot-f950f8e-b64d852]
	at net.minecraft.server.v1_11_R1.DedicatedServer.init(DedicatedServer.java:204) [spigot.jar:git-Spigot-f950f8e-b64d852]
	at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:542) [spigot.jar:git-Spigot-f950f8e-b64d852]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_72]
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: Could not resolve class for [ResolverQuery{name='org.bukkit.craftbukkit.UNKNOWN.entity.CraftEntity', types=[]}]
	at org.inventivetalent.reflection.minecraft.Minecraft.<clinit>(Minecraft.java:64) ~[?:?]
	... 11 more
Caused by: java.lang.ClassNotFoundException: Could not resolve class for [ResolverQuery{name='org.bukkit.craftbukkit.UNKNOWN.entity.CraftEntity', types=[]}]
	at org.inventivetalent.reflection.resolver.ClassResolver.notFoundException(ClassResolver.java:68) ~[?:?]
	at org.inventivetalent.reflection.resolver.ClassResolver.notFoundException(ClassResolver.java:36) ~[?:?]
	at org.inventivetalent.reflection.resolver.ResolverAbstract.resolve(ResolverAbstract.java:88) ~[?:?]
	at org.inventivetalent.reflection.resolver.ClassResolver.resolve(ClassResolver.java:55) ~[?:?]
	at org.inventivetalent.reflection.resolver.minecraft.OBCClassResolver.resolve(OBCClassResolver.java:46) ~[?:?]
	at org.inventivetalent.reflection.minecraft.Minecraft.<clinit>(Minecraft.java:62) ~[?:?]
	... 11 more

Then I tried updating PacketListener to 1.11 and it appeared to have worked. Then I created a playerNPC, told it to move and got this when my plugin ran:
generated an exception java.lang.AbstractMethodError: org.inventivetalent.npclib.generated.entity.NPCEntityPlayer.move(DDD)V

And I have no idea what caused that so I decided to make this issue because you know a lot about the inner workings of this plugin because you designed it.

I tried to update it, I spent many hours on it today, but I just don't know enough about the code to update it in a timely manner.

moveForward crashes server

What steps will reproduce the problem?

  1. Create an NPCPlayer
  2. Run #moveForward(3.0F, 1.0F);

What were you expecting to happen? What happened instead?

I expected the entity to move forward, instead the entire server crashed

What version of the plugin are you using? Type /version <Plugin Name>

Version 2.2.1

What Spigot version are you using? Type /version

This server is running Paper version git-Paper-808 (MC: 1.10.2) (Implementing API version 1.10.2-R0.1-SNAPSHOT)

What plugins are you using? Type /plugins

Plugins (4): PacketListenerApi, NickNamer, NPCLib, GravelSlash

Do you have an error log? Use pastebin.com. If you're not sure, upload your whole server log

http://pastebin.com/ix0AKTHX

Did your client crash? Upload errors in .minecraft/logs/latest.log as well

No

Additional information? (Are you using Bungeecord? Did it work in previous versions? etc.)

Craftbukkit dependency

Should there be a craftbukkit 1.9.4 and 1.10.2 dependency in the pom.xml? If not, can these be removed?

DataWatcher

Add methods to modify NPC's DataWatcher values.

RuntimeException

Explanation

Based on the error log, it appears that the setYaw method is causing an error. It happens on 1.8.8 but not 1.10.2

What version of the plugin are you using? Type /version <Plugin Name>

2.2.6

What Spigot version are you using? Type /version

CraftBukkit version git-Spigot-e4d4710-e1ebe52 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)

Do you have an error log? Use pastebin.com. If you're not sure, upload your whole server log

http://pastebin.com/CvFQQxhq

Did your client crash? Upload errors in .minecraft/logs/latest.log as well

It did not, but it did disconnect me.

Additional information? (Are you using Bungeecord? Did it work in previous versions? etc.)

I am using bungeecord. It works on 1.10.2 where I have originally been testing it.

Excessive CPU usage after several NPCs are spawned then removed.

What steps will reproduce the problem?

  1. Create a PlayerNPC
  2. Run this:
npc.setShowInList(false);
Main.registery.removeNpc(npc);
  1. Repeat steps 1 and 2 ~10 times

What were you expecting to happen? What happened instead?

I would expect that now the NPC is gone for it to have no impact on CPU.
Instead, randomly, CPU usage jumps for the reflection methods as if there is an infinite loop or something wrong happening.
Here is what the sampler says: http://imgur.com/a/hNUwa
It's all on the main server thread, dropping my TPS to 5.

What version of the plugin are you using? Type /version <Plugin Name>

2.3.2, however this has happened on all versions of CompactNPCLib

What Spigot version are you using? Type /version

The screenshot is on 1.11, but it happens on all supported versions.

What plugins are you using? Type /plugins

Should not matter.

Do you have an error log? Use pastebin.com. If you're not sure, upload your whole server log

No errors.

Did your client crash? Upload errors in .minecraft/logs/latest.log as well

No crash.

Additional information? (Are you using Bungeecord? Did it work in previous versions? etc.)

No bungeecord. Has happened ever since I started using this plugin.

If you do not want to fix this, just accept my pull request and suggest a few possible things that could be causing this and I will try to fix it myself. Is the problem in ReflectionHelper or NPCLib?

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update dependency org.inventivetalent.nicknamer:api to v3.20.0-SNAPSHOT
  • Update dependency org.inventivetalent.spiget-update:bukkit to v1.4.6-SNAPSHOT
  • Update dependency org.inventivetalent:boundingboxapi to v1.3.12-SNAPSHOT
  • Update dependency org.inventivetalent:nbt-lib to v1.1.0-SNAPSHOT
  • Update dependency org.inventivetalent:pluginannotations to v1.5.1-SNAPSHOT
  • Update dependency org.inventivetalent:reflectionhelper to v1.18.11-SNAPSHOT
  • 🔐 Create all rate-limited PRs at once 🔐

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

maven
API/pom.xml
  • org.spigotmc:spigot-api 1.12-R0.1-SNAPSHOT
  • org.projectlombok:lombok 1.16.8
  • com.google.code.gson:gson 2.6.2
  • com.google.guava:guava 19.0
  • org.javassist:javassist 3.20.0-GA
Plugin/pom.xml
  • org.apache.maven.plugins:maven-compiler-plugin 3.3
  • org.apache.maven.plugins:maven-shade-plugin 2.4
  • org.inventivetalent:eventcallbacks 1.0.2-SNAPSHOT
  • org.inventivetalent.spiget-update:bukkit 1.3.0
pom.xml
  • org.inventivetalent:reflectionhelper 1.13.1-SNAPSHOT
  • org.inventivetalent:pluginannotations 1.4.7-SNAPSHOT
  • org.inventivetalent:mc-wrappers 1.0.3-SNAPSHOT
  • org.inventivetalent:vectors 1.0.0
  • org.inventivetalent:boundingboxapi 1.2.3
  • org.inventivetalent:apimanager 1.0.3-SNAPSHOT
  • org.inventivetalent:nbt-lib 1.0.1-SNAPSHOT
  • org.inventivetalent.nicknamer:api 3.14.1-SNAPSHOT
  • org.inventivetalent.npc-lib:api 2.5.2-SNAPSHOT
  • org.apache.maven.plugins:maven-compiler-plugin 3.3

  • Check this box to trigger a request for Renovate to run again on this repository

Spawn a Player after Reload

What steps will reproduce the problem?

  1. Spawn FakePlayer after Reload (Code: http://pastebin.com/pWRBi45H).
  2. Reload the Server, if you are only reloading the Plugin then get i no errors.

What were you expecting to happen? What happened instead?

I think it's NickNamer because without the plugin I get no errors and the skins are not loaded. With the plugin the skins are loaded but after the Reload comes the error and the skins are also not loaded. Sorry if it is my fault. Another question, is that normal that the Wiki not working? Screenshot: http://prntscr.com/ehitbd

Edit: If you reloaded the Server and try to reconnect you get an error and will be kicked. (http://pastebin.com/m8m7NnS3)

What version of the plugin are you using? Type /version <Plugin Name>

2.5.0-SNAPSHOT

What Spigot version are you using? Type /version

1.11.2-R0.1-SNAPSHOT

What plugins are you using? Type /plugins

PacketListenerAPI, MapManager, Vault, Multiverse-Core, ProtocolLib, NickNamer, AnimatedFrames, HideAndCustomPlugins, NPCLib, CubeLife(Own)

Do you have an error log? Use pastebin.com. If you're not sure, upload your whole server log

http://pastebin.com/VJcPANqQ

Did your client crash? Upload errors in .minecraft/logs/latest.log as well

It did not.

Additional information? (Are you using Bungeecord? Did it work in previous versions? etc.)

I'am using Spigot and its my first time to use this API

Move code is only compatible with 1.11

In 1.11, they added a movetype enum which broke the move function.

https://github.com/InventivetalentDev/CompactNPCLib/blob/master/API/src/main/java/org/inventivetalent/npclib/entity/NPCEntity.java

In the old code, you just linked it directly to the function, but to make it 1.11 compatible I needed to add a method body that calls the new function with the (I think) correct MoveType enum. The issue with that is the code is not compatible with 1.10.2 and older since those versions do not have that enum. If I remember correctly, it fails during injection due to the lack of the enum.

There are a few ways to fix this:

  1. Use reflection in the post-compile method body (Lower performance)
  2. Somehow make it have a different method body based on version (Faster but I have not found a legal way to do this)

I think that when the method was implemented, it was not expected to change, but it seems more fit to put the method into NPCAbstract

Crash

What steps will reproduce the problem?

  1. Create a PlayerNPC
  2. Do something that makes it try to use the player's connection. In this case I died near them, but there are times where it seems random. Once it happened when I brought them very far from where they originally spawned.
  3. NPE happens, crashing server.

What were you expecting to happen? What happened instead?

I expected it to not crash.

What version of the plugin are you using? Type /version <Plugin Name>

2.3.1

What Spigot version are you using? Type /version

1.11

Do you have an error log? Use pastebin.com. If you're not sure, upload your whole server log

Here's the error: http://pastebin.com/JEdBGrzy

Did your client crash? Upload errors in .minecraft/logs/latest.log as well

It did not.

Additional information? (Are you using Bungeecord? Did it work in previous versions? etc.)

I don't know if this is new or not. It actually sends my server into a crash loop for some reason. As I typed this my server crashed 21 times. I tested it with a backup world and it still happens. It does not happen if I unload NPCLib, so only when it IS loaded.

Hidden Nametags

Add scoreboards to hide player nametags.

  • Add support for prefix/suffix.

Ride entity

Is it possible to ride entity and controll via WASD?
I'm trying to do this, but i need method overriding in minecraft entity class.(EntityPig, method "g")

Dependencies unavailable

The bukkit & craftbukkit dependencies for this project are both 1.10 which is unavailable atm.

it won't load

What steps will reproduce the problem?

  1. starting up the server

What were you expecting to happen? What happened instead?

i was expecting it to load up properly. it just doesn't recognise it.

What version of the plugin are you using? Type /version <Plugin Name>

i have tried 1.8.6 and 2.2.6

What Spigot version are you using? Type /version

1.8.8 spigot git-spigot-e4d4710-e1ebe52

What plugins are you using? Type /plugins

permissionsEX antimcleaks resourcepackapi worldedit nicknamer menubuilder silkspawners murder

Do you have an error log? Use pastebin.com. If you're not sure, upload your whole server log

no point because it doesn't show anything to do with it.

Did your client crash? Upload errors in .minecraft/logs/latest.log as well

nothing went wrong, just won't load.

Additional information? (Are you using Bungeecord? Did it work in previous versions? etc.)

i am using bungeecord, but i am only loading it on one server. it has never worked for me.

AI crash

What steps will reproduce the problem?

  1. Spawn NPC
  2. Set AI (A*)

What were you expecting to happen? What happened instead?

AI enabled. Crash.

What version of the plugin are you using? Type /version <Plugin Name>

1.11.2, 2.5.0-SNAPSHOT

What Spigot version are you using? Type /version

1.11.2

What plugins are you using? Type /plugins

No plugins

Do you have an error log? Use pastebin.com. If you're not sure, upload your whole server log

https://pastebin.com/8wAhx5r2

Did your client crash? Upload errors in .minecraft/logs/latest.log as well

Server closed.

Additional information? (Are you using Bungeecord? Did it work in previous versions? etc.)

Crash code:
https://pastebin.com/STWB25LA
Crash at npc.registerAI

Concurrency issue on NPCRegistry.destroy()

What steps will reproduce the problem?

  1. Write a plugin that correctly supports onEnable and onDisable (i.e. PlugMan compatible)
  2. Use the NPCRegistry in onEnable, and call destroy in onDisable
  3. Sometimes (when the registry contains NPCs), you will get the stacktrace below:
java.util.ConcurrentModificationException
        at java.util.HashMap$HashIterator.nextNode(Unknown Source) ~[?:1.8.0_60]
        at java.util.HashMap$KeyIterator.next(Unknown Source) ~[?:1.8.0_60]
        at org.inventivetalent.npclib.registry.NPCRegistry.destroy(NPCRegistry.java:51) ~[?:?]
        at org.inventivetalent.npclib.registry.NPCRegistry.destroy(NPCRegistry.java:59) ~[?:?]
        at com.github.rlf.pokeamon.PokeAMon.onDisable(PokeAMon.java:40) ~[?:?]

What were you expecting to happen? What happened instead?

The destroy method should either iterate over a copy of the data-model, or use the iterator to remove the items.

What version of the plugin are you using? Type /version <Plugin Name>

2.2.5

Cannot spawn PlayerNPCs (Nothing happens)

I probably sound stupid, but I can't figure out how to use this library. I'm usually pretty good at figuring out how to use libraries, but with this one, there's no documentation, the Wiki is barren, and there's not one line of description text in the entire Javadoc.

Anyway, here's what I've got so far, but it hasn't worked once. No NPC shows up. I've tried with player's UUID, a random UUID, different names, calling spawn() or respawnTo(), etc. Nothing works.

private NPCPlayer npc = null;
private NPCPlayer addPlayer(String name, String uuid, World w, float x, float y, float z) {
	//UUID.fromString(uuid)
	return this.npcReg.spawnPlayerNPC(new Location(w, x, y, z), NPCPlayer.class, UUID.randomUUID(), name);
}

@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPlayerLogin(PlayerLoginEvent event) { synchronized(API_SYNC) { //Player Login.
	if(event.getResult() == PlayerLoginEvent.Result.ALLOWED) {
		Player player = event.getPlayer();
		String id = player.getUniqueId().toString();
		World world = player.getWorld();
		Location loc = player.getLocation();
		
		//Not what I plan on doing in the actual plugin, but just a test:
		if(npc == null) {
			Main.dbg("LOGIN!");
			npc = addPlayer(player.getName()+" test", id, world, (float)loc.getX()-5, (float)loc.getY(), (float)loc.getZ()-5);
			//npc.setShowInList(true);
			//npc.spawn();
			//npc.respawnTo(player);
			//npc.setSkin(id);
		}
	}
}}

npcReg is defined in onEnable() as npcReg = NPCLib.createRegistry(this);

After the first few tries, it started giving an error when creating the entity:

[13:50:20 ERROR]: "Silently" catching entity tracking error.
net.minecraft.server.v1_10_R1.ReportedException: Adding entity to track
	at net.minecraft.server.v1_10_R1.EntityTracker.addEntity(EntityTracker.java:141) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at net.minecraft.server.v1_10_R1.EntityTracker.addEntity(EntityTracker.java:100) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at net.minecraft.server.v1_10_R1.EntityTracker.track(EntityTracker.java:30) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at net.minecraft.server.v1_10_R1.WorldManager.a(WorldManager.java:19) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at net.minecraft.server.v1_10_R1.World.b(World.java:1028) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at net.minecraft.server.v1_10_R1.WorldServer.b(WorldServer.java:1126) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at net.minecraft.server.v1_10_R1.World.addEntity(World.java:1021) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at org.inventivetalent.npclib.generated.entity.NPCEntityPlayer.spawn(NPCEntityPlayer.java) [NPCLib_v2.2.6.jar:?]
	at org.inventivetalent.npclib.npc.NPCAbstract.spawn(NPCAbstract.java:98) [NPCLib_v2.2.6.jar:?]
	at com.pecacheu.test.Main.onPlayerLogin(Main.java:110) [Test.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25]
	at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25]
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at net.minecraft.server.v1_10_R1.PlayerList.attemptLogin(PlayerList.java:507) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at net.minecraft.server.v1_10_R1.LoginListener.b(LoginListener.java:118) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at net.minecraft.server.v1_10_R1.LoginListener.E_(LoginListener.java:54) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at net.minecraft.server.v1_10_R1.NetworkManager.a(NetworkManager.java:233) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at net.minecraft.server.v1_10_R1.ServerConnection.c(ServerConnection.java:140) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:832) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:399) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:673) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:572) [spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_25]
Caused by: java.lang.IllegalStateException: Entity is already tracked!
	at net.minecraft.server.v1_10_R1.EntityTracker.addEntity(EntityTracker.java:108) ~[spigot-1.10.2.jar:git-Spigot-a9631d2-67b2424]
	... 27 more

So, I probably corrupted my world save. Perfect.

What steps will reproduce the problem?

  • Pretty self-evident.

What were you expecting to happen? What happened instead?

  • Duplicate of player spawning.
  • Nothing. Well, until the error started happening. Then the error happened.
  • Also, the error stopped happening again. So that's a thing.

What version of the plugin are you using? Type /version <Plugin Name>

v2.2.6

What Spigot version are you using? Type /version

1.10.2

What plugins are you using? Type /plugins

Already tried it without other plugins.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.