mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Update /tpignore locale
This commit is contained in:
1 parent
8adbc49a61
commit
632d43d131
3 files changed
+12
-7
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package net.william278.huskhomes.command;
|
||||
|
||||
import de.themoep.minedown.MineDown;
|
||||
import net.william278.huskhomes.HuskHomes;
|
||||
import net.william278.huskhomes.player.OnlineUser;
|
||||
import net.william278.huskhomes.player.UserData;
|
||||
@@ -28,7 +29,8 @@ public class TpIgnoreCommand extends CommandBase {
|
||||
plugin.getDatabase().getUserData(onlineUser.uuid).thenAccept(
|
||||
userData -> userData.ifPresent(data -> plugin.getDatabase().updateUserData(new UserData(onlineUser,
|
||||
data.homeSlots(), isIgnoringRequests, data.rtpCooldown())).join())).thenRun(
|
||||
() -> plugin.getLocales().getLocale("tpignore_toggle_" + (isIgnoringRequests ? "on" : "off"))
|
||||
.ifPresent(onlineUser::sendMessage));
|
||||
() -> plugin.getLocales().getRawLocale("tpignore_toggle_" + (isIgnoringRequests ? "on" : "off"),
|
||||
plugin.getLocales().getRawLocale("tpignore_toggle_button").orElse(""))
|
||||
.ifPresent(locale -> onlineUser.sendMessage(new MineDown(locale))));
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.william278.huskhomes.listener;
|
||||
|
||||
import de.themoep.minedown.MineDown;
|
||||
import net.william278.huskhomes.HuskHomes;
|
||||
import net.william278.huskhomes.player.OnlineUser;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -73,8 +74,9 @@ public class EventListener {
|
||||
|
||||
// Send a reminder message if they are still ignoring requests
|
||||
if (ignoringRequests) {
|
||||
plugin.getLocales().getLocale("tpignore_on_reminder")
|
||||
.ifPresent(onlineUser::sendMessage);
|
||||
plugin.getLocales().getRawLocale("tpignore_on_reminder",
|
||||
plugin.getLocales().getRawLocale("tpignore_toggle_button").orElse(""))
|
||||
.ifPresent(locale -> onlineUser.sendMessage(new MineDown(locale)));
|
||||
}
|
||||
}
|
||||
}).join();
|
||||
|
||||
@@ -95,9 +95,10 @@ delete_all_warps_success: '[Successfully deleted all](#00fb9a) [%1%](#00fb9a bol
|
||||
teleporting_complete_console: '[Console teleported you to %1%.](gray)'
|
||||
spawn_warp_default_description: 'The /spawn position of the server'
|
||||
|
||||
tpignore_toggle_on: '[You are now](#00fb9a) [ignoring](#00fb9a bold) [incoming teleport requests.](#00fb9a) [(Click to toggle)](gray show_text=&7Click to listen for incoming teleport requests run_command=/huskhomes:tpignore)'
|
||||
tpignore_toggle_off: '[You are now](#00fb9a) [listening](#00fb9a bold) [to any incoming teleport requests.](#00fb9a) [(Click to toggle)](gray show_text=&7Click to ignore incoming teleport requests run_command=/huskhomes:tpignore)'
|
||||
tpignore_on_reminder: '[You are currently ignoring incoming teleport requests!](gray) [(Click to toggle)](gray show_text=&7Click to listen for incoming teleport requests run_command=/huskhomes:tpignore)'
|
||||
tpignore_toggle_on: '[You are now](#00fb9a) [ignoring](#00fb9a bold) [incoming teleport requests.](#00fb9a) %1%'
|
||||
tpignore_toggle_off: '[You are now](#00fb9a) [listening](#00fb9a bold) [to incoming teleport requests.](#00fb9a) %1%'
|
||||
tpignore_on_reminder: '[You are currently ignoring incoming teleport requests!](gray) %1%'
|
||||
tpignore_toggle_button: '[[🔔 Toggle…]](#ffc43b show_text=&#ffc43b&Click to toggle:\n&7Toggle ignoring/listening to incoming teleport requests run_command=/huskhomes:tpignore)'
|
||||
|
||||
teleporting_all_players: '[Teleporting all players to your position…](#00fb9a)'
|
||||
|
||||
|
||||
Reference in new issue
Block a user