Skip to content
This repository was archived by the owner on Jul 8, 2020. It is now read-only.

Commit 74adda3

Browse files
committed
1.0.0 release
Added zeta to EU. Other minor fixes
1 parent 0e7c86c commit 74adda3

3 files changed

Lines changed: 8 additions & 16 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>net.mcapi.uuid</groupId>
44
<artifactId>uuid-java</artifactId>
5-
<version>0.0.5</version>
5+
<version>1.0.0</version>
66
<name>uuid-java</name>
77

88
<scm>

src/main/java/net/mcapi/uuid/ServerRegion.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public enum ServerRegion {
1313
/**
1414
* European servers
1515
*/
16-
EU("eu.mc-api.net", "Delta"),
16+
EU("eu.mc-api.net", "Delta", "Zeta"),
1717

1818
/**
1919
* American servers
@@ -29,15 +29,15 @@ public enum ServerRegion {
2929
private boolean https = true;
3030
private String[] servers;
3131

32-
private ServerRegion(String hostname, String... servers) {
32+
private ServerRegion(String hostname, String... serverNames) {
3333
this.hostname = hostname;
34-
this.servers = servers;
34+
this.servers = serverNames;
3535
}
3636

37-
private ServerRegion(String hostname, boolean https, String... servers) {
37+
private ServerRegion(String hostname, boolean https, String... serverNames) {
3838
this.hostname = hostname;
3939
this.https = https;
40-
this.servers = servers;
40+
this.servers = serverNames;
4141
}
4242

4343
public String getHostname() {

src/main/java/net/mcapi/uuid/UUIDAPI.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
public class UUIDAPI {
2323

2424
private static UUIDHandler handler;
25-
private static Set<UUIDHandler> handlers = new HashSet<UUIDHandler>();
25+
private final static Set<UUIDHandler> handlers = new HashSet<UUIDHandler>();
2626
private static ServerRegion region;
2727

2828
/**
@@ -55,15 +55,7 @@ public static void setHandler(UUIDHandler newHandler) {
5555
* @return the {@link UUIDHandler handler} we are using to process requests
5656
*/
5757
public static UUIDHandler getHandler() {
58-
if(handler == null) {
59-
if(handlers.size() == 0) {
60-
handlers.add(new JavaHandler());
61-
handlers.add(new BukkitHandler());
62-
handlers.add(new BungeeHandler());
63-
}
64-
handler = new JavaHandler();
65-
}
66-
58+
Preconditions.checkArgument(handler != null, "Handler cannot be null!");
6759
return handler;
6860
}
6961

0 commit comments

Comments
 (0)