mirror of
https://github.com/PikaMug/Quests.git
synced 2025-01-07 08:58:30 +01:00
Properly store repeat/cooldown values greater than max int, fixes #1523
This commit is contained in:
parent
7f8fb8e0f8
commit
a408b77c60
@ -228,8 +228,8 @@ public class PlannerPrompt extends QuestsEditorNumericPrompt {
|
||||
}
|
||||
long delay;
|
||||
try {
|
||||
final int i = Integer.parseInt(input);
|
||||
delay = i * 1000;
|
||||
final long l = Long.parseLong(input);
|
||||
delay = l * 1000;
|
||||
if (delay < 1) {
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorPositiveAmount"));
|
||||
} else {
|
||||
@ -279,8 +279,8 @@ public class PlannerPrompt extends QuestsEditorNumericPrompt {
|
||||
}
|
||||
long delay;
|
||||
try {
|
||||
final int i = Integer.parseInt(input);
|
||||
delay = i * 1000;
|
||||
final long l = Long.parseLong(input);
|
||||
delay = l * 1000;
|
||||
if (delay < 1) {
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorPositiveAmount"));
|
||||
} else {
|
||||
@ -369,7 +369,7 @@ public class PlannerPrompt extends QuestsEditorNumericPrompt {
|
||||
|
||||
private String getPrettyDate(final String formattedDate) {
|
||||
final Calendar cal = Calendar.getInstance();
|
||||
final SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
|
||||
final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/dd/MM");
|
||||
final SimpleDateFormat timeFormat = new SimpleDateFormat("hh:mm:ss");
|
||||
final String[] date = formattedDate.split(":");
|
||||
final int day = Integer.valueOf(date[0]);
|
||||
|
Loading…
Reference in New Issue
Block a user