Hi, Just creating a potion cooldown and can't seem to find the class for potion use. Any help? Thanks
use this: Code: targetPlayer.addPotionEffect(new PotionEffect(PotionEffectType.SLOW_DIGGING, 10000000, 1)); targetplayer = YOUR PLAYER SLOW_DIGGING = POTION EFFECT 10000000 = the amount of time, in my case infinite 1 = the level of the potion , 0 = a lvl 1 potion, 1 = a lvl 2 potion, 2 = a lvl 3 potion
yeah just found that thanks Is there one for drinking potions? EDIT by Moderator: merged posts, please use the edit button instead of double posting.