Skip to content

Commit

Permalink
Fixed mishandling in PortalTeleportationListener
Browse files Browse the repository at this point in the history
it's a very stupid mistake... Which caused the "to End" teleportation to teleport the player to the Nether...
  • Loading branch information
Poslovitch authored Feb 27, 2019
1 parent d688178 commit bbeefc2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ else if (plugin.getIslands().hasIsland(Util.getWorld(fromWorld), e.getPlayer().g
// If this is from the island nether, then go to the same vector, otherwise try island home location
Location to = plugin.getIslands().getIslandAt(e.getFrom()).map(i -> i.getSpawnPoint(Environment.NORMAL)).orElse(e.getFrom().toVector().toLocation(overWorld));
e.setCancelled(true);
// Else other worlds teleport to the nether
// Else other worlds teleport to the overworld
new SafeSpotTeleport.Builder(plugin)
.entity(e.getPlayer())
.location(to)
Expand All @@ -90,7 +90,7 @@ else if (plugin.getIslands().hasIsland(Util.getWorld(fromWorld), e.getPlayer().g
return true;
}
// TO END
World endWorld = plugin.getIWM().getNetherWorld(overWorld);
World endWorld = plugin.getIWM().getEndWorld(overWorld);
// If this is to island End, then go to the same vector, otherwise try spawn
Location to = plugin.getIslands().getIslandAt(e.getFrom()).map(i -> i.getSpawnPoint(Environment.THE_END)).orElse(e.getFrom().toVector().toLocation(endWorld));
e.setCancelled(true);
Expand Down Expand Up @@ -161,4 +161,4 @@ public boolean onNetherPortal(PlayerPortalEvent e) {
.build();
return true;
}
}
}

0 comments on commit bbeefc2

Please sign in to comment.