Make players teleport to shops once they return to the nether

This commit is contained in:
AlexTheCoder 2016-07-30 17:42:57 -04:00
parent d12d353c20
commit cd237b8d3b
4 changed files with 1 additions and 4 deletions

View File

@ -250,7 +250,6 @@ public class BossNetherPortal implements Listener
{
ClansManager.getInstance().getNetherManager().InNether.put((Player)event.getEntity(), Expire);
Location from = event.getEntity().getLocation();
ClansManager.getInstance().getNetherManager().OverworldOrigins.put((Player)event.getEntity(), from);
event.getEntity().teleport(ClansManager.getInstance().getNetherManager().getNetherWorld().getSpawnLocation());
ClansManager.getInstance().ClanTips.displayTip(TipType.ENTER_NETHER, (Player)event.getEntity());
}

View File

@ -155,7 +155,7 @@ public class NetherManager extends MiniPlugin
*/
public Location getReturnLocation(Player player)
{
return OverworldOrigins.getOrDefault(player, Spawn.getNorthSpawn());
return OverworldOrigins.getOrDefault(player, Spawn.getWestTown());
}
/**

View File

@ -261,7 +261,6 @@ public class NetherPortal implements Listener
{
ClansManager.getInstance().getNetherManager().InNether.put((Player)event.getEntity(), Expire);
Location from = event.getEntity().getLocation();
ClansManager.getInstance().getNetherManager().OverworldOrigins.put((Player)event.getEntity(), from);
event.getEntity().teleport(ClansManager.getInstance().getNetherManager().getNetherWorld().getSpawnLocation());
ClansManager.getInstance().ClanTips.displayTip(TipType.ENTER_NETHER, (Player)event.getEntity());
}

View File

@ -54,7 +54,6 @@ public class ForceTeleportCommand extends CommandBase<NetherManager>
if (natural)
{
Plugin.InNether.put(caller, System.currentTimeMillis() + UtilTime.convert(10, TimeUnit.MINUTES, TimeUnit.MILLISECONDS));
Plugin.OverworldOrigins.put(caller, caller.getLocation());
caller.teleport(Plugin.getNetherWorld().getSpawnLocation());
ClansManager.getInstance().ClanTips.displayTip(TipType.ENTER_NETHER, caller);
}