org.bukkit.event.vehicle.VehicleMoveEvent Java Examples

The following examples show how to use org.bukkit.event.vehicle.VehicleMoveEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EntityEventHandler.java    From GriefDefender with MIT License 4 votes vote down vote up
@EventHandler(priority = EventPriority.LOWEST)
public void onVehicleMove(VehicleMoveEvent event) {
    CommonEntityEventHandler.getInstance().onEntityMove(event, event.getFrom(), event.getTo(), event.getVehicle());
}
 
Example #2
Source File: FreezeMatchModule.java    From PGM with GNU Affero General Public License v3.0 4 votes vote down vote up
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onVehicleMove(final VehicleMoveEvent event) {
  if (!event.getVehicle().isEmpty() && freeze.isFrozen(event.getVehicle().getPassenger())) {
    event.getVehicle().setVelocity(new Vector(0, 0, 0));
  }
}
 
Example #3
Source File: FreezeListener.java    From ProjectAres with GNU Affero General Public License v3.0 4 votes vote down vote up
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onVehicleMove(final VehicleMoveEvent event) {
    if(!event.getVehicle().isEmpty() && freeze.isFrozen(event.getVehicle().getPassenger())) {
        event.getVehicle().setVelocity(new Vector(0, 0, 0));
    }
}