type: world
debug: false
events:
on player chats:
- if <context.message.contains['[item]']>:
- narrate "<yellow>Info<gray>> Please use <aqua>/showitem <gray> or <aqua>/showinv"```
i need to check if the players message contaisn th e string ```[item]```
but the formatting denizen uses is breaking it. i tried "[item]" [item] and '[item]'
#(paintsplat) filling in brackets in contains check
1 messages · Page 1 of 1 (latest)
(paintsplat) filling in brackets in contains check
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.
Tag parse results for <element[[item]].contains_text[[item]]>: https://paste.denizenscript.com/View/122359
true
Seems to work fine?
maybe bc my chat plugin
Ill find another solution if this doesnt work
I need canned messages lol
Well, look at your debug - does it fire? what's going wrong?
Group
Player
**WARNING**
Using this will forcibly sync the chat thread.
Event Lines
player chats
Switches
message:<matcher> to only process the event if the chat message matches an advanced matcher.
Triggers
when a player chats.
Has Player
Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
Context
<context.message> returns the player's message as an Element.
<context.format> returns the chat message's raw format.
<context.full_text> returns the full text of the chat message (ie, the written message with the format applied to it).
<context.recipients> returns a list of all players that will receive the chat.
Determine
ElementTag to change the message.
"FORMAT:<ScriptTag>" to set the format script the message should use.
"RAW_FORMAT:<ElementTag>" to set the format directly (without a format script). (Use with caution, avoid if possible).
"RECIPIENTS:<ListTag(PlayerTag)>" to set the list of players that will receive the message.
Has Known Location
True - this adds switches in:<area> + location_flagged:<flag name>.
Cancellable
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
the on player chats isnt going off
Content of Server Log Paste #122366: Denizen Debug Logs From A Minecraft Server... pasted 2024/05/01 14:52:33 UTC-07:00, Paste length: 3645 characters across 44 lines, Content: Java Version: 21.0.1Up-time: 9d 23h
btw im stuck on 1.20.2 bc of mmoitems and such. they have 1.20.4 but with breaking changes
Id need to reset a lot to update
as i said, this is probably my chat plugin's fault
What's the chat plugin
Content of Server Log Paste #122366: Denizen Debug Logs From A Minecraft Server... pasted 2024/05/01 14:52:33 UTC-07:00, Paste length: 3645 characters across 44 lines, Content: Java Version: 21.0.1Up-time: 9d 23h
Server Version
Paper version git-Paper-318 (MC: 1.20.2)-- (Current build :white_check_mark:)
Plugin Version(s)
Citizens: 2.0.33-SNAPSHOT (build 3252) -- (:warning:Outdated build, behind by 156)
Denizen: 1.2.9-SNAPSHOT (build 1799-REL) -- (:warning:Outdated build, behind by 5)
Depenizen: 2.1.0 (build 850) -- (Outdated build, behind by 5)
Checked For
@vernal hornet
Online/Offline
Offline, but proxied.
UUID Version
4 (:white_check_mark: Online)
Java Version
21.0.1 :warning: - Only Java versions 17, 16, and 8 are fully supported
Other Noteworthy Plugin(s)
WorldGuard: 7.0.10-SNAPSHOT+2260-c7319f1, MythicMobs: 5.5.2-SNAPSHOT-9824ee6c, ProtocolLib: 5.1.1-SNAPSHOT-673
Possibly Relevant Plugin(s)
HeadDatabase: 4.18.2 - HeadDatabase has been known to cause issues with skins.
ModelEngine: R4.0.4 - ModelEngine has Citizens support, but that support is known to be buggy. Issues related to NPCs that use ModelEngine should be reported to ModelEngine support, not Citizens.
Multiverse-Core: 4.3.1-b861 - Multi-world configuration plugins may affect NPCs in unexpected ways.
FastAsyncWorldEdit: 2.8.3-SNAPSHOT-605;1996a38 - This plugin has been known to break the plugin load order on many servers, due to usage of the 'loadbefore' directive in its 'plugin.yml'.
GSit: 1.5.3 - 'Sit on other players' or 'sit on mobs' plugins sometimes allow players to sit on NPCs.
You could try tinker with ignorecancelled:true and bukkit_priority switches
!lang bukkit priority
Possible Confusion
Did you mean to search for bukkit event priority?
Script events that are backed by standard Bukkit events are able to control what underlying Bukkit event priority
they register as.
This can be useful, for example, if a different plugin is cancelling the event at a later priority,
and you're writing a script that needs to un-cancel the event.
This can be done using the "bukkit_priority" switch.
Valid priorities, in order of execution, are: LOWEST, LOW, NORMAL, HIGH, HIGHEST, MONITOR.
Monitor is executed last, and is intended to only be used when reading the results of an event but not changing it.
The default priority is "normal".
Group
Script Events
ie:
on player chats bukkit_priority:LOWEST:
- announce to_console "fired LOWEST"
on player chats bukkit_priority:LOWEST ignorecancelled:true:
- announce to_console "fired LOWEST + ignoredcancelled"
will try
this works thx
type: world
debug: false
events:
on player chats bukkit_priority:LOWEST ignorecancelled:true:
- if <context.message.contains[[item]]>:
- wait 10t
- narrate "<yellow>Info<gray>> Please use <aqua>/showitem <gray> or <aqua>/showinv"```