2014-08-01 23:56:29 +02:00
|
|
|
package mineplex.serverdata;
|
|
|
|
|
2015-03-14 22:41:16 +01:00
|
|
|
import java.io.File;
|
|
|
|
|
2014-08-01 23:56:29 +02:00
|
|
|
/**
|
|
|
|
* Region enumerates the various geographical regions where Mineplex servers are
|
|
|
|
* hosted.
|
|
|
|
* @author Ty
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public enum Region
|
|
|
|
{
|
|
|
|
US,
|
2014-08-14 14:41:04 +02:00
|
|
|
EU,
|
2014-09-22 02:42:47 +02:00
|
|
|
ALL;
|
2015-03-14 22:41:16 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return the geographical {@link Region} of the current running process.
|
|
|
|
*/
|
|
|
|
public static Region currentRegion()
|
|
|
|
{
|
|
|
|
return !new File("eu.dat").exists() ? Region.US : Region.EU;
|
|
|
|
}
|
2014-08-01 23:56:29 +02:00
|
|
|
}
|