The Bundles of Bravery drop broke my plugin, and in fixing it I allowed hardcore mode to be enabled now, so I guess you could say I... added hardcore mode?
Changes
The plugin no longer requires the hardcore option in server.properties to be disabled.
Fixes
SH-3 - The sentence for players sacrificing themselves in the settings printed to the console when the plugin is enabled is grammatically incorrect
SH-5 - The javadoc for SemiHardcore#getOfficialAddonList is missing a period
SH-6 - Respawning with hardcore hearts enabled makes the player a spectator even if they have lives left
For some reason I had assumed that everyone would run this plugin along with at least one of its add-ons...
Fixes
SH-1 - Error when enabling plugin / java.lang.NullPointerException: Cannot invoke "java.util.Map.containsKey(Object)" because "this.addonsToBeChecked" is null
This bug fix is probably not important, since almost nobody changes level-name in server.properties.
Fixes
Fixed the plugin breaking when a player is revived and there isn't a world named "world" loaded in the server. It now checks server.properties to find the main world's name and uses that one instead.
This version adds update checking for this plugin and its add-on plugins, as well as the ability to sacrifice your last life to revive a player, or just give it away if you want to stop living for some reason.
Additions
Added some new configuration options:
lightning-strike-on-last-death
This option controls a new feature of the plugin: a lightning effect that strikes a player when they die and lose their last life.
If the option is enabled, a lightning bolt that doesn't create fire or damage players or mobs will strike at the location of a player as soon as they die for their last time (until they are revived; more on that later).
This option is set to false by default.
sacrifices-for-revival
This option controls whether players can sacrifice themselves to revive a player.
With this option on, players on their last life can use the /givelife command to give their life to a player who is currently dead (i.e. on 0 lives). Doing this will kill the player being sacrificed and revive the receiver of the life.
This option is set to false by default, and also requires players-can-be-generous to be enabled.
players-can-give-away-last-life
This option controls whether players can give away their last life to an alive player.
With this option on, players on their last life can use the /givelife command to give their life to a player who is currently alive (i.e. on 1 life or more). Doing this will kill the player giving away their life and add one to the receiver's lives.
This option is set to false by default, and also requires players-can-be-generous to be enabled.
Added a lot of new messages to messages.yml which pertain to the above options.
Added an update checker to the plugin. This will get this plugin's version from SpigotMC's API and check if it's newer than the version currently being run. If it is, a message will be sent to the console prompting you to update the plugin, giving you the link to this plugin's page on SpigotMC.
If there are any known add-ons of SemiHardcore present on the server, the update checker will check those for updates too.
At last, you don't need to manually add new options into the configuration files anymore! 2.3.0 is a big code update, but it has paved the way for some surprises further down the road.
Additions
Added a new configuration option players-can-be-generous, which controls whether players can use the /givelife command. This option is set to true by default, but you can turn it off to make your server more like Grian's 3rd Life.
Added a new Bukkit event called PlayerLifeChangeEvent, which is called every time a player's number of lives changes. This was added to make it possible to code add-on plugins for this plugin, which I will be working on and you will be getting your hands on in the fullness of time.
I mean, technically since I added this, you could now make your own add-ons for this, and there is no one stopping you, so if you want to, you can.
Changes
Dropped support for all Minecraft versions older than 1.12.2. The plugin will now disable itself if you try to use it in 1.12.1 or even older versions. This change happened because it was difficult to maintain code used to bypass the fact that old versions are missing features (primarily the totem effect when you give a life to another player).
All configuration files now update themselves without you needing to add new options manually. Any options missing will be added to the files with their default values.
Some messages in messages.yml have been moved to new identifiers to remove duplicate messages. If you have been using a previous version of the plugin and want to see what changed, the new messages will now be added automatically to the very bottom of the file.
Fixes
Some options in config.yml were not properly checked for invalid values. The plugin should now disable itself when any option in config.yml has an invalid value.
Message customization and a life limit are added in this update.
Additions
There is now a messages.yml file which contains all messages that can appear in the chat as a result of this plugin.
The config.yml file now contains a new option: "lives-limit", which controls what the maximum number of lives players can have at the same time. Its default value is 5.
Changes
The config.yml file's values are now stricter.
The plugin now supports all Minecraft versions from 1.8 to 1.19.
Fixes
Using the /givelife command now tells both players how many lives they now have, instead of just to one of them.
Added a new option in the configuration file (config.yml) called force-hard-difficulty, true by default. Can be changed to false to stop the plugin from forcing the difficulty to hard on all of your worlds.
All commands now show their syntax when /help is used for them.
Added the SpigotMC page for this plugin as the website URL in the plugin.yml file.
Changes
The plugin now logs the settings to the console when it gets enabled (useful for debugging and checking if your settings are correct).
Fixes
Fixed bug where the plugin would not force the difficulty to hard (now only if force-hard-difficulty is true in the config) or change the hearts to hardcore (if hardcore-hearts is true in the config) on any new world created while the server is running.
Fixed bug where starting-lives.min and starting-lives.max in the config could be set to values that are not numbers, which would cause problems.
Update 2.0.0 is now out. A lot of useful customization features have been added.
Additions
The plugin now has a configuration file (config.yml). You can now customize how many lives every player will start with, or alternatively make every player start with a random amount of lives within a range you specify.