Skip to content

Commit

Permalink
Disabled end portals temp
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachesMLG committed May 28, 2021
1 parent bd0989c commit 56c6164
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.iridium.iridiumskyblock.IridiumSkyblock;
import com.iridium.iridiumskyblock.managers.IslandManager;
import com.iridium.iridiumskyblock.utils.LocationUtils;
import org.bukkit.World;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
Expand All @@ -23,8 +22,9 @@ public void onPlayerPortal(PlayerPortalEvent event) {
event.setTo(island.getCenter(world));
}
if (event.getCause().equals(PlayerTeleportEvent.TeleportCause.END_PORTAL)) {
World world = Objects.equals(event.getFrom().getWorld(), islandManager.getEndWorld()) ? islandManager.getWorld() : islandManager.getEndWorld();
event.setTo(LocationUtils.getSafeLocation(island.getCenter(world), island));
event.setCancelled(true);
// World world = Objects.equals(event.getFrom().getWorld(), islandManager.getEndWorld()) ? islandManager.getWorld() : islandManager.getEndWorld();
// event.setTo(LocationUtils.getSafeLocation(island.getCenter(world), island));
}
});
}
Expand Down

0 comments on commit 56c6164

Please sign in to comment.