Disable warp teleport while falling if world Flags.PREVENT_TELEPORT_WHEN_FALLING is enabled.
This commit is contained in:
parent
aa1f0bdcba
commit
9c88792b27
|
@ -24,6 +24,7 @@ import org.bukkit.block.Block;
|
|||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.block.Sign;
|
||||
|
||||
import world.bentobox.bentobox.lists.Flags;
|
||||
import world.bentobox.warps.objects.WarpsData;
|
||||
import world.bentobox.warps.event.WarpInitiateEvent;
|
||||
import world.bentobox.warps.event.WarpListEvent;
|
||||
|
@ -353,6 +354,15 @@ public class WarpSignsManager {
|
|||
addon.getWarpSignsManager().removeWarp(world, owner);
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.plugin.getIWM().inWorld(user.getWorld()) &&
|
||||
Flags.PREVENT_TELEPORT_WHEN_FALLING.isSetForWorld(user.getWorld()) &&
|
||||
user.getPlayer().getFallDistance() > 0) {
|
||||
// We're sending the "hint" to the player to tell them they cannot teleport while falling.
|
||||
user.sendMessage(Flags.PREVENT_TELEPORT_WHEN_FALLING.getHintReference());
|
||||
return;
|
||||
}
|
||||
|
||||
// Find out if island is locked
|
||||
// TODO: Fire event
|
||||
|
||||
|
|
Loading…
Reference in New Issue