Comments (12)
So, I should probably clarify. I was a bit of a noob and said "shade" when I didn't actually shade the API into my own plugin. I added the plugin version of NPCLib as a dependency. I just shaded (actually this time) the API into my own plugin (I use Maven and I use IntelliJ) and now I'm getting another error:
java.lang.NullPointerException: null
at com.mc_atlas.atlasmachinationsaddon.npclib.NPCLib.createNPC(NPCLib.java:80) ~[?:?]
at com.mc_atlas.atlasmachinationsaddon.npclib.NPCLib.createNPC(NPCLib.java:96) ~[?:?]
at com.mc_atlas.atlasmachinationsaddon.util.NPCSpawner.spawnTownSteward(NPCSpawner.java:16) ~[?:?]
at com.mc_atlas.atlasmachinationsaddon.util.DatabaseManager.loadCitizens(DatabaseManager.java:97) ~[?:?]
at com.mc_atlas.atlasmachinationsaddon.AtlasMachinationsAddon.onEnable(AtlasMachinationsAddon.java:108) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:265) ~[paperclip.jar:git-Paper-"c36f2062"]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:334) ~[paperclip.jar:git-Paper-"c36f2062"]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:412) ~[paperclip.jar:git-Paper-"c36f2062"]
at org.bukkit.craftbukkit.v1_13_R2.CraftServer.enablePlugin(CraftServer.java:443) ~[paperclip.jar:git-Paper-"c36f2062"]
at org.bukkit.craftbukkit.v1_13_R2.CraftServer.enablePlugins(CraftServer.java:357) ~[paperclip.jar:git-Paper-"c36f2062"]
at net.minecraft.server.v1_13_R2.MinecraftServer.l(MinecraftServer.java:608) ~[paperclip.jar:git-Paper-"c36f2062"]
at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:570) ~[paperclip.jar:git-Paper-"c36f2062"]
at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:431) ~[paperclip.jar:git-Paper-"c36f2062"]
at net.minecraft.server.v1_13_R2.DedicatedServer.init(DedicatedServer.java:316) ~[paperclip.jar:git-Paper-"c36f2062"]
at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:787) ~[paperclip.jar:git-Paper-"c36f2062"]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]
EDIT:
So it looks like I was adding in an extra step... I just had to compile the plugin during the package phase of Maven. Marked as resolved.
from npclib.
Hi there, thanks for opening this issue!
Could you first provide me with some information on what version of NPCLib you're using? And how you are shading the JAR?
from npclib.
Latest version of NPCLib (1.4.1 I think)
I've simply added the plugin itself as a dependency. (This issue did not occur with version 1.3)
from npclib.
Any updates on this?
from npclib.
I've ran into this same issue with NPCLib version 1.4.1 using Paper Spigot 582. The stack trace is identical, and does not reproduce when using NPCLib version 1.3.
from npclib.
I might know how this occurred. Are you @arnhav11 (and @AvANight) creating the NPCLib instance before or after the onEnable
method is called?
My apologies for my late reply. I've been incredibly busy with school.
from npclib.
No worries.
I was instantiating the NPCLib in the onEnable() method. I'm not sure what you mean by before or after...
from npclib.
Same issue. Looks to be something to do with TinyProtocol.
from npclib.
Hm.. I still get the error using gradle, although it works fine using the 3.0 version of NPCLib.
from npclib.
This is actually something that's caused by the support of 1.7 R4. It's actually frustrating me so much that I'll be porting 1.7 R4 support to a legacy branch of NPCLib.
Should soon be sorted!
from npclib.
Will be solved in the same version as the fix for #17.
from npclib.
Fixed in release 1.4.2!
from npclib.
Related Issues (20)
- Distant NPCs don't spawn when getting closer with ViaVersion HOT 2
- Custom AI for NPC?
- 1_16_R3 incompatible HOT 5
- HEX colors HOT 1
- NPC Movement HOT 2
- 1.17 support
- The NPC isn't configured to use skin overlays HOT 2
- Nullpointer when creating NPC HOT 1
- Replace Skin id by Skin uuid HOT 1
- discord for the people (link inside)
- Could not resolve dependencies
- Failed load the plugin HOT 1
- Fix NPC not fully loading if constructed when no players are online HOT 1
- Cannot invoke "net.jitse.npclib.api.NPC.setLocation()" because "npc" is null HOT 6
- NPC Rejoin Disappearance
- NPC save system HOT 2
- Exception in thread "pool-14-thread-2" java.lang.NullPointerException: "this.npcLib" is null" HOT 2
- Wrong README info HOT 1
- An opinion on skin HOT 1
- java.lang.ExceptionInInitializerError
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from npclib.