Exemplo n.º 1
0
 @EventHandler
 public void onDestroyed(VehicleDestroyEvent e) {
   String time = DateFormat.getInstance().format(new Date(System.currentTimeMillis())) + " ";
   Location loc = e.getVehicle().getLocation();
   String entity = "";
   if (e.getAttacker() != null) {
     entity = "by " + e.getAttacker().getClass();
   }
   out.log(
       time
           + e.getVehicle().toString()
           + " "
           + plugin.translate("vehicle.destroy")
           + " "
           + entity
           + " "
           + plugin.translate("in")
           + " ["
           + (int) loc.getX()
           + ","
           + (int) loc.getY()
           + ","
           + (int) loc.getZ()
           + "]");
 }
Exemplo n.º 2
0
 @EventHandler
 public void onCreated(VehicleCreateEvent e) {
   String time = DateFormat.getInstance().format(new Date(System.currentTimeMillis())) + " ";
   Location loc = e.getVehicle().getLocation();
   out.log(
       time
           + e.getVehicle().toString()
           + " "
           + plugin.translate("vehicle.place")
           + " "
           + plugin.translate("in")
           + " ["
           + (int) loc.getX()
           + ","
           + (int) loc.getY()
           + ","
           + (int) loc.getZ()
           + "]");
 }
Exemplo n.º 3
0
 @EventHandler
 public void onEnter(VehicleEnterEvent e) {
   String time = DateFormat.getInstance().format(new Date(System.currentTimeMillis())) + " ";
   Location loc = e.getVehicle().getLocation();
   String entity = e.getEntered().getClass() + "";
   out.log(
       time
           + entity
           + " "
           + plugin.translate("vehicle.enter")
           + " "
           + e.getVehicle().toString()
           + " "
           + plugin.translate("in")
           + " ["
           + (int) loc.getX()
           + ","
           + (int) loc.getY()
           + ","
           + (int) loc.getZ()
           + "]");
 }