Add nms classes for 1.7.8
This commit is contained in:
parent
ddb0d86053
commit
bb0d355fd2
BIN
libs/craftbukkit178.jar
Normal file
BIN
libs/craftbukkit178.jar
Normal file
Binary file not shown.
@ -0,0 +1,30 @@
|
|||||||
|
package com.cnaude.chairs.vehiclearrow.nms178;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_7_R3.EntityArrow;
|
||||||
|
|
||||||
|
import org.bukkit.craftbukkit.v1_7_R3.CraftServer;
|
||||||
|
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftArrow;
|
||||||
|
import org.bukkit.entity.Entity;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.entity.Vehicle;
|
||||||
|
|
||||||
|
import com.cnaude.chairs.api.ChairsAPI;
|
||||||
|
|
||||||
|
public class CraftChairsArrow extends CraftArrow implements Vehicle {
|
||||||
|
|
||||||
|
public CraftChairsArrow(CraftServer server, EntityArrow entity) {
|
||||||
|
super(server, entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void remove() {
|
||||||
|
Entity passenger = getPassenger();
|
||||||
|
if (passenger != null && passenger instanceof Player) {
|
||||||
|
if (ChairsAPI.isSitting((Player) passenger)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
super.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
package com.cnaude.chairs.vehiclearrow.nms178;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_7_R3.EntityArrow;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Server;
|
||||||
|
import org.bukkit.craftbukkit.v1_7_R3.CraftServer;
|
||||||
|
import org.bukkit.craftbukkit.v1_7_R3.CraftWorld;
|
||||||
|
import org.bukkit.entity.Arrow;
|
||||||
|
|
||||||
|
import com.cnaude.chairs.vehiclearrow.NMSChairsArrowInterface;
|
||||||
|
|
||||||
|
public class NMSChairsArrow extends EntityArrow implements NMSChairsArrowInterface {
|
||||||
|
|
||||||
|
public NMSChairsArrow(CraftWorld cworld) {
|
||||||
|
super(cworld.getHandle());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void h() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setBukkitEntity(Server server) {
|
||||||
|
bukkitEntity = new CraftChairsArrow((CraftServer) server, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Arrow getBukkitArrow() {
|
||||||
|
return (Arrow) bukkitEntity;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setArrowLocation(Location location) {
|
||||||
|
setPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addToWorld() {
|
||||||
|
world.addEntity(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user