total players registerd

This commit is contained in:
dginovker
2019-10-09 18:52:41 -04:00
parent b97a843428
commit d9d09a7ed0
6 changed files with 43 additions and 1 deletions
@@ -8,6 +8,7 @@ import java.net.URL;
public class PlayersOnlineWebsite {
static String password;
private static boolean hasntwared = true;
private static void setWebsitePlayersOnline(int amount) throws IOException {
URL url;
@@ -30,7 +31,8 @@ public class PlayersOnlineWebsite {
} else {
count--;
}
} else {
} else if (hasntwared) {
hasntwared = false;
System.out.println("No Players Online On Website Password Set So Task Stopped");
}
}
@@ -0,0 +1,38 @@
package redone.integrations;
import redone.game.players.PlayerHandler;
import java.io.File;
import java.io.IOException;
import java.net.URL;
public class RegisteredAccsWebsite {
static String password;
private static boolean hasntwarned = true;
private static void setAccountsRegistered(int amount) throws IOException {
URL url;
url = new URL("https://2006rebotted.tk/accountsregistered.php?pass=" + password + "&amount=" + amount);
url.openStream().close();
}
private static int count = 50;
public static void addUpdateRegisteredUsersTask() {
if (password != null && !password.equals("")) {
if (count == 0) {
try {
setAccountsRegistered(new File("data/characters/").list().length);
count = 50;
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} else {
count--;
}
} else if (hasntwarned) {
hasntwarned = false;
System.out.println("You need to provide the powpass secret to use this!");
}
}
}