This repository was archived by the owner on Jul 8, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
src/main/java/net/mcapi/uuid Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff 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 () {
Original file line number Diff line number Diff line change 2222public 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
You can’t perform that action at this time.
0 commit comments