Hi, does anyone know what the code is to remove all effects from the player for a specific time and then return the effects to the player?
I tried the code to remove all the effects and it worked fine, but I'm still looking for how I can make it so that I can't use the effects for a while and then I can return the old effects.
Get and save potion effects -> LivingEntity#getActivePotionEffects Remove all potion effects -> LivingEntity#removePotionEffect Add back potion effects -> LivingEntity#addPotionEffect You'll need this too: Scheduling a delayed task