Parental control / time based ban

Discussion in 'Archived: Plugin Requests' started by Madness, Mar 31, 2011.

  1. Offline

    Madness

    I run a server with a couple of friends, and one of the players is a young kid, son of one of my friends, lately he got in trouble 'cause he logged in late at night and played until early in the morning, failing some tests he had in that same morning at school.

    Would it be possible to make a time limit control ban system? Like "no more than 2 hours a day for this user, and not after 1 AM" ?
     
  2. Offline

    MisanthropX

  3. Offline

    Madness

    That wouldn't do, I need it to be automated as much as possible as I won't be able to enforce it manually, were I able to do it I wouldn't need a plugin in the first place.
     
  4. Offline

    h0us3cat

    tell hes parents to look at the kid...
     
  5. Offline

    petteyg359

    Second that. I find it simultaneously amusing and greatly depressing that so many people today refuse to do their job as parents.
     
  6. Offline

    Madness

    I guess you have a lot of kids considering how you talk.
    The father is a friend of mine, and he's doing what he can, but removing the temptation until the kid learns to handle it is better than the alternative, taking away his pc.

    But regardless of the why, is someone actually willing to develop it? Perhaps base it on an economy system.
     
  7. Offline

    Carbon131

    @Madness

    Yes this could be done, I'll look into it for you and get back to you.
     
  8. Offline

    h0us3cat

    Some days later... kid opens new thread. "Is there a way i can bypass parental cpntrol plugin?"
     
  9. Offline

    Madness

    He could with a different account, but I'm whitelisting, so yeah, he can't. :p

    But it's ok if he tried, the hacker mindset is a healthy one, let's just make it so he has to put some effort in it. :p
     
  10. Offline

    Madness

    Any updates? The kiddo has been banned for a while now, it'd be nice to let him rejoin.
     
  11. Offline

    Jorrdan

    Cmon guys, this sounds like a good plugin to have. Please develope it?
     
  12. Offline

    MisanthropX

    http://forums.bukkit.org/threads/admn-simplecronclone-v0-2-a-cron-like-scheduling-system-527.6331/

    I hope that does it

    by the way:

    yes, definitely better than taking away pc.
    I learnt by myself, meaning that my parents never restricted me to do anything, but let me learn from my own problems and troubles was the best way.
    However, removing the temptation until he learns to handle it is okay too if the kid doesn't care about being tired the next morning or getting worse grades at school.
     
  13. Offline

    Madness

    That might work to prevent him to join during some times of the day, but it doesn't keep track of the remainder of the day. I had already seen that cron tool, and it's not what I need.
     
  14. Offline

    opatut

    I can do that plugin for you. But it will take a few hours, probably, because there are several features. I will implement it with rules for different players. Rules can be the following
    • no login between XX:XX and XX:XX
    • kick at XX:XX with message
    • count the minutes online the day, kick and prevent login after XX minutes
    Any more types of rules you'd like to see?

    Again, give me a few hours, maybe until tomorrow evening (I have school until 4pm. CET tomorrow, then I will continue the work :D (lol I care about my online time ;)))

    Example configuration files:

    plugins/ParentalControl/rules.yml
    Code:
    rules:
        notatnight:
            type: time
            from: '23:00'
            to: '6:00'
            message: "You shall not play at night."
            warn: true
        toolongtoday:
            type: onlinetime
            minutes: 60
            message: "You already played %n minutes."
            warn: true
    
    plugins/ParentalControl/players.yml
    Code:
    players:
        smallkid: >
            - 'notatnight'
            - 'toolongtoday'
        bigkid: >
            - 'toolongtoday'
    Like the idea?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  15. Offline

    Madness

    Prevent login means?

    Dunno if it can help but maybe implement a pseudo economy like system, like a player has a "wallet" of up to 180 minutes, and it fills up with 120 minutes every day, as soon as you "consume" your last minute, you're kicked out, also, it should prevent logins from ppl who have less than 20 mins saved up.
     
  16. Offline

    iPhysX

    Surely all that isnt necessary,

    Code:
        Date todaysDate = new java.util.Date();
        SimpleDateFormat formatter = new SimpleDateFormat(
                "EEE, dd-MMM-yyyy HH:mm:ss");
    
        String formattedDate = formatter.format(todaysDate);
    Get the server time..

    Code:
    public void onPlayerJoin(PlayerJoinEvent event) {
    
            Player player = event.getPlayer();
    if(player.getName() == USERNAME && (SOME TIME STUFF){
    event.setCancelled(true)
    }
    
    
    i may be wrong.
     
  17. Offline

    opatut

    @Madness: "prevent login" means that if the player tries to join the server he will get a message (which you may configure, for example "You shall not play at night.") and cannot login. Aren't you native English speaker? I can also do the wallet thing for you, but that would mean if the player does not join for a whole week he'd have 840 minutes = 14 hours to play. This would not cover the night :D However if you want I can do that, too.


    @iPhysX: Well the examples were not about the programming but about how much you'll be able to configure.... Of course I will get the server time somehow with a similar/the same method you suggested. It's just that I want to have it a bit customizable so I can submit it as a plugin and more people than only Madness can profit from it.
     
  18. Offline

    iPhysX

    I was only thinking about madness when i made that post :)
     
  19. Offline

    Madness

    Yeah but not able for how long? How is it configured? If he connects for 59mins and then disconnects, can he reconnect?
     
  20. Offline

    iPhysX

    you could install jail as a temporary solution. jail him at 1am for like 10 hours or so?
     
  21. Offline

    opatut

    No let me just make the plugin you'll see then :D

    I can make it so that you can configure it the way you want. I understand your reason for this plugin so I will make it reasonable ;) You will be able to assing "wallets" to collect minutes even if the player is not online, you can also set a limited number of minutes per day that will not remain on the following day and you will also be able to set times (e.g. in the night) when the user cannot play.

    If the user cannot play (e.g. because he does not have any minutes left or it is late in the night) then he will be kicked AND will not be able to login.

    /edit: It's time for me to go (11pm.) I have a Maths exam tomorrow. I will finish the plugin after school ;D Well it's ironic I am student who works until "late" at night to help adults stop their children from playing at night because they fail at exams, and I have an exam tomorrow myself :p Well it's only maths. :p
     

Share This Page