Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package fr.skydev59.HackTheCraft;
- import org.bukkit.Bukkit;
- import org.bukkit.Location;
- import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
- import org.bukkit.entity.Entity;
- import org.bukkit.entity.EntityType;
- import org.bukkit.entity.Player;
- import org.bukkit.entity.Villager;
- import org.bukkit.event.EventHandler;
- import org.bukkit.event.Listener;
- import org.bukkit.event.player.PlayerJoinEvent;
- public class NPC implements Listener {
- public NPC(main main) {
- // TODO Auto-generated constructor stub
- }
- @EventHandler
- public void onJoin(PlayerJoinEvent event) {
- Player player = event.getPlayer();
- Location spawn = new Location(Bukkit.getWorld("world"), -500.823, 66, -533.073);
- Villager npc = (Villager) spawn.getWorld().spawnEntity(spawn, EntityType.VILLAGER);
- Entity nmsArmes = (Entity) ((CraftEntity) npc).getHandle();
- nmsArmes.setCustomName("ยง5Vendeur d'armes");
- }
- }
- ERREUR CONSOLE :
- Could not pass event PlayerJoinEvent to HackTheCraft v1.0
- org.bukkit.event.EventException
- at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot.jar:git-Spigot-798f32d-0cd0397]
- at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-798f32d-0cd0397]
- at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot.jar:git-Spigot-798f32d-0cd0397]
- at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot.jar:git-Spigot-798f32d-0cd0397]
- at net.minecraft.server.v1_9_R2.PlayerList.onPlayerJoin(PlayerList.java:333) [spigot.jar:git-Spigot-798f32d-0cd0397]
- at net.minecraft.server.v1_9_R2.PlayerList.a(PlayerList.java:159) [spigot.jar:git-Spigot-798f32d-0cd0397]
- at net.minecraft.server.v1_9_R2.LoginListener.b(LoginListener.java:144) [spigot.jar:git-Spigot-798f32d-0cd0397]
- at net.minecraft.server.v1_9_R2.LoginListener.c(LoginListener.java:54) [spigot.jar:git-Spigot-798f32d-0cd0397]
- at net.minecraft.server.v1_9_R2.NetworkManager.a(NetworkManager.java:233) [spigot.jar:git-Spigot-798f32d-0cd0397]
- at net.minecraft.server.v1_9_R2.ServerConnection.c(ServerConnection.java:140) [spigot.jar:git-Spigot-798f32d-0cd0397]
- at net.minecraft.server.v1_9_R2.MinecraftServer.D(MinecraftServer.java:825) [spigot.jar:git-Spigot-798f32d-0cd0397]
- at net.minecraft.server.v1_9_R2.DedicatedServer.D(DedicatedServer.java:399) [spigot.jar:git-Spigot-798f32d-0cd0397]
- at net.minecraft.server.v1_9_R2.MinecraftServer.C(MinecraftServer.java:665) [spigot.jar:git-Spigot-798f32d-0cd0397]
- at net.minecraft.server.v1_9_R2.MinecraftServer.run(MinecraftServer.java:564) [spigot.jar:git-Spigot-798f32d-0cd0397]
- at java.lang.Thread.run(Unknown Source) [?:1.8.0_144]
- Caused by: java.lang.NoClassDefFoundError: org/bukkit/craftbukkit/v1_9_R1/entity/CraftEntity
- at fr.skydev59.HackTheCraft.NPC.onJoin(NPC.java:29) ~[?:?]
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144]
- at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144]
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144]
- at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_144]
- at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot.jar:git-Spigot-798f32d-0cd0397]
- ... 14 more
- Caused by: java.lang.ClassNotFoundException: org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity
- at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:91) ~[spigot.jar:git-Spigot-798f32d-0cd0397]
- at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[spigot.jar:git-Spigot-798f32d-0cd0397]
- at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_144]
- at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_144]
- at fr.skydev59.HackTheCraft.NPC.onJoin(NPC.java:29) ~[?:?]
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144]
- at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144]
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144]
- at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_144]
- at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot.jar:git-Spigot-798f32d-0cd0397]
- ... 14 more
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement