Reformat also this
This commit is contained in:
parent
9d231ca8b8
commit
ca3fecdef4
@ -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");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user