Open FanisDeligiannis opened 7 years ago
I would prefer if there is a resultArray Entity.getAllEffects( targetEntity )
instead. If the entity type doesn't support effects (I don't know if items can or not), return null
?
Maybe the result array is in the following layout per array entry? I forgot at this time all the params but some will be useful for some devs?
[ effectId , effectLevel, ticksRemaining ]
I believe that "removeEffect" should return true or false depending on whether it did something or not, especially since there isnt something like "checkEffect".
Example:
if(Entity.removeEffect(Player.getEntity(),MobEffect.movementSlowdown)) { ModPE.showTipMessage("Effect removed!"); }