Removed "warp not safe" message, replaced with the (renamed) "no-safe-location-found"

This commit is contained in:
Florian CUNY 2019-04-11 10:37:14 +02:00
parent a25ab326c3
commit 1d119ddea1
8 changed files with 17 additions and 26 deletions

View File

@ -1,11 +1,7 @@
package world.bentobox.bentobox.api.commands.island;
import java.util.List;
import java.util.UUID;
import org.bukkit.Sound;
import org.eclipse.jdt.annotation.Nullable;
import world.bentobox.bentobox.api.commands.CompositeCommand;
import world.bentobox.bentobox.api.events.IslandBaseEvent;
import world.bentobox.bentobox.api.events.island.IslandEvent;
@ -13,10 +9,12 @@ import world.bentobox.bentobox.api.localization.TextVariables;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.database.objects.Island;
import java.util.List;
import java.util.UUID;
/**
* @author tastybento
* @since 1.4.0
*
*/
public class IslandExpelCommand extends CompositeCommand {
@ -135,7 +133,5 @@ public class IslandExpelCommand extends CompositeCommand {
getAddon().logError("Expel: " + target.getName() + " had no island, and one could not be created");
user.sendMessage(CANNOT_EXPEL);
return false;
}
}

View File

@ -1,10 +1,5 @@
package world.bentobox.bentobox.util.teleport;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Optional;
import org.bukkit.Bukkit;
import org.bukkit.ChunkSnapshot;
import org.bukkit.GameMode;
@ -15,12 +10,17 @@ import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitTask;
import org.bukkit.util.Vector;
import org.eclipse.jdt.annotation.Nullable;
import world.bentobox.bentobox.BentoBox;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.database.objects.Island;
import world.bentobox.bentobox.util.Pair;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Optional;
/**
* A class that calculates finds a safe spot asynchronously and then teleports the player there.
* @author tastybento
@ -414,6 +414,7 @@ public class SafeSpotTeleport {
* Try to teleport the player
* @return SafeSpotTeleport
*/
@Nullable
public SafeSpotTeleport build() {
// Error checking
if (entity == null) {
@ -425,7 +426,7 @@ public class SafeSpotTeleport {
return null;
}
if (failureMessage.isEmpty() && entity instanceof Player) {
failureMessage = "general.errors.warp-not-safe";
failureMessage = "general.errors.no-safe-location-found";
}
return new SafeSpotTeleport(plugin, entity, location, failureMessage, portal, homeNumber, overrideGamemode);
}

View File

@ -23,14 +23,13 @@ general:
player-has-island: "&cPlayer already has an island!"
player-has-no-island: "&cThat player has no island!"
already-have-island: "&cYou already have an island!"
no-safe-location: "&cNo safe location found on island!"
no-safe-location-found: "&cCould not find a safe spot to teleport you to on the island."
not-owner: "&cYou are not the owner of your island!"
not-in-team: "&cThat player is not in your team!"
offline-player: "&cThat player is offline or doesn't exist."
unknown-player: "&c[name] is an unknown player!"
general: "&cThat command is not ready yet - contact admin"
unknown-command: "&cUnknown command. Do &b/[label] help &cfor help."
warp-not-safe: "&cThat warp is not safe right now!"
wrong-world: "&cYou are not in the right world to do that!"
you-must-wait: "&cYou must wait [number]s before you can do that command again."
must-be-positive-number: "&c[number] is not a valid positive number."

View File

@ -21,14 +21,13 @@ general:
player-has-island: "&cプレイヤーはすでに島を持っている!"
player-has-no-island: "&cあの選手には島がない!"
already-have-island: "&cあなたはすでに島を持っている!"
no-safe-location: "&cスタッフの方がとても親切でした。"
no-safe-location-found: "&cスタッフの方がとても親切でした。"
not-owner: "&cあなたの島のリーダーではありません!"
not-in-team: "&cあの選手はあなたのチームにはいない!"
offline-player: "&cそのプレイヤーはオフラインまたは存在しません。"
unknown-player: "&c不明なプレイヤー!"
general: "&cそのコマンドはまだ準備ができていません-お問い合わせ管理"
unknown-command: "&c不明なコマンドです。/[label] help を表示します。"
warp-not-safe: "&cワープは安全じゃない!"
wrong-world: "&cあなたはそれを行うには、右の世界ではありません!"
you-must-wait: "&cそのコマンドを再度実行するには、[number]秒を待つ必要があります"
tips:

View File

@ -25,14 +25,13 @@ general:
player-has-island: "&cGracz ma już wyspę!"
player-has-no-island: "&cTen gracz nie ma wyspy!"
already-have-island: "&cMasz już wyspę!"
no-safe-location: "&cNa wyspie nie znaleziono bezpiecznej lokalizacji!"
no-safe-location-found: "&cNa wyspie nie znaleziono bezpiecznej lokalizacji!"
not-owner: "&cNie jesteś liderem swojej wyspy!"
not-in-team: "&cTen gracz nie jest w twojej drużynie."
offline-player: "&cTen gracz jest offline lub nie istnieje."
unknown-player: "&cNieznany gracz!"
general: "&cTo polecenie nie jest jeszcze gotowe - skontaktuj się z administratorem"
unknown-command: "&cNieznane polecenie. Wpisz &b/[label] help &caby wyświetlić pomoc."
warp-not-safe: "&cTen warp nie jest teraz bezpieczny!"
wrong-world: "&cNie jesteś we właściwym świecie, aby to zrobić!"
you-must-wait: "&cMusisz poczekać [number]s, zanim będziesz mógł wykonać to polecenie ponownie."
you-need: "&cPotrzebujesz [permission]"

View File

@ -22,13 +22,12 @@ general:
no-island: "&cBạn không có đảo!"
player-has-no-island: "&cNgười chơi đó không có đảo!"
already-have-island: "&cBạn đã có đảo!"
no-safe-location: "&cKhông có địa điểm an toàn nào trên đảo!"
no-safe-location-found: "&cKhông có địa điểm an toàn nào trên đảo!"
not-owner: "&cBạn không phải đội trưởng!"
not-in-team: "&cNgười chơi không có trong đội!"
offline-player: "&cNgười chơi đang offline hoặc không tồn tại."
unknown-player: "&cNgười chơi không tìm thấy!"
general: "&cLệnh chưa sẵn sàng - hãy liên hệ admin"
warp-not-safe: "&cCổng dịch chuyển không an toàn!"
wrong-world: "&cBạn đang không ở trong thế giới có thể làm được việc này!"
tips:
changing-ob-to-lava: "Đang chuyển Hắc Diện Thạch về Dung Nham, hãy cẩn thận"

View File

@ -20,14 +20,13 @@ general:
player-has-island: "&c玩家已经有岛屿了"
player-has-no-island: "&c该玩家没有岛屿"
already-have-island: "&c您已经有岛屿了"
no-safe-location: "&c岛上没有安全位置"
no-safe-location-found: "&c岛上没有安全位置"
not-owner: "&c您不是您的岛上的队长"
not-in-team: "&c该玩家不是您的队员"
offline-player: "&c该玩家不在线或不存在。"
unknown-player: "&c[name] 是未知玩家!"
general: "&c该命令未就绪 - 请联系管理员"
unknown-command: "&c未知命令。使用 &b/[label] help &c来获得帮助。"
warp-not-safe: "&c该传送点当前不安全"
wrong-world: "&c您不在正确的世界"
you-must-wait: "&c要再次使用该命令您必须等待 [number] 秒"
tips:

View File

@ -21,14 +21,13 @@ general:
player-has-island: "&c玩家已經有島嶼了!"
player-has-no-island: "&c該玩家沒有島嶼!"
already-have-island: "&c您已經有島嶼了!"
no-safe-location: "&c島上沒有安全位置!"
no-safe-location-found: "&c島上沒有安全位置!"
not-owner: "&c您不是您的島上的隊長!"
not-in-team: "&c該玩家不是您的隊員!"
offline-player: "&c該玩家不在線或不存在。"
unknown-player: "&c[name] 是未知玩家!"
general: "&c該命令未就緒 - 請聯繫管理員"
unknown-command: "&c未知命令。使用 &b/[label] help &c來獲得幫助。"
warp-not-safe: "&c該傳送點當前不安全!"
wrong-world: "&c您不在正確的世界!"
you-must-wait: "&c要再次使用該命令, 您必須等待 [number] 秒"
must-be-positive-number: "&c[number] 不是一個有效的正數。"