mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-27 04:35:46 +01:00
Fix for Residence compatibility
This commit is contained in:
parent
341edb3c3b
commit
66e3dfbc01
@ -54,17 +54,20 @@ public class Teleport implements Listener {
|
||||
Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml"));
|
||||
FileConfiguration configLoad = config.getFileConfiguration();
|
||||
|
||||
Bukkit.getScheduler().runTaskLater(skyblock, () -> islandManager.updateFlight(player), 1L);
|
||||
if(worldManager.isIslandWorld(event.getFrom().getWorld())
|
||||
|| (event.getTo() != null && worldManager.isIslandWorld(event.getTo().getWorld()))) {
|
||||
Bukkit.getScheduler().runTaskLater(skyblock, () -> islandManager.updateFlight(player), 1L);
|
||||
}
|
||||
islandManager.loadPlayer(player);
|
||||
|
||||
|
||||
// Fix for bug that tp you in the real Nether/End when entering in a portal in an island
|
||||
if (worldManager.isIslandWorld(event.getFrom().getWorld())
|
||||
if (event.getTo() != null && (worldManager.isIslandWorld(event.getFrom().getWorld())
|
||||
&& !worldManager.isIslandWorld(event.getTo().getWorld())
|
||||
&& (event.getFrom().getBlock().getType().equals(CompatibleMaterial.END_PORTAL.getMaterial())
|
||||
|| event.getFrom().getBlock().getType().equals(CompatibleMaterial.NETHER_PORTAL.getMaterial())) && (event.getTo().getWorld() != null
|
||||
&& event.getTo().getWorld().getEnvironment().equals(World.Environment.NETHER)
|
||||
|| event.getTo().getWorld().getEnvironment().equals(World.Environment.THE_END))) {
|
||||
|| event.getTo().getWorld().getEnvironment().equals(World.Environment.THE_END)))) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user