HomeJavaModsServerAge
ServerAge
ModsJava

ServerAge

A placeholder add-on used to display the age of a server. Free Minecraft Java mod for 1.7, 1.8, 1.9.

⬇ Download on Spigot
ServerAge
A placeholder add-on used to display the age of a server, supporting both PlaceholderAPI and MVdWPlaceholderAPI . This plugin simply provides a placeholder which can display the time difference between the current and a given timestamp, meaning it can be used for different purposes too.

Guide
Use the placeholders shown below depending on your chosen placeholder plugin to retrieve the age of a server based on the given wildcard timestamp. The '#' below should be replaced with the server's start date in a UNIX timestamp format, which can be retrieved here by entering a date, selecting 'Convert' and then copying the resulting timestamp into your placeholder, most probably within a scoreboard or menu configuration. The plugin supports both past and future timestamps and will calculate the difference accordingly.

Placeholders:
Configuration
You are not required to modify the configuration unless you use both PlaceholderAPI and MVdWPlaceholderAPI on your server. If this is the case, you should set the 'default-provider' option to the plugin you wish to use for ServerAge placeholders.
Code (YAML):
# ServerAge by Shockzeh

# This is only required if you run both PlaceholderAPI and MvDWPlaceholderAPI
# on your server. This will prevent the plugin from hooking into the incorrect
# placeholder plugin.
# Supported providers are: 'placeholderapi' or 'mvdwplaceholderapi'
default-provider
: placeholderapi
API
I f you wish to supply your own result to the placeholder, you can create a Pla ceholderSupplier implementation and then replace the default supplier with your own. An example of where this could be used is if you wish to use your own time formatting.
Code (Java):
if ( Bukkit. getPluginManager ( ) . isPluginEnabled ( "ServerAge" ) ) { // Make sure plugin is enabled
     ServerAgePlugin plugin = ( ServerAgePlugin ) Bukkit. getPluginManager ( ) . getPlugin ( "ServerAge" ) ; // Get instance
     plugin. setSupplier ( argument -> { // Replace the supplier (PlaceholderSupplier is a functional interface)
      long time = Long . parseLong ( argument ) ; // A raw long is expected, but should be checked
      return String . valueOf ( time ) ; // Parse time how you like and return result
  } ) ;
}
Terms and Conditions

Plugin details

Read from the plugin's own plugin.yml.

ServerAge is a free Minecraft Java mod. Compatible with Minecraft 1.7, 1.8, 1.9, 1.10 and newer. Downloaded 516 times (via Spigot). Download it and open it directly in the game.

Explore more