Make players teleport to shops once they return to the nether
This commit is contained in:
parent
d12d353c20
commit
cd237b8d3b
@ -250,7 +250,6 @@ public class BossNetherPortal implements Listener
|
|||||||
{
|
{
|
||||||
ClansManager.getInstance().getNetherManager().InNether.put((Player)event.getEntity(), Expire);
|
ClansManager.getInstance().getNetherManager().InNether.put((Player)event.getEntity(), Expire);
|
||||||
Location from = event.getEntity().getLocation();
|
Location from = event.getEntity().getLocation();
|
||||||
ClansManager.getInstance().getNetherManager().OverworldOrigins.put((Player)event.getEntity(), from);
|
|
||||||
event.getEntity().teleport(ClansManager.getInstance().getNetherManager().getNetherWorld().getSpawnLocation());
|
event.getEntity().teleport(ClansManager.getInstance().getNetherManager().getNetherWorld().getSpawnLocation());
|
||||||
ClansManager.getInstance().ClanTips.displayTip(TipType.ENTER_NETHER, (Player)event.getEntity());
|
ClansManager.getInstance().ClanTips.displayTip(TipType.ENTER_NETHER, (Player)event.getEntity());
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ public class NetherManager extends MiniPlugin
|
|||||||
*/
|
*/
|
||||||
public Location getReturnLocation(Player player)
|
public Location getReturnLocation(Player player)
|
||||||
{
|
{
|
||||||
return OverworldOrigins.getOrDefault(player, Spawn.getNorthSpawn());
|
return OverworldOrigins.getOrDefault(player, Spawn.getWestTown());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -261,7 +261,6 @@ public class NetherPortal implements Listener
|
|||||||
{
|
{
|
||||||
ClansManager.getInstance().getNetherManager().InNether.put((Player)event.getEntity(), Expire);
|
ClansManager.getInstance().getNetherManager().InNether.put((Player)event.getEntity(), Expire);
|
||||||
Location from = event.getEntity().getLocation();
|
Location from = event.getEntity().getLocation();
|
||||||
ClansManager.getInstance().getNetherManager().OverworldOrigins.put((Player)event.getEntity(), from);
|
|
||||||
event.getEntity().teleport(ClansManager.getInstance().getNetherManager().getNetherWorld().getSpawnLocation());
|
event.getEntity().teleport(ClansManager.getInstance().getNetherManager().getNetherWorld().getSpawnLocation());
|
||||||
ClansManager.getInstance().ClanTips.displayTip(TipType.ENTER_NETHER, (Player)event.getEntity());
|
ClansManager.getInstance().ClanTips.displayTip(TipType.ENTER_NETHER, (Player)event.getEntity());
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,6 @@ public class ForceTeleportCommand extends CommandBase<NetherManager>
|
|||||||
if (natural)
|
if (natural)
|
||||||
{
|
{
|
||||||
Plugin.InNether.put(caller, System.currentTimeMillis() + UtilTime.convert(10, TimeUnit.MINUTES, TimeUnit.MILLISECONDS));
|
Plugin.InNether.put(caller, System.currentTimeMillis() + UtilTime.convert(10, TimeUnit.MINUTES, TimeUnit.MILLISECONDS));
|
||||||
Plugin.OverworldOrigins.put(caller, caller.getLocation());
|
|
||||||
caller.teleport(Plugin.getNetherWorld().getSpawnLocation());
|
caller.teleport(Plugin.getNetherWorld().getSpawnLocation());
|
||||||
ClansManager.getInstance().ClanTips.displayTip(TipType.ENTER_NETHER, caller);
|
ClansManager.getInstance().ClanTips.displayTip(TipType.ENTER_NETHER, caller);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user