#Added: option messages.cmd.prefix to configure the plugin's command prefix. An empty string will result in the default prefix.
IMPORTANT: This update needs editing of the current config. Please add the following to the messages.cmd section of the config.yml (you can always compare your config with the default one on the plugin's Spigot page)
Code (YAML):
# This is the prefix of all command message outputs. An empty string will result in the default prefix. prefix: ""
#Added: official support for MC version 1.20.2 and below.
#Changed: warning message about the lack of a valid implementation to make it more clear that the plugin is trying to use the last valid/updated implementation in this case.
I want to stress out the fact that in many cases the plugin does not need to be updated specifically in order to work properly on future versions - especially if the API did not change drastically (which is usually the case).
#Added: the plugin will now inform you if the latest implementation is used and if so, for what version it was last tested.
#Changed: the warning messages about the lack of a valid implementation was more or less replaced by the above info message.
The plugin already tried to use the default implementation if no valid implementation was found. Therefore I think these changes give some clarity over what is actually happening. In addition future versions will now not be "unvalid" so to speak but rather untested (hence the new info message informing you of the last tested version) because the later versions will very likely work except for new attributes or block types.
#Fixed: world_exceptions.by_environment was negated. Now it works like intended: Setting an environment to true will disable the plugin for those worlds.
Special thanks to
@RalphORama for pointing that out and sorry for the long wait. I appreciate your patients.
#Added: official support for MC 1.19.
#Added: update checker by
mfnalex along with some config options.
#Added: permission timecontrol.updatechecker to get notified on login of a new version if existent.
#Changed: updated commons code to v1.10.2.
#Fixed: NPE if custom login messages are used.
#Fixed: NoClassDefFoundError if ProtocolLib was not installed.
IMPORTANT: This update requires editing of the current config. Please add the following to the bottom of the file:
#Added: official support for MC version 1.18.2.
#Added: MC1.17+: nights will now always skip slowly instead of instantly even if all players are sleeping.
#Added: disabled vanilla action bar messages. (ProtocolLib is required)
#Fixed: java error was thrown for wrong configurations regarding the default_world_settings instead of precise console message.
For one of the features you will need to install
ProtocolLib. Just drag and drop it into your plugins folder.
#Changed: updated commons code to v1.8.2. This fixes a bug regarding console warning messages.
IMPORTANT: This update needs an addition to the current config. So please add custom to the world_exceptions.by_environment section. It should look like this:
#Added: several options to inform players within a world of sleeping.
#Added: permission timecontrol.sleep.actionbar (default true) to receive sleep notifications via actionBar.
#Added: permission timecontrol.sleep.chat (default true) to receive sleep notifications via chat.
#Changed: storm duration will now be speed up by multiplying just like time in respect of the speed value to be more consistent.
#Changed: storms will no longer clear if night sleeping happened anytime but not till morning.
#Changed: storms will now be speed up also during night time.
#Changed: set command now shows valid range if an invalid value was tried to be set.
#Changed: renamed storm-time-subtrahend to sleeping-storm-time-multiplier.
#Changed: renamed sleeping-time-multiplier to sleeping-night-time-multiplier.
#Changed: renamed permission timecontrol.edit to timecontrol.set.
#Changed: renamed permissions timecontrol.change.[option] to timecontrol.set.[option].
#Changed: all existing entries of messages section were moved to section.cmd.
#Changed: default value of (now) sleeping-night-time-multiplier to 20.
#Changed: default value of (now) sleeping-storm-time-multiplier to 60.
#Changed: updated Essentials dependency to v2.18.0.
#Changed: updated commons code to v1.8.0.
#Changed: the credits (aka. my name) is now clickable and will open my profile page on spigot.
#Changed: sent messages make now use of the BaseComponent API which allows click events (like above) or hover events.
#Changed: commands are now easier to maintain.
#Changed: every (sub-)command will now generate its own help command.
#Changed: every (sub-)command will now generate its own usage message.
#Fixed: main config was not properly reloaded by command.
IMPORTANT: This update needs quite heavy editing of your current configurations.
In the default_world_settings section rename
- "sleeping-time-multiplier" to "sleeping-night-time-multiplier" and
- "storm-time-subtrahend" to "sleeping-storm-time-multiplier"
These renamings will result in a lose of those values for every world.
Edit your messages section to look like this:
Code (YAML):
messages:
cmd:
credits: "Use /timecontrol help for all available commands." help_header: "List of all available commands:" noPerm: "&4You do not have permission." wrongCmdUsagePrefix: "&CUsage:"
# Messages regarding the sleeping mechanics. # Available placeholders: ## %sleep_needed% - Amount of needed sleeping players. (not available for sleeping.actionBar.msg.success) ## %sleep_sleeping% - Amount of actual sleeping players. (not sleeping ignored in any way) (not available for sleeping.actionBar.msg.success) ## %player% - the player's displayed name. (only available in sleeping.chat.msg) sleeping:
actionBar:
enable: true
msg:
success: "&eSweet dreams everyone!" progress: "&e%sleep_sleeping% of %sleep_needed% players are sleeping." chat:
enable: true
msg:
enterBed: "%player% is now sleeping. (%sleep_sleeping%/%sleep_needed%)" leaveBed: "%player% left bed. (%sleep_sleeping%/%sleep_needed%)"
As you can see a lot of work was done before publishing this update. Let me give you some closing words:
Because I had to rewrite all commands I decided to not support changing the messages of all commands which I categorized as operator commands. If you really feel like you need one of the removed options, feel free to contact me.
This update is quite a monster I will admit and I am very glad to finally be able to publish it. However such large updates come with various different bug possibilities. I think I tested everything but you never know so please report bugs as soon as possible in the discussion section.
After finishing coding I felt like doing a proper wiki on github before editing the whole plugin's main page on spigot. I hope you like it - feel free to make any suggestions!
TimeControl Wiki on GitHub
Best regards
Alex_qp
PS:
@TheNutsOfRambo Sorry it took my so long but I had a whole code cleanup in mind before publishing the next update. I hope the changes suit your interests.
#Added: hidden debug mode. To enable debug mode add "debug: true" at the bottom of the config.
#Added: official support for Minecraft version 1.15
#Added: sleep mechanics can now be applied to (thunder-)storms at daytime.
#Added: option storm-time-subtrahend (default 500) to set how much ticks should be subtracted from the remaining storm duration !AT DAYTIME ONLY!. This value will be plain subtracted every speed-tick. (set in config)
#Added: permission timecontrol.change.stormtimesubtrahend (default: op)
#Changed: native Minecraft version to 1.15
#Changed: updated commons code to v1.7.1. This slightly improves performance of console messages and might change their appearance a bit.
#Changed: missing values while deserializing will now be replaced with default values set in config (getting data from worldConfigurations.yml)
IMPORTANT: This update needs an addition to the current config. So please add the following code within the "default_world_settings"-section (preferably at the bottom) of the config file OR just move the file out of the plugin's folder in order to get recreated. You can always compare the config with the one on the plugin's main page.
Code (YAML):
storm-time-subtrahend: 500
So your configuration section should look something like this:
A note to the added option: The option was added to give needed-sleep-percentage also an influence if it is thundering at daytime because in the vanilla game thunder can be skipped by sleeping also at daytime.
Therefore storm-time-subtrahend will have no effect if players sleep at nighttime! It will only take influence if enough players (needed-sleep-percentage) are sleeping at daytime. In this case the value of storm-time-subtrahend will be flat subtracted from the remaining storm duration. While testing the vanilla duration of a storm was about 17000 ticks.
In conclusion a storm-time-subtrahend of 0 will have no effect. If you want to disable this feature completely (i. e. vanilla behavior) set the value to -1.
#Fixed: if all players of a world slept at once, night was not skipped every time.
I have planned some more features and hope to get them implemented within this week. Unfortunately this bug quite got me but it should be fixed now.
Although it is still supported it is not recommended to use any other plugin to set a player sleepingIgnored (essentials etc.) because this behaves the same way as there was no player at all what brings us back to the problem of instant night skipping.
Let me give you an example (needed sleep percentage is set to 50%): If two players are in a world, one is sleepingIgnored by essentials, one not. If the first one decides to sleep in a bed, everything works as it should: night-time speeds up and he will wake up eventually. But if the second player decides to sleep, he will get kicked out of bed and therefore night has to be skipped instantly.
I will edit the plugin's main page on spigot in the next view days.
#Fixed: critical bug with the command & permissions.
#Fixed: dependency problems with essentials.
Again my apologies for the long wait! I have not supped the discussion thread so I did not get any notification about any posts there. This is out of the way now so those critical fixes will be a lot faster for the future.
#Changed: package structure to fit java conventions.
#Fixed: data got not saved if only day-start-tick got changed.
#Fixed: reload command did not reload config.yml.
#Fixed: data got always changed for all worlds simultaneously.
#Fixed: data got not loaded correctly.
#Fixed: typo in config.yml.
I am so happy the premium version of this plugin got finally approved. Have fun with the plugin and as always feel free to leave suggestions and bug reports for future updates in the discussion section.