To retrieve a UUID based on a player's username, follow this example:
import net.smoothplugins.smoothusersapi.SmoothUsersAPI;
import net.smoothplugins.smoothusersapi.user.User;
import java.util.UUID;
public class Example {
private final SmoothUsersAPI smoothUsersAPI;
public Example(SmoothUsersAPI smoothUsersAPI) {
this.smoothUsersAPI = smoothUsersAPI;
}
public UUID getUUIDByUsername(String username) {
User user = smoothUsersAPI.getUserService().getUserByUsername(username).orElse(null);
if (user == null) return null;
return user.getUuid();
}
}