mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 15:08:18 +01:00
Allow unsafe homes when force-disable-teleport-safety is enabled (#4650)
This commit is contained in:
parent
3f857e3183
commit
3c60bcf2de
@ -51,7 +51,7 @@ public class Commandsethome extends EssentialsCommand {
|
||||
}
|
||||
|
||||
final Location location = user.getLocation();
|
||||
if (!ess.getSettings().isTeleportSafetyEnabled() && LocationUtil.isBlockUnsafeForUser(usersHome, location.getWorld(), location.getBlockX(), location.getBlockY(), location.getBlockZ())) {
|
||||
if ((!ess.getSettings().isTeleportSafetyEnabled() || !ess.getSettings().isForceDisableTeleportSafety()) && LocationUtil.isBlockUnsafeForUser(usersHome, location.getWorld(), location.getBlockX(), location.getBlockY(), location.getBlockZ())) {
|
||||
throw new Exception(tl("unsafeTeleportDestination", location.getWorld().getName(), location.getBlockX(), location.getBlockY(), location.getBlockZ()));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user