Skip to content

Commit 89a1697

Browse files
authored
Allow unsafe homes when force-disable-teleport-safety is enabled (EssentialsX#4650)
1 parent 73ad54d commit 89a1697

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Essentials/src/main/java/com/earth2me/essentials/commands/Commandsethome.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public void run(final Server server, final User user, final String commandLabel,
5151
}
5252

5353
final Location location = user.getLocation();
54-
if (!ess.getSettings().isTeleportSafetyEnabled() && LocationUtil.isBlockUnsafeForUser(usersHome, location.getWorld(), location.getBlockX(), location.getBlockY(), location.getBlockZ())) {
54+
if ((!ess.getSettings().isTeleportSafetyEnabled() || !ess.getSettings().isForceDisableTeleportSafety()) && LocationUtil.isBlockUnsafeForUser(usersHome, location.getWorld(), location.getBlockX(), location.getBlockY(), location.getBlockZ())) {
5555
throw new Exception(tl("unsafeTeleportDestination", location.getWorld().getName(), location.getBlockX(), location.getBlockY(), location.getBlockZ()));
5656
}
5757

0 commit comments

Comments
 (0)