Update to spigot 1.8
This commit is contained in:
parent
680115f975
commit
74eb3fa468
BIN
libs/craftbukkit180.jar
Normal file
BIN
libs/craftbukkit180.jar
Normal file
Binary file not shown.
@ -0,0 +1,30 @@
|
|||||||
|
package com.cnaude.chairs.vehiclearrow.v1_8_R1;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_8_R1.EntityArrow;
|
||||||
|
|
||||||
|
import org.bukkit.craftbukkit.v1_8_R1.CraftServer;
|
||||||
|
import org.bukkit.craftbukkit.v1_8_R1.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,20 @@
|
|||||||
|
package com.cnaude.chairs.vehiclearrow.v1_8_R1;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_8_R1.EntityArrow;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.craftbukkit.v1_8_R1.CraftWorld;
|
||||||
|
import org.bukkit.entity.Arrow;
|
||||||
|
|
||||||
|
import com.cnaude.chairs.vehiclearrow.NMSArrowFactoryInterface;
|
||||||
|
|
||||||
|
public class NMSArrowFactory implements NMSArrowFactoryInterface {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Arrow spawnArrow(Location location) {
|
||||||
|
CraftWorld world = (CraftWorld) location.getWorld();
|
||||||
|
EntityArrow arrow = new NMSChairsArrow(world, location);
|
||||||
|
return (Arrow) arrow.getBukkitEntity();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
package com.cnaude.chairs.vehiclearrow.v1_8_R1;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_8_R1.EntityArrow;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.craftbukkit.v1_8_R1.CraftServer;
|
||||||
|
import org.bukkit.craftbukkit.v1_8_R1.CraftWorld;
|
||||||
|
|
||||||
|
public class NMSChairsArrow extends EntityArrow {
|
||||||
|
|
||||||
|
public NMSChairsArrow(CraftWorld cworld, Location location) {
|
||||||
|
super(cworld.getHandle());
|
||||||
|
setPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||||
|
world.addEntity(this);
|
||||||
|
bukkitEntity = new CraftChairsArrow((CraftServer) Bukkit.getServer(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void s_() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user