mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
fancydialogs: Fix cast exception caused by close_timeout config option
This commit is contained in:
@@ -1 +1 @@
|
||||
0.0.27
|
||||
0.0.28
|
||||
@@ -12,7 +12,7 @@ public class FancyDialogsConfig {
|
||||
private String logLevel;
|
||||
private String welcomeDialogID;
|
||||
private String quickActionsDialogID;
|
||||
private long closeTimeout;
|
||||
private int closeTimeout;
|
||||
|
||||
public void load() {
|
||||
FancyDialogsPlugin.get().reloadConfig();
|
||||
@@ -30,7 +30,7 @@ public class FancyDialogsConfig {
|
||||
quickActionsDialogID = (String) ConfigHelper.getOrDefault(config, "quick_actions_dialog_id", "quick_actions");
|
||||
config.setInlineComments("quick_actions_dialog_id", List.of("The ID of the dialog which will be shown to the player when they click on the quick actions key ('G' by default)."));
|
||||
|
||||
closeTimeout = (long) ConfigHelper.getOrDefault(config, "close_timeout", 1000L * 60 * 2);
|
||||
closeTimeout = (int) ConfigHelper.getOrDefault(config, "close_timeout", 1000 * 60 * 2);
|
||||
config.setInlineComments("close_timeout", List.of("The time in milliseconds after which a dialog will be considered closed if the player does not respond. 0 means no timeout."));
|
||||
|
||||
FancyDialogsPlugin.get().saveConfig();
|
||||
@@ -52,7 +52,7 @@ public class FancyDialogsConfig {
|
||||
return quickActionsDialogID;
|
||||
}
|
||||
|
||||
public long getCloseTimeout() {
|
||||
public int getCloseTimeout() {
|
||||
return closeTimeout;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user