I want to modify the plugin so it can damage monsters other than players. ( api : [3.0.0-ALPHA7, 3.0.0-ALPHA8, 3.0.0-ALPHA9] ) ( MCPE 1.1.5 ) PHP: function move ($player,$eid,$damage,$type,$value = true) { //$typeは将来使うかもだから一応keep if (!isset($this->pos[$eid])) return false; $S = $this->pos[$eid]; $F = $this->motion[$eid]; if ($value) $F->y-=0.05; $this->pos[$eid] = new Vector3($S->x+$F->x, $S->y+$F->y, $S->z+$F->z); for ($K = 1; $K < 4; $K++) { $G = new Vector3($S->x+$F->x/$K, $S->y+$F->y/$K, $S->z+$F->z/$K); if ($player->level->getBlock($G)->isSolid()) { $this->close($eid); break; return false; } foreach (Server::getInstance()->getOnlinePlayers() as $p) { $x = $p->x; $y = $p->y; $z = $p->z; $c = new Vector2($x, $z); if ((new Vector2($S->x, $S->z))->distance($c) <= 1.2 && $S->y-$p->y <= 2.6 && $S->y-$p->y > 0) { if($p->getName() != $player->getName()) { $d = $this->getFinalDamage($p, $damage); $ev = new EntityDamageByEntityEvent($player, $p, EntityDamageEvent::CAUSE_ENTITY_ATTACK, $d); $p->attack($d, $ev); } return $this->close($eid); } } } $this->getScheduler()->scheduleDelayedTask(new Callback([$this,"move"],[$player,$eid,$damage]),1); }