Ignore error from player no longer being online
This commit is contained in:
+1
-1
@@ -41,7 +41,7 @@ public class EstimatedTime extends Placeholder {
|
||||
cache.put(p.getUniqueId(), response.getEither());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (TimeoutException ignored) {}
|
||||
} catch (TimeoutException | IllegalArgumentException ignored) {}
|
||||
});
|
||||
|
||||
return cache.getOrDefault(p.getUniqueId(), "...");
|
||||
|
||||
@@ -40,7 +40,7 @@ public class InQueue extends Placeholder {
|
||||
cache.put(p.getUniqueId(), response + "");
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (TimeoutException ignored) {}
|
||||
} catch (TimeoutException | IllegalArgumentException ignored) {}
|
||||
});
|
||||
|
||||
return cache.getOrDefault(p.getUniqueId(), "...");
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ public class Position extends Placeholder {
|
||||
cache.put(p.getUniqueId(), response.getEither());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (TimeoutException ignored) {}
|
||||
} catch (TimeoutException | IllegalArgumentException ignored) {}
|
||||
});
|
||||
|
||||
return cache.getOrDefault(p.getUniqueId(), "...");
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ public class PositionOf extends Placeholder {
|
||||
cache.put(p.getUniqueId(), response.getEither());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (TimeoutException ignored) {}
|
||||
} catch (TimeoutException | IllegalArgumentException ignored) {}
|
||||
});
|
||||
|
||||
return cache.getOrDefault(p.getUniqueId(), "...");
|
||||
|
||||
@@ -41,7 +41,7 @@ public class Queued extends Placeholder {
|
||||
cache.put(p.getUniqueId(), response.getEither());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (TimeoutException ignored) {}
|
||||
} catch (TimeoutException | IllegalArgumentException ignored) {}
|
||||
});
|
||||
|
||||
return cache.getOrDefault(p.getUniqueId(), "...");
|
||||
|
||||
@@ -50,7 +50,7 @@ public class Status extends Placeholder {
|
||||
} else {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
} catch (TimeoutException ignored) {}
|
||||
} catch (TimeoutException | IllegalArgumentException ignored) {}
|
||||
});
|
||||
|
||||
return cached;
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ public class StatusPlayer extends Placeholder {
|
||||
cache.put(key, response);
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (TimeoutException ignored) {}
|
||||
} catch (TimeoutException | IllegalArgumentException ignored) {}
|
||||
});
|
||||
|
||||
return cache.getOrDefault(key, "...");
|
||||
|
||||
Reference in New Issue
Block a user