Skip to content

Commit

Permalink
Clarify unsafeTeleportDestination message. Fixes #5088
Browse files Browse the repository at this point in the history
  • Loading branch information
Haarolean committed Oct 25, 2023
1 parent fdf1875 commit 65a6f62
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ public void run(final Server server, final User user, final String commandLabel,
}

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

if (ess.getSettings().isConfirmHomeOverwrite() && usersHome.hasHome(name) && (!name.equals(usersHome.getLastHomeConfirmation()) || name.equals(usersHome.getLastHomeConfirmation()) && System.currentTimeMillis() - usersHome.getLastHomeConfirmationTimestamp() > TimeUnit.MINUTES.toMillis(2))) {
Expand Down
2 changes: 1 addition & 1 deletion Essentials/src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1453,7 +1453,7 @@ unlinkCommandUsage=/<command>
unlinkCommandUsage1=/<command>
unlinkCommandUsage1Description=Unlinks your Minecraft account from the currently linked Discord account.
unmutedPlayer=\u00a76Player\u00a7c {0} \u00a76unmuted.
unsafeTeleportDestination=\u00a74The teleport destination is unsafe and teleport-safety is disabled.
unsafeTeleportDestination=\u00a74The teleport destination is unsafe and teleport-safety rules are preventing you from bypassing this.
unsupportedBrand=\u00a74The server platform you are currently running does not provide the capabilities for this feature.
unsupportedFeature=\u00a74This feature is not supported on the current server version.
unvanishedReload=\u00a74A reload has forced you to become visible.
Expand Down
2 changes: 1 addition & 1 deletion Essentials/src/main/resources/messages_en_GB.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@ unlinkCommandUsage=/<command>
unlinkCommandUsage1=/<command>
unlinkCommandUsage1Description=Unlinks your Minecraft account from the currently linked Discord account.
unmutedPlayer=§6Player§c {0} §6unmuted.
unsafeTeleportDestination=§4The teleport destination is unsafe and teleport-safety is disabled.
unsafeTeleportDestination=§4The teleport destination is unsafe and teleport-safety rules are preventing you from bypassing this.
unsupportedBrand=§4The server platform you are currently running does not provide the capabilities for this feature.
unsupportedFeature=§4This feature is not supported on the current server version.
unvanishedReload=§4A reload has forced you to become visible.
Expand Down
2 changes: 1 addition & 1 deletion Essentials/src/main/resources/messages_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1452,7 +1452,7 @@ unlinkCommandUsage=/<command>
unlinkCommandUsage1=/<command>
unlinkCommandUsage1Description=Отвязывает ваш аккаунт Minecraft от вашего аккаунта Discord.
unmutedPlayer=§6Игрок§c {0} §6снова может писать в чат.
unsafeTeleportDestination=§4Место назначения телепортации небезопасно, а защита при телепортации отключена.
unsafeTeleportDestination=§4Место назначения телепортации небезопасно, и правила защиты при телепортации не позволяют обойти ограничение.
unsupportedBrand=§4Ваше текущее серверное ядро не поддерживает эту функцию.
unsupportedFeature=§4Эта функция не поддерживается на текущей версии сервера.
unvanishedReload=§4Из-за перезагрузки вы вновь стали видимы.
Expand Down

0 comments on commit 65a6f62

Please sign in to comment.