a simple timer plugin
create quick and easy timers
Commands:
/simpletimer
/stimer set <HH:MM:SS> <ID> <color> <sound> <text>
Important arguments:
HH:MM:SS - simple time format
ID - add a unique id to your timer
Optional arguments:
color- you can choose the color of the bossbar: BLUE, GREEN, PINK, PURPLE, RED, WHITE or YELLOW.
sound - can be true or false, the sound per second is specified in the config
text - The text that will have the title of the bossbar must be enclosed in " " and you can use the following placeholders: <HH:MM:SS> <MM:SS> <HH> <MM> <SS> (you can also use color code or hexadecimal colors).
/stimer modify <ID> <modifier> <value>
Important arguments:
ID - a timer id
modifier- a modifier for the timer
add - add time
set - set a time
take - take time
pause - pause a timer
resume - resume a timer
maxvalue - set a max timer value
minvalue - set a min timer value
value- the value for the modifier (some modifiers don't need a value):
add/set/take/maxvalue/minvalue - need a value (HH:MM:SS)
pause/resume - they don't need value
/stimer remove <ID>
/stimer list
/stimer reload
Usage Example:
/stimer set00:05:00test
/stimer set 00:03:00test RED true "&cMy Timer: #751436<timer>"
/stimer modify test add 00:00:30
/stimer modifytest pause
/stimermodifytest resume
/stimermodifytest reset
/stimerremove test
It works with a simple time format (HH:MM:SS), where H stands for hours, M stands for minutes and S stands for seconds.
Placeholder: requires the PlaceholderAPI plugin to work
%simpletimer_hhmmss_<ID>%HH:MM:SS (00:00:00)
%simpletimer_mmss_<ID>%MM:SS (00:00)
%simpletimer_hh_<ID>%HH (00) hours
%simpletimer_mm_<ID>%MM (00) minutes
%simpletimer_ss_<ID>%SS (00) seconds
Permissions:
simpletimer.all
Oh, and if for some reason you want to remove all timers, use "/stimer remove all"
Code (YAML):
#----------------------------------------------------------------------- #Here you can configure some parameters of the timers. #-----------------------------------------------------------------------[/SIZE] timer: #This option indicates how long in seconds the timer should wait after finishing to clear the bossbar. time_after_ending: 1
#This option disables the bossbar, but the timer still works. bossbar: true
#This option gives the default color to the bossbar bossbar-color: WHITE
#This option you can determine the sound of the timer if it is active timer-sound: UI_BUTTON_CLICK
[SIZE=4
]
This is a small api to use in your plugins
Events:
Code (Java):
//called when a timer is created @EventHandler
publicvoid onTimerCreate
(TimerCreateEvent event
){