Closed Mansitoh closed 3 years ago
Because you're using 1.7.
Check the legacy branch for the 1.7 version. However it hasn’t been updated in years.
Because you're using 1.7.
And how can I use it for 1.7?
Check the legacy branch for the 1.7 version. However it hasn’t been updated in years.
Check the legacy branch for the 1.7 version. However it hasn’t been updated in years.
How do I find that? I don't understand that much because I don't speak English
Latest legacy release: https://github.com/MinecraftLibraries/NPCLib/releases/tag/v1.0-legacy
Legacy branch: https://github.com/MinecraftLibraries/NPCLib/tree/legacy
Latest legacy release: https://github.com/MinecraftLibraries/NPCLib/releases/tag/v1.0-legacy
Legacy branch: https://github.com/MinecraftLibraries/NPCLib/tree/legacy
Who version supported 1.7?
[16:23:11 INFO]: [NPCLib] Enabled for MC v1_7_R4
[16:23:11 ERROR]: Error occurred while enabling FrostyKitmapCore v1.0 (Is it up to date?)
java.lang.ExceptionInInitializerError
at net.jitse.npclib.listeners.PacketListener.start(PacketListener.java:61) ~[?:?]
at net.jitse.npclib.NPCLib.registerInternal(NPCLib.java:67) ~[?:?]
at net.jitse.npclib.NPCLib.
[16:39:00 ERROR]: [FrostyKitmapCore] [NPCLib] Error in onPacketInAsync(). java.lang.NullPointerException: Cannot invoke "Object.toString()" because the return value of "com.comphenix.tinyprotocol.Reflection$FieldAccessor.get(Object)" is null at net.jitse.npclib.listeners.PacketListener$1.onPacketInAsync(PacketListener.java:59) ~[npclib-plugin-v1.4.jar:?] at com.comphenix.tinyprotocol.LegacyTinyProtocol$PacketInterceptor.channelRead(LegacyTinyProtocol.java:315) [npclib-plugin-v1.4.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [Spigot.jar:?] at net.minecraft.util.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:173) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [Spigot.jar:?] at net.minecraft.util.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:173) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [Spigot.jar:?] at net.minecraft.util.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:173) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [Spigot.jar:?] at com.comphenix.protocol.injector.netty.ChannelInjector$4.channelRead(ChannelInjector.java:261) [ProtocolLib.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [Spigot.jar:?] at net.minecraft.util.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:173) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [Spigot.jar:?] at net.minecraft.util.io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:149) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:100) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:480) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:447) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:341) [Spigot.jar:?] at net.minecraft.util.io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [Spigot.jar:?] at java.base/java.lang.Thread.run(Thread.java:832) [?:?]
WHY GIVE ME THAT ERROR? ON NPCInteractEvent
[10:29:55 ERROR]: [FrostyKitmapCore] [NPCLib] Error in onPacketInAsync(). java.lang.NullPointerException: Cannot invoke "Object.toString()" because the return value of "com.comphenix.tinyprotocol.Reflection$FieldAccessor.get(Object)" is null at net.jitse.npclib.listeners.PacketListener$1.onPacketInAsync(PacketListener.java:59) ~[npclib-plugin-v1.4.jar:?] at com.comphenix.tinyprotocol.LegacyTinyProtocol$PacketInterceptor.channelRead(LegacyTinyProtocol.java:315) [npclib-plugin-v1.4.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [Spigot.jar:?] at net.minecraft.util.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:173) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [Spigot.jar:?] at net.minecraft.util.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:173) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [Spigot.jar:?] at net.minecraft.util.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:173) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [Spigot.jar:?] at com.comphenix.protocol.injector.netty.ChannelInjector$4.channelRead(ChannelInjector.java:261) [ProtocolLib.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [Spigot.jar:?] at net.minecraft.util.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:173) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [Spigot.jar:?] at net.minecraft.util.io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:149) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:100) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:480) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:447) [Spigot.jar:?] at net.minecraft.util.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:341) [Spigot.jar:?] at net.minecraft.util.io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [Spigot.jar:?] at java.base/java.lang.Thread.run(Thread.java:832) [?:?]
It’s super outdated, I’m planning on implementing features from the latest 1.8.8 release at some point.
It’s super outdated, I’m planning on implementing features from the latest 1.8.8 release at some point.
Ok Thanks, I really need it I'm using 1.7
Closing, 1.7 is no longer supported.
It has a very different structure than 1.8+ versions, therefore drastically increasing the size of the library. Therefore giving me enough reason to take it out of the library.
[12:10:08 INFO]: Mansitoh issued server command: /kit npc add Diamond [12:10:08 WARN]: NPCLib Failed to create NPC. Please report the following stacktrace message java.lang.NullPointerException: Cannot invoke "java.lang.Class.getConstructors()" because "this.npcClass" is null at net.jitse.npclib.NPCLib.createNPC(NPCLib.java:114) [npclib-plugin-2.11-SNAPSHOT.jar:?] at net.frosty.kitmap.kits.NPCKit.createDiamondNPC(NPCKit.java:51) [FrostyKitmap.jar:?] at net.frosty.kitmap.kits.KitsCommand.onCommand(KitsCommand.java:234) [FrostyKitmap.jar:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [Spigot.jar:?] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181) [Spigot.jar:?] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:766) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.PlayerConnection.handleCommand(PlayerConnection.java:1037) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:874) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.PacketPlayInChat.a(PacketPlayInChat.java:28) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.PacketPlayInChat.handle(PacketPlayInChat.java:65) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:189) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.ServerConnection.c(ServerConnection.java:81) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:799) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:312) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:645) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:550) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [Spigot.jar:?]
org.bukkit.command.CommandException: Unhandled exception executing command 'kit' in plugin FrostyKitmapCore v1.0 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[Spigot.jar:?] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181) ~[Spigot.jar:?] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:766) ~[Spigot.jar:?] at net.minecraft.server.v1_7_R4.PlayerConnection.handleCommand(PlayerConnection.java:1037) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:874) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.PacketPlayInChat.a(PacketPlayInChat.java:28) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.PacketPlayInChat.handle(PacketPlayInChat.java:65) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:189) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.ServerConnection.c(ServerConnection.java:81) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:799) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:312) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:645) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:550) [Spigot.jar:?] at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [Spigot.jar:?] Caused by: java.lang.NullPointerException: Cannot invoke "net.jitse.npclib.api.NPC.setLocation(org.bukkit.Location)" because "diamondnpc" is null at net.frosty.kitmap.kits.NPCKit.createDiamondNPC(NPCKit.java:52) ~[?:?] at net.frosty.kitmap.kits.KitsCommand.onCommand(KitsCommand.java:234) ~[?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[Spigot.jar:?] ... 13 more
CODE: Main class: private NPCLib npclib; public void onEnable() { ///Kit npc this.npclib = new NPCLib(this); } public NPCLib getNPCLib() { return npclib; }
NPCKit class:
public static void createDiamondNPC(Player p, String name) {
}