diff --git a/README b/README index 7df044f..353d8dc 100644 --- a/README +++ b/README @@ -130,6 +130,8 @@ maxgates - If non-zero, will define the maximum amount of gates allowed on a net ============= Changes ============= +[Version 0.5.0b] + - Updated the teleport method [Version 0.4.9] - Left-click to scroll signs up - Show "(Not Connected)" on fixed-gates with a non-existant destination diff --git a/src/net/TheDgtl/Stargate/Portal.java b/src/net/TheDgtl/Stargate/Portal.java index 4d7b837..ec70512 100644 --- a/src/net/TheDgtl/Stargate/Portal.java +++ b/src/net/TheDgtl/Stargate/Portal.java @@ -217,10 +217,8 @@ public class Portal { exit.setYaw(origin.getRotation() - traveller.getYaw() + this.getRotation() + 180); - // Change "from" so we don't get hack warnings. Cancel player move event. - event.setFrom(exit); - player.teleport(exit); - event.setCancelled(true); + // The new method to teleport in a move event is set the "to" field. + event.setTo(exit); } public void teleport(final Vehicle vehicle) { @@ -254,7 +252,7 @@ public class Portal { if (passenger != null) { vehicle.eject(); vehicle.remove(); - final Minecart mc = exit.getWorld().spawnMinecart(exit); + final Minecart mc = exit.getWorld().spawn(exit, Minecart.class); passenger.teleport(exit); Stargate.server.getScheduler().scheduleSyncDelayedTask(Stargate.stargate, new Runnable() { public void run() { diff --git a/src/net/TheDgtl/Stargate/Stargate.java b/src/net/TheDgtl/Stargate/Stargate.java index 5be107e..c6e44e7 100644 --- a/src/net/TheDgtl/Stargate/Stargate.java +++ b/src/net/TheDgtl/Stargate/Stargate.java @@ -25,9 +25,6 @@ import org.bukkit.event.block.BlockFromToEvent; import org.bukkit.event.block.BlockListener; import org.bukkit.event.block.BlockPhysicsEvent; import org.bukkit.event.block.SignChangeEvent; -import org.bukkit.event.entity.EntityCombustEvent; -import org.bukkit.event.entity.EntityDamageByBlockEvent; -import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.EntityExplodeEvent; import org.bukkit.event.entity.EntityListener; import org.bukkit.event.player.PlayerInteractEvent; @@ -382,7 +379,6 @@ public class Stargate extends JavaPlugin { player.sendMessage(ChatColor.RED + denyMsg); } portal.teleport(player, portal, event); - event.setCancelled(true); return; } @@ -395,7 +391,6 @@ public class Stargate extends JavaPlugin { player.sendMessage(ChatColor.RED + denyMsg); } portal.teleport(player, portal, event); - event.setCancelled(true); portal.close(false); return; } diff --git a/src/plugin.yml b/src/plugin.yml index c2c8da1..ab24f24 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: Stargate main: net.TheDgtl.Stargate.Stargate -version: 0.4.9 +version: 0.5.0b description: Stargate mod for Bukkit author: Drakia website: http://www.thedgtl.net