From a9081979071ec8ad56d14474cfbc48b5c60fb440 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 29 Dec 2019 19:03:32 +0000 Subject: [PATCH] Effect: document that duration is expected in ticks --- src/pocketmine/entity/Effect.php | 3 ++- src/pocketmine/entity/EffectInstance.php | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/entity/Effect.php b/src/pocketmine/entity/Effect.php index 96299d3ca..247a7f91e 100644 --- a/src/pocketmine/entity/Effect.php +++ b/src/pocketmine/entity/Effect.php @@ -195,7 +195,8 @@ class Effect{ } /** - * Returns the default duration this effect will apply for if a duration is not specified. + * Returns the default duration (in ticks) this effect will apply for if a duration is not specified. + * * @return int */ public function getDefaultDuration() : int{ diff --git a/src/pocketmine/entity/EffectInstance.php b/src/pocketmine/entity/EffectInstance.php index c66341926..42475a5c8 100644 --- a/src/pocketmine/entity/EffectInstance.php +++ b/src/pocketmine/entity/EffectInstance.php @@ -75,6 +75,8 @@ class EffectInstance{ } /** + * Returns the number of ticks remaining until the effect expires. + * * @return int */ public function getDuration() : int{ @@ -82,6 +84,8 @@ class EffectInstance{ } /** + * Sets the number of ticks remaining until the effect expires. + * * @param int $duration * * @throws \InvalidArgumentException