Hello,
I am trying to use the api in a project, but whenever I run my plugin the first line where I use a CitizensAPI method I get an error that no implementation has been set and the server stops. I have Citizens as a dependency in plugin.yml and have the jar in plugins. On the wiki I ensured that I avoided all the common mistakes. Where I am going wrong?
#(BigKy) no implementation set- Trouble using Citizens API
37 messages · Page 1 of 1 (latest)
(BigKy) no implementation set- Trouble using Citizens API
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
!logs
Please post your full latest log file.
Background Info: One of the most helpful tools to identifying the source of a problem is your server logs file! Logs contain all sorts of important information like server and plugin versions, any error messages, and a lot more important information (More Info).
How To: Your log can be found in the logs folder within your server folder. The most recent log is a text file labeled latest.log. To get help using these logs, please open that file in a text editor and copy all of the text, then open https://paste.denizenscript.com/New/Log and paste the text into the box on the page. Then click "Submit" and copy the URL and paste that back into this channel.
Please do not upload the file to Discord or to other pastebin services, use the log pastebin linked above.
also send your plugin.yml through
Content of Server Log Paste #108121: Unnamed Server Log Paste... pasted 2023/03/30 06:39:35 UTC-07:00, Paste length: 10926 characters across 129 lines, Content: [07:35:08] [ServerMain/INFO]: Environment: authHost=https://authserver.mojang.com, accountsHost=http...
Content of YAML Paste #108123: plugin.yml... pasted 2023/03/30 06:40:29 UTC-07:00, Paste length: 106 characters across 5 lines, Content: name: SMP5version: 1.0-SNAPSHOT
@solemn walrus hmm, I forget how paper works these days
maybe just wait for CitizensEnableEvent?
For the regular Spigot plugin.yml it's still the same format
I had that event, but it seems like it never runs. I think because I have it as a dependency the plugin is enabled before my plugin runs, the event is never caught
They have their own separate system
no, I'm talking more about the concurrent plugin loading
You're trying to use it in onEnable, yeah? (as in, not the static scope or anything like that)
Content of Server Log Paste #108121: Unnamed Server Log Paste... pasted 2023/03/30 06:39:35 UTC-07:00, Paste length: 10926 characters across 129 lines, Content: [07:35:08] [ServerMain/INFO]: Environment: authHost=https://authserver.mojang.com, accountsHost=http...
Server Version
Paper version git-Paper-478 (MC: 1.19.4)-- (Outdated build, behind by 3... Current build is 481)
Plugin Version(s)
Citizens v2.0.31-SNAPSHOT (build 3004) -- (Current build :white_check_mark:)
Checked For
@lone coral
Potentially Bad Line(s)
[07:35:14] [Server thread/ERROR]: Error occurred while enabling SMP5 v1.0-SNAPSHOT (Is it up to date?) :warning: Log contains error messages.
Ahhhh ok that makes sense. Yeah I have it in onEnable. https://paste.denizenscript.com/View/108124
Content of Java Paste #108124: onEnable... pasted 2023/03/30 06:56:10 UTC-07:00, Paste length: 407 characters across 9 lines, Content: @Override public void onEnable() {
@solemn walrus what about your StigglesNPC code
Alright, I moved citizens code out of onEnable and it did not give the same error. Now the error is a null pointer exception when trying to set the skin trait of an NPC
Content of Java Paste #108134: Unnamed Java Paste... pasted 2023/03/30 08:26:32 UTC-07:00, Paste length: 1312 characters across 43 lines, Content: public abstract class StigglesNPC { private NPC npc;
Here is a simplified version of my StigglesNPC code. The error comes when setSkin () is called in a derived class of StigglesNPC
And heres the new error
Content of Server Log Paste #108135: Error... pasted 2023/03/30 08:29:05 UTC-07:00, Paste length: 1510 characters across 16 lines, Content: [11:23:48 WARN]: Task #6 for SMP5 v1.0-SNAPSHOT generated an exceptionjava.lang.NullPointerException...
@solemn walrus ok, the NPE is an error in your code I'm guessing
Thread Closing Reminder
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@solemn walrus
Yeah I'll figure it out haha. Thanks for the help!