mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Remove FAILED_UNSAFE for now
This commit is contained in:
1 parent
ff37f8ee12
commit
52a30c98ca
2 files changed
+12
-14
No files matched your search
@@ -275,9 +275,6 @@ public class TeleportManager {
|
||||
.ifPresent(onlineUser::sendMessage);
|
||||
case FAILED_INVALID_WORLD -> plugin.getLocales().getLocale("error_invalid_on_arrival")
|
||||
.ifPresent(onlineUser::sendMessage);
|
||||
case FAILED_UNSAFE -> {
|
||||
//todo
|
||||
}
|
||||
case FAILED_ILLEGAL_COORDINATES -> plugin.getLocales().getLocale("error_illegal_target_coordinates")
|
||||
.ifPresent(onlineUser::sendMessage);
|
||||
case FAILED_INVALID_SERVER -> plugin.getLocales().getLocale("error_invalid_server")
|
||||
@@ -350,10 +347,20 @@ public class TeleportManager {
|
||||
// Display countdown action bar message
|
||||
if (teleport.timeLeft > 0) {
|
||||
plugin.getLocales().getLocale("teleporting_action_bar_countdown", Integer.toString(teleport.timeLeft))
|
||||
.ifPresent(message -> teleport.getPlayer().sendActionBar(message));
|
||||
.ifPresent(message -> {
|
||||
switch (plugin.getSettings().teleportWarmupDisplay) {
|
||||
case ACTION_BAR -> teleport.getPlayer().sendActionBar(message);
|
||||
case MESSAGE -> teleport.getPlayer().sendMessage(message);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
plugin.getLocales().getLocale("teleporting_complete")
|
||||
.ifPresent(message -> teleport.getPlayer().sendActionBar(message));
|
||||
.ifPresent(message -> {
|
||||
switch (plugin.getSettings().teleportWarmupDisplay) {
|
||||
case ACTION_BAR -> teleport.getPlayer().sendActionBar(message);
|
||||
case MESSAGE -> teleport.getPlayer().sendMessage(message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Tick (decrement) the timed teleport timer
|
||||
|
||||
@@ -32,24 +32,15 @@ public enum TeleportResult {
|
||||
/**
|
||||
* Returns if the {@link Teleport} failed because the server of the target
|
||||
* {@link Position} was invalid or not online
|
||||
* <p>
|
||||
*/
|
||||
FAILED_INVALID_SERVER(false),
|
||||
|
||||
/**
|
||||
* Returns if the {@link Teleport} failed because the coordinates of the
|
||||
* target {@link Position} were outside the world border limits
|
||||
* <p>
|
||||
*/
|
||||
FAILED_ILLEGAL_COORDINATES(false),
|
||||
|
||||
/**
|
||||
* Returns if the {@link Teleport} failed because the coordinates of the
|
||||
* target {@link Position} were in an unsafe spot
|
||||
* <p>
|
||||
*/
|
||||
FAILED_UNSAFE(false),
|
||||
|
||||
/**
|
||||
* Returns if the teleport was cancelled, for example if a {@link TimedTeleport} in progress is cancelled
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user