More comments
This commit is contained in:
parent
2476e379e5
commit
cf0d1f7fff
@ -50,7 +50,6 @@ public class Main {
|
||||
setup();
|
||||
new ServerConsoles();
|
||||
Profile.load();
|
||||
|
||||
ScheduledExecutorService exec = Executors.newSingleThreadScheduledExecutor();
|
||||
exec.scheduleAtFixedRate(Main::updateConsoles, 10, 500, TimeUnit.MILLISECONDS);
|
||||
} catch (Exception e) {
|
||||
|
@ -42,6 +42,11 @@ public class ServerType {
|
||||
return serverTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a list of all server types' names.
|
||||
*
|
||||
* @return A list of strings
|
||||
*/
|
||||
public static String[] getTypeNames() {
|
||||
ArrayList<ServerType> types = ServerType.getServerTypes();
|
||||
String[] serverTypes = new String[types.size()];
|
||||
@ -51,6 +56,12 @@ public class ServerType {
|
||||
return serverTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a server type by name.
|
||||
*
|
||||
* @param name Then name of the server type
|
||||
* @return A ServerType
|
||||
*/
|
||||
public static ServerType getByName(String name) {
|
||||
for (ServerType serverType : serverTypes) {
|
||||
if (serverType.getName().equals(name)) {
|
||||
|
Loading…
Reference in New Issue
Block a user