Time operating expansion for PlaceholderAPI
- Download jar file from releases.
- Put the jar file to
/plugins/PlaceholderAPI/expansions/
- Execute command
/papi register <filename>
or/papi reload
or restart server.
// Arguments: <Required> [Optional]
%timeoperate_<time>_<display format>[_<time override>]%
Type {placeholder}
or (placeholder)
if you want to use some placeholders in arguments.
I am not a native English speaker. There are maybe some typo errors.
value | detail | example |
---|---|---|
now | now time | now |
timestamp | timestamp (in seconds) | 1675353600 |
Formatter|value | specific format time | yyyy-MM-dd|2023-02-03 |
Use unix
for returning timestamp (in seconds).
Or read the DateTimeFormatter Javadoc page about possible formats.
e.g. yyyy-MM-dd
(2024-08-10), HH:mm:ss
(11:45:14)
value | detail | example |
---|---|---|
+DURATION | plus time, needed number and unit (ignore case),
|
+1d2h |
-DURATION | minus time, needed number and unit (ignore case),
|
-1d2h |
unit=value | set specific time, needed unit and number (case sensitivity),
|
y=2023 |
hour:minute:second | set hour, minute and second in a more simple way, type ~ means not modify |
4:0:0 , 6:0 (full 06:00:00 ), 20:05 (full 20:05:00 ), 11:45:14 |
Support multi overrides, connect them with _
.
// Get timestamp (in second) of tomorrow 6:00
%timeoperate_now_unix_+1d_6:00%
// Get time of tomorrow but minute and second are 0 with custom format
%timeoperate_now_yyyy/MM/dd HH:mm:ss_+1d_~:0:0%
// give player temp permission by LuckPerms, expire in tomorrow 4:00
/lp user %player_name% permission settemp your.perm.here true %timeoperate_now_unix_+1d_4:00%