I thought line 44 would cause the stuff within those brackets to execute when the projectile is either on the ground, or collided with another entity. But when it hits an entity, it just damages them and nothing else happens. What am I doing wrong?
Line 44, make that PHP: if($this->onGround or $this->isCollided or $this->age > 1200){ Move line 50, 51 off the foreach loop. Remove lines 36 - 39. Line 42, better to return false. AFAIK, when onUpdate($tick) return false, the server will no longer schedule updates for the entity. Basically, onUpdate($tick) will never be called for that entity if onUpdate($tick) returns false any time. Whenever you're closing an entity, make sure you return false at the end of it.