Added log errors option for async display
This commit is contained in:
@@ -51,7 +51,9 @@ class PacketWindowItems(plugin: EcoPlugin) : AbstractPacketAdapter(plugin, Packe
|
||||
try {
|
||||
modifyWindowItems(itemStacks, windowId, player)
|
||||
} catch (e: Exception) {
|
||||
// Don't do anything, just accept defeat
|
||||
if (this.getPlugin().configYml.getBool("async-display.log-errors")) {
|
||||
this.getPlugin().logger.warning("Error happened in async processing! Disable async display (/plugins/eco/config.yml) if this is a frequent issue")
|
||||
}
|
||||
}
|
||||
|
||||
val newPacket = packet.deepClone()
|
||||
|
||||
@@ -51,6 +51,9 @@ async-display:
|
||||
# If async display should always be used.
|
||||
enabled: false
|
||||
|
||||
# Log errors that occur in async processing.
|
||||
log-errors: true
|
||||
|
||||
# If the server is running under heavy load (below a certain TPS value), enable
|
||||
# async display automatically. This can prevent some server crashes under load.
|
||||
emergency:
|
||||
|
||||
Reference in New Issue
Block a user