Refactor player location and server name fetching, prune unused locales

This commit is contained in:
William committed 2022-08-23 16:19:18 +01:00
1 parent 571f35429d
commit 7e3dab918f
23 files changed
+151 -200

No files matched your search

@@ -39,7 +39,7 @@ public class RtpCommand extends CommandBase implements ConsoleExecutable {
.ifPresent(onlineUser::sendMessage);
return;
}
final Position userPosition = target.getPosition().join();
final Position userPosition = target.getPosition();
if (plugin.getSettings().rtpRestrictedWorlds.stream()
.anyMatch(worldName -> worldName.equals(userPosition.world.name))) {
plugin.getLocales().getLocale("error_rtp_restricted_world")