#No so then what should I change
1 messages ยท Page 1 of 1 (latest)
Very good question.
Okay so lets break this down and start from scratch
U know what a flow diagram is?
no
I got started doing this stuff pretty recently and then I did a big project, probably a bad idea
Ok
"An error doesnt become a mistake till u refuse to correct it" ๐
So
Do me a favour and write me a flow chart out (in paint, powerpoint,m whatever) of what u want this to do
No its perfect
now think about this for a moment. How many checks should we need here using common sense?
Like an if statement
1
Brill
Okay so
you want to do one check, and that check is "does this player have a cooldown" yes?
yes
So lets use some serious big brain common sense
You have a command
you know you will have one single check
and the check is u want a cooldown
In this episode of the Spigot series, I show you how to make your commands have cooldowns. #Spigot #Minecraft #MCPlugins
Code: https://github.com/Spigot-Plugin-Development-Tutorial/cooldowns
Join the Community! - https://discord.gg/cortexdev
Want to Support the Channel?
Become a Member: https://www.youtube.com/channel/UC_LtbK9pzAEI-4yVprLOcyA...
Shoulda been the first place ya go :L
Sometimes asking the dumb question to google, youtube, etc
is the best policiy
But please listen closely, i'd start from episode 1 and watch till episode 10.5.
I ask as u put ur cool down in "on enable" .
"On Enable" just does stuff the moment the server opens up.
This tells me there are some serious gaps in ur knowledge of coding that need filling.
That is NOT bad news. Its great news actually. it means you know ull get tonnes of value from this youtube series.
Thank you
Spoon Feed Spoiler: ||I'd just store the time that the cooldown was set, and check if the difference between the time now and the time then is greater than the cooldown amount. If so, you can do your stuff and delete the cooldown entry so no memory leaks.||
I think we can both agree that if the lad is mistaking on enable for anything other than what it is, spoonfeeding is probs not the play here ๐
ok so im trying to make the item invulnerable to all forms of damage, like fire and explosions
is that an item attribute?
Woah woah woah slow the breaks my guy how did we do on getting up to scratch with the basics?
Last time we talked there was a lot to go through
i figured out the issue with the cooldown and it works now but now i have new issues