diff --git a/libs/bukkit.jar b/libs/bukkit.jar index 899993e..2ca2fac 100644 Binary files a/libs/bukkit.jar and b/libs/bukkit.jar differ diff --git a/src/com/cnaude/chairs/listeners/TrySitEventListener.java b/src/com/cnaude/chairs/listeners/TrySitEventListener.java index 1505ed0..cc5ea0c 100644 --- a/src/com/cnaude/chairs/listeners/TrySitEventListener.java +++ b/src/com/cnaude/chairs/listeners/TrySitEventListener.java @@ -12,6 +12,7 @@ import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.inventory.EquipmentSlot; import org.bukkit.material.Stairs; import org.bukkit.material.Step; import org.bukkit.material.WoodenStep; @@ -29,7 +30,7 @@ public class TrySitEventListener implements Listener { @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onPlayerInteract(PlayerInteractEvent event) { - if (event.getAction() == Action.RIGHT_CLICK_BLOCK) { + if (event.getAction() == Action.RIGHT_CLICK_BLOCK && event.getHand() == EquipmentSlot.HAND) { Player player = event.getPlayer(); Block block = event.getClickedBlock(); if (sitAllowed(player, block)) { diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_10_R1/CraftChairsArrow.java b/src/com/cnaude/chairs/vehiclearrow/v1_10_R1/CraftChairsArrow.java index 2ddf9af..9677354 100644 --- a/src/com/cnaude/chairs/vehiclearrow/v1_10_R1/CraftChairsArrow.java +++ b/src/com/cnaude/chairs/vehiclearrow/v1_10_R1/CraftChairsArrow.java @@ -2,6 +2,9 @@ package com.cnaude.chairs.vehiclearrow.v1_10_R1; import net.minecraft.server.v1_10_R1.EntityArrow; +import java.util.Collections; +import java.util.Set; + import org.bukkit.craftbukkit.v1_10_R1.CraftServer; import org.bukkit.craftbukkit.v1_10_R1.entity.CraftArrow; import org.bukkit.entity.Entity; @@ -27,4 +30,28 @@ public class CraftChairsArrow extends CraftArrow implements Vehicle { super.remove(); } + @Override + public int getPortalCooldown() { + return 0; + } + + @Override + public void setPortalCooldown(int val) { + } + + @Override + public Set getScoreboardTags() { + return Collections.emptySet(); + } + + @Override + public boolean addScoreboardTag(String tag) { + return false; + } + + @Override + public boolean removeScoreboardTag(String tag) { + return false; + } + } diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_9_R1/CraftChairsArrow.java b/src/com/cnaude/chairs/vehiclearrow/v1_9_R1/CraftChairsArrow.java index 3ad9c7e..650e4d9 100644 --- a/src/com/cnaude/chairs/vehiclearrow/v1_9_R1/CraftChairsArrow.java +++ b/src/com/cnaude/chairs/vehiclearrow/v1_9_R1/CraftChairsArrow.java @@ -2,6 +2,9 @@ package com.cnaude.chairs.vehiclearrow.v1_9_R1; import net.minecraft.server.v1_9_R1.EntityArrow; +import java.util.Collections; +import java.util.Set; + import org.bukkit.craftbukkit.v1_9_R1.CraftServer; import org.bukkit.craftbukkit.v1_9_R1.entity.CraftArrow; import org.bukkit.entity.Entity; @@ -27,4 +30,56 @@ public class CraftChairsArrow extends CraftArrow implements Vehicle { super.remove(); } + + @Override + public void setInvulnerable(boolean invulnerable) { + } + + @Override + public boolean isInvulnerable() { + return true; + } + + @Override + public boolean isSilent() { + return true; + } + + @Override + public void setSilent(boolean silent) { + } + + @Override + public boolean hasGravity() { + return false; + } + + @Override + public void setGravity(boolean gravity) { + } + + @Override + public int getPortalCooldown() { + return 0; + } + + @Override + public void setPortalCooldown(int val) { + } + + @Override + public Set getScoreboardTags() { + return Collections.emptySet(); + } + + @Override + public boolean addScoreboardTag(String tag) { + return false; + } + + @Override + public boolean removeScoreboardTag(String tag) { + return false; + } + } diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_9_R2/CraftChairsArrow.java b/src/com/cnaude/chairs/vehiclearrow/v1_9_R2/CraftChairsArrow.java index 798f380..42a54d6 100644 --- a/src/com/cnaude/chairs/vehiclearrow/v1_9_R2/CraftChairsArrow.java +++ b/src/com/cnaude/chairs/vehiclearrow/v1_9_R2/CraftChairsArrow.java @@ -2,6 +2,9 @@ package com.cnaude.chairs.vehiclearrow.v1_9_R2; import net.minecraft.server.v1_9_R2.EntityArrow; +import java.util.Collections; +import java.util.Set; + import org.bukkit.craftbukkit.v1_9_R2.CraftServer; import org.bukkit.craftbukkit.v1_9_R2.entity.CraftArrow; import org.bukkit.entity.Entity; @@ -27,4 +30,47 @@ public class CraftChairsArrow extends CraftArrow implements Vehicle { super.remove(); } + + @Override + public boolean isSilent() { + return true; + } + + @Override + public void setSilent(boolean silent) { + } + + @Override + public boolean hasGravity() { + return false; + } + + @Override + public void setGravity(boolean gravity) { + } + + @Override + public int getPortalCooldown() { + return 0; + } + + @Override + public void setPortalCooldown(int val) { + } + + @Override + public Set getScoreboardTags() { + return Collections.emptySet(); + } + + @Override + public boolean addScoreboardTag(String tag) { + return false; + } + + @Override + public boolean removeScoreboardTag(String tag) { + return false; + } + }