DeathBan 1.0.1

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

  1. Okx
    Native Minecraft Version:
    1.13
    Tested Minecraft Versions:
    • 1.7
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    Source Code:
    https://github.com/okx-code/DeathBan
    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.

    Commands
    /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 an online player
    /deathban deathban.command.info 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.

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

    Code (YAML):


    # options:
    # date-format SHORT/MEDIUM/LONG/FULL SHORT/MEDIUM/LONG/FULL
    # 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: https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html
    # 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
    time-format
    : '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

    messages
    :
      ban
    : |-
        You were banned because of your death.
        You will be unbanned at %time%.
      kick
    : |-
        You died and have been banned.
        You will be unbanned at %time%.
      lives
    :
       # 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
        self
    : |-
          &eYou have %lives%/%maxlives% lives remaining.
          &eYou have been banned %bans% time(s).
        other
    : |-
          &6Player %player%
          &e%lives%/%maxlives% lives remaining.
          &eBanned %bans% time(s).
        invalid-player
    : '&cInvalid player'
      revive
    :
        invalid-player
    : '&cInvalid player'
        max-lives
    : '&cThat player is at their maximum amount of lives'
        revived
    : '&a%player% has been unbanned. You now have %lives% live(s).'
        transferred
    : '&aYou have transferred a life to %player%. You now have %lives% lives'
        confirm
    : '&eYou will be death banned if you do this! If you are sure, type the command again.'
        self
    : '&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
    revive-confirm
    : 10

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

    default
    :
     # how many deaths they can have until they die
      lives
    : 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)
      time
    : 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.
    groups
    :
    #  donator:
    #    permission: deathban.group.donator
    #    lives: 20
    #    time: 5h
    #    priority: 1
    #  staff:
    #    permission: deathban.group.staff
    #    lives: 15
    #    time: 1h
    #    priority: 2

Recent Updates

  1. 1.0.1

Recent Reviews

  1. z__
    z__
    5/5,
    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!!