/rtp API tweaks, add timeout failsafe, add teleporting_random_generation locale

This commit is contained in:
William committed 2022-11-26 00:24:13 +00:00
1 parent a0042ac4c8
commit 6efefb175f
13 files changed
+42 -9

No files matched your search

@@ -70,6 +70,8 @@ public class RtpCommand extends CommandBase implements ConsoleExecutable {
}
// Get a random position and teleport
plugin.getLocales().getLocale("teleporting_random_generation")
.ifPresent(onlineUser::sendMessage);
plugin.getRandomTeleportEngine().getRandomPosition(onlineUser.getPosition().world, rtpArguments).thenAccept(position -> {
if (position.isEmpty()) {
plugin.getLocales().getLocale("error_rtp_randomization_timeout")