diff --git a/build.gradle b/build.gradle index bac1215..068b319 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ java { } group = 'me.playbosswar.com' -version = '8.5.7' +version = '8.6.0' description = 'CommandTimer' repositories { @@ -61,7 +61,7 @@ publishing { maven(MavenPublication) { groupId = 'me.playbosswar.com' artifactId = 'commandtimer' - version = '8.5.7' + version = '8.6.0' from components.java } diff --git a/docs/docs/placeholders.md b/docs/docs/placeholders.md index d8cf023..4ea658b 100644 --- a/docs/docs/placeholders.md +++ b/docs/docs/placeholders.md @@ -11,6 +11,7 @@ to replace `task` with your actual task name. - `%commandtimer_task_seconds%`: Get the configured [interval](configuration/schedules#intervals) in seconds - `%commandtimer_task_secondsFormat%`: Same as previous placeholder, but formated as `HH:mm:ss` +- `%commandtimer_ALLTASKS_nextTaskName%`: Show the name of the next task that will be executed - `%commandtimer_task_nextExecution%`: Get the next execution time in seconds - `%commandtimer_task_nextExecutionFormat%`: Same as previous placeholder, but formatted in `HH:mm:ss` - `%commandtimer_task_timeFormat%`: Same as previous placeholder, but you can replace `timeFormat` with a format of your @@ -24,7 +25,7 @@ to take into account all active tasks ## Fallback values -`nextExecution`, `nextExecutionFormat` and `timeFormat` can be suffixed with a fallback value in +`nextExecution`, `nextExecutionFormat`, `timeFormat` and `nextTaskName` can be suffixed with a fallback value in case there is no next execution anymore. For example- `%commandtimer_task_nextExecutionFormat_No next execution%` ## PAPI Placeholders diff --git a/java8-build.gradle b/java8-build.gradle index 2a08b85..9bb8a4e 100644 --- a/java8-build.gradle +++ b/java8-build.gradle @@ -9,7 +9,7 @@ java { } group = 'me.playbosswar.com' -version = '8.5.7' +version = '8.6.0' description = 'CommandTimer' repositories { @@ -69,7 +69,7 @@ publishing { maven(MavenPublication) { groupId = 'me.playbosswar.com' artifactId = 'commandtimer' - version = '8.5.7' + version = '8.6.0' from components.java } diff --git a/src/main/java/me/playbosswar/com/hooks/PAPIPlaceholders.java b/src/main/java/me/playbosswar/com/hooks/PAPIPlaceholders.java index f051f3b..5bfe7f7 100644 --- a/src/main/java/me/playbosswar/com/hooks/PAPIPlaceholders.java +++ b/src/main/java/me/playbosswar/com/hooks/PAPIPlaceholders.java @@ -72,6 +72,10 @@ public String onPlaceholderRequest(Player player, @NotNull String identifier) { return fallbackMessage; } + if(placeholder.getPlaceholderType().equals("nextTaskName")) { + return task.getName(); + } + if(placeholder.getPlaceholderType().equalsIgnoreCase("seconds")) { return getSecondsText(task, fallbackMessage, false);