コード例 #1
0
ファイル: VehicleLogger.java プロジェクト: Fronix/UltraLogger
 @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()
           + "]");
 }
コード例 #2
0
ファイル: VehicleLogger.java プロジェクト: Fronix/UltraLogger
 @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()
           + "]");
 }
コード例 #3
0
ファイル: VehicleLogger.java プロジェクト: Fronix/UltraLogger
 @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()
           + "]");
 }