#(Mertjs) Item permissions or flags

53 messages · Page 1 of 1 (latest)

solid hill
#

I have a RPG minecraft server with custom rpg classes
i create custom items like a long sword... but anyone can use
theese items. I want to prevent this with custom item
permissions. Today i started to learn Denizen for theese
problems and other things, how can i assign flags to items like
iron_sword or permissions for use. Is it possible?

hybrid bisonBOT
#

(Mertjs) Item permissions or flags

hybrid bisonBOT
#

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.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

young tree
#

yeah

#

you'd pick your event of choice, check if the player has the permission, and if not cancel it

solid hill
#

yes i know this, but for special items?

young tree
#

depends. are they item scripts or from another plugin?

solid hill
#

for example

#

can i add flag to item who is my on hand

young tree
#

are they item scripts, or are they from another plugin?

#

or just regular vanilla items

solid hill
#

vanilla item

#

but

#

with difficult name

#

damage

#

attack speed

#

and custom model data

young tree
#

i see. can you hold the item in your hand, do /ex narrate <player.item_in_hand.raw_nbt> and paste the output of that tag into here?

solid hill
#

yes

#

this is mythic mobs item

#

can this make a problem?

young tree
#

yeah this just turned into a more difficult thing to do

#

i dont remember it very well so i'll let someone else help you

solid hill
#

for vanilla?

solid hill
#

can someone help?

shell plover
#

!t mythic_item

left pebbleBOT
solid hill
#

i can't find event player switching hotbars

shell plover
#

!e hotbar

left pebbleBOT
# shell plover !e hotbar
Group

Player

Event Lines

player scrolls their hotbar player holds item

Switches

item:<item> to only process the event when the player is going to hold a specified item.

Triggers

when a player scrolls through their hotbar.

Has Player

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

Context

<context.new_slot> returns the number of the new inventory slot.
<context.previous_slot> returns the number of the old inventory slot.

Has Known Location

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

Cancellable

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

solid hill
#

is this true?

#

using of event

young tree
#

you cant use tags in events

#

but i had an idea

#

if you get the item you can see if mythic_item[] will return null or not

solid hill
shell plover
#

nevermind lol

solid hill
#

for mythic item?

young tree
#

nah shouldnt be

solid hill
#

but it will trigger every inventory scroll :/

tawny nacelle
#

still wont be a performance issue

solid hill
#

hmm okay

#

thanks guys