mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-07-03 01:54:43 +02:00
Fixed teleportation bug.
This commit is contained in:
parent
2c86e6e89b
commit
eb5e7f3399
|
@ -180,13 +180,15 @@ public class Teleport implements Listener {
|
|||
@EventHandler
|
||||
public void onEntityTeleport(EntityPortalEvent e) {
|
||||
WorldManager worldManager = skyblock.getWorldManager();
|
||||
|
||||
// Do not handle player
|
||||
if (e.getEntityType() == EntityType.PLAYER)
|
||||
return;
|
||||
|
||||
Location from = e.getFrom();
|
||||
Location to = e.getTo();
|
||||
// Test which world the event is from
|
||||
if (from.getWorld() == to.getWorld())
|
||||
|
||||
if (to == null || from.getWorld() == to.getWorld())
|
||||
return;
|
||||
|
||||
if (worldManager.getIslandWorld(e.getFrom().getWorld()) != null)
|
||||
|
|
Loading…
Reference in New Issue
Block a user