A plugin to replicate that childhood feeling of going through an advent calendar!
After seeing how few advent calendar plugins there are and how mediocre they are (specifically a bloated paid one I shall not name), I decided to create my own to fit my needs.
This plugin provides an advent calendar, and most importantly the framework for one. If you don't like the menu, it's super easy to use commands and placeholders to create your own.
Usage
This plugin requires RedLib.
To add items and commands to presents, enter the editor with /acal editor.
Players will use /acal to open the GUI (you must grant the acal.menu permission!)
Commands
/adventurecalendar (/acal):
- reload - reload the config
- edit - enter the present editor
- claim [player] [day] [-f] - claim a present as if you were clicking in the GUI (all arguments are optional, day will default to current day, use -f to bypass all checks and grant rewards for that day regardless)
- reset [player/everyone] [day/all] - reset claim status for someone specific or everybody, of a specific present or all presents (defaults to resetting your present for the current day)
Permissions
- acal.menu - required to open the menu with /ac (recommended player permission)
- acal.reload - /acal reload
- acal.edit - /acal edit
- acal.claim - /acal claim (command only - will not change ability to claim via the GUI)
- acal.reset - /acal reset
- acal.bypass - open the GUI outside of the intended month
- acal.claim.others - ability to use /acal claim on other players
- acal.claim.force - ability to use -f in /acal claim to bypass cooldowns
Config
- month - the month during which to activate the calendar
- first-day, last-day - days between which presents will be avaliable
- sql - optional, used to fill out info for a MySQL database
- items - info for different display items in the /ac menu
- Supports Head Database, use the format hdb-(id) for heads as materials
- use-claimed-item-from-day-automatically - displays item from the list of items for a present
- gui.command-alias - empty will open the default menu, otherwise /acal will be mapped to this command
- gui.sort-presents - Displays presents in numerical order
- use-clean-duration - Display times more simply in the GUI
Placeholders
This plugin supports PlaceholderAPI by default. There are a couple of placeholders you can use to interact with other plugins, especially GUI menus:
- %adventurecalendar_next% - returns the day of the upcoming present
- %adventurecalendar_current% - returns the current day of the month
- %adventurecalendar_timeuntil_next% - returns the time until the next present
- %adventurecalendar_timeuntil_<day>% - returns time until a specific present
- %adventurecalendar_claimed_total% - returns the total number of presents claimed
- %adventurecalendar_claimed_<day>% - returns true or false based on whether the present that day has been claimed
Using
{day} inside of a placeholder will automatically be replaced with the current day of the month (for example:
%adventurecalendar_timeuntil_{day}%).
Useful Trick For Timezones
If your server's time is set to the wrong timezone (for example, most of your players are in the US but the server time is GMT) you can add the startup flag -Duser.timezone={timezone} where {timezone} is found in the "TZ database name" column here (for example: -Duser.timezone=America/Los_Angeles will set the server time to be GMT-08:00).