AfkTitle 1.0

Simple & configurable plugin to send titles when a player goes AFK

  1. BandiDevelopment
    Native Minecraft Version:
    1.15
    Tested Minecraft Versions:
    • 1.14
    • 1.15
    Contributors:
    PartyProNL, Fernigheid
    Languages Supported:
    Configurable
    [​IMG]

    AfkTitle is a simple plugin to send a title to a player when they go Away From Keyboard. You can configure these titles and change the time before going AFK. This plugin also comes with a small API

    [​IMG]

    First, put the plugin in the plugins folder in your server. Then start your server. The default config has default settings. You can configure these like this:
    Code (YAML):

    // config.yml
    afk-time
    : 180 // the time before a player goes afk in seconds
    welcome-back-main
    : '&cExample' // the title sent when a player comes back
    welcome-back-sub
    : '&7Example subtitle' // the subtitle sent when a player comes back

    // titles.yml
    titles
    :
      example
    : // just the id, just don't clone it
        main
    : '&eThe main title'
        sub
    : '&7The subtitle'
     

    [​IMG]

    To make your life a bit easier, we also provide an API for developers. It doesn't contain much currently, but this is it for now:

    Code (Java):

    AfkUtil.isPlayerAfk(Player player) // returns a boolean telling if the player is AFK or not
    AfkUtil.resetPlayer(Player player) // stop a player from being AFK
    AfkUtil.getAfkPlayers() // returns a list of players that are AFK

    // PlayerAfkEvent
    getPlayer() // get the player who went AFK
    setCancelled() // set if the event is cancelled
    isCancelled() // returns if the event is cancelled
     
    If you enjoy this plugin, please leave a rating. If you find any bug you can report it.

    You can find support for this plugin on our Discord (https://discord.gg/R6M7mAr) or go to the discussion page of this plugin