Advertisement
Guest User

Untitled

a guest
Nov 18th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.50 KB | None | 0 0
  1. package fr.skydev59.HackTheCraft;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.Location;
  5. import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
  6. import org.bukkit.entity.Entity;
  7. import org.bukkit.entity.EntityType;
  8. import org.bukkit.entity.Player;
  9. import org.bukkit.entity.Villager;
  10. import org.bukkit.event.EventHandler;
  11. import org.bukkit.event.Listener;
  12. import org.bukkit.event.player.PlayerJoinEvent;
  13.  
  14. public class NPC implements Listener {
  15.  
  16. public NPC(main main) {
  17. // TODO Auto-generated constructor stub
  18. }
  19.  
  20. @EventHandler
  21. public void onJoin(PlayerJoinEvent event) {
  22.  
  23. Player player = event.getPlayer();
  24.  
  25. Location spawn = new Location(Bukkit.getWorld("world"), -500.823, 66, -533.073);
  26.  
  27. Villager npc = (Villager) spawn.getWorld().spawnEntity(spawn, EntityType.VILLAGER);
  28.  
  29. Entity nmsArmes = (Entity) ((CraftEntity) npc).getHandle();
  30.  
  31. nmsArmes.setCustomName("ยง5Vendeur d'armes");
  32.  
  33. }
  34.  
  35. }
  36.  
  37.  
  38. ERREUR CONSOLE :
  39.  
  40. Could not pass event PlayerJoinEvent to HackTheCraft v1.0
  41. org.bukkit.event.EventException
  42. at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot.jar:git-Spigot-798f32d-0cd0397]
  43. at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-798f32d-0cd0397]
  44. at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot.jar:git-Spigot-798f32d-0cd0397]
  45. at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot.jar:git-Spigot-798f32d-0cd0397]
  46. at net.minecraft.server.v1_9_R2.PlayerList.onPlayerJoin(PlayerList.java:333) [spigot.jar:git-Spigot-798f32d-0cd0397]
  47. at net.minecraft.server.v1_9_R2.PlayerList.a(PlayerList.java:159) [spigot.jar:git-Spigot-798f32d-0cd0397]
  48. at net.minecraft.server.v1_9_R2.LoginListener.b(LoginListener.java:144) [spigot.jar:git-Spigot-798f32d-0cd0397]
  49. at net.minecraft.server.v1_9_R2.LoginListener.c(LoginListener.java:54) [spigot.jar:git-Spigot-798f32d-0cd0397]
  50. at net.minecraft.server.v1_9_R2.NetworkManager.a(NetworkManager.java:233) [spigot.jar:git-Spigot-798f32d-0cd0397]
  51. at net.minecraft.server.v1_9_R2.ServerConnection.c(ServerConnection.java:140) [spigot.jar:git-Spigot-798f32d-0cd0397]
  52. at net.minecraft.server.v1_9_R2.MinecraftServer.D(MinecraftServer.java:825) [spigot.jar:git-Spigot-798f32d-0cd0397]
  53. at net.minecraft.server.v1_9_R2.DedicatedServer.D(DedicatedServer.java:399) [spigot.jar:git-Spigot-798f32d-0cd0397]
  54. at net.minecraft.server.v1_9_R2.MinecraftServer.C(MinecraftServer.java:665) [spigot.jar:git-Spigot-798f32d-0cd0397]
  55. at net.minecraft.server.v1_9_R2.MinecraftServer.run(MinecraftServer.java:564) [spigot.jar:git-Spigot-798f32d-0cd0397]
  56. at java.lang.Thread.run(Unknown Source) [?:1.8.0_144]
  57. Caused by: java.lang.NoClassDefFoundError: org/bukkit/craftbukkit/v1_9_R1/entity/CraftEntity
  58. at fr.skydev59.HackTheCraft.NPC.onJoin(NPC.java:29) ~[?:?]
  59. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144]
  60. at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144]
  61. at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144]
  62. at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_144]
  63. at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot.jar:git-Spigot-798f32d-0cd0397]
  64. ... 14 more
  65. Caused by: java.lang.ClassNotFoundException: org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity
  66. at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:91) ~[spigot.jar:git-Spigot-798f32d-0cd0397]
  67. at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[spigot.jar:git-Spigot-798f32d-0cd0397]
  68. at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_144]
  69. at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_144]
  70. at fr.skydev59.HackTheCraft.NPC.onJoin(NPC.java:29) ~[?:?]
  71. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144]
  72. at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144]
  73. at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144]
  74. at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_144]
  75. at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot.jar:git-Spigot-798f32d-0cd0397]
  76. ... 14 more
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement