File tree Expand file tree Collapse file tree
fabric-1.16/src/main/java/net/azisaba/interchatmod/fabric
fabric-1.17/src/main/java/net/azisaba/interchatmod/fabric
fabric-1.18/src/main/java/net/azisaba/interchatmod/fabric
fabric-1.19/src/main/java/net/azisaba/interchatmod/fabric
fabric-1.20/src/main/java/net/azisaba/interchatmod/fabric
fabric-1.21.11/src/main/java/net/azisaba/interchatmod/fabric
fabric-1.21.8/src/main/java/net/azisaba/interchatmod/fabric
fabric-1.21/src/main/java/net/azisaba/interchatmod/fabric
forge-1.15/src/main/java/net/azisaba/interchatmod/forge Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ public void onInitialize() {
4444 TIMER .schedule (new TimerTask () {
4545 @ Override
4646 public void run () {
47+ if (ModConfig .apiKey .isEmpty ()) return ;
4748 try {
4849 Gson gson = new Gson ();
4950 JsonArray arr = gson .fromJson (makeRequest ("interchat/guilds/list" ), JsonArray .class );
@@ -119,6 +120,7 @@ public static boolean isInAzisaba() {
119120 }
120121
121122 public static void trySwitch () {
123+ if (ModConfig .apiKey .isEmpty ()) return ;
122124 if (client == null ) return ;
123125 ServerInfo serverData = MinecraftClient .getInstance ().getCurrentServerEntry ();
124126 if (serverData != null ) {
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ public void onInitialize() {
4747 TIMER .schedule (new TimerTask () {
4848 @ Override
4949 public void run () {
50+ if (ModConfig .apiKey .isEmpty ()) return ;
5051 try {
5152 Gson gson = new Gson ();
5253 JsonArray arr = gson .fromJson (makeRequest ("interchat/guilds/list" ), JsonArray .class );
@@ -118,6 +119,7 @@ public static boolean isInAzisaba() {
118119 }
119120
120121 public static void trySwitch () {
122+ if (ModConfig .apiKey .isEmpty ()) return ;
121123 if (client == null ) return ;
122124 ServerInfo serverData = MinecraftClient .getInstance ().getCurrentServerEntry ();
123125 if (serverData != null ) {
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ public void onInitialize() {
4747 TIMER .schedule (new TimerTask () {
4848 @ Override
4949 public void run () {
50+ if (ModConfig .apiKey .isEmpty ()) return ;
5051 try {
5152 Gson gson = new Gson ();
5253 JsonArray arr = gson .fromJson (makeRequest ("interchat/guilds/list" ), JsonArray .class );
@@ -118,6 +119,7 @@ public static boolean isInAzisaba() {
118119 }
119120
120121 public static void trySwitch () {
122+ if (ModConfig .apiKey .isEmpty ()) return ;
121123 if (client == null ) return ;
122124 ServerInfo serverData = MinecraftClient .getInstance ().getCurrentServerEntry ();
123125 if (serverData != null ) {
Original file line number Diff line number Diff line change 1616import org .slf4j .Logger ;
1717import org .slf4j .LoggerFactory ;
1818
19- import javax .net .ssl .SSLContext ;
20- import javax .net .ssl .SSLSocketFactory ;
2119import java .io .IOException ;
2220import java .net .HttpURLConnection ;
2321import java .net .URI ;
@@ -47,6 +45,7 @@ public void onInitialize() {
4745 TIMER .schedule (new TimerTask () {
4846 @ Override
4947 public void run () {
48+ if (CONFIG .apiKey ().isEmpty ()) return ;
5049 try {
5150 Gson gson = new Gson ();
5251 JsonArray arr = gson .fromJson (makeRequest ("interchat/guilds/list" ), JsonArray .class );
@@ -122,6 +121,7 @@ public static boolean isInAzisaba() {
122121 }
123122
124123 public static void trySwitch () {
124+ if (CONFIG .apiKey ().isEmpty ()) return ;
125125 if (client == null ) return ;
126126 ServerInfo serverData = MinecraftClient .getInstance ().getCurrentServerEntry ();
127127 if (serverData != null ) {
Original file line number Diff line number Diff line change 1616import org .slf4j .Logger ;
1717import org .slf4j .LoggerFactory ;
1818
19- import javax .net .ssl .SSLContext ;
20- import javax .net .ssl .SSLSocketFactory ;
2119import java .io .IOException ;
2220import java .net .HttpURLConnection ;
2321import java .net .URI ;
@@ -47,6 +45,7 @@ public void onInitialize() {
4745 TIMER .schedule (new TimerTask () {
4846 @ Override
4947 public void run () {
48+ if (CONFIG .apiKey ().isEmpty ()) return ;
5049 try {
5150 Gson gson = new Gson ();
5251 JsonArray arr = gson .fromJson (makeRequest ("interchat/guilds/list" ), JsonArray .class );
@@ -122,6 +121,7 @@ public static boolean isInAzisaba() {
122121 }
123122
124123 public static void trySwitch () {
124+ if (CONFIG .apiKey ().isEmpty ()) return ;
125125 if (client == null ) return ;
126126 ServerInfo serverData = MinecraftClient .getInstance ().getCurrentServerEntry ();
127127 if (serverData != null ) {
Original file line number Diff line number Diff line change 1818import org .slf4j .Logger ;
1919import org .slf4j .LoggerFactory ;
2020
21- import javax .net .ssl .SSLContext ;
22- import javax .net .ssl .SSLSocketFactory ;
2321import java .io .IOException ;
2422import java .net .HttpURLConnection ;
2523import java .net .URI ;
@@ -50,6 +48,7 @@ public void onInitialize() {
5048 TIMER .schedule (new TimerTask () {
5149 @ Override
5250 public void run () {
51+ if (CONFIG .apiKey .isEmpty ()) return ;
5352 try {
5453 Gson gson = new Gson ();
5554 JsonArray arr = gson .fromJson (makeRequest ("interchat/guilds/list" ), JsonArray .class );
@@ -159,6 +158,7 @@ public static boolean isInAzisaba() {
159158 }
160159
161160 public static void trySwitch () {
161+ if (CONFIG .apiKey .isEmpty ()) return ;
162162 if (client == null ) return ;
163163 ServerInfo serverData = MinecraftClient .getInstance ().getCurrentServerEntry ();
164164 if (serverData != null ) {
Original file line number Diff line number Diff line change 1919import org .slf4j .Logger ;
2020import org .slf4j .LoggerFactory ;
2121
22- import javax .net .ssl .SSLContext ;
23- import javax .net .ssl .SSLSocketFactory ;
2422import java .io .IOException ;
2523import java .net .HttpURLConnection ;
2624import java .net .URI ;
@@ -50,6 +48,7 @@ public void onInitialize() {
5048 TIMER .schedule (new TimerTask () {
5149 @ Override
5250 public void run () {
51+ if (CONFIG .apiKey ().isEmpty ()) return ;
5352 try {
5453 Gson gson = new Gson ();
5554 JsonArray arr = gson .fromJson (makeRequest ("interchat/guilds/list" ), JsonArray .class );
@@ -163,6 +162,7 @@ public static boolean isInAzisaba() {
163162 }
164163
165164 public static void trySwitch () {
165+ if (CONFIG .apiKey ().isEmpty ()) return ;
166166 if (client == null ) return ;
167167 ServerInfo serverData = MinecraftClient .getInstance ().getCurrentServerEntry ();
168168 if (serverData != null ) {
Original file line number Diff line number Diff line change 1919import org .slf4j .Logger ;
2020import org .slf4j .LoggerFactory ;
2121
22- import javax .net .ssl .SSLContext ;
23- import javax .net .ssl .SSLSocketFactory ;
2422import java .io .IOException ;
2523import java .net .HttpURLConnection ;
2624import java .net .URI ;
@@ -50,6 +48,7 @@ public void onInitialize() {
5048 TIMER .schedule (new TimerTask () {
5149 @ Override
5250 public void run () {
51+ if (CONFIG .apiKey ().isEmpty ()) return ;
5352 try {
5453 Gson gson = new Gson ();
5554 JsonArray arr = gson .fromJson (makeRequest ("interchat/guilds/list" ), JsonArray .class );
@@ -163,6 +162,7 @@ public static boolean isInAzisaba() {
163162 }
164163
165164 public static void trySwitch () {
165+ if (CONFIG .apiKey ().isEmpty ()) return ;
166166 if (client == null ) return ;
167167 ServerInfo serverData = MinecraftClient .getInstance ().getCurrentServerEntry ();
168168 if (serverData != null ) {
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ public Mod() {
4444 TIMER .schedule (new TimerTask () {
4545 @ Override
4646 public void run () {
47+ if (ModConfig .apiKey .isEmpty ()) return ;
4748 try {
4849 Gson gson = new Gson ();
4950 JsonArray arr = gson .fromJson (makeRequest ("interchat/guilds/list" ), JsonArray .class );
@@ -119,6 +120,7 @@ public static boolean isInAzisaba() {
119120 }
120121
121122 public static void trySwitch () {
123+ if (ModConfig .apiKey .isEmpty ()) return ;
122124 if (client == null ) return ;
123125 ServerData serverData = Minecraft .getInstance ().getCurrentServerData ();
124126 if (serverData != null ) {
You can’t perform that action at this time.
0 commit comments