#(podjazd) Someone know why its not working?
91 messages · Page 1 of 1 (latest)
(podjazd) Someone know why its not working?
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.
on player equips helmet:
- if <player.has_flag[nosi_pumpkin]>:
- determine cancelled
if player tries to equip helmet using hotbar
he can do that
idk why
!debug
If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!
Content of Server Log Paste #128112: Denizen Debug Logs From A Minecraft Server... pasted 2024/11/13 13:41:02 UTC-08:00, Paste length: 1787 characters across 25 lines, Content: Java Version: 21.0.3Up-time: 34s
There is no flag check?
!e player equips
Paper
Paper
This event is not reliable, and may miss some types of equipment changes or fire when equipment hasn't actually changed.
player equips|unequips armor|helmet|chestplate|leggings|boots player equips|unequips <item>
when a player (un)equips armor.
Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
<context.new_item> returns the ItemTag that is now in the slot.
<context.old_item> returns the ItemTag that used to be in the slot.
<context.slot> returns the name of the slot.
This event is not reliable, and may miss some types of equipment changes or fire when equipment hasn't actually changed.
You might have to manually check.
!e player clicks in inventory
Player
player (<click_type>) clicks (<item>) in <inventory>
with:<item> to only process the event if a specified cursor item was used.
in_area:<area> replaces the default 'in:<area>' for this event.
action:<action> to only process the event if a specified action occurred.
slot:<slot> to only process the event if a specified slot or slot_type was clicked. For slot input options, see !language Slot Inputs.
when a player clicks in an inventory. Note that you likely will also want to listen to !event player drags in inventory.
Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
<context.item> returns the ItemTag the player has clicked on.
<context.inventory> returns the InventoryTag (the 'top' inventory, regardless of which slot was clicked).
<context.clicked_inventory> returns the InventoryTag that was clicked in.
<context.cursor_item> returns the item the Player is clicking with.
<context.click> returns an ElementTag with the name of the click type. Click type list: <@link url...
<context.slot_type> returns an ElementTag with the name of the slot type that was clicked. Slot ty...
<context.slot> returns an ElementTag with the number of the slot that was clicked.
<context.raw_slot> returns an ElementTag with the raw number of the slot that was clicked.
<context.is_shift_click> returns true if 'shift' was used while clicking.
<context.action> returns the inventory_action. See <@link language Inventory Actions>.
... and 1 more.
ItemTag to set the current item for the event.
True - this adds switches in:<area> + location_flagged:<flag name>.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
on player clicks item in inventory:
- if <context.slot_type> == armor:
- if <context.slot> == 40:
i have this
May have to check when they click on the head slot and an equippable item is in their inventory.
I don't see the problem.
You don't want them equipping it.
The hotbar won't let them equip it by clicking on it? Am I missing something?
if someone try to equip just by using mouse from inventory he can't but if the player right click when he is holding the helmet then he can
idk why
Ahh.
Content of Server Log Paste #128112: Denizen Debug Logs From A Minecraft Server... pasted 2024/11/13 13:41:02 UTC-08:00, Paste length: 1787 characters across 25 lines, Content: Java Version: 21.0.3Up-time: 34s
UniverseSpigot version git-UniverseSpigot-"84fb86a" (MC: 1.20.4)
Denizen: 1.3.0-SNAPSHOT (build 1803-REL) -- (Outdated build, behind by 1)
@versed thunder
Offline, but proxied.
4 (:white_check_mark: Online)
21.0.3 :white_check_mark:
WorldGuard: 7.0.9+5934e49
TAB: 5.0.1 - This plugin adds Below_Name scoreboards to NPCs.
ViaVersion: 5.1.0 - Mixed client vs server versions can sometimes cause packet-related issues.
CMI: 9.7.7.5 - CMI tends to mess with a large variety of server features and often gets in the way of issue debugging.
FastAsyncWorldEdit: 2.12.1-SNAPSHOT-961;eb0f07a - 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'.
!update denizen
Latest Denizen stable release builds are at https://ci.citizensnpcs.co/job/Denizen/. Most users should download the stable release build.
Latest Denizen dev builds are at https://ci.citizensnpcs.co/job/Denizen_Developmental/. Dev builds are for usually for test servers only.
Spigot resource page for Denizen is at https://www.spigotmc.org/resources/denizen.21039/ (do NOT download builds from Spigot).
You're behind on release builds.
Wouldn't hurt to update to the latest release build.
If the event still won't work then I'll have to mingle myself, I may have solved this problem myself but I'd like to see if it's just an outdated denizen issue.
still the same
Okay.
Yeah I got around this problem too.
You're gonna have to check when someone right clicks a block with those items.
!e player clicks block
Player
this event may in some cases double-fire, requiring usage of the 'ratelimit' command (like 'ratelimit <player> 1t') to prevent doubling actions.
this sometimes fires at unexpected times, eg when dropping an item.
player (right|left) clicks <block>
with:<item> to only process the event if a specified item was held.
using:hand/off_hand/either_hand to only process the event if the specified hand was used to click.
type:<material> to only run if the block clicked matches the material input.
when a player clicks on a block or in the air.
Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
<context.item> returns the ItemTag the player is clicking with.
<context.location> returns the LocationTag the player is clicking on.
<context.relative> returns a LocationTag of the air block in front of the clicked block.
<context.click_type> returns an ElementTag of the Spigot API click type <@link url https://hub.spi...
<context.hand> returns an ElementTag of the used hand.
True - this adds switches in:<area> + location_flagged:<flag name>.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
Did you mean to search for the basics?
!l matchables
Script events have a variety of matchable object inputs, and the range of inputs they accept may not always be obvious.
For example, an event might be "player clicks <block>"... what can "<block>" be filled with?
"<block>" usually indicates that a LocationTag and/or MaterialTag will be matched against.
This means you can specify any valid block material name, like "stone" or "air", like "on player clicks stone:" (will only run the event if the player is clicking stone)
You can also use a catch-all such as "block", like "on player clicks block:" (will always run the event when the player clicks anything/anywhere)
You can also use some more complicated matchables such as "vanilla_tagged:", like "on player clicks vanilla_tagged:mineable/axe:" (will run if the block is mineable with axes)
(Fo...
Object System
Close.
with:*_helmet
Asterisks are wildcards, as per the matchables.
That'll cover the helmet, but you may wanna include the jack o lantern and turtle_shell
Thread closed as resolved.
okay
Thread was manually reopened by @jagged viper.
Huh?
Is that a thing?
I'll do some checking on my end soon.
You need the switch using:either_hand
From what I believe, using the with: switch is only firing for items in your right hand by default.
Good catch, I added that to my own custom stuff too.
If this is all then
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command 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.)
@jagged viper
on player right clicks block using:either_hand with:*_helmet:
- if <player.has_flag[nosi_pumpkin]>:
- determine cancelled
like this?
Should work, if not reverse using and with. I'm not sure if they follow a special order or not.
Eh?
and without either_hand?
Why?
im asking
No, this should cover most equippable helmets with right clicking a block regardless of what hand the item is in.
okay
This obviously won't work for turtle shell or jack o lanterns.