add trys around canceling tasks to prevent breaking

This commit is contained in:
ajgeiss0702
2020-12-06 15:49:39 -07:00
parent 3de7e77e66
commit d29ce83665
@@ -85,23 +85,33 @@ public class Manager {
*/ */
public void reloadIntervals() { public void reloadIntervals() {
if(sendId != -1) { if(sendId != -1) {
try {
pl.getProxy().getScheduler().cancel(sendId); pl.getProxy().getScheduler().cancel(sendId);
} catch(IllegalArgumentException e) {}
sendId = -1; sendId = -1;
} }
if(updateId != -1) { if(updateId != -1) {
try {
pl.getProxy().getScheduler().cancel(updateId); pl.getProxy().getScheduler().cancel(updateId);
} catch(IllegalArgumentException e) {}
updateId = -1; updateId = -1;
} }
if(messagerId != -1) { if(messagerId != -1) {
try {
pl.getProxy().getScheduler().cancel(messagerId); pl.getProxy().getScheduler().cancel(messagerId);
} catch(IllegalArgumentException e) {}
messagerId = -1; messagerId = -1;
} }
if(actionbarId != -1) { if(actionbarId != -1) {
try {
pl.getProxy().getScheduler().cancel(actionbarId); pl.getProxy().getScheduler().cancel(actionbarId);
} catch(IllegalArgumentException e) {}
actionbarId = -1; actionbarId = -1;
} }
if(srvRefId != -1) { if(srvRefId != -1) {
try {
pl.getProxy().getScheduler().cancel(srvRefId); pl.getProxy().getScheduler().cancel(srvRefId);
} catch(IllegalArgumentException e) {}
srvRefId = -1; srvRefId = -1;
} }