Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@
*.iml
*.ipr
*.iws
.idea/
.idea/

.DS_Store
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import net.buycraft.plugin.data.responses.DueQueueInformation;

import java.io.IOException;
import java.net.SocketTimeoutException;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
Expand Down Expand Up @@ -64,6 +65,11 @@ public void run(boolean scheduleAgain) {
return;
}
nextCheck = information.getMeta().getNextCheck();
} catch (SocketTimeoutException e) {
if (verbose) {
platform.log(Level.SEVERE, "Could not fetch due players queue", e);
}
return;
} catch (IOException e) {
platform.log(Level.SEVERE, "Could not fetch due players queue", e);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import net.buycraft.plugin.data.ServerEvent;

import java.io.IOException;
import java.net.SocketTimeoutException;
import java.util.List;
import java.util.logging.Level;

Expand All @@ -27,7 +28,7 @@ public void run() {
return;
}

if(platform.getServerInformation() == null || !platform.getServerInformation().getAccount().isLogEvents()) {
if (platform.getServerInformation() == null || !platform.getServerInformation().getAccount().isLogEvents()) {
return;
}

Expand All @@ -37,6 +38,11 @@ public void run() {
try {
if (verbose) platform.log(Level.INFO, "Sending " + runEvents.size() + " analytic events");
platform.getApiClient().sendEvents(runEvents).execute();
} catch (SocketTimeoutException e) {
if (verbose) {
platform.log(Level.SEVERE, "Failed to send analytic events!", e);
}
return;
} catch (IOException | BuyCraftAPIException e) {
platform.log(Level.SEVERE, "Failed to send analytic events!", e);
return;
Expand Down