Package org.bukkit.event.vehicle

Examples of org.bukkit.event.vehicle.VehicleDamageEvent


      return;
    }
    final Entity damager = damagesource.getEntity();
    try {
      // Call CraftBukkit event
      VehicleDamageEvent event = new VehicleDamageEvent(this.entity.getEntity(), damager, damage);
      if (CommonUtil.callEvent(event).isCancelled()) {
        return;
      }
      damage = event.getDamage();
      // Play shaking animation and logic
      this.entity.setShakingDirection(-this.entity.getShakingDirection());
      this.entity.setShakingFactor(10);
      this.entity.setVelocityChanged(true);
      this.entity.setDamage(this.entity.getDamage() + damage * 10);
 
View Full Code Here

TOP

Related Classes of org.bukkit.event.vehicle.VehicleDamageEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.