mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-18 01:46:44 +01:00
Allow commands to target offline players (#1022)
* Add targetRequirement annotation for Command * Added MTL lines for other langs * Fix TargetRequirement enum scoping * Adjust commands to targetRequirement system * Add translation message sugar to prevent future messages from being translated for wrong player * Temporarily disable offline targeting on /permission and /clear * Preliminary README cleanup * Readme commands cleanup * Clean up command table in README, including column shuffle Co-authored-by: AnimeGitB <AnimeGitB@bigblueball.in>
This commit is contained in:
@@ -14,11 +14,6 @@ public final class PositionCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
public void execute(Player sender, Player targetPlayer, List<String> args) {
|
||||
if (targetPlayer == null) {
|
||||
CommandHandler.sendMessage(sender, translate(sender, "commands.execution.need_target"));
|
||||
return;
|
||||
}
|
||||
|
||||
Position pos = targetPlayer.getPos();
|
||||
CommandHandler.sendMessage(sender, translate(sender, "commands.position.success",
|
||||
Float.toString(pos.getX()), Float.toString(pos.getY()), Float.toString(pos.getZ()),
|
||||
|
||||
Reference in New Issue
Block a user