Check PAPI Debug before printing the error
This commit is contained in:
1 parent
2842d0d8f9
commit
a832abeff3
1 file changed
+4
-2
@@ -114,8 +114,10 @@ public class ServerExpansion extends PlaceholderExpansion implements Cacheable,
|
||||
try {
|
||||
return String.valueOf(cache.get(key, callable));
|
||||
} catch (ExecutionException e) {
|
||||
getPlaceholderAPI().getLogger().log(Level.SEVERE, "[server] Could not access cache key " + key, e);
|
||||
return "Error: " + e.getMessage() + " (see console)";
|
||||
if (getPlaceholderAPI().getPlaceholderAPIConfig().isDebugMode()) {
|
||||
getPlaceholderAPI().getLogger().log(Level.SEVERE, "[server] Could not access cache key " + key, e);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user