#937 Add option for AuthMe to run in sync
- Create BukkitService#runTaskOptionallyAsync and BukkitService#scheduleSyncTaskFromOptionallyAsyncTask whose behavior depends on a new setting - Use the new methods where applicable - Declare events async or sync depending on the new setting
This commit is contained in:
@@ -68,6 +68,13 @@ public class PluginSettings implements SettingsHolder {
|
||||
public static final Property<LogLevel> LOG_LEVEL =
|
||||
newProperty(LogLevel.class, "settings.logLevel", LogLevel.FINE);
|
||||
|
||||
@Comment({
|
||||
"By default we schedule async tasks when talking to the database",
|
||||
"If you want typical communication with the database to happen synchronously, set this to false"
|
||||
})
|
||||
public static final Property<Boolean> USE_ASYNC_TASKS =
|
||||
newProperty("settings.useAsyncTasks", true);
|
||||
|
||||
private PluginSettings() {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user