mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-28 05:35:44 +01:00
Fixes teleporting back from standard nether to island.
This commit is contained in:
parent
37aa2e06f9
commit
c438f4a45d
@ -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())) {
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user