Interface IWeaponCompatibility
public interface IWeaponCompatibility
-
Method Summary
Modifier and TypeMethodDescriptionvoidlogDamage(org.bukkit.entity.LivingEntity victim, org.bukkit.entity.LivingEntity source, double health, double damage, boolean isMelee) Logs "fake" damage to the givenvictim'sCombatTracker.voidmodifyCameraRotation(org.bukkit.entity.Player player, float yaw, float pitch, boolean absolute) Rotates player's camera rotation with given values.voidsetKiller(org.bukkit.entity.LivingEntity victim, org.bukkit.entity.Player killer) Sets which player killed thevictim.
-
Method Details
-
modifyCameraRotation
void modifyCameraRotation(org.bukkit.entity.Player player, float yaw, float pitch, boolean absolute) Rotates player's camera rotation with given values. Absolute true means that yaw and pitch will be SET to the given values. While as absolute false means that yaw and pitch is ADDED to the given values.Having absolute true may cause that player's movement glitches a bit.
- Parameters:
player- the player whose camera rotation to rotateyaw- absolute or relative rotation on the X axis, in degreespitch- absolute or relative rotation on the Y axis, in degreesabsolute- whether to use absolute rotation
-
logDamage
void logDamage(org.bukkit.entity.LivingEntity victim, org.bukkit.entity.LivingEntity source, double health, double damage, boolean isMelee) Logs "fake" damage to the givenvictim'sCombatTracker. This is important for death messages, and any plugins that may use minecraft's built in combat tracker.- Parameters:
victim- The entity receiving the damagesource- The entity giving the damagehealth- The health of the entitydamage- The damage being applied to the entityisMelee- Whether or not this is a melee attack (And not a projectile)
-
setKiller
void setKiller(org.bukkit.entity.LivingEntity victim, org.bukkit.entity.Player killer) Sets which player killed thevictim. Entities that are killed by players will drop their experience.- Parameters:
victim- The entity that diedkiller- The killer
-