From 3c5c3c958acb2dcfac4d7ddf4e390014b7e83c11 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 6 Nov 2013 21:05:35 +1300 Subject: [PATCH] Deprecated potioneffect to potioneffecttype as they don't expire naturally. --- .../disguise/disguisetypes/watchers/LivingWatcher.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/me/libraryaddict/disguise/disguisetypes/watchers/LivingWatcher.java b/src/me/libraryaddict/disguise/disguisetypes/watchers/LivingWatcher.java index 4f5ac45b..4b683a36 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/watchers/LivingWatcher.java +++ b/src/me/libraryaddict/disguise/disguisetypes/watchers/LivingWatcher.java @@ -18,10 +18,18 @@ public class LivingWatcher extends FlagWatcher { super(disguise); } + @Deprecated public void addPotionEffect(PotionEffect potionEffect) { if (hasPotionEffect(potionEffect.getType())) removePotionEffect(potionEffect.getType()); - new MobEffect(potionEffect.getType().getId(), potionEffect.getDuration(), potionEffect.getAmplifier()); + potionEffects.add(new MobEffect(potionEffect.getType().getId(), potionEffect.getDuration(), potionEffect.getAmplifier())); + sendPotionEffects(); + } + + public void addPotionEffect(PotionEffectType potionEffect) { + if (hasPotionEffect(potionEffect)) + removePotionEffect(potionEffect); + potionEffects.add(new MobEffect(potionEffect.getId(), 0, 0)); sendPotionEffects(); }