From ca3fecdef48dbb23c14727b8977fc4a80c968ca2 Mon Sep 17 00:00:00 2001 From: Shevchik Date: Wed, 5 Mar 2014 23:41:01 +0400 Subject: [PATCH] Reformat also this --- .../chairs/vehiclearrow/GetVehicleArrowClass.java | 14 ++++---------- .../chairs/vehiclearrow/nms164/VehicleArrow.java | 9 +++------ .../chairs/vehiclearrow/nms172/VehicleArrow.java | 9 +++------ 3 files changed, 10 insertions(+), 22 deletions(-) diff --git a/src/com/cnaude/chairs/vehiclearrow/GetVehicleArrowClass.java b/src/com/cnaude/chairs/vehiclearrow/GetVehicleArrowClass.java index 8620c52..93c5f94 100644 --- a/src/com/cnaude/chairs/vehiclearrow/GetVehicleArrowClass.java +++ b/src/com/cnaude/chairs/vehiclearrow/GetVehicleArrowClass.java @@ -6,21 +6,15 @@ public class GetVehicleArrowClass { private String pkgname = this.getClass().getPackage().getName(); private String vehiclearrowclassname = "VehicleArrow"; - public Class getVehicleArrowClass(String arrowclass, Class entityarrow, Class craftserver) throws Exception - { + public Class getVehicleArrowClass(String arrowclass, Class entityarrow, Class craftserver) throws Exception { String packageName = Bukkit.getServer().getClass().getPackage().getName(); String nmspackageversion = packageName.substring(packageName.lastIndexOf('.') + 1); - if (nmspackageversion.equals("v1_7_R1")) - { + if (nmspackageversion.equals("v1_7_R1")) { return Class.forName(pkgname+"."+"nms172"+"."+vehiclearrowclassname); - } else - if (nmspackageversion.equals("v1_6_R3")) - { + } else if (nmspackageversion.equals("v1_6_R3")) { return Class.forName(pkgname+"."+"nms164"+"."+vehiclearrowclassname); } - throw new Exception("ChiarsReloaded is not compatible with your server version"); + throw new Exception("ChairsReloaded is not compatible with your server version"); } - - } diff --git a/src/com/cnaude/chairs/vehiclearrow/nms164/VehicleArrow.java b/src/com/cnaude/chairs/vehiclearrow/nms164/VehicleArrow.java index c422839..472859e 100644 --- a/src/com/cnaude/chairs/vehiclearrow/nms164/VehicleArrow.java +++ b/src/com/cnaude/chairs/vehiclearrow/nms164/VehicleArrow.java @@ -8,16 +8,13 @@ import org.bukkit.entity.Vehicle; public class VehicleArrow extends CraftArrow implements Vehicle { - public VehicleArrow(CraftServer server, EntityArrow entity) - { + public VehicleArrow(CraftServer server, EntityArrow entity) { super(server, entity); } @Override - public void remove() - { - if (this.getPassenger() == null) - { + public void remove() { + if (this.getPassenger() == null) { super.remove(); } } diff --git a/src/com/cnaude/chairs/vehiclearrow/nms172/VehicleArrow.java b/src/com/cnaude/chairs/vehiclearrow/nms172/VehicleArrow.java index fa0670c..a37a3f4 100644 --- a/src/com/cnaude/chairs/vehiclearrow/nms172/VehicleArrow.java +++ b/src/com/cnaude/chairs/vehiclearrow/nms172/VehicleArrow.java @@ -8,16 +8,13 @@ import org.bukkit.entity.Vehicle; public class VehicleArrow extends CraftArrow implements Vehicle { - public VehicleArrow(CraftServer server, EntityArrow entity) - { + public VehicleArrow(CraftServer server, EntityArrow entity) { super(server, entity); } @Override - public void remove() - { - if (this.getPassenger() == null) - { + public void remove() { + if (this.getPassenger() == null) { super.remove(); } }