Name | console output |
Event Lines | console output |
Triggers | when any message is printed to console. (Requires system.redirect_logging be set true.) |
Generated Examples | after console output: |
Contexts | <context.message> returns the message that is being printed to console.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Group | Core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/events/core/ConsoleOutputScriptEvent.java#L9 |
Name | custom event |
Event Lines | custom event |
Triggers | when called by a script using customevent. |
Example |
|
Has Player | When the command is used with a player link. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Has NPC | When the command is used with an NPC link. |
Switches | id:<id> to only run the event if the given ID is used. This should almost always be specified.
data:<key>:<value> to only run the event if the given data key matches the given value, using advanced matchers for the given object type (note: the 'customevent' command call has to be careful about object type for this). |
Contexts | <context.id> returns the ID that was used.
<context.data> returns the MapTag of input data (if any! some events don't have context data).
<context.(key)> returns the value of the input data key, if available.
|
Determine | "OUTPUT:<Anything>" to add that value to the output list (note this is an ADD, not a SET). |
Group | Core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/events/core/CustomScriptEvent.java#L16 |
Name | delta time hourly|minutely|secondly |
Event Lines | delta time hourly|minutely|secondly |
Triggers | every <count> seconds, minutes, or hours of game calculation time. Default repetitions count of 1.
This is specifically based on the rate of time advancement in the game server, which is not necessarily equivalent to the real passage of time (for example, this event may fire slower if the server is lagging). For real time, see system time. |
Generated Examples | on delta time minutely: |
Switches | every:<count> to only run the event every *count* times (like "on delta time secondly every:5" for every 5 seconds). |
Contexts | <context.second> returns the exact delta time since system start.
|
Group | Core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/events/core/DeltaTimeScriptEvent.java#L10 |
Name | pre script reload |
Event Lines | pre script reload |
Triggers | immediately before Denizen scripts are reloaded. |
Generated Examples | after pre script reload:
on pre script reload: |
Group | Core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/events/core/PreScriptReloadScriptEvent.java#L7 |
Name | redis pubsub message |
Event Lines | redis pubsub message |
Triggers | when a subscribed redis connection receives a published message, see Redis. |
Generated Examples | after redis pubsub message:
on redis pubsub message: |
Switches | channel:<channel> to only fire on events advanced-matching the given channel. |
Contexts | <context.redis_id> returns the connection id that saw this message.
<context.pattern> returns the redis pattern that matched the channel.
<context.channel> returns the actual channel matched.
<context.message> returns the published message.
|
Group | Core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/events/core/RedisPubSubMessageScriptEvent.java#L9 |
Name | reload scripts |
Event Lines | reload scripts
script reload |
Triggers | when Denizen scripts are reloaded. Not triggered on initial load. |
Generated Examples | on reload scripts:
after script reload: after reload scripts: |
Switches | had_error:true/false to only process the event if there either was or was not an error message. |
Contexts | <context.had_error> returns an ElementTag(Boolean) whether there was an error.
|
Group | Core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/events/core/ReloadScriptsScriptEvent.java#L9 |
Name | scripts loaded |
Event Lines | scripts loaded |
Triggers | when Denizen scripts are loaded, but on reloaded and on initial load. |
Generated Examples | after scripts loaded: |
Switches | had_error:true/false to only process the event if there either was or was not an error message. |
Contexts | <context.had_error> returns an ElementTag(Boolean) whether there was an error.
|
Group | Core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/events/core/ScriptsLoadedScriptEvent.java#L9 |
Name | system time hh:mm |
Event Lines | system time <HH:MM>
system time hourly|minutely|secondly |
Triggers | when the system time changes to the specified value.
The system time is the real world time set in the server's operating system. It is not necessarily in sync with the game server time, which may vary (for example, when the server is lagging). For events based on in-game time passage, use delta time or wait. |
Example |
|
Example |
|
Example |
|
Switches | every:<count> to only run the event every *count* times (like "on system time secondly every:5" for every 5 seconds). |
Contexts | <context.hour> returns the exact hour of the system time.
<context.minute> returns the exact minute of the system time.
|
Synonyms (Search Aid) | cron |
Group | Core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/events/core/SystemTimeScriptEvent.java#L11 |
Name | webserver web request |
Event Lines | webserver web request |
Triggers | when a webserver opened by webserver receives a connection request. |
Example |
|
Example |
|
Example |
|
Switches | port:<#> to only handle requests to a specific port.
path:<path> to only handle requests that match the given advanced-matcher for the path. method:<method> to only handle requests with the specific method (such as GET or POST). has_response:<true/false> to only handle requests that do or don't have a response already. |
Contexts | <context.method> returns the method that was used (such as GET or POST).
<context.path> returns the path requested (such as "/index.html").
<context.port> returns the port connected to.
<context.remote_address> returns the IP address that connected.
<context.query> returns a MapTag of the query data (if no query, returns empty map).
<context.raw_query> returns the raw query input (if no query, returns null).
<context.raw_user_info> returns the raw user info input (if any) (this is a historical HTTP system that allows sending username/password over query).
<context.headers> returns a MapTag of all input headers, where the key is the header name and the value is a ListTag of header values for that name.
<context.body> returns the text content of the body that was sent, if any. Particularly for POST requests.
<context.body_binary> returns the raw binary content body that was sent, if any. Particularly for POST requests.
<context.has_response> returns true if a response body determination (raw_text_content, file, or cached_file) was applied, or false if not.
|
Determine | "CODE:<Element(Number)>" to set a standard web response code, such as 'code:200' for 'OK', or 'code:404' for 'File Not Found'
"HEADERS": + MapTag to set a map of headers, where map keys are the header name and map values are the text of the value, for example headers:[Content-Type=text/html] ... note that header are sometimes case-sensitive. "RAW_TEXT_CONTENT:<ElementTag>" to set a raw text content body in response. You may determine only one response - raw text, raw binary, a file, or a cached file. You cannot use multiple. "RAW_BINARY_CONTENT:<BinaryTag>" to set a raw binary content body in response. "FILE:<ElementTag>" to set a path to a file to send in response. File path must be within the web-root path configured in Denizen/config.yml. Files will be read async. "CACHED_FILE:<ElementTag>" to set a path to a file to send in response. The content of the file will be cached in RAM until the server restarts. This is useful for files that definitely won't change. First file read will be sync, all others are instant. "PARSED_FILE:<ElementTag>" - like "FILE:", but this file will be parsed for tags using syntax like "<{util.pi}>" to separate tags from HTML entries. "CACHED_PARSED_FILE:<ElementTag>" - like "PARSED_FILE" and "CACHED_FILE" combined. Note that the file will be cached, but the results of tags will be handled at runtime still. |
Group | Core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/events/core/WebserverWebRequestScriptEvent.java#L29 |
Name | script generates error |
Event Lines | script generates error |
Triggers | when a script generates an error. |
Generated Examples | after script generates error:
on script generates error: |
Contexts | <context.message> returns the error message.
<context.queue> returns the queue that caused the error, if any.
<context.script> returns the script that caused the error, if any.
<context.line> returns the line number within the script file that caused the error, if any.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Group | Core |
Warning(s) | Abusing this event can cause significant failures in the Denizen debug system. Use only with extreme caution. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/events/core/ScriptGeneratesErrorScriptEvent.java#L13 |
Name | server generates exception |
Event Lines | server generates exception |
Triggers | when an exception occurs on the server. |
Generated Examples | after server generates exception:
on server generates exception: |
Contexts | <context.message> returns the Exception message.
<context.full_trace> returns the full exception trace+message output details.
<context.type> returns the type of the error. (EG, NullPointerException).
<context.queue> returns the queue that caused the exception, if any.
<context.script> returns the script that caused the exception, if any.
<context.line> returns the line number within the script file that caused the exception, if any.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Group | Core |
Warning(s) | Abusing this event can cause significant failures in the Denizen debug system. Use only with extreme caution. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/events/core/ServerGeneratesExceptionScriptEvent.java#L14 |
Name | tick |
Event Lines | tick |
Triggers | every single tick. |
Generated Examples | on tick:
after tick: |
Switches | every:<count> to only run the event every *count* times (like "every:5" for every 5 ticks). |
Contexts | <context.tick> how many ticks have passed since the server started.
|
Group | Core |
Warning(s) | This event fires very rapidly and is usually not the most ideal way to handle things. Generally, prefer delta time. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/events/core/TickScriptEvent.java#L9 |
Name | input_device key pressed|released|toggled |
Event Lines | <input_device> key pressed|released|toggled |
Triggers | when a keyboard/mouse key is pressed. |
Example |
|
Example |
|
Switches | name:<key> to only process the event if the pressed key's name matches the specified matcher. |
Contexts | <context.key> returns an ElementTag of the pressed key's name.
<context.device> returns an ElementTag of the device used, will be either KEYBOARD or MOUSE.
<context.key_code> returns an ElementTag(Number) of the pressed key's raw key code.
|
Group | input |
Source | https://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/events/KeyPressReleaseScriptEvent.java#L13 |
Name | player starts|stops|toggles sprinting |
Event Lines | player starts|stops|toggles sprinting |
Triggers | when the client player starts/stops sprinting. Does not trigger for other entities/players currently. |
Example |
|
Contexts | <context.entity> returns an EntityTag of the client player.
<context.sprinting> returns an ElementTag(Boolean) of whether the client player is sprinting.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Group | Player |
Source | https://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/events/PlayerSprintScriptEvent.java#L11 |
Name | screen opened|closed |
Event Lines | screen opened|closed |
Triggers | when a screen is opened or closed. |
Generated Examples | on screen opened: |
Switches | type:<screen_type> to only process the event if the type of screen opened matches the specified matcher.
from:<screen_type> to only process the event if the screen was opened from a different screen and that screen's type matches the specified matcher. |
Contexts | <context.screen_type> returns an ElementTag of the screen type that opened/closed.
<context.previous_screen_type> returns an ElementTag of the screen type this screen was opened from, if any.
|
Group | User Interface |
Source | https://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/events/ScreenOpenCloseEvent.java#L12 |
Name | entity starts|stops rendering |
Event Lines | <entity> starts|stops rendering |
Triggers | when an entity is rendered by the client. This does not mean the entity will always be visible, but within the camera's viewing frustum. |
Generated Examples | after entity starts rendering:
after entity stops rendering: |
Contexts | <context.entity> returns an EntityTag of the entity being rendered.
<context.rendering> returns an ElementTag(Boolean) of whether the entity is being rendered.
|
Warning(s) | This event may fire very rapidly when the client's camera moves around a lot. |
Source | https://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/events/EntityStartsStopsRenderingScriptEvent.java#L11 |
Name | shutdown |
Event Lines | shutdown |
Triggers | when the server is shutting down. |
Example |
|
Group | Server |
Warning(s) | not all plugins will be loaded and delayed scripts will be dropped.
Also note that this event is not guaranteed to always run (eg if the server crashes). |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/events/core/ShutdownScriptEvent.java#L7 |