Skip to content

@pumpkin-plugins/pumpkin-api API / core / AiGoal

Interface: AiGoal ​

Defined in: core.ts:45

Callbacks that describe a custom entity AI goal.

Properties ​

canStart ​

canStart: (server, entity) => boolean

Defined in: core.ts:47

Return whether the goal can start for this entity.

Parameters ​

server ​

Server

entity ​

Entity

Returns ​

boolean


shouldContinue ​

shouldContinue: (server, entity) => boolean

Defined in: core.ts:49

Return whether the active goal should continue.

Parameters ​

server ​

Server

entity ​

Entity

Returns ​

boolean


start ​

start: (server, entity) => void

Defined in: core.ts:51

Start the goal.

Parameters ​

server ​

Server

entity ​

Entity

Returns ​

void


stop ​

stop: (server, entity) => void

Defined in: core.ts:53

Stop the goal.

Parameters ​

server ​

Server

entity ​

Entity

Returns ​

void


tick ​

tick: (server, entity) => void

Defined in: core.ts:55

Advance the goal by one server tick.

Parameters ​

server ​

Server

entity ​

Entity

Returns ​

void

pumpkin-plugins documentation