DeathBan 1.0.5

A simple, modern plugin to ban players on their death.

  1. Okx
    Native Minecraft Version:
    Tested Minecraft Versions:
    • 1.7
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    • 1.14
    Source Code:
    A modern plugin to ban players on their death. You can set the amount of lives a player has before they are banned and use custom time formats for ban messages, as well as giving different ban times and lives to different players depending on their permsisions.

    /revive <player> deathban.command.revive Transfer one of your lives to another player. If they are death banned they will be unbanned. If you are at one life you will be death banned.
    /lives [player] deathban.command.lives Check the amount of lives and statistics for you or another online player
    /deathban View plugin version

    The following commands require deathban.command.admin
    /deathban reset <player>
    Remove a death ban from a player and give them their maximum lives
    /deathban set <player> <lives> Set the amount of lives for a player (if the player is offline, this might not set correctly if the player has a permission giving a different number of lives than the default)
    /deathban add <player> <lives> Add lives to a player (works for offline players), can exceed their maximum
    /deathban ban <player> <time> Ban a player as if they had run out of lives.
    /deathban reload Reload the plugin from the configuration file.

    deathban.bypass default: nobody Cannot lose lives
    deathban.command.lives default: everyone /lives
    deathban.command.revive default: everyone /revive default: everyone /deathban
    deathban.command.admin default: op /deathban subcommands

    Code (YAML):

    # options:
    # date/time formats are any of short/medium/long/full, twice, separated by a space
    # the first is the length of the date format and the second, the time format.
    # custom-date-format <FORMAT>
    # these give you more control over your date formats
    # documentation for custom date formats:
    # in <type> [months] [weeks] [days] [hours] [minutes] [seconds]
    # this will show something like "5 hours, 2 minutes" for "in 2 days hours minutes seconds"
    # you can include a ? like "minutes?" so that it only shows if the next greatest time period is zero
    # for example,  "in minutes seconds?" can show "2 minutes" or "59 seconds" but not "1 minute 4 seconds"
    # The types affect the formatting, these are what they look like
    # Type 1: "5 hours, 3 minutes and 20 seconds"
    # Type 2: "5 hours, 2 minutes, 1 second"
    # Type 3: "1 hour 5 minutes"
    # Type 4: "1h, 5m and 3s"
    # Type 5: "4h, 2m, 2s"
    # Type 6: "3h 7m 6s"
    # Type 7: "8h2m4s"
    # you will want different formats depending on how long you want your deathbans to be
    # if you don't quite understand, there are many examples
    : 'date-format long long'
    # time-format: 'date-format full medium' # Sunday, 20 January 2019, 22:50:00
    # time-format: 'custom-date-format dd-MM-yyyy HH:mm:ss' # 2001-1-7 15:42:28
    # time-format: 'custom-date-format EEE, d MMM yyyy HH:mm:ss' # Wed, 4 Jul 2001 12:08:56
    # time-format: 'date-format long short' # 20 January 2019, 22:47
    # time-format: 'in 0 months weeks days hours minutes' # 5 hours and 1 minute
    # time-format: 'in 5 weeks days hours? minutes?' # 1w, 4h

    : |-
        You were banned because of your death.
        You will be unbanned at %time%.
    : |-
        You died and have been banned.
        You will be unbanned at %time%.
       # you can use any of the following placeholders:
        # %player% player name
        # %lives% number of deaths until ban
        # %maxlives% maximum number of lives
        # %deaths% number of deaths since the last ban
        # %bans% amount of times banned
    : |-
          &eYou have %lives%/%maxlives% lives remaining.
          &eYou have been banned %bans% time(s).
    : |-
          &6Player %player%
          &e%lives%/%maxlives% lives remaining.
          &eBanned %bans% time(s).
    : '&cInvalid player'
    : '&cInvalid player'
    : '&cThat player is at their maximum amount of lives'
    : '&a%player% has been unbanned. You now have %lives% live(s).'
    : '&aYou have transferred a life to %player%. You now have %lives% lives'
    : '&eYou will be death banned if you do this! If you are sure, type the command again.'
    : '&cYou cannot transfer a life to yourself!'

    # if a player will be death banned by /reviving a player, give them this amount of seconds to confirm
    # set to 0 to disable confirming
    : 10

       # how many players the player cache can hold
    : 100
        # how long cache data takes to expire
    : 1h 30m
      # interval to flush changes to the database
    : 30s

     # how many deaths they can have until they die
    : 10
      # how long their death ban is
      # alternatively you can use a list for different death bans as a player is banned more times
      # if the player has more bans than the list, they will be banned permanently (for 100 years)
    : 10h
      # time:
      # - 10m
      # - 1h
      # optionally you can include a list of commands to run on deathban
      # commands:
      # - 'say %player% has been death banned!'

    # if a player has permission for multiple groups,
    # the one with the highest priority will be used.
    #  donator:
    #    permission:
    #    lives: 20
    #    time: 5h
    #    priority: 1
    #  staff:
    #    permission:
    #    lives: 15
    #    time: 1h
    #    priority: 2


    If PlaceholderAPI is installed, you can use the following placeholders:
    • %deathban_max_lives% The maximum amount of lives a player can have before being death banned
    • %deathban_bans% The amount of times a player has been death banned.
    • %deathban_deaths% The amount of times a player has died. Resets after a death ban.
    • %deathban_lives% The amount of times a player can die before being death banned.
    FoxSpellCaster and Perdedor like this.

Recent Updates

  1. Commands bugfix
  2. 1.0.4 PlaceholderAPI support
  3. 1.0.3 Bugfix

Recent Reviews

  1. nail181
    Version: 1.0.5
    Great plugin! Can there be an option to set the cost of a revive? Instead of 1 life you can only revive in favor 3 or 4 lives?
    1. Okx
      Author's Response
      Good idea - but using the reviews for suggestions is not the best place - I'm best contacted on Discord or you can open a GitHub issue
  2. Perdedor
    Version: 1.0.4
    Muito bom, extremamente recomendado, bem configuravel
    Nao apresentou nenhum problema.
  3. LengFeng
    Version: 1.0.4
    Will the plugin update to version 1.14?
    This plugin allows me to implement some special ideas
    1. Okx
      Author's Response
  4. EveryDayGaming
    Version: 1.0.3
    Great plugin, works as intended. I hope you will end up adding a scoreboard criteria to display remaining lives for the player.
    1. Okx
      Author's Response
      Good idea, thanks for the review
  5. z__
    Version: 1.0.1
    This is actually exactly what I have been wanting for one of our new servers!! And from an already great Author... thanks!!