#(naick) Denizen Java API
38 messages · Page 1 of 1 (latest)
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>
Denizen doesn't have an explicit Java API, just a bunch of public code classes
you could possibly take a look at the relevant code in the plugins themselves?
!github Citizens
Citizens can be found on GitHub at: https://github.com/CitizensDev/Citizens2
!command sleep
Citizens
npc
sleep (<location>)
Causes the NPC to sleep. To make them wake up, see !command Stand.
Makes the linked NPC sleep at the specified location.
Use !command Stand to make the NPC wake back up.
the source for that sleep command is linked to that meta link in command: sleep
Do you think if I add I take the tract from the source code and add it from my code does it work?
Or do you suggest I do something else?
@tired light
i don't know, someone more familiar with the API can answer when they can though
i'd say try it and see or reference your java docs
You can look at the command's source code to see how does it work, but generally these are just traits you can use the same way as any other Citizens traits
npc.getOrAddTrait(SleepingTrait.class) to get the trait instance, then used the methods on it to configure it however you'd like
Don't know too much about Gradle, did you properly add the repo?
can you link me the repo?
so i check
https://maven.citizensnpcs.co/repo, should be something like
maven {
name = 'citizens-repo'
url = 'https://maven.citizensnpcs.co/repo'
}
?
yes yes
can you also give me the dependency itself so i check if it's the right one?
That looks about right; again don't have much gradle knowledge - are you getting any errors when you reload?
no error says imported everything, but doesn't find class
With maven it should be
<repository>
<id>citizens-repo</id>
<url>https://maven.citizensnpcs.co/repo</url>
</repository>
And
<dependency>
<groupId>com.denizenscript</groupId>
<artifactId>denizen</artifactId>
<version>1.2.6-SNAPSHOT</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
I don't know much about Gradle sadly, but doesn't it have some sort of auto-convertor?
Has your issue been resolved, or your question been answered?
If so, please type </resolved:1028673926114594866> 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.)
@mild elk