Fixes teleporting back from standard nether to island.

This commit is contained in:
tastybento 2018-11-10 11:57:46 -08:00
parent 37aa2e06f9
commit c438f4a45d
2 changed files with 5 additions and 5 deletions

View File

@ -175,7 +175,7 @@ public class NetherPortals implements Listener {
public void onNetherPortalStandardNether(PlayerPortalEvent e) {
World fromWorld = e.getFrom().getWorld();
if (e.getCause().equals(TeleportCause.NETHER_PORTAL)
&& plugin.getIWM().inWorld(e.getFrom())
&& plugin.getIWM().inWorld(Util.getWorld(fromWorld))
&& !plugin.getIWM().isNetherIslands(fromWorld)
&& fromWorld.getEnvironment().equals(Environment.NETHER)
&& plugin.getPlayers().isKnown(e.getPlayer().getUniqueId())) {

View File

@ -65,11 +65,11 @@ public class IslandWorldManager {
}
/**
* Checks if a location is in any of the island worlds
* Checks if a location is in any of the island worlds.
* This will be false if the player is in the standard Nether or standard End.
*
* @param loc
* - location
* @return true if in a world or false if not
* @param loc - location
* @return true if in a world or false if not. False if in standard Nether or standard End.
*/
public boolean inWorld(Location loc) {
return inWorld(loc.getWorld());