Quests

MineDiversity

Serveur Minecraft
4 Avril 2016
52
1
28
Bonjour, j'ai un sérieux problème, sur mon serveur, quand quel q'un accomplie une tache et qu'il rend l'item, rien ne lui est affiché et il n'a pas de récompense. Dans ma console voici ce qui est écrit
  1. [Server thread/ERROR]: Could not pass event NPCRightClickEvent to Quests v2.7.3-b116
  2. org.bukkit.event.EventException
  3. at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-1.9.4.jar:git-Spigot-4af49dc-e22506f]
  4. at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.9.4.jar:git-Spigot-4af49dc-e22506f]
  5. at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.9.4.jar:git-Spigot-4af49dc-e22506f]
  6. at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.9.4.jar:git-Spigot-4af49dc-e22506f]
  7. at net.citizensnpcs.EventListen.onPlayerInteractEntity(EventListen.java:397) [citizens-2.0.18-SNAPSHOT.jar:?]
  8. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_72]
  9. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_72]
  10. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_72]
  11. at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_72]
  12. at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) [spigot-1.9.4.jar:git-Spigot-4af49dc-e22506f]
  13. at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [spigot-1.9.4.jar:git-Spigot-4af49dc-e22506f]
  14. at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.9.4.jar:git-Spigot-4af49dc-e22506f]
  15. at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.9.4.jar:git-Spigot-4af49dc-e22506f]
  16. at net.minecraft.server.v1_9_R2.PlayerConnection.a(PlayerConnection.java:1531) [spigot-1.9.4.jar:git-Spigot-4af49dc-e22506f]
  17. at net.minecraft.server.v1_9_R2.PacketPlayInUseEntity.a(SourceFile:68) [spigot-1.9.4.jar:git-Spigot-4af49dc-e22506f]
  18. at net.minecraft.server.v1_9_R2.PacketPlayInUseEntity.a(SourceFile:12) [spigot-1.9.4.jar:git-Spigot-4af49dc-e22506f]
  19. at net.minecraft.server.v1_9_R2.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.9.4.jar:git-Spigot-4af49dc-e22506f]
  20. at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_72]
  21. at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_72]
  22. at net.minecraft.server.v1_9_R2.SystemUtils.a(SourceFile:45) [spigot-1.9.4.jar:git-Spigot-4af49dc-e22506f]
  23. at net.minecraft.server.v1_9_R2.MinecraftServer.D(MinecraftServer.java:726) [spigot-1.9.4.jar:git-Spigot-4af49dc-e22506f]
  24. at net.minecraft.server.v1_9_R2.DedicatedServer.D(DedicatedServer.java:399) [spigot-1.9.4.jar:git-Spigot-4af49dc-e22506f]
  25. at net.minecraft.server.v1_9_R2.MinecraftServer.C(MinecraftServer.java:665) [spigot-1.9.4.jar:git-Spigot-4af49dc-e22506f]
  26. at net.minecraft.server.v1_9_R2.MinecraftServer.run(MinecraftServer.java:564) [spigot-1.9.4.jar:git-Spigot-4af49dc-e22506f]
  27. at java.lang.Thread.run(Thread.java:745) [?:1.8.0_72]
  28. Caused by: java.lang.NullPointerException
  29. at org.bukkit.inventory.ItemStack.<init>(ItemStack.java:68) ~[spigot-1.9.4.jar:git-Spigot-4af49dc-e22506f]
  30. at me.blackvein.quests.Quester.deliverItem(Quester.java:1404) ~[?:?]
  31. at me.blackvein.quests.NpcListener.onNPCRightClick(NpcListener.java:74) ~[?:?]
  32. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_72]
  33. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_72]
  34. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_72]
  35. at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_72]
  36. at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.9.4.jar:git-Spigot-4af49dc-e22506f]
  37. ... 24 more
 
Bonjour,
Je crois qu'il y a un problème dans le code, je résume :

Material m = null; Ici il déclare l'item comme étant null (d'ou l'erreur 'NullPointerException')
if (amount < req) {
if ((i.getAmount() + amount) > req) {
getQuestData(quest).itemsDelivered.put(found, req);
int index = player.getInventory().first(i);
i.setAmount(i.getAmount() - (req - amount)); //Take away the remaining amount needed to be delivered from the item stack
player.getInventory().setItem(index, i);
player.updateInventory();
finishObjective(quest, "deliverItem", new ItemStack(m, 1), found, null, null, null, null, null, null, null, null); Il fait quelque chose utilisant cette item, mais il est toujours null.
Vous ne pouvez donc rien y faire, je vais voir s'il y a une version moins récente mais ne comportant pas ce problème. Apres peut-être que je me trompe. @Detobel36 (dsl pour le fail de tag robin) dis-je vrai ? le code source : https://github.com/Blackvein/Quests/blob/master/src/main/java/me/blackvein/quests/Quester.java

}
}
 
Dernière édition: