Вам необходимо создать CommandExecutor, объясненный более здесь . Вы можете получить Местоположение фрагментов (XYZ) из Местоположения игрока . Затем вам нужно сохранить его где-нибудь, чтобы получить доступ к нему при выполнении другой команды, например, в Hashmap, чтобы связать местоположение с игроком.
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (sender instanceof Player) {
Player player = (Player) sender;
// get location and location fragments
Location loc = player.getLocation();
double x = loc.getX();
double y = loc.getY();
double y = loc.getZ();
// convert to int (information loss)
int xInt = (int)x;
int yInt = (int)y;
int zInt = (int)z;
}
}