Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class sPlayer {
- private static HashMap<UUID, sPlayer> storage = new HashMap<>();
- private static int Admin;
- private static int Level;
- private static int Bank;
- private static int Cash;
- private static int Deaths;
- public sPlayer(UUID uuid) {
- if(Stats.playerExists(uuid.toString())) {
- try {
- ResultSet rs = MySQL.query("SELECT * FROM Stats WHERE UUID = '" +uuid+ "'");
- if(rs.next()) {
- sPlayer.setAdmin(rs.getInt("ADMIN"));
- sPlayer.setLevel(rs.getInt("LEVEL"));
- sPlayer.setBank(rs.getInt("BANK"));
- sPlayer.setCash(rs.getInt("CASH"));
- sPlayer.setDeaths(rs.getInt("DEATHS"));
- storage.put(uuid, this);
- }
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- }
- public static void setAdmin(int admin) {
- Admin = admin;
- }
- public static int getAdmin() {
- return Admin;
- }
- public static void setLevel(int level) {
- Level = level;
- }
- public static int getLevel() {
- return Level;
- }
- public static void setBank(int bank) {
- Bank = bank;
- }
- public static int getBank() {
- return Bank;
- }
- public static void setCash(int cash) {
- Cash = cash;
- }
- public static int getCash() {
- return Cash;
- }
- public static void setDeaths(int deaths) {
- Deaths = deaths;
- }
- public static int getDeaths() {
- return Deaths;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment