diff --git a/libs/bukkit.jar b/libs/bukkit.jar index 77d42f7..899993e 100644 Binary files a/libs/bukkit.jar and b/libs/bukkit.jar differ diff --git a/libs/craftbukkit164.jar b/libs/craftbukkit164.jar deleted file mode 100644 index 5b447c9..0000000 Binary files a/libs/craftbukkit164.jar and /dev/null differ diff --git a/libs/craftbukkit1710.jar b/libs/craftbukkit1710.jar deleted file mode 100644 index 22915b9..0000000 Binary files a/libs/craftbukkit1710.jar and /dev/null differ diff --git a/libs/craftbukkit172.jar b/libs/craftbukkit172.jar deleted file mode 100644 index b583d6e..0000000 Binary files a/libs/craftbukkit172.jar and /dev/null differ diff --git a/libs/craftbukkit175.jar b/libs/craftbukkit175.jar deleted file mode 100644 index 758e208..0000000 Binary files a/libs/craftbukkit175.jar and /dev/null differ diff --git a/libs/craftbukkit178.jar b/libs/craftbukkit178.jar deleted file mode 100644 index a23f221..0000000 Binary files a/libs/craftbukkit178.jar and /dev/null differ diff --git a/libs/craftbukkit180.jar b/libs/craftbukkit180.jar deleted file mode 100644 index f0588b7..0000000 Binary files a/libs/craftbukkit180.jar and /dev/null differ diff --git a/libs/craftbukkit183.jar b/libs/craftbukkit183.jar deleted file mode 100644 index 86b26d3..0000000 Binary files a/libs/craftbukkit183.jar and /dev/null differ diff --git a/libs/craftbukkit188.jar b/libs/craftbukkit188.jar new file mode 100644 index 0000000..ea6a298 Binary files /dev/null and b/libs/craftbukkit188.jar differ diff --git a/libs/craftbukkit19.jar b/libs/craftbukkit19.jar new file mode 100644 index 0000000..c36a432 Binary files /dev/null and b/libs/craftbukkit19.jar differ diff --git a/libs/craftbukkit194.jar b/libs/craftbukkit194.jar new file mode 100644 index 0000000..4bd3d43 Binary files /dev/null and b/libs/craftbukkit194.jar differ diff --git a/src/com/cnaude/chairs/commands/ChairsCommand.java b/src/com/cnaude/chairs/commands/ChairsCommand.java index 014ea90..638fd6c 100644 --- a/src/com/cnaude/chairs/commands/ChairsCommand.java +++ b/src/com/cnaude/chairs/commands/ChairsCommand.java @@ -38,6 +38,16 @@ public class ChairsCommand implements CommandExecutor { sender.sendMessage(plugin.msgNoPerm); } } + if (sender instanceof Player) { + Player player = (Player) sender; + if (args[0].equalsIgnoreCase("off")) { + plugin.sitDisabled.add(player.getName()); + player.sendMessage(plugin.msgDisabled); + } else if (args[0].equalsIgnoreCase("on")) { + plugin.sitDisabled.remove(player.getName()); + player.sendMessage(plugin.msgEnabled); + } + } return true; } diff --git a/src/com/cnaude/chairs/core/Chairs.java b/src/com/cnaude/chairs/core/Chairs.java index fca9270..8798d02 100644 --- a/src/com/cnaude/chairs/core/Chairs.java +++ b/src/com/cnaude/chairs/core/Chairs.java @@ -7,6 +7,7 @@ import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; +import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.configuration.file.FileConfiguration; @@ -25,6 +26,7 @@ import com.cnaude.chairs.vehiclearrow.NMSAccess; public class Chairs extends JavaPlugin { + public HashSet sitDisabled = new HashSet(); public ChairEffects chairEffects; public List allowedBlocks; public List validSigns; @@ -84,7 +86,7 @@ public class Chairs extends JavaPlugin { @Override public void onDisable() { if (psitdata != null) { - for (Player player : Utils.getOnlinePlayers()) { + for (Player player : Bukkit.getOnlinePlayers()) { if (psitdata.isSitting(player)) { psitdata.unsitPlayerForce(player); } diff --git a/src/com/cnaude/chairs/core/Utils.java b/src/com/cnaude/chairs/core/Utils.java deleted file mode 100644 index bb31029..0000000 --- a/src/com/cnaude/chairs/core/Utils.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.cnaude.chairs.core; - -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; - -public class Utils { - - public static Player[] getOnlinePlayers() { - return Bukkit.getOnlinePlayers(); - } - -} diff --git a/src/com/cnaude/chairs/listeners/TrySitEventListener.java b/src/com/cnaude/chairs/listeners/TrySitEventListener.java index 2aa9016..7b801a7 100644 --- a/src/com/cnaude/chairs/listeners/TrySitEventListener.java +++ b/src/com/cnaude/chairs/listeners/TrySitEventListener.java @@ -42,6 +42,12 @@ public class TrySitEventListener implements Listener { } private boolean sitAllowed(Player player, Block block) { + + // Check for sitting disabled + if (plugin.sitDisabled.contains(player.getName())) { + return false; + } + // Check for permissions if (!player.hasPermission("chairs.sit")) { return false; @@ -53,7 +59,7 @@ public class TrySitEventListener implements Listener { } // Check for item in hand - if (plugin.ignoreIfBlockInHand && player.getItemInHand().getType() != Material.AIR) { + if (plugin.ignoreIfBlockInHand && player.getInventory().getItemInMainHand().getType() != Material.AIR) { return false; } @@ -92,9 +98,6 @@ public class TrySitEventListener implements Listener { if (block.getRelative(BlockFace.DOWN).isEmpty()) { return false; } - if (!block.getRelative(BlockFace.DOWN).getType().isSolid()) { - return false; - } // Check for distance distance between player and chair. if (plugin.distance > 0 && player.getLocation().distance(block.getLocation().add(0.5, 0, 0.5)) > plugin.distance) { diff --git a/src/com/cnaude/chairs/sitaddons/ChairEffects.java b/src/com/cnaude/chairs/sitaddons/ChairEffects.java index d90e440..8e68edf 100644 --- a/src/com/cnaude/chairs/sitaddons/ChairEffects.java +++ b/src/com/cnaude/chairs/sitaddons/ChairEffects.java @@ -11,7 +11,6 @@ import org.bukkit.event.player.PlayerLevelChangeEvent; import org.bukkit.event.player.PlayerPickupItemEvent; import com.cnaude.chairs.core.Chairs; -import com.cnaude.chairs.core.Utils; public class ChairEffects { @@ -44,7 +43,7 @@ public class ChairEffects { healTaskID = plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() { @Override public void run() { - for (Player p : Utils.getOnlinePlayers()) { + for (Player p : Bukkit.getOnlinePlayers()) { if (plugin.getPlayerSitData().isSitting(p)) { if (p.hasPermission("chairs.sit.health")) { double pHealthPcnt = (getPlayerHealth(p)) / getMaxPlayerHealth(p) * 100d; @@ -90,7 +89,7 @@ public class ChairEffects { pickupTaskID = plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() { @Override public void run() { - for (Player p : Utils.getOnlinePlayers()) { + for (Player p : Bukkit.getOnlinePlayers()) { if (plugin.getPlayerSitData().isSitting(p)) { for (Entity entity : p.getNearbyEntities(1, 2, 1)) { if (entity instanceof Item) { diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_6_R3/NMSChairsArrow.java b/src/com/cnaude/chairs/vehiclearrow/v1_6_R3/NMSChairsArrow.java deleted file mode 100644 index a386329..0000000 --- a/src/com/cnaude/chairs/vehiclearrow/v1_6_R3/NMSChairsArrow.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.cnaude.chairs.vehiclearrow.v1_6_R3; - -import net.minecraft.server.v1_6_R3.EntityArrow; - -import org.bukkit.Bukkit; -import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_6_R3.CraftServer; -import org.bukkit.craftbukkit.v1_6_R3.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 l_() { - } - -} diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_7_R1/CraftChairsArrow.java b/src/com/cnaude/chairs/vehiclearrow/v1_7_R1/CraftChairsArrow.java deleted file mode 100644 index 3856118..0000000 --- a/src/com/cnaude/chairs/vehiclearrow/v1_7_R1/CraftChairsArrow.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.cnaude.chairs.vehiclearrow.v1_7_R1; - -import net.minecraft.server.v1_7_R1.EntityArrow; - -import org.bukkit.craftbukkit.v1_7_R1.CraftServer; -import org.bukkit.craftbukkit.v1_7_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(); - } - -} diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_7_R1/NMSChairsArrow.java b/src/com/cnaude/chairs/vehiclearrow/v1_7_R1/NMSChairsArrow.java deleted file mode 100644 index 8f45c84..0000000 --- a/src/com/cnaude/chairs/vehiclearrow/v1_7_R1/NMSChairsArrow.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.cnaude.chairs.vehiclearrow.v1_7_R1; - -import net.minecraft.server.v1_7_R1.EntityArrow; - -import org.bukkit.Bukkit; -import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_7_R1.CraftServer; -import org.bukkit.craftbukkit.v1_7_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 h() { - } - -} diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_7_R3/NMSArrowFactory.java b/src/com/cnaude/chairs/vehiclearrow/v1_7_R3/NMSArrowFactory.java deleted file mode 100644 index 37ecd7c..0000000 --- a/src/com/cnaude/chairs/vehiclearrow/v1_7_R3/NMSArrowFactory.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.cnaude.chairs.vehiclearrow.v1_7_R3; - -import net.minecraft.server.v1_7_R3.EntityArrow; - -import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_7_R3.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(); - } - -} diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_7_R4/CraftChairsArrow.java b/src/com/cnaude/chairs/vehiclearrow/v1_7_R4/CraftChairsArrow.java deleted file mode 100644 index 5b5b9ec..0000000 --- a/src/com/cnaude/chairs/vehiclearrow/v1_7_R4/CraftChairsArrow.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.cnaude.chairs.vehiclearrow.v1_7_R4; - -import net.minecraft.server.v1_7_R4.EntityArrow; - -import org.bukkit.craftbukkit.v1_7_R4.CraftServer; -import org.bukkit.craftbukkit.v1_7_R4.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(); - } - -} diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_7_R4/NMSArrowFactory.java b/src/com/cnaude/chairs/vehiclearrow/v1_7_R4/NMSArrowFactory.java deleted file mode 100644 index efd1f33..0000000 --- a/src/com/cnaude/chairs/vehiclearrow/v1_7_R4/NMSArrowFactory.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.cnaude.chairs.vehiclearrow.v1_7_R4; - -import net.minecraft.server.v1_7_R4.EntityArrow; - -import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_7_R4.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(); - } - -} diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_7_R4/NMSChairsArrow.java b/src/com/cnaude/chairs/vehiclearrow/v1_7_R4/NMSChairsArrow.java deleted file mode 100644 index c5b3e9e..0000000 --- a/src/com/cnaude/chairs/vehiclearrow/v1_7_R4/NMSChairsArrow.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.cnaude.chairs.vehiclearrow.v1_7_R4; - -import net.minecraft.server.v1_7_R4.EntityArrow; - -import org.bukkit.Bukkit; -import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_7_R4.CraftServer; -import org.bukkit.craftbukkit.v1_7_R4.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 h() { - } - -} diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_8_R1/CraftChairsArrow.java b/src/com/cnaude/chairs/vehiclearrow/v1_8_R1/CraftChairsArrow.java deleted file mode 100644 index 118ac0f..0000000 --- a/src/com/cnaude/chairs/vehiclearrow/v1_8_R1/CraftChairsArrow.java +++ /dev/null @@ -1,30 +0,0 @@ -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(); - } - -} diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_8_R1/NMSArrowFactory.java b/src/com/cnaude/chairs/vehiclearrow/v1_8_R1/NMSArrowFactory.java deleted file mode 100644 index 15e4727..0000000 --- a/src/com/cnaude/chairs/vehiclearrow/v1_8_R1/NMSArrowFactory.java +++ /dev/null @@ -1,20 +0,0 @@ -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(); - } - -} diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_8_R1/NMSChairsArrow.java b/src/com/cnaude/chairs/vehiclearrow/v1_8_R1/NMSChairsArrow.java deleted file mode 100644 index 89a7490..0000000 --- a/src/com/cnaude/chairs/vehiclearrow/v1_8_R1/NMSChairsArrow.java +++ /dev/null @@ -1,23 +0,0 @@ -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_() { - } - -} diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_8_R2/CraftChairsArrow.java b/src/com/cnaude/chairs/vehiclearrow/v1_8_R2/CraftChairsArrow.java deleted file mode 100644 index 113527e..0000000 --- a/src/com/cnaude/chairs/vehiclearrow/v1_8_R2/CraftChairsArrow.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.cnaude.chairs.vehiclearrow.v1_8_R2; - -import net.minecraft.server.v1_8_R2.EntityArrow; - -import org.bukkit.craftbukkit.v1_8_R2.CraftServer; -import org.bukkit.craftbukkit.v1_8_R2.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(); - } - -} diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_8_R2/NMSArrowFactory.java b/src/com/cnaude/chairs/vehiclearrow/v1_8_R2/NMSArrowFactory.java deleted file mode 100644 index 02563c1..0000000 --- a/src/com/cnaude/chairs/vehiclearrow/v1_8_R2/NMSArrowFactory.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.cnaude.chairs.vehiclearrow.v1_8_R2; - -import net.minecraft.server.v1_8_R2.EntityArrow; - -import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_8_R2.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(); - } - -} diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_7_R3/CraftChairsArrow.java b/src/com/cnaude/chairs/vehiclearrow/v1_8_R3/CraftChairsArrow.java similarity index 59% rename from src/com/cnaude/chairs/vehiclearrow/v1_7_R3/CraftChairsArrow.java rename to src/com/cnaude/chairs/vehiclearrow/v1_8_R3/CraftChairsArrow.java index 37f3e92..86768eb 100644 --- a/src/com/cnaude/chairs/vehiclearrow/v1_7_R3/CraftChairsArrow.java +++ b/src/com/cnaude/chairs/vehiclearrow/v1_8_R3/CraftChairsArrow.java @@ -1,30 +1,39 @@ -package com.cnaude.chairs.vehiclearrow.v1_7_R3; - -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(); - } - -} +package com.cnaude.chairs.vehiclearrow.v1_8_R3; + +import net.minecraft.server.v1_8_R3.EntityArrow; + +import org.bukkit.craftbukkit.v1_8_R3.CraftServer; +import org.bukkit.craftbukkit.v1_8_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(); + } + + @Override + public boolean isGlowing() { + return false; + } + + @Override + public void setGlowing(boolean glowing) { + } + +} diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_7_R1/NMSArrowFactory.java b/src/com/cnaude/chairs/vehiclearrow/v1_8_R3/NMSArrowFactory.java similarity index 73% rename from src/com/cnaude/chairs/vehiclearrow/v1_7_R1/NMSArrowFactory.java rename to src/com/cnaude/chairs/vehiclearrow/v1_8_R3/NMSArrowFactory.java index 5997891..7884a47 100644 --- a/src/com/cnaude/chairs/vehiclearrow/v1_7_R1/NMSArrowFactory.java +++ b/src/com/cnaude/chairs/vehiclearrow/v1_8_R3/NMSArrowFactory.java @@ -1,9 +1,9 @@ -package com.cnaude.chairs.vehiclearrow.v1_7_R1; +package com.cnaude.chairs.vehiclearrow.v1_8_R3; -import net.minecraft.server.v1_7_R1.EntityArrow; +import net.minecraft.server.v1_8_R3.EntityArrow; import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_7_R1.CraftWorld; +import org.bukkit.craftbukkit.v1_8_R3.CraftWorld; import org.bukkit.entity.Arrow; import com.cnaude.chairs.vehiclearrow.NMSArrowFactoryInterface; diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_8_R2/NMSChairsArrow.java b/src/com/cnaude/chairs/vehiclearrow/v1_8_R3/NMSChairsArrow.java similarity index 67% rename from src/com/cnaude/chairs/vehiclearrow/v1_8_R2/NMSChairsArrow.java rename to src/com/cnaude/chairs/vehiclearrow/v1_8_R3/NMSChairsArrow.java index 7a44f1d..ac17500 100644 --- a/src/com/cnaude/chairs/vehiclearrow/v1_8_R2/NMSChairsArrow.java +++ b/src/com/cnaude/chairs/vehiclearrow/v1_8_R3/NMSChairsArrow.java @@ -1,11 +1,11 @@ -package com.cnaude.chairs.vehiclearrow.v1_8_R2; +package com.cnaude.chairs.vehiclearrow.v1_8_R3; -import net.minecraft.server.v1_8_R2.EntityArrow; +import net.minecraft.server.v1_8_R3.EntityArrow; import org.bukkit.Bukkit; import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_8_R2.CraftServer; -import org.bukkit.craftbukkit.v1_8_R2.CraftWorld; +import org.bukkit.craftbukkit.v1_8_R3.CraftServer; +import org.bukkit.craftbukkit.v1_8_R3.CraftWorld; public class NMSChairsArrow extends EntityArrow { diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_6_R3/CraftChairsArrow.java b/src/com/cnaude/chairs/vehiclearrow/v1_9_R1/CraftChairsArrow.java similarity index 69% rename from src/com/cnaude/chairs/vehiclearrow/v1_6_R3/CraftChairsArrow.java rename to src/com/cnaude/chairs/vehiclearrow/v1_9_R1/CraftChairsArrow.java index 22200df..3ad9c7e 100644 --- a/src/com/cnaude/chairs/vehiclearrow/v1_6_R3/CraftChairsArrow.java +++ b/src/com/cnaude/chairs/vehiclearrow/v1_9_R1/CraftChairsArrow.java @@ -1,30 +1,30 @@ -package com.cnaude.chairs.vehiclearrow.v1_6_R3; - -import net.minecraft.server.v1_6_R3.EntityArrow; - -import org.bukkit.craftbukkit.v1_6_R3.CraftServer; -import org.bukkit.craftbukkit.v1_6_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(); - } - -} +package com.cnaude.chairs.vehiclearrow.v1_9_R1; + +import net.minecraft.server.v1_9_R1.EntityArrow; + +import org.bukkit.craftbukkit.v1_9_R1.CraftServer; +import org.bukkit.craftbukkit.v1_9_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(); + } + +} diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_6_R3/NMSArrowFactory.java b/src/com/cnaude/chairs/vehiclearrow/v1_9_R1/NMSArrowFactory.java similarity index 73% rename from src/com/cnaude/chairs/vehiclearrow/v1_6_R3/NMSArrowFactory.java rename to src/com/cnaude/chairs/vehiclearrow/v1_9_R1/NMSArrowFactory.java index 39bb602..9bdc789 100644 --- a/src/com/cnaude/chairs/vehiclearrow/v1_6_R3/NMSArrowFactory.java +++ b/src/com/cnaude/chairs/vehiclearrow/v1_9_R1/NMSArrowFactory.java @@ -1,9 +1,9 @@ -package com.cnaude.chairs.vehiclearrow.v1_6_R3; +package com.cnaude.chairs.vehiclearrow.v1_9_R1; -import net.minecraft.server.v1_6_R3.EntityArrow; +import net.minecraft.server.v1_9_R1.EntityArrow; import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_6_R3.CraftWorld; +import org.bukkit.craftbukkit.v1_9_R1.CraftWorld; import org.bukkit.entity.Arrow; import com.cnaude.chairs.vehiclearrow.NMSArrowFactoryInterface; diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_7_R2/NMSChairsArrow.java b/src/com/cnaude/chairs/vehiclearrow/v1_9_R1/NMSChairsArrow.java similarity index 56% rename from src/com/cnaude/chairs/vehiclearrow/v1_7_R2/NMSChairsArrow.java rename to src/com/cnaude/chairs/vehiclearrow/v1_9_R1/NMSChairsArrow.java index 8b79a69..aaa1387 100644 --- a/src/com/cnaude/chairs/vehiclearrow/v1_7_R2/NMSChairsArrow.java +++ b/src/com/cnaude/chairs/vehiclearrow/v1_9_R1/NMSChairsArrow.java @@ -1,23 +1,23 @@ -package com.cnaude.chairs.vehiclearrow.v1_7_R2; - -import net.minecraft.server.v1_7_R2.EntityArrow; - -import org.bukkit.Bukkit; -import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_7_R2.CraftServer; -import org.bukkit.craftbukkit.v1_7_R2.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 h() { - } - -} +package com.cnaude.chairs.vehiclearrow.v1_9_R1; + +import net.minecraft.server.v1_9_R1.EntityTippedArrow; + +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.craftbukkit.v1_9_R1.CraftServer; +import org.bukkit.craftbukkit.v1_9_R1.CraftWorld; + +public class NMSChairsArrow extends EntityTippedArrow { + + 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 m() { + } + +} diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_7_R2/CraftChairsArrow.java b/src/com/cnaude/chairs/vehiclearrow/v1_9_R2/CraftChairsArrow.java similarity index 69% rename from src/com/cnaude/chairs/vehiclearrow/v1_7_R2/CraftChairsArrow.java rename to src/com/cnaude/chairs/vehiclearrow/v1_9_R2/CraftChairsArrow.java index 0e90bda..798f380 100644 --- a/src/com/cnaude/chairs/vehiclearrow/v1_7_R2/CraftChairsArrow.java +++ b/src/com/cnaude/chairs/vehiclearrow/v1_9_R2/CraftChairsArrow.java @@ -1,30 +1,30 @@ -package com.cnaude.chairs.vehiclearrow.v1_7_R2; - -import net.minecraft.server.v1_7_R2.EntityArrow; - -import org.bukkit.craftbukkit.v1_7_R2.CraftServer; -import org.bukkit.craftbukkit.v1_7_R2.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(); - } - -} +package com.cnaude.chairs.vehiclearrow.v1_9_R2; + +import net.minecraft.server.v1_9_R2.EntityArrow; + +import org.bukkit.craftbukkit.v1_9_R2.CraftServer; +import org.bukkit.craftbukkit.v1_9_R2.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(); + } + +} diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_7_R2/NMSArrowFactory.java b/src/com/cnaude/chairs/vehiclearrow/v1_9_R2/NMSArrowFactory.java similarity index 73% rename from src/com/cnaude/chairs/vehiclearrow/v1_7_R2/NMSArrowFactory.java rename to src/com/cnaude/chairs/vehiclearrow/v1_9_R2/NMSArrowFactory.java index d777440..8b66af5 100644 --- a/src/com/cnaude/chairs/vehiclearrow/v1_7_R2/NMSArrowFactory.java +++ b/src/com/cnaude/chairs/vehiclearrow/v1_9_R2/NMSArrowFactory.java @@ -1,9 +1,9 @@ -package com.cnaude.chairs.vehiclearrow.v1_7_R2; +package com.cnaude.chairs.vehiclearrow.v1_9_R2; -import net.minecraft.server.v1_7_R2.EntityArrow; +import net.minecraft.server.v1_9_R2.EntityArrow; import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_7_R2.CraftWorld; +import org.bukkit.craftbukkit.v1_9_R2.CraftWorld; import org.bukkit.entity.Arrow; import com.cnaude.chairs.vehiclearrow.NMSArrowFactoryInterface; diff --git a/src/com/cnaude/chairs/vehiclearrow/v1_7_R3/NMSChairsArrow.java b/src/com/cnaude/chairs/vehiclearrow/v1_9_R2/NMSChairsArrow.java similarity index 56% rename from src/com/cnaude/chairs/vehiclearrow/v1_7_R3/NMSChairsArrow.java rename to src/com/cnaude/chairs/vehiclearrow/v1_9_R2/NMSChairsArrow.java index 4b0520c..5a7c166 100644 --- a/src/com/cnaude/chairs/vehiclearrow/v1_7_R3/NMSChairsArrow.java +++ b/src/com/cnaude/chairs/vehiclearrow/v1_9_R2/NMSChairsArrow.java @@ -1,23 +1,23 @@ -package com.cnaude.chairs.vehiclearrow.v1_7_R3; - -import net.minecraft.server.v1_7_R3.EntityArrow; - -import org.bukkit.Bukkit; -import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_7_R3.CraftServer; -import org.bukkit.craftbukkit.v1_7_R3.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 h() { - } - -} +package com.cnaude.chairs.vehiclearrow.v1_9_R2; + +import net.minecraft.server.v1_9_R2.EntityTippedArrow; + +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.craftbukkit.v1_9_R2.CraftServer; +import org.bukkit.craftbukkit.v1_9_R2.CraftWorld; + +public class NMSChairsArrow extends EntityTippedArrow { + + 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 m() { + } + +} diff --git a/src/plugin.yml b/src/plugin.yml index 80273fe..f38967a 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,5 +1,5 @@ name: Chairs -version: 4.5 +version: 4.8 description: Let players sit on blocks. website: http://dev.bukkit.org/bukkit-plugins/chairsreloaded/ authors: