File tree Expand file tree Collapse file tree
src/main/java/net/earthmc/emcapi/endpoint/towny Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,17 +111,17 @@ private JsonArray getRankArray(List<String> ranks) {
111111 }
112112
113113 private String getDiscordId (UUID uuid ) {
114- if (!Integrations .getIntegration ("DiscordSRV" ).isEnabled ()) {
114+ if (!Integrations .getIntegration ("DiscordSRV" ).isEnabled () || DiscordSRV . getPlugin (). getAccountLinkManager () == null ) {
115115 return null ;
116116 }
117+
117118 return DiscordSRV .getPlugin ().getAccountLinkManager ().getDiscordId (uuid );
118119 }
119120
120121 private UUID getUUIDFromDiscordId (String discordId ) {
121- if (!Integrations .getIntegration ("DiscordSRV" ).isEnabled ()) {
122+ if (!Integrations .getIntegration ("DiscordSRV" ).isEnabled () || ! DISCORD_ID_PATTERN . matcher ( discordId ). find () || DiscordSRV . getPlugin (). getAccountLinkManager () == null ) {
122123 return null ;
123124 }
124- if (!DISCORD_ID_PATTERN .matcher (discordId ).find ()) return null ;
125125
126126 return DiscordSRV .getPlugin ().getAccountLinkManager ().getUuid (discordId );
127127 }
You can’t perform that action at this time.
0 commit comments