1package com.runehive.game.world.entity.combat.attack.listener.npc;
3import com.runehive.game.world.entity.combat.attack.listener.NpcCombatListenerSignature;
4import com.runehive.game.world.entity.combat.attack.listener.SimplifiedListener;
5import com.runehive.game.world.entity.combat.hit.Hit;
6import com.runehive.game.world.entity.mob.Mob;
7import com.runehive.game.world.entity.mob.npc.Npc;
8import com.runehive.game.world.entity.mob.player.Player;
9import com.runehive.util.Utility;
33 if (attacker.
getCombat().isAttacking(player))
37 players[index] = player;
void hit(Npc attacker, Mob defender, Hit hit)
A Hit object holds the damage amount and hitsplat data.
final boolean isPlayer()
Check if an entity is a player.
List< Player > getPlayersInViewport()
The collection of players in this viewport.
Represents a non-player character in the in-game world.
Combat< Npc > getCombat()
The combat of the mob.
This class represents a character controlled by a player.
Handles miscellaneous methods.
static int random(int bound)
static< T > T randomElement(Collection< T > collection)
Picks a random element out of any array type.
static boolean within(Position source, Position target, int distance)