#Help applying potion effects

1 messages · Page 1 of 1 (latest)

dusky cove
#

Does anyone have any specific ways they can apply potion effects to players? I have been trying player.addPotionEffect(effect) but it hasnt been working and I keep getting an error in console.

mild iron
#

Show the error

dusky cove
#

how do i do that little code thingy?

#

instead of having it as a regular chat?

mild iron
#

?paste

flat boneBOT
dusky cove
mild iron
#

You are doing it async

#

That won’t work

dusky cove
#

So how would i do it in sync?

mild iron
#

Use a scheduler to run it back on the main thread

#

Via Bukkit.getScheduler.runTask

#

?scheduling

flat boneBOT