diff --git a/src/com/cnaude/chairs/EventListener.java b/src/com/cnaude/chairs/EventListener.java index 1d2c901..de44395 100644 --- a/src/com/cnaude/chairs/EventListener.java +++ b/src/com/cnaude/chairs/EventListener.java @@ -297,10 +297,8 @@ public class EventListener implements Listener { plugin.sitstopteleportloc.put(player.getName(), player.getLocation()); player.teleport(plocation); - Entity arrow = block.getWorld().spawnArrow(getBlockCentre(block).subtract(0, 0.5, 0), new Vector(0, 0, 0), 0, 0); + Entity arrow = block.getWorld().spawnArrow(block.getLocation().add(0.5, 0 , 0.5), new Vector(0, 0, 0), 0, 0); arrow.setPassenger(player); - player.setSneaking(false); - arrow.setTicksLived(1); plugin.sit.put(player.getName(), arrow); plugin.sitblock.put(block, player.getName()); plugin.sitblockbr.put(player.getName(), block); @@ -321,12 +319,6 @@ public class EventListener implements Listener { },1000,1000); plugin.sittask.put(player.getName(), task); } - - - // https://github.com/sk89q/craftbook/blob/master/src/main/java/com/sk89q/craftbook/util/BlockUtil.java - public static Location getBlockCentre(Block block) { - return block.getLocation().add(0.5, 0.5, 0.5); - } private int getChairWidth(Block block, BlockFace face) { int width = 0; diff --git a/src/com/cnaude/chairs/PacketListener.java b/src/com/cnaude/chairs/PacketListener.java index 3848b14..f473671 100644 --- a/src/com/cnaude/chairs/PacketListener.java +++ b/src/com/cnaude/chairs/PacketListener.java @@ -20,7 +20,6 @@ public class PacketListener { falledPlayerDismountListener(); } - private void playerDismountListener() { pm.getAsynchronousManager().registerAsyncHandler( @@ -50,7 +49,6 @@ public class PacketListener { }).syncStart(); } - private void falledPlayerDismountListener() { pm.getAsynchronousManager().registerAsyncHandler( @@ -76,7 +74,4 @@ public class PacketListener { }).syncStart(); } - - - } diff --git a/target/Chairs.jar b/target/Chairs.jar index a25c72f..62a8828 100644 Binary files a/target/Chairs.jar and b/target/Chairs.jar differ