Server/Management-Server/src/org/keldagrim/ServerConstants.java
Qweqker b233b0650e New Accounts will now automatically join the 2009Scape clan chat (#60)
Renamed the Server's account to '2009Scape' within the members table of the global.sql database
The automatic clan chat join can be toggled on or off on the Management Server's ServerConstants.java file
Added some text in the TutorialCompletionDialogue.java file to simulate joining the clan once the player has reached the mainland.
Added some comments along with my changes to properly denote what is happening.
Added spawns for Melee Dummy and Magic Dummy in the Lumbridge Combat Hall in the server.sql database.
2020-01-20 21:10:11 -05:00

92 lines
No EOL
2 KiB
Java

package org.keldagrim;
import org.apache.commons.io.FilenameUtils;
import org.keldagrim.system.OperatingSystem;
/**
* Holds constants for the management server.
* @author v4rg
*
*/
public final class ServerConstants {
/**
* The port to be used for communications.
*/
public static final String SERVER_NAME = "2009Scape";
/**
* The port to be used for communications.
*/
public static final int PORT = 5555;
/**
* The maximum amount of worlds.
*/
public static final int WORLD_LIMIT = 10;
/**
* The world switching delay in milliseconds.
*/
public static final long WORLD_SWITCH_DELAY = 20_000l;
/**
* The address of the Management server.
*/
public static final String HOST_ADDRESS = "127.0.0.1";
/**
* The setting that determines whether new accounts created will automatically join the Server's default clan chat.
*/
public static boolean NEW_PLAYER_DEFAULT_CLAN = false;
/**
* The store path.
*/
public static final String STORE_PATH = "./store/";
/**
* The maximum amount of players per world.
*/
public static final int MAX_PLAYERS = (1 << 11) - 1;
/**
* The operating system of the management server
*/
public static final OperatingSystem OS = System.getProperty("os.name").toUpperCase().contains("WIN") ? OperatingSystem.WINDOWS : OperatingSystem.UNIX;
/**
* The administrators.
*/
public static final String[] ADMINISTRATORS = {
"ethan",
"austin",
"redsparr0w",
};
public static final String[] DATABASE_NAMES = {
"server",
"global",
};
/**
* Stops from instantiating.
*/
private ServerConstants() {
/*
* empty.
*/
}
/**
* Fixes a path to a specified operating system
* @param operatingSystem The os type.
* @param path The path.
* @return The fixed path.
*/
public static String fixPath(OperatingSystem operatingSystem, String path) {
if (operatingSystem == null)
operatingSystem = OS;
return operatingSystem == OperatingSystem.WINDOWS ? FilenameUtils.separatorsToWindows(path) : FilenameUtils.separatorsToUnix(path);
}
}