Skip to content

Commit

Permalink
Use async teleport
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Jun 28, 2020
1 parent 0035e31 commit e01731d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void onIslandRangeChange(IslandEvent.IslandProtectionRangeChangeEvent e)

this.addon.updateBorder(player, e.getLocation());
}

/**
* Teleports a player back home if they use a vehicle to glitch out of the world border
* @param event - event
Expand All @@ -112,7 +112,7 @@ public void onDismount(VehicleExitEvent event) {
Bukkit.getScheduler().runTask(addon.getPlugin(), () -> {
if (!addon.getIslands().getProtectedIslandAt(p.getLocation()).isPresent()
&& addon.getIslands().getIslandAt(p.getLocation()).equals(is)) {
addon.getIslands().homeTeleport(Util.getWorld(p.getWorld()), p);
addon.getIslands().homeTeleportAsync(Util.getWorld(p.getWorld()), p);
}
});
}
Expand Down

0 comments on commit e01731d

Please sign in to comment.