mirror of
https://github.com/PikaMug/Quests.git
synced 2025-01-08 09:27:56 +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;
|
long delay;
|
||||||
try {
|
try {
|
||||||
final int i = Integer.parseInt(input);
|
final long l = Long.parseLong(input);
|
||||||
delay = i * 1000;
|
delay = l * 1000;
|
||||||
if (delay < 1) {
|
if (delay < 1) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorPositiveAmount"));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorPositiveAmount"));
|
||||||
} else {
|
} else {
|
||||||
@ -279,8 +279,8 @@ public class PlannerPrompt extends QuestsEditorNumericPrompt {
|
|||||||
}
|
}
|
||||||
long delay;
|
long delay;
|
||||||
try {
|
try {
|
||||||
final int i = Integer.parseInt(input);
|
final long l = Long.parseLong(input);
|
||||||
delay = i * 1000;
|
delay = l * 1000;
|
||||||
if (delay < 1) {
|
if (delay < 1) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorPositiveAmount"));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorPositiveAmount"));
|
||||||
} else {
|
} else {
|
||||||
@ -369,7 +369,7 @@ public class PlannerPrompt extends QuestsEditorNumericPrompt {
|
|||||||
|
|
||||||
private String getPrettyDate(final String formattedDate) {
|
private String getPrettyDate(final String formattedDate) {
|
||||||
final Calendar cal = Calendar.getInstance();
|
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 SimpleDateFormat timeFormat = new SimpleDateFormat("hh:mm:ss");
|
||||||
final String[] date = formattedDate.split(":");
|
final String[] date = formattedDate.split(":");
|
||||||
final int day = Integer.valueOf(date[0]);
|
final int day = Integer.valueOf(date[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user