How to set hearts color without giving effect Like: Wither->Hearts turn to black; Poison->Hearts turn yellow-green;
You can control this event. https://github.com/PocketMine/PocketMine-MP/blob/master/src/pocketmine/entity/Effect.php#L211
so the solution is give them effect and cancelled EntityDamageEvent when cause is 1 and player have effect wither/poison