Filled Erase

Discussion in 'Plugin Requests' started by Resoluciones, Nov 22, 2020 at 10:11 AM.

  1. Offline

    Resoluciones

    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.
     
  2. Online

    timtower Moderator Moderator

    @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.
     
  3. Offline

    Resoluciones

    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!
     
  4. Offline

    KarimAKL

    Last edited: Nov 23, 2020 at 8:46 AM
    Resoluciones likes this.
  5. Offline

    Resoluciones

    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!
     
    Last edited: Nov 23, 2020 at 5:35 PM
    KarimAKL likes this.
  6. Offline

    KarimAKL

    Resoluciones likes this.
  7. Offline

    Resoluciones

    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
    upload_2020-11-24_7-22-22.png

    Thanks!
     

    Attached Files:

    KarimAKL likes this.
  8. Offline

    KarimAKL

    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?
     
  9. Offline

    Resoluciones

    that would be not necesary for me Karim

    Thanks!!!!!!
     
  10. Offline

    KarimAKL

    @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
    1. /erase 7ms = 7 milliseconds
    2. /erase 7s = 7 seconds
    3. /erase 7m = 7 minutes
    4. /erase 7h = 7 hours
    5. /erase 7d = 7 days
    6. /erase 7w = 7 weeks
    7. /erase 7M = 7 months
    8. /erase 7y = 7 years

    There are some alternatives as well:
    Alternatives (open)
    Code:Java
    1. // Milliseconds
    2. /erase 7ms = 7 milliseconds
    3. /erase 7milliseconds = 7 milliseconds
    4. /erase 7millisecond = 7 milliseconds
    5.  
    6. // Seconds
    7. /erase 7s = 7 seconds
    8. /erase 7seconds = 7 seconds
    9. /erase 7second = 7 seconds
    10.  
    11. // Minutes
    12. /erase 7m = 7 minutes
    13. /erase 7minutes = 7 minutes
    14. /erase 7minute = 7 minutes
    15.  
    16. // Hours
    17. /erase 7h = 7 hours
    18. /erase 7hours = 7 hours
    19. /erase 7hour = 7 hours
    20.  
    21. // Days
    22. /erase 7d = 7 days
    23. /erase 7days = 7 days
    24. /erase 7day = 7 days
    25. /erase 7 = 7 days (default time unit)
    26.  
    27. // Weeks
    28. /erase 7w = 7 weeks
    29. /erase 7weeks = 7 weeks
    30. /erase 7week = 7 weeks
    31.  
    32. // Months
    33. /erase 7M = 7 months
    34. /erase 7mo = 7 months
    35. /erase 7months = 7 months
    36. /erase 7month = 7 months
    37.  
    38. // Years
    39. /erase 7y = 7 years
    40. /erase 7years = 7 years
    41. /erase 7year = 7 years
     
    Resoluciones likes this.

Share This Page