Interface IWeaponCompatibility


public interface IWeaponCompatibility
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    logDamage(org.bukkit.entity.LivingEntity victim, org.bukkit.entity.LivingEntity source, double health, double damage, boolean isMelee)
    Logs "fake" damage to the given victim's CombatTracker.
    void
    modifyCameraRotation(org.bukkit.entity.Player player, float yaw, float pitch, boolean absolute)
    Rotates player's camera rotation with given values.
    void
    setKiller(org.bukkit.entity.LivingEntity victim, org.bukkit.entity.Player killer)
    Sets which player killed the victim.
  • 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 rotate
      yaw - absolute or relative rotation on the X axis, in degrees
      pitch - absolute or relative rotation on the Y axis, in degrees
      absolute - 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 given victim's CombatTracker. This is important for death messages, and any plugins that may use minecraft's built in combat tracker.
      Parameters:
      victim - The entity receiving the damage
      source - The entity giving the damage
      health - The health of the entity
      damage - The damage being applied to the entity
      isMelee - 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 the victim. Entities that are killed by players will drop their experience.
      Parameters:
      victim - The entity that died
      killer - The killer