Plugin category: Mechanics Minecraft version: Paper version git-Paper-262 (MC: 1.16.4) (Implementing API version 1.16.4-R0.1-SNAPSHOT) Suggested name: Erase What I want: I would like a command that would be executed by console or by other pluginsas as follows: /erase 7 # all playerdata files for all players that were inactive for 7 real world days (in example) are deleted from the worlds/server. Ideas for config: - Returning players: "Your data was deleted for inactivity" - Online players notification (logged in console also): "playername1, playername2, etc etc etc were deleted for inactivity" Ideas for permissions: erase.inactives When I'd like it by: Whenever it is possible.
@Resoluciones Slight issue with this: you can delete user data, but also having it delete economy stuff etc requires us to know which plugins you want to delete from.
It is important what you say, thanks timtower! My economy plugin already has that function (autodeleting balances), also has a command for that to manually do it. There are not other plugins tracking user info currently. Thank you very much!
@Resoluciones I will attempt this. You should be able to expect it to be done soon, unless I inform you otherwise. Edit: I believe it is finished. However, I have not tested it. Download: https://www.dropbox.com/s/ttvd21eu0jxmju7/Erase 1.0.jar?dl=0
Great! I will test it in a moment!!!!!!!!!!! Thanks!!!!!!!!!!!!! EDIT: follows error in console: https://pastebin.com/gXejqE6G Maybe you have time to check it. Thanks!
Of course. Just looking at the error, I see what is wrong. I will edit this post in about two minutes with a fix. Edit: Fixed! Download: https://www.dropbox.com/s/ttvd21eu0jxmju7/Erase 1.0.jar?dl=0
Thanks Karim, the plugin loads perfect! Can I ask you, it seems the plugin is activating the deletion itself. Can this be possible? I mean, was that intentionally? If possible can you add a way to deactivate that? as I prefer to do it manually or by other plugins or by the control panel task creator Thanks!
Yes. That was intentional, but only because I forgot the exact purpose of the command and remembered wrong. The plugin is set to check for any playerdata files older than the set time, every 5 minutes. Yes. I will do that. Sorry about the inconvenience. When you say "deactivate", do you want it to still be an option toggleable in the config file?
@Resoluciones This should do it: https://www.dropbox.com/s/ttvd21eu0jxmju7/Erase 1.0.jar?dl=0 Note: The command works like this: Code:Java /erase 7ms = 7 milliseconds/erase 7s = 7 seconds/erase 7m = 7 minutes/erase 7h = 7 hours/erase 7d = 7 days/erase 7w = 7 weeks/erase 7M = 7 months/erase 7y = 7 years There are some alternatives as well: Alternatives (Move your mouse to reveal the content) Alternatives (open) Alternatives (close) Code:Java // Milliseconds/erase 7ms = 7 milliseconds/erase 7milliseconds = 7 milliseconds/erase 7millisecond = 7 milliseconds // Seconds/erase 7s = 7 seconds/erase 7seconds = 7 seconds/erase 7second = 7 seconds // Minutes/erase 7m = 7 minutes/erase 7minutes = 7 minutes/erase 7minute = 7 minutes // Hours/erase 7h = 7 hours/erase 7hours = 7 hours/erase 7hour = 7 hours // Days/erase 7d = 7 days/erase 7days = 7 days/erase 7day = 7 days/erase 7 = 7 days (default time unit) // Weeks/erase 7w = 7 weeks/erase 7weeks = 7 weeks/erase 7week = 7 weeks // Months/erase 7M = 7 months/erase 7mo = 7 months/erase 7months = 7 months/erase 7month = 7 months // Years/erase 7y = 7 years/erase 7years = 7 years/erase 7year = 7 years
Plugin is working perfect, thanks!!! @KarimAKL May I ask you for an addition that came to my mind? Would it be possible that when the playerdata is erased, the items in the player's inventory are automatically dropped on the position when that player last logged out? Other option, is that the items go directly to the "garbage collector" as I have another plugin that recycles the items in the "garbage collector". That would help me a lot, as I am trying ways to "recycle" items in my server. Thanks!
Great! I am glad to hear it. Sure, I do not think that will be a problem. What "garbage collector" are you talking about?
@KarimAKL "Garbage collector" maybe it is not the correct name. You know the setting " item-despawn-rate: 6000" those items are sent to somewhere that I don't know how to call it. And then, remember that plugin you recreate some time ago that catches those despawned items and then are recovered back when braking something? I was thinking on the possiblity of items from inactive people are sent to that place also, in case it is possible of course.
I do not remember how I did that, so I will have to look at the source code (I believe I still have it), and then I will probably have to add an API of sorts for it. They are probably just removed from the game, but I should be able to catch them somehow (if the other plugin does not already do that). PS: "garbage collector" is a fine name, I just did not know what you were talking about.
@Resoluciones Lately I have been busier than I usually am, and then I decided to try something new, so it might have taken a little longer, but it should be done and working. However, it is untested, so let me know if you encounter any problems. Erase: https://www.dropbox.com/s/ttvd21eu0jxmju7/Erase 1.0.jar?dl=0 Equinox: https://www.dropbox.com/s/remneytgmkumdd2/Equinox 1.0.jar?dl=0 There should be no difference to Equinox, other than the fact that I made Erase able to access the items in it, which then requires you to get that version of it. Edit: Btw, do you want me to remove "<server>/<world>/stats/<uuid>.json" as well as "<server>/<world>/playerdata/<uuid>.dat"?
It should be done. I did not change anything else, because you have not encounter any problems yet. Download: https://www.dropbox.com/s/ttvd21eu0jxmju7/Erase 1.0.jar?dl=0
Thank you Karim! /erase is giving internal error as per detail in pastebin: https://pastebin.com/eNqShCjB Maybe you have time to check it. Thanks!
you are right! let me check it! @KarimAKL pls forget the error above, it was my fault! I will let you know if any issues! Thanks! EDIT: follows "real" error, I think: https://pastebin.com/DgSqMnkj Thanks!