Entity: Address fireticks crashdumps

This will now throw an exception at the source instead of crashing when the entity is saved, which should put the blame on the correct plugin responsible for this.
This also includes magic method hacks to preserve backwards compatibility, since the fireTicks field is now protected.
This commit is contained in:
Dylan K. Taylor
2019-01-19 16:05:10 +00:00
parent 41fd7545e3
commit 4fd3bee360
3 changed files with 52 additions and 5 deletions

View File

@ -319,7 +319,7 @@ abstract class Projectile extends Entity{
$entityHit->attack($ev);
if($this->fireTicks > 0){
if($this->isOnFire()){
$ev = new EntityCombustByEntityEvent($this, $entityHit, 5);
$ev->call();
if(!$ev->isCancelled()){