diff --git a/src/main/java/net/frozenorb/apiv3/model/Rank.java b/src/main/java/net/frozenorb/apiv3/model/Rank.java index 6b1971e..a679b97 100644 --- a/src/main/java/net/frozenorb/apiv3/model/Rank.java +++ b/src/main/java/net/frozenorb/apiv3/model/Rank.java @@ -40,7 +40,7 @@ public final class Rank { } public static Rank findById(String id) { - return rankIdCache.get(id.toLowerCase()); + return id == null ? null : rankIdCache.get(id.toLowerCase()); } static { diff --git a/src/main/java/net/frozenorb/apiv3/model/Server.java b/src/main/java/net/frozenorb/apiv3/model/Server.java index 2240ec2..b494236 100644 --- a/src/main/java/net/frozenorb/apiv3/model/Server.java +++ b/src/main/java/net/frozenorb/apiv3/model/Server.java @@ -39,7 +39,7 @@ public final class Server { } public static Server findById(String id) { - return serverIdCache.get(id.toLowerCase()); + return id == null ? null : serverIdCache.get(id.toLowerCase()); } static { diff --git a/src/main/java/net/frozenorb/apiv3/model/ServerGroup.java b/src/main/java/net/frozenorb/apiv3/model/ServerGroup.java index 31c819d..8cb5476 100644 --- a/src/main/java/net/frozenorb/apiv3/model/ServerGroup.java +++ b/src/main/java/net/frozenorb/apiv3/model/ServerGroup.java @@ -37,7 +37,7 @@ public final class ServerGroup { } public static ServerGroup findById(String id) { - return serverGroupIdCache.get(id.toLowerCase()); + return id == null ? null : serverGroupIdCache.get(id.toLowerCase()); } public static ServerGroup findDefault() {