menu
#4550122 Call to undefined method pocketmine\entity\object\ItemEntity::getArmorPoints()

Submitted by PocketMine-MP 3.15.1

General information

Version: 3.15.1
Git commit: 9f604842
Plugin involvement: Direct
Report date: 2020-09-26 16:01:42 +0000 UTC

System Information

PHP version: 7.3.22
Operating system: linux
System banner: Linux 593870ff-f632-4ec3-8c43-bc6d22933f46 4.4.0-189-generic #219-Ubuntu SMP Tue Aug 11 12:26:50 UTC 2020 x86_64

Error information

Warning: the OpaliteSword plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to undefined method pocketmine\entity\object\ItemEntity::getArmorPoints()
File: plugins/OpaliteSword_1.phar/src/Cle/OpaliteSword
Line: #106
Error level: Error
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116

}

public function getDamage($event , $player, int $basedamage )
{
$event->setModifier($basedamage,14);

if($event->canBeReducedByArmor()){

$event->setModifier(-$event->getFinalDamage() * $player->getArmorPoints() * 0.04, EntityDamageEvent::MODIFIER_ARMOR);

}

$cause = $event->getCause();

if($player->hasEffect(Effect::DAMAGE_RESISTANCE) and $cause !== EntityDamageEvent::CAUSE_VOID and $cause !== EntityDamageEvent::CAUSE_SUICIDE){

$event->setModifier(-$event->getFinalDamage() * min(1, 0.2 * $player->getEffect(Effect::DAMAGE_RESISTANCE)->getEffectLevel()), EntityDamageEvent::MODIFIER_RESISTANCE);

}
#0 plugins/OpaliteSword_1.phar/src/Cle/OpaliteSword(59): Cle\OpaliteSword->getDamage(object pocketmine\event\entity\EntityDamageByEntityEvent, object pocketmine\entity\object\ItemEntity, integer 8)
#1 src/pocketmine/plugin/MethodEventExecutor(42): Cle\OpaliteSword->onEntityDamage(object pocketmine\event\entity\EntityDamageByEntityEvent)
#2 src/pocketmine/plugin/RegisteredListener(80): pocketmine\plugin\MethodEventExecutor->execute(object Cle\OpaliteSword, object pocketmine\event\entity\EntityDamageByEntityEvent)
#3 src/pocketmine/event/Event(88): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\entity\EntityDamageByEntityEvent)
#4 src/pocketmine/entity/Entity(933): pocketmine\event\Event->call()
#5 plugins/PiggyCustomEnchants.phar/src/DaPigGuy/PiggyCustomEnchants/utils/PiggyExplosion(68): pocketmine\entity\Entity->attack(object pocketmine\event\entity\EntityDamageByEntityEvent)
#6 plugins/PiggyCustomEnchants.phar/src/DaPigGuy/PiggyCustomEnchants/entities/PiggyTNT(33): DaPigGuy\PiggyCustomEnchants\utils\PiggyExplosion->explodeB()
#7 src/pocketmine/entity/object/PrimedTNT(97): DaPigGuy\PiggyCustomEnchants\entities\PiggyTNT->explode()
#8 src/pocketmine/entity/Entity(1394): pocketmine\entity\object\PrimedTNT->entityBaseTick(integer 1)
#9 src/pocketmine/level/Level(852): pocketmine\entity\Entity->onUpdate(integer 52321)
#10 src/pocketmine/level/Level(785): pocketmine\level\Level->actuallyDoTick(integer 52321)
#11 src/pocketmine/Server(2267): pocketmine\level\Level->doTick(integer 52321)
#12 src/pocketmine/Server(2398): pocketmine\Server->checkTickUpdates(integer 52321, double 1601136101.6407)
#13 src/pocketmine/Server(2154): pocketmine\Server->tick()
#14 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
#15 src/pocketmine/Server(1588): pocketmine\Server->start()
#16 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /home/container/, string[24] /home/container/plugins/)
#17 src/pocketmine/PocketMine(304): pocketmine\server()
#18 (11): require(string[71] phar:///home/container/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies