KillCommands 1.2

Executes commands if a player reaches a specific amount of kills or deaths.

  1. stonar96
    WARNING!! Updating from v0.1 to v1.0 and above is problematic (see Configuration)! Do not just replace the old jar! Make a backup before updating!

    Description:
    This plugin has a kill and a death counter based on permissions and executes console or player (killer or dead player) commands if a player reaches a specific amount of kills or deaths or on every kill or death.

    Features:
    • Minecraft 1.15.2 (not tested for other versions)
    • Multiple separate per player kill and death counters (stored in separate player files) (see Configuration)
    • UUID support
    • Configurable commands with settings when and how to execute them (see Configuration)
    • Command arguments (<killer>, <dead>, <kills>, <deaths>) (see Configuration)
    • Configurable command sender (console, killer, dead) (see Configuration)
    • Configurable permissions (see Configuration)

    Configuration:
    Path: plugins/KillCommands/config.yml
    Code (YAML):
    # example config
    #
    # commands:
    #   always:
    #     - 'console: say <name> has <kills> kills'
    #     - 'killer: say I have <kills> kills'
    #   10:
    #     - 'console: say <name> has now 10 kills'# You can also use <kills> instead of 10.
    #     - 'killer: say I have now 10 kills'
    WARNING!! You have to make some changes in your config.yml if you update from v0.1 to v1.0 or newer versions. Even the player stats are incompatible between v0.1 to v1.0 or newer versions. If you need help at updating please PM me.
    Code (YAML):
    # This is an example configuration.
    #
    # permissions:                                                                  # Specify all permissions here. Each permission has its own kill and death counter.
    # - killcommands.category1                                                      # Therefore you can use a plugin which allows permissions per world or region.
    # - killcommands.category2
    # commands:
    # - kill: true                                                                  # If true, the command will be executed on kill.
    #   death: false                                                                # If true, the command will be executed on death.
    #   permission: killcommands.category1                                          # Specifies which kill or death counter should be used to lookup data. The command will only be executed if the killer or the dead player has this permission.
    #   kills: always                                                               # The command is only executed if this number equals the number of kills of the killer or the dead player.
    #   deaths: always                                                              # The command is only executed if this number equals the number of deaths of the killer or the dead player.
    #   killer: true                                                                # On death: If true, there must be a killer to execute the command, if false, there must not be a killer, otherwise, or if this line does not exist, the command is executed anyway.
    #   command: 'say <killer> has killed <dead>. Kills: <kills>, deaths: <deaths>' # The command to be executed.
    #   executor: console                                                           # The command executor. Valid options are console, killer and dead.
    # - kill: false
    #   death: true
    #   permission: killcommands.category1
    #   kills: always
    #   deaths: 1
    #   command: 'me I was killed for the first time. Kills: <kills>, deaths: 1'
    #   executor: dead

    permissions
    :
    - killcommands.category1
    - killcommands.category2
    commands
    :
    - kill
    : true
      death
    : false
      permission
    : killcommands.category1
      kills
    : always
      deaths
    : always
      killer
    : true
      command
    : 'say <killer> has killed <dead>. Kills: <kills>, deaths: <deaths>'
      executor
    : console
    - kill
    : false
      death
    : true
      permission
    : killcommands.category1
      kills
    : always
      deaths
    : 1
      command
    : 'me I was killed for the first time. Kills: <kills>, deaths: 1'
      executor
    : dead
     
    v1.1 added the killer-recognition option to the configuration.
    Code (YAML):
    # This is an example configuration.
    #
    # killer-recognition: minecraft                                                 # The algorithm used to recognize the killer. Valid options are minecraft and last-damager.
    # permissions:                                                                  # Specify all permissions here. Each permission has its own kill and death counter.
    # - killcommands.category1                                                      # Therefore you can use a plugin which allows permissions per world or region.
    # - killcommands.category2
    # commands:
    # - kill: true                                                                  # If true, the command will be executed on kill.
    #   death: false                                                                # If true, the command will be executed on death.
    #   permission: killcommands.category1                                          # Specifies which kill or death counter should be used to lookup data. The command will only be executed if the killer or the dead player has this permission.
    #   kills: always                                                               # The command is only executed if this number equals the number of kills of the killer or the dead player.
    #   deaths: always                                                              # The command is only executed if this number equals the number of deaths of the killer or the dead player.
    #   killer: true                                                                # On death: If true, there must be a killer to execute the command, if false, there must not be a killer, otherwise, or if this line does not exist, the command is executed anyway.
    #   command: 'say <killer> has killed <dead>. Kills: <kills>, deaths: <deaths>' # The command to be executed.
    #   executor: console                                                           # The command executor. Valid options are console, killer and dead.
    # - kill: false
    #   death: true
    #   permission: killcommands.category1
    #   kills: always
    #   deaths: 1
    #   command: 'me I was killed for the first time. Kills: <kills>, deaths: 1'
    #   executor: dead

    killer-recognition
    : minecraft
    permissions
    :
    - killcommands.category1
    - killcommands.category2
    commands
    :
    - kill
    : true
      death
    : false
      permission
    : killcommands.category1
      kills
    : always
      deaths
    : always
      killer
    : true
      command
    : 'say <killer> has killed <dead>. Kills: <kills>, deaths: <deaths>'
      executor
    : console
    - kill
    : false
      death
    : true
      permission
    : killcommands.category1
      kills
    : always
      deaths
    : 1
      command
    : 'me I was killed for the first time. Kills: <kills>, deaths: 1'
      executor
    : dead
     

    Commands and Permissions:
    There are no commands and you have to define the permissions by yourself in the config.yml (see Configuration).

    Istallation:
    • Download KillCommands.zip
    • Extract KillCommands.jar
    • Put KillCommands.jar in your plugins folder
    • Restart or reload your server

    Changelog:
    v0.1
    • Initial version (Minecraft 1.8)
    v1.0
    • Updated to Minecraft 1.14.4
    • Code cleanup
    • Configuration improvement and changes
    • Added death counter
    • Added commands on death
    • Added permission specific kill and death counters
    • Added permission support to specific commands
    • Added many options for the commands in the configuration
    • Added many tags for the commands in the configuration
    v1.1
    • Added an alternative killer-recognition algorithm
    • Added the killer-recognition option to the configuration
    v1.2
    • Updated to Minecraft 1.15.2
    • Code cleanup
    • Added api-version to plugin.yml
    Source:
    Extract the whole project from KillCommands.zip.

    And now enjoy! Do what ever you want with this plugin.

Recent Reviews

  1. FadedGapl
    FadedGapl
    5/5,
    Version: 1.2
    this is a good plugin but players kill them selfs to farm the cmd and kills is there a fix for this :?
  2. Anay
    Anay
    5/5,
    Version: 1.2
    I have been using it for 3 months but I have a question can we set that kills are only counted in one world and not another?
    1. stonar96
      Author's Response
      Thanks for the review! You can do this with a permissions plugin. Just give the player the permission of the kill counter only in a specific world.
  3. rodrigomarcelos
    rodrigomarcelos
    5/5,
    Version: 1.2
    Excelent plugin add support PlaceHolderAPI %player_name% command on death /tm bc %player_name% <message> or tell me the variable of the %player_name% or the dead
    1. stonar96
      Author's Response
      It's not really possible to support the PlaceholderAPI for the commands in a proper general way because there are two players involved (the dead player and the killer). You need the dead player's name but someone else might want the killer's name.

      Instead I have created a PR to the PlaceholderAPI: https://github.com/PlaceholderAPI/PlaceholderAPI/pull/346
      If this gets merged you can do something like that:
      command: 'papi cmdparse <dead> tm bc %player_name% was killed.'
  4. paine562005
    paine562005
    5/5,
    Version: 1.2
    IS it can count kills then doing something like "console : lp user {} parent set vip "
    1. stonar96
      Author's Response
      Yes, just add this to the commands list in your config.yml:
      # The command should be executed on kill.
      - kill: true
      # Not on death.
      death: false
      permission: <put the permission for the counter to use here>
      # When the player reaches 10 kills for example.
      kills: 10
      # We don't care how many deaths the killer has.
      deaths: always
      # The killer setting has no affect because death: false.
      killer: true
      # Your command.
      command: 'lp user <killer> parent set vip'
      # Your command is executed by the console.
      executor: console
  5. TheBurningBacca
    TheBurningBacca
    5/5,
    Version: 1.2
    very good plugin, does exactly what I want it to do, very simple and easy to setup, great job!
  6. Wilmerbox
    Wilmerbox
    5/5,
    Version: 1.1
    Excellent, it works well!
    But I need something, I put a CUSTOMBOSSES command and the command is / boss spawn <entity> <name>.
    So in the name I don't know what variable to put to execute the player that did it
    1. stonar96
      Author's Response
      Thanks for the rating. Player names can be either used with <killer> (name of the player who killed another player) or <dead> (name of the player who was killed or died), depending on your requirements. If that doesn't solve your problem, feel free to PM me for further help.
  7. Samik164
    Samik164
    5/5,
    Version: 0.1
    -------------------------------------------------------------------

    Very good plugin, can you give me a source? <3

    -------------------------------------------------------------------
    1. stonar96
      Author's Response
      The latest version includes the source code.
  8. MrDestruktiv
    MrDestruktiv
    1/5,
    Version: 0.1
    Dont. Work.
    But console says:
    [KillCommands] KillCommands v0.1 enabled
    Sry but I dont know, what I have to do...
    There are no mistakes in the config so...
    1. stonar96
      Author's Response
      Sorry, I can't help you with that information. Please try again using the latest versions of the plugin and the server.
  9. Safeen-Azad
    Safeen-Azad
    5/5,
    Version: 0.1
    Best Plugin ive ever seen before thanks bro <3 sorry for my bad english! im from iraq
  10. Ashton0101
    Ashton0101
    5/5,
    Version: 0.1
    Assisted me when I had issues with the plugin and fixed it 5/5 would rate 6/5 if i could