#Sk-YAML Lore with Variables
1 messages · Page 1 of 1 (latest)
Also hey got any tips on my code. or does it looks pretty good?
So like how would I be able to put a placeholder in a function?
depends if you wanna make your own system or use placeholderapi
my idea would be that you put ${idk} in your yml and in skript do smth like replace "${idk}" with "100" in text
that works ty
I'm trynna make a plugin shop plugin and I'm trynna to keep it as low as addons as possible
but honestly how does that look to you too many loops or is just good?
everything works fine but i know there is always a better way of doing stuff
yaml isnt the best way for doing shops but for that it looks nearly fine
what's a better way? I'm making it fully configure able for all people that wanna use it I'm trynna to keep it as user friendly as possible and ymls are the only thing I thought that was worth it
like this is just one of the configs
then yml is the best way
for performance i would say the best way would be json but yeah
that's true, but I'm trynna to keep it basic for new people
I usually use json for like datastorage
loop all items in {_p}'s current inventory:
if loop-item is air:
send "Hey" to {_p}
else:
send "Hey2" to {_p}``` any idea no error but also no text
what should this function do?
I'm trynna make a function that will loop thru this gui and tell me if the slot is air or not if not, I want it to grab the item which is there and then i can get the rest of the data needed
I have searched for the past 2 hours looking for a way to do this and nothing
I also did just try this ```if event-inventory = (metadata tag "SellAll" of player):
loop all items in player's current inventory:
if type of loop-item = air:
send "hey" to player
so if event-inventory = (metadata tag "SellAll" of player): loop all items in metadata tag "SellAll" of player: loop-item = black stained glass pane: send "hey" to player this works but air doesn't?
the item can't be air, so just check if the item is set and if it is, then there's an item.
Example?
dude.
use the code you already have, and replace = yourItemHere with is set