#(naick) Denizen Java API

38 messages · Page 1 of 1 (latest)

grave orioleBOT
#

(naick) Denizen Java 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>

tired light
#

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

obsidian orchidBOT
tired light
#

!command sleep

obsidian orchidBOT
# tired light !command sleep
Required Plugins or Platforms

Citizens

Group

npc

Syntax

sleep (<location>)

Short Description

Causes the NPC to sleep. To make them wake up, see !command Stand.

Description

Makes the linked NPC sleep at the specified location.
Use !command Stand to make the NPC wake back up.

tired light
#

the source for that sleep command is linked to that meta link in command: sleep

mild elk
#

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

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

warm current
#

npc.getOrAddTrait(SleepingTrait.class) to get the trait instance, then used the methods on it to configure it however you'd like

mild elk
#

i imported denizen via gradle but it can't find the class of the trait

#

@warm current

warm current
mild elk
#

can you link me the repo?

warm current
#

https://maven.citizensnpcs.co/repo, should be something like

    maven {
        name = 'citizens-repo'
        url = 'https://maven.citizensnpcs.co/repo'
    }

?

mild elk
#

yes yes

mild elk
warm current
#

That looks about right; again don't have much gradle knowledge - are you getting any errors when you reload?

mild elk
warm current
#

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?

marsh questBOT
#
Thread Closing Reminder

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