diff --git a/2006Scape Server/libs/everythingrs-api.jar b/2006Scape Server/libs/everythingrs-api.jar deleted file mode 100644 index a56e84b5..00000000 Binary files a/2006Scape Server/libs/everythingrs-api.jar and /dev/null differ diff --git a/2006Scape Server/pom.xml b/2006Scape Server/pom.xml index c5b4186a..1d0b9bd0 100644 --- a/2006Scape Server/pom.xml +++ b/2006Scape Server/pom.xml @@ -123,13 +123,6 @@ gson 2.8.9 - - com.everythingrs - api - 3.0.5 - system - ${project.basedir}/libs/everythingrs-api.jar - com.google.guava diff --git a/2006Scape Server/src/main/java/com/rs2/ConfigLoader.java b/2006Scape Server/src/main/java/com/rs2/ConfigLoader.java index fa25f291..500586fb 100644 --- a/2006Scape Server/src/main/java/com/rs2/ConfigLoader.java +++ b/2006Scape Server/src/main/java/com/rs2/ConfigLoader.java @@ -90,30 +90,4 @@ public class ConfigLoader { bindBoolean(core, "cycle_logging", val -> Constants.CYCLE_LOGGING = val); bindInt(core, "cycle_logging_tick", val -> Constants.CYCLE_LOGGING_TICK = val); } - - private static void initialize() { - JSONObject main = new JSONObject(); - main.put("erssecret", ""); - try (BufferedWriter br = new BufferedWriter(new FileWriter("data/secrets.json"))) { - br.write(main.toString()); - } catch (IOException e) { - e.printStackTrace(); - } - } - - public static void loadSecrets() throws IOException { - if (!new File("data/secrets.json").exists()) { - initialize(); - } else { - String out = new String(Files.readAllBytes(Paths.get("data/secrets.json")), StandardCharsets.UTF_8); - JSONObject obj = new JSONObject(out); - - /* - * Sets External Services Vars - */ - if (obj.has("erssecret")) - GameEngine.ersSecret = obj.getString("erssecret"); - - } - } } diff --git a/2006Scape Server/src/main/java/com/rs2/GameEngine.java b/2006Scape Server/src/main/java/com/rs2/GameEngine.java index f5b5b029..946960de 100644 --- a/2006Scape Server/src/main/java/com/rs2/GameEngine.java +++ b/2006Scape Server/src/main/java/com/rs2/GameEngine.java @@ -96,7 +96,6 @@ public class GameEngine { return d; } - public static String ersSecret; public static int[] cannonsX = new int[50]; public static int[] cannonsY = new int[50]; public static String[] cannonsO = new String[50]; @@ -180,11 +179,6 @@ public class GameEngine { Runtime.getRuntime().addShutdownHook(new Thread(() -> Player.postGlobal(new ServerShutdownEvent()))); - /** - * Start Integration Services - **/ - ConfigLoader.loadSecrets(); - /** * Accepting Connections */ diff --git a/2006Scape Server/src/main/java/com/rs2/game/players/Player.java b/2006Scape Server/src/main/java/com/rs2/game/players/Player.java index 9253964c..d95058d9 100644 --- a/2006Scape Server/src/main/java/com/rs2/game/players/Player.java +++ b/2006Scape Server/src/main/java/com/rs2/game/players/Player.java @@ -1,6 +1,5 @@ package com.rs2.game.players; -import com.everythingrs.hiscores.Hiscores; import com.rs2.Constants; import com.rs2.GameEngine; import com.rs2.event.*; @@ -625,14 +624,6 @@ public abstract class Player { getSummon().pickUpPet(this, summonId); } - if(GameEngine.ersSecret != null && !GameEngine.ersSecret.equals("") && this.playerRights < 2) { - boolean debugMessage = false; - System.out.println("Updating highscores for " + this.playerName + "!"); - Hiscores.update(GameEngine.ersSecret, "Normal Mode", this.playerName, this.playerRights, this.playerXP, debugMessage); - } else { - System.out.println("EverythingRS API Disabled, highscores not saved!"); - } - System.out.println("[DEREGISTERED]: " + playerName + ""); // HostList.getHostList().remove(session); CycleEventHandler.getSingleton().stopEvents(this); diff --git a/2006Scape Server/src/main/java/com/rs2/net/packets/impl/Commands.java b/2006Scape Server/src/main/java/com/rs2/net/packets/impl/Commands.java index 24253c48..cab2ec7b 100644 --- a/2006Scape Server/src/main/java/com/rs2/net/packets/impl/Commands.java +++ b/2006Scape Server/src/main/java/com/rs2/net/packets/impl/Commands.java @@ -145,35 +145,6 @@ public class Commands implements PacketType { } } break; - case "claimvote": - if (!GameEngine.ersSecret.equals("")) { - final String playerName = player.playerName; - - com.everythingrs.vote.Vote.service.execute(new Runnable() { - @Override - public void run() { - try { - int currentPoints = player.votePoints; - com.everythingrs.vote.Vote[] reward = com.everythingrs.vote.Vote.reward(GameEngine.ersSecret, playerName, "1", "all"); - if (reward[0].message != null) { - player.getPacketSender().sendMessage(reward[0].message); - return; - } - player.votePoints = (currentPoints + reward[0].give_amount); - //player.getActionSender().sendMessage("Thank you for voting! You now have " + reward[0].vote_points + " vote points."); - player.getPacketSender().sendMessage( - "Thank you for voting! You now have " + player.votePoints + " vote points."); - } catch (Exception e) { - player.getPacketSender().sendMessage("Api Services are currently offline. Please check back shortly"); - e.printStackTrace(); - } - } - - }); - } else { - player.getPacketSender().sendMessage("Voting Is Not Enabled"); - } - break; case "coords": case "coord": case "pos":