diff --git a/src/pocketmine/entity/effect/Effect.php b/src/pocketmine/entity/effect/Effect.php index 28832b175..5774c338a 100644 --- a/src/pocketmine/entity/effect/Effect.php +++ b/src/pocketmine/entity/effect/Effect.php @@ -279,7 +279,7 @@ class Effect{ * @return Color */ public function getColor() : Color{ - return clone $this->color; + return $this->color; } /** @@ -350,8 +350,4 @@ class Effect{ public function remove(Living $entity, EffectInstance $instance) : void{ } - - public function __clone(){ - $this->color = clone $this->color; - } } diff --git a/src/pocketmine/entity/effect/EffectInstance.php b/src/pocketmine/entity/effect/EffectInstance.php index 2619a73d1..4da94f602 100644 --- a/src/pocketmine/entity/effect/EffectInstance.php +++ b/src/pocketmine/entity/effect/EffectInstance.php @@ -198,7 +198,7 @@ class EffectInstance{ * @return Color */ public function getColor() : Color{ - return clone $this->color; + return $this->color; } /** @@ -209,7 +209,7 @@ class EffectInstance{ * @return EffectInstance */ public function setColor(Color $color) : EffectInstance{ - $this->color = clone $color; + $this->color = $color; return $this; }