Why it doesn't return the value?

Why it doesn't return the value?

So basiclly I have a very simple function to get online players but it doesn't return to the value what I'm looking for.

  1. $(document).ready(function() {
  2.     var ip = "mc.hypixel.net";
  3.     loadPlayerCount(ip);
  4.     window.setInterval(function() {
  5.         loadPlayerCount(ip);
  6.     }, 60000);
  7. });
  8. function loadPlayerCount(i) {
  9.     $.get('https://eu.mc-api.net/v3/server/info/' + i, function(s) {
  10.         if(s['status'] == false) {
  11.             return -1;
  12.         } else {
  13.             return s['players']['online'];
  14.         }
  15.     });
  16.     return -1;
  17. }