mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-18 18:05:05 +01:00
add /language command (#780)
* Fix the following issues: 1. HashMap non-thread-safe issus 2. Fix the same problem in pr621, but use a better implementation Add the following functions: 1. There is now a language cache inside getLanguage to prepare for different languages corresponding to different time zones where the accounts in the server are located * add /language command,each account has their own Locate
This commit is contained in:
@@ -15,12 +15,12 @@ public final class PositionCommand implements CommandHandler {
|
||||
@Override
|
||||
public void execute(Player sender, Player targetPlayer, List<String> args) {
|
||||
if (targetPlayer == null) {
|
||||
CommandHandler.sendMessage(sender, translate("commands.execution.need_target"));
|
||||
CommandHandler.sendMessage(sender, translate(sender, "commands.execution.need_target"));
|
||||
return;
|
||||
}
|
||||
|
||||
Position pos = targetPlayer.getPos();
|
||||
CommandHandler.sendMessage(sender, translate("commands.position.success",
|
||||
CommandHandler.sendMessage(sender, translate(sender, "commands.position.success",
|
||||
Float.toString(pos.getX()), Float.toString(pos.getY()), Float.toString(pos.getZ()),
|
||||
Integer.toString(targetPlayer.getSceneId())));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user