Full REVAMP! All of the bug fixes like bossbars, reload errors, etc. have been fixed. Also, I've done A LOT more optimizations, should be at least 50% more efficient than before.
P.S. Also posted on github
Bug fixes:
- Memory Leak
- 1.20.6 support
Quick fix, rewards were not being given.
Optimization + random "null" error should be fixed
By using the 2.0.1 version you will now be able to use the event AFKRewardEvent whenever a player receives a reward. Check our github for more
API! You can now integrate ToastedAFK api inside your plugin if you're looking to create new things + I made some code organization
The plugin would give an error related to chunks when starting up. Now it's fixed.
You can now add lists to probabilities and also timeout players for spending too much time inside the afk arena (great for bots)
Timeouts:
timeout:
times: 0 # put 0 to not use this feature
commands:
- "msg {player} you have been teleported back to spawn!"
# - "tp {player} -2217 94 -490"
New probabilities:
probability_commands:
first_prob:
commands:
- "msg {player} first_prob"
- "msg {player} 50%"
chance: 50.0
second_prob:
commands:
- "msg {player} second_prob"
- "msg {player} 35%"
chance: 35.0
third_prob:
commands:
- "msg {player} third_prob"
- "msg {player} 15%"
chance: 15.0
PlaceholderAPI didn't sometimes register %afktimer%. I included it as a soft dependency. Now it should work 99% of the times.
Inside the loading screen, you can now also use the actionbar's timer. Just put {timer} there
The timer would decrease by 2 seconds instead of 1
players could use /tafk bossbar and change the colors and styles of it/also activate/deactivate them, new perms: afk.bossbar, afk.list and afk.check
Misuse of parallel streaming fixed
Title self explanatory ^-^
When the player was inside region and if he left, you would get this error:
Cannot invoke "me.serbob.toastedafk.Classes.PlayerStats.getLevelTimer()" because the return value of "java.util.Map.get(Object)" is null
Now it's fixed (the problem was it was being called 2 times)
I forgot to remove worldguard dependency (it was for a test)
Fixed a random bug where sometimes the region didn't work because of unsafe threads.
The title is self-explanatory
On version 1.12 or below sendtitle didn't work. (Now it does so ez)
Feature:
- This algorithm should be 5x faster than the chunk-based one
New features:
- Ability to now use the loading screen in actionbar and bossbar!
- Text for a player when he enters/leaves a region
- Faster player checking, I've implemented a much better player finding algorithm based on chunks, 5x more efficient than the other one
- Reward Synchronization, true/false (by def false) players will now all be handled their timers by a global timer
- In random commands you can now put more commands to be executed at once
- Each command that doesn't work, won't break the plugin anymore. Instead, it will warn you inside console about the command that isn't working.
Bugs fixed:
- When using a denied command, it would remain forever denied
New features:
* Hex Support
* Ability to change how many seconds all the players are checked/given rewards/timers/etc., by default it's 1 sec
* Ability to enable/disable random commands/probability commands/commands themselves
You can now use actionbars and titles on 1.8 to 1.19.2!
Updated the metrics so now it works
Fixed some small bugs, one noticable being the increasing priority of when a player leaves when inside the region and also now it should remove them correctly
New features:
- probability commands (you can now put a percentage in config.yml for each command, must sum up to 100)
- AFK Reload Force will now work fully
- Metrics added
Bugs fixed:
- When using afk reload force and show_xp is true, it would leave the player's xp from the timer there
- After reloading, the configuration values wouldn't fully load
Hello, this new version has the new following features:
- Title Screen (title + subtitle) also, you can put there a loading screen
- Random Prizes
Bug fixes:
- 1.8.x didn't work, now it should
IMPORTANT NOTE!
I know I've said that I'll add in this feature multi regions, but me and my team have decided to make this plugin premium which will have that following feature. To be let known when the premium plugin will be published, join my discord
.
Any commands put inside denied_commands were acting globally, now only when inside region
Partial Update 1.6.0:
Features:
- Bossbar -> done
- Don't lose xp inside region (without showing XP bar timer) -> done
- Command to show all players inside all the afk regions -> done
- Placeholder for timer -> done
- Deny Commands -> done
Bugs fixed:
- Dupe bug fixed (you kept rejoining lobby and back in afk area, therefore you could glitch)
- Some other small minor bugs + some code cleaning
There will be another update with the other part of 1.6.0 being:
- Multiple afk regions -> to do
- Random prizes -> to do
- Timed screen notification -> to do
Added action bar
config.yml will have new stuff like:
actionbar:
show: false
messages:
sg_day: " day, "
pl_day: " days, "
sg_hour: " hour, "
pl_hour: " hours, "
sg_minute: " minute, "
pl_minute: " minutes, "
0_seconds: " Resetting!"
sg_second: " second."
pl_second: " seconds."
before_msg: "{player} has been afk for >> "
Also, the hotfix, sometimes people with OP didn't get recognized so they were getting the commands executed each second
I am sorry for posting so many, repeteadly updates, but I've found another bug that had to be fixed. So you may know that in config when you type sgive {player} {something} it works, but if you wanted to use the command itself ingame, it wouldn't work
If you are using silentgive in 1.5.2, items won't be given to players who don't have the inventory full. This is now fixed.
Bugs fixed:
- If your inv is full (not even stacks) it won't give the items in command (in custom NBT)
- If someone dies inside the region, the level won't be restored
When inside the region, players could use the xp from xp bar to enchant/repair in anvils
Update 1.5
So, so far the new update will have:
- Show time on xp bar (after you leave the afk area it will go back to normal) - Reload command
- Nbt Support
- Silent commands
- Fixing know bugs:
* You cant select location if you don't click on a solid block
- Made it perm based instead of only Luckperms rank based
So, even though I've added softdependencies the worlds plugins, on some servers, the plugin still didnt load those softdependencies, therefore it lead to rewards not working on server restart.
Now, I've made to plugin to get enabled when the server/libraries are fully loaded! It should work now.
Sorry, if it didn't work with the hotfix I gave you in the version 1.4.1...
If you're using Multiworld / Multverse-Core, you'll see that after restarting the server, the rewards won't work anymore. This is because the plugin always loaded before them. I fixed it, you should take this new version!
Changes:
- Now the plugin can even work on servers for 1.8.x
- You don't need to use regions to define the area, you can just make your own region using /afkwand
- 2 new commands: /afkwand and /afksave
- 2 new permissions:
afkwand.use:
default: op
afksave.allow:
default: op
Changes:
- Before, if you didn't have Luckperms on your server, the plugin would've just stopped. Now you can use the plugin even without Luckperms
- It works for 1.17.x - 1.19.x
Changes:
- Optimization
- Code cleanup
- Update checker (permission: afk.update)
- Added new line inside config.yml
- More to come soon!
default_afk_time: 1200
didn't matter before, now if a rank isn't there, instead of giving the player numerous times the command, it will get the time from
default_afk_time: 1200
Now the config.yml will give you access to give users with rank lower afk time
Forgot to add in plugin.yml the dependencies:
[WorldGuard, FastAsyncWorldEdit]