#(podjazd) Someone know why its not working?

91 messages · Page 1 of 1 (latest)

jagged viper
#

Someone know why its not working?

keen oasisBOT
#

(podjazd) Someone know why its not working?

keen oasisBOT
#

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.

jagged viper
#
        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

loud zodiacBOT
# versed thunder !debug
Info: 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!

jagged viper
versed thunder
#

There is no flag check?

jagged viper
#

i tried without the flag

#

and its still dont work

versed thunder
#

!e player equips

loud zodiacBOT
# versed thunder !e player equips
Required Plugins or Platforms

Paper

Group

Paper

**WARNING**

This event is not reliable, and may miss some types of equipment changes or fire when equipment hasn't actually changed.

Event Lines

player equips|unequips armor|helmet|chestplate|leggings|boots player equips|unequips <item>

Triggers

when a player (un)equips armor.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<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.

versed thunder
#

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

loud zodiacBOT
# versed thunder !e player clicks in inventory
Group

Player

Event Lines

player (<click_type>) clicks (<item>) in <inventory>

Switches

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.

Triggers

when a player clicks in an inventory. Note that you likely will also want to listen to !event player drags in inventory.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<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.

Determine

ItemTag to set the current item for the event.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

jagged viper
#
        on player clicks item in inventory:
            - if <context.slot_type> == armor:
                - if <context.slot> == 40:
#

i have this

versed thunder
#

May have to check when they click on the head slot and an equippable item is in their inventory.

jagged viper
#

but if someone click o the hotbar

#

then he bypass that

versed thunder
#

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?

jagged viper
#

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

versed thunder
#

Ahh.

loud zodiacBOT
# versed thunder !logcheck https://paste.denizenscript.com/View/128112
Server Version

UniverseSpigot version git-UniverseSpigot-"84fb86a" (MC: 1.20.4)

Plugin Version(s)

Denizen: 1.3.0-SNAPSHOT (build 1803-REL) -- (Outdated build, behind by 1)

Checked For

@versed thunder

Online/Offline

Offline, but proxied.

UUID Version

4 (:white_check_mark: Online)

Java Version

21.0.3 :white_check_mark:

Other Noteworthy Plugin(s)

WorldGuard: 7.0.9+5934e49

Possibly Relevant Plugin(s)

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'.

versed thunder
#

!update denizen

loud zodiacBOT
versed thunder
#

You're behind on release builds.

jagged viper
#

you think its the problem

#

?

versed thunder
#

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.

jagged viper
#

still the same

versed thunder
#

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

loud zodiacBOT
# versed thunder !e player clicks block
Group

Player

**WARNING**

this event may in some cases double-fire, requiring usage of the 'ratelimit' command (like 'ratelimit <player> 1t') to prevent doubling actions.

**WARNING**

this sometimes fires at unexpected times, eg when dropping an item.

Event Lines

player (right|left) clicks <block>

Switches

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.

Triggers

when a player clicks on a block or in the air.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<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.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

versed thunder
#

You can use matchables, so that'll be easier.

#

!G matchables

loud zodiacBOT
#
Possible Confusion

Did you mean to search for the basics?

jagged viper
#
        on player right clicks block with:helmet:
            - determine cancelled
#

like this?

versed thunder
#

!l matchables

loud zodiacBOT
# versed thunder !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...

Group

Object System

versed thunder
#

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

jagged viper
#

work

#

thanks

#

:)

exotic fjordBOT
#
Resolved

Thread closed as resolved.

jagged viper
#

okay

exotic fjordBOT
#
Thread Reopened

Thread was manually reopened by @jagged viper.

jagged viper
#

second problem

#

if player have

#

the helmet in left hand

#

then he can equip this

versed thunder
#

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

exotic fjordBOT
#
Thread Closing Reminder

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

jagged viper
#

like this?

versed thunder
#

Should work, if not reverse using and with. I'm not sure if they follow a special order or not.

jagged viper
#

i need make 2 events

#

for either_hand

versed thunder
#

Eh?

jagged viper
#

and without either_hand?

versed thunder
#

Why?

jagged viper
#

im asking

versed thunder
#

No, this should cover most equippable helmets with right clicking a block regardless of what hand the item is in.

jagged viper
#

okay

versed thunder
#

This obviously won't work for turtle shell or jack o lanterns.

jagged viper
#

works fine

#

rn

#

thanks