Various Changes (#614)

* Clean Old Log Files

* Various Changes

* Moved minutes.log to log folder
* Made SERVER_LOG_DIR constant
* Moved FILE_SYSTEM_DIR to GameConstants & Deleted org.apollo.jagcached.Constants
* Removed unused minutes.log from data/data
* Removed Duplicate RSAKeyGen
* Moved RSAKeyGen from com.rs2.net.rsa to com.rs2.util.rsa

* Removed data/net.xml & Created Moved NetworkConstants.java

* Add HTTP & Jaggrab Port's to ConfigLoader

* IntelliJ Reformat ConfigLoader.java

* Fix Mistake

* Attempt #2

* Woops, wrong port
This commit is contained in:
Josh Shippam
2023-02-09 01:05:06 +00:00
committed by GitHub
parent 88a9562e03
commit 55ca851d07
201 changed files with 1264 additions and 12570 deletions
@@ -1,6 +1,6 @@
package com.rs2.gui;
import com.rs2.GameConstants;
import com.rs2.Constants;
import javax.swing.*;
import java.awt.*;
@@ -206,7 +206,7 @@ public class ControlPanel extends JFrame {
EXIT_ITEM = new JMenuItem();
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
setTitle(GameConstants.SERVER_NAME + " ControlPanel");
setTitle(Constants.SERVER_NAME + " ControlPanel");
setBackground(new Color(245, 244, 244));
setResizable(false);
@@ -698,20 +698,20 @@ public class ControlPanel extends JFrame {
SERVER_NAME_LABEL.setText("Server Name:");
SERVER_NAME_TEXT.setText(GameConstants.SERVER_NAME);
SERVER_NAME_TEXT.setText(Constants.SERVER_NAME);
SERVER_NAME_TEXT.setToolTipText("Set the name of the server.");
ADMINS_CAN_TRADE.setSelected(GameConstants.ADMIN_CAN_TRADE);
ADMINS_CAN_TRADE.setSelected(Constants.ADMIN_CAN_TRADE);
ADMINS_CAN_TRADE.setText("Admins can Trade");
ADMINS_CAN_TRADE.setToolTipText("Determins wether or not an admin can trade other players.");
ADMINS_CAN_DROP.setText("Admins can Drop");
ADMINS_CAN_DROP.setSelected(GameConstants.ADMIN_DROP_ITEMS);
ADMINS_CAN_DROP.setSelected(Constants.ADMIN_DROP_ITEMS);
ADMINS_CAN_DROP.setToolTipText("Determins if admins can drop an item.");
ADMINS_CAN_SELL_ITEMS.setText("Admins can sell Items");
ADMINS_CAN_SELL_ITEMS.setSelected(GameConstants.ADMIN_CAN_SELL_ITEMS);
ADMINS_CAN_SELL_ITEMS.setSelected(Constants.ADMIN_CAN_SELL_ITEMS);
ADMINS_CAN_SELL_ITEMS.setToolTipText("Determins if admins can sell items or not.");
UPDATE_SETTINGS.setText("Update Settings");
@@ -975,7 +975,7 @@ public class ControlPanel extends JFrame {
.addContainerGap())
);
pack();
setVisible(GameConstants.GUI_ENABLED);
setVisible(Constants.GUI_ENABLED);
}
// Holds the button commands
@@ -1,7 +1,7 @@
package com.rs2.gui;
import com.rs2.Connection;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.GameEngine;
import com.rs2.game.items.DeprecatedItems;
import com.rs2.game.npcs.Npc;
@@ -71,7 +71,7 @@ public class PanelSettings {
public Client getClient(String name) {
name = name.toLowerCase();
for (int i = 0; i < GameConstants.MAX_PLAYERS; i++) {
for (int i = 0; i < Constants.MAX_PLAYERS; i++) {
if (validClient(i)) {
Client c = getClient(i);
if (c.playerName.toLowerCase().equalsIgnoreCase(name)) {
@@ -87,7 +87,7 @@ public class PanelSettings {
}
public boolean validClient(int id) {
if (id < 0 || id > GameConstants.MAX_PLAYERS)
if (id < 0 || id > Constants.MAX_PLAYERS)
return false;
return validClient(getClient(id));
}
@@ -151,7 +151,7 @@ public class PanelSettings {
SelectedName = SelectedName + getColor(color);
// Sending the message
for (int i = 0; i < GameConstants.MAX_PLAYERS; i++) {
for (int i = 0; i < Constants.MAX_PLAYERS; i++) {
if (validClient(i)) {
Client c = getClient(i);
c.getPacketSender().sendMessage(SelectedName + p.MESSAGE_ALL_TEXT.getText());
@@ -161,7 +161,7 @@ public class PanelSettings {
return;
}
if (cmd.equalsIgnoreCase("Players to Npcs")) {
for (int i = 0; i < GameConstants.MAX_PLAYERS; i++) {
for (int i = 0; i < Constants.MAX_PLAYERS; i++) {
if (validClient(i)) {
Client c = getClient(i);
try {
@@ -183,7 +183,7 @@ public class PanelSettings {
return;
}
if (cmd.equalsIgnoreCase("Update Players")) {
for (int i = 0; i < GameConstants.MAX_PLAYERS; i++) {
for (int i = 0; i < Constants.MAX_PLAYERS; i++) {
if (validClient(i)) {
Client c = getClient(i);
c.isNpc = false;
@@ -211,7 +211,7 @@ public class PanelSettings {
y = tele.getY();
z = tele.getZ();
}
for (int i = 0; i < GameConstants.MAX_PLAYERS; i++) {
for (int i = 0; i < Constants.MAX_PLAYERS; i++) {
if (validClient(i)) {
Client c = getClient(i);
c.getPlayerAssistant().spellTeleport(x, y, z);
@@ -226,7 +226,7 @@ public class PanelSettings {
p.displayMessage("You must enter a message!", cmd, 3);
return;
}
for (int i = 0; i < GameConstants.MAX_PLAYERS; i++) {
for (int i = 0; i < Constants.MAX_PLAYERS; i++) {
if (validClient(i)) {
Client c = getClient(i);
c.forcedChat(msg);
@@ -234,7 +234,7 @@ public class PanelSettings {
}
}
if (cmd.equalsIgnoreCase("Disconnect All")) {
for (int i = 0; i < GameConstants.MAX_PLAYERS; i++) {
for (int i = 0; i < Constants.MAX_PLAYERS; i++) {
if (validClient(i)) {
Client c = getClient(i);
c.disconnected = true;
@@ -327,7 +327,7 @@ public class PanelSettings {
SelectedName = "";
String color = p.MESSAGE_ALL_COLOR_BOX.getSelectedItem().toString();
SelectedName = SelectedName + getColor(color);
for (int i = 0; i < GameConstants.MAX_PLAYERS; i++) {
for (int i = 0; i < Constants.MAX_PLAYERS; i++) {
if (validClient(i)) {
getClient(i).getPacketSender().sendMessage(SelectedName + "Npcs have been reset.");
}
@@ -335,11 +335,11 @@ public class PanelSettings {
return;
}
if (cmd.equalsIgnoreCase("Update Settings")) {
GameConstants.SERVER_NAME = p.SERVER_NAME_TEXT.getText();
GameConstants.ADMIN_CAN_TRADE = p.ADMINS_CAN_TRADE.isSelected();
GameConstants.ADMIN_DROP_ITEMS = p.ADMINS_CAN_DROP.isSelected();
GameConstants.ADMIN_CAN_SELL_ITEMS = p.ADMINS_CAN_SELL_ITEMS.isSelected();
p.setTitle(GameConstants.SERVER_NAME + " ControlPanel");
Constants.SERVER_NAME = p.SERVER_NAME_TEXT.getText();
Constants.ADMIN_CAN_TRADE = p.ADMINS_CAN_TRADE.isSelected();
Constants.ADMIN_DROP_ITEMS = p.ADMINS_CAN_DROP.isSelected();
Constants.ADMIN_CAN_SELL_ITEMS = p.ADMINS_CAN_SELL_ITEMS.isSelected();
p.setTitle(Constants.SERVER_NAME + " ControlPanel");
return;
}