Rename & Repackage

This commit is contained in:
dark98
2021-03-11 00:21:56 +00:00
parent caa4625efa
commit 3bf473129d
1921 changed files with 2017 additions and 2010 deletions
@@ -0,0 +1,39 @@
package com.rs2.integrations;
import java.io.IOException;
import java.net.URL;
import com.rs2.GameConstants;
import com.rs2.game.players.PlayerHandler;
public class PlayersOnlineWebsite {
static String password;
private static boolean hasntwared = true;
private static void setWebsitePlayersOnline(int amount) throws IOException {
URL url;
url = new URL(GameConstants.WEBSITE_LINK + "/playersonline.php?pass=" + password + "&amount=" + amount);
url.openStream().close();
}
private static int count = 50;
public static void addUpdatePlayersOnlineTask() {
if (password != null && !password.equals("")) {
if (count == 0) {
try {
setWebsitePlayersOnline(PlayerHandler.getPlayerCount());
count = 50;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} else {
count--;
}
} else if (hasntwared) {
hasntwared = false;
System.out.println("No Website Password Set So Website Integration Tasks Stopped");
}
}
}