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(); } }