[DeathBans]
DeathBans
Notice
Currently, I feel as if deathbans is in a 'finished' state, if anyone has anything they would like to see added I will add it if I believe it is worth adding, please remember I am not always free as I am a developer for MineSuperior HCF (CursedHCF), which is taking up most of my free time, again sorry for the lack of updates, however I will repeat myself again - I believe this plugin is in a finished state.
Description
Ever wanted a HCF Server but didn't know how to code? Did you look up deathbans plugins to no avail because they were all outdated? I created this plugin for just those reasons, Currently DeathBans has a simple to use API but is fully functional without knowledge of coding, DeathBans also runs off of a UUID banning system so if you have a long ban time, players cannot bypass that via name changes - Also handles a simple 'lives' system.
Commands
Command | Description | Permission | |
---|---|---|---|
/DeathBans unban | Unbans a player | deathbans.admin | |
/DeathBans editlives | Adds/Takes lives to/from a player | deathbans.admin | |
/DeathBans check | Checks if a player is banned | deathbans.admin | |
/DeathBans exempt | Adds a player to the exemption list | deathbans.admin | |
/DeathBans unexempt | Removes a player from the exemption list | deathbans.admin | |
/DeathBans lives | Checks a players lives | None | |
/DeathBans revive | Revives a player at the cost of 1 of your lives | None |
Configuration
Only copy & paste if your config does not generate correctly.
ban-reason: '&cYou are still deathbanned for &e%remaining%' kick-reason: '&cYou have died, and are now DeathBanned!' ban-length: 90 timeframe: minute lightning-strike: true delay-ban: false prefix: '&f[&cDeathBans&f]' denied-worlds: - 'DENIED_WORLD' perms: diamond: lessened-banlength: 60 timeframe: minute gold: lessened-banlength: 45 timeframe: minute iron: lessened-banlength: 30 timeframe: minute
Permissions
Since people seem to be having troubles with permissions, here is how to use them.
Inside of your config you should have something like this:
perms: diamond: lessened-banlength: 60 timeframe: minute gold: lessened-banlength: 45 timeframe: minute iron: lessened-banlength: 30 timeframe: minute
In this case, 'diamond' is the name of the permission node, prefaced with 'deathbans.' so the entire permission node for diamond would be
'deathbans.diamond', due to lessened-banlength set to 60 and the timeframe set to minutes, it removes a total of 60 minutes from the ban time when a player is given deathbans.diamond as a permission node.
Message Variables
Only current Message Variable is %remaining% in ban-message, which shows the remaining time on the ban.
TODO
- #1 - DeathBans API - Finish the DeathBans API
- #2 - Add bungeecord support - Add bungee support for bans.
New update, no new API changes but missed parts of the config will be auto generated, and a new command (/deathbans list) that lists all deathbanned players.
Source code is now on the main page, even contains some new stuff not in the released version ;)
@LuckTop
Are you asking me for a way to choose only set worlds for deathbans to take place in?
I'm sorry, my English is very poor (a translator, there may be little affected reading). But this plugin is really great, but if support for more world better.
Releasing a new build of deathbans, no more manual updates! the plugin will now auto update if enabled in the config (default is false), however I am working on a way to test if parts of the config is missing, and if it is it will auto-add it..
Successfully tested if 1.8 versions of DeathBans works on 1.7, I will hereby be uploading only 1 single deathbans file for 1.8, however it can be used on 1.7
2 new DeathBans files, New API Functions, no need for downloading the update if you do not plan to use the DeathBans API.
Deathbans api is referenced as DBApi (Plugin may be casted to DBApi, but will throw a NPE if DeathBans doesn't exist.)
New poll on the main page, please do tell me what you would like to see me focus on in future updates.
Quite a big update coding wise, with this new update I should be able to get updates out faster this way, also could be used as an API for a deathbans based plugin, however this API is VERY limited
@Eries_curse
Does it happen every time a player dies, or does it only happen the first time? Because the starting lives config option changes the amount of lives a player will start with, and on default they have 1 life.
If an error of this sort still occurs, please do contact me again after you have tested to see if the above is what causes it, thanks.
Edit: Also, as for banning it should be completely automated & timeframes should be set correctly, please try the newer update of deathbans and tell me if it still occurs with banning.
Would love to use this on my server but I seem to be having an issue. When a player dies they loose a life and can keep playing. Then on the second death they get banned. (works as intended)
I set the config to banlength: 30 timeframe: MINUTE
Yet after the 30 minutes are up players are still banned and can not log in.
I was hoping for an automated service and not have to manually go in and unban players after the allotted time was up.
Currently working on an entire new DeathBans plugin for bungeecord support, so 4 different files will be uploaded at a time when this is done (non bungee 1.7 & 1.8 and bungee 1.7 & 1.8 builds)
Uploading 2 new deathbans files with custom configurable kick, ban, and life lost messages & message variables ([time], [lasts], [lives]), also fixed a bug where 'banlength' was set to 'bantime' in the config. (Requires a config.yml file reset)
@Mattimussi
You must delete the config.yml to update it to V2.6 from any earlier version as I have made multiple changes to the config since then, As for reconnecting straight after death, I take it as your console is getting nullpointerexception's because there is missing statements in your config that were not updated because you have not deleted the config.yml and reloaded/restarted your server, if any more problems occur please do notify me after deleting the config.yml and reloading/restarting your server.
Also, i'm checking if the 'timeframe' option is set, and if not it will not ban you from the server as it does not default to anything in the current version, however I am already working on a new version with a default timeframe if it is not set.
Edit: I am also planning to auto-generate a updated config file if your config does not contain a certain parameter (e.g the timeframe option which was not available in V2.3 but is now available in V2.6) which should help everyone if they have the same problem as you.
Edit 2: Woops, my mistake I changed the bantime variable in the config to banlength in my plugin as well, so thats another reason why it is probably bugging out :P
@Walterrocks91:
Thanks for your quick response.
I have a satisfying setup running right now, as I am using DeathBans-1.8-V2.3.
Am I supposed to open the .jar with WinRar and modify the config.yml inside the .jar to change the ban-time? It works when I do, but in the DeathBans-1.8-V2.6 version, you generate a config file in the "plugins/deathbans" folder, next to "bans" and "lives". Which one am I supposed to edit? Do they have to identical?
The ban is not enforced, even when I remove the entire olugin, shut down the server, install the DeathBans-1.8-V2.6.jar and restart. No edits have been made to either config.yml files (.jar config.yml & "plugins\deathbans\config.yml").
If you want the files anyway, I'll reinstall the bugged version again and pull the files :)
Only on player death is the player kicked with the message "You have died.". It does not happen constantly.
However, the player is allowed to reconnect again straight after the death. The player is not OP, and I am not running bungeecord.
- Mat
@Mattimussi
Ban's should be enforced, can you tell me what happens when you die? does it just constantly kick you for 'You have died' or something of the sort?
Also, if your server is running bungeecord, as I have said before, it will not work with banning.
Edit: Also, if you ever need direct support you can message me via bukkit with your server ip or problems occurring and I will try to help, or of course you could always just comment on this thread.
Edit 2: Please send me your config as well, as it may have to do with something wrong with your config.
Your 1.8-v2.6 version seems to be malfunctioning on my server.
The config file generates, and I am able to set a costum ban-length now, but the ban is not enforced.
On death, the player is kicked, but is able to join again straight away.
The last version that works is 1-8-v2.3, but that version does not generate a config file in the deathbans folder. (edit: I just realized the config file is in the .jar. I am able to set a custom ban-length there)
Tell me if, and what kind of of error-messages or information, you need from me. I'll happily provide.
This mod is a very important part of my server, so thank you for making this. And thanks for implementing a costum ban-length by the way! :)
-Mat
Uploading another version of deathbans with 2 new commands (/deathbans reset (Console only, resets all deathbans.) and /deathbans reload (reloads all configs.))
@MERCHANToDEATH
Also, the default lives is in the config (startinglives: 1) just so you know :)
@MERCHANToDEATH
I've been attempting to do what everyone else would like, so i'll definitely try to do this, also, I don't think bungeecord servers work right now as I have tested it on my own bungee server and it simply doesn't work, it just constantly kicks me for 'You have died' when I respawn.