Time based action restriction plugin

Discussion in 'Archived: Plugin Requests' started by 7h3d4rkw0lf, Jan 8, 2013.

  1. Offline

    7h3d4rkw0lf

    Plugin category: ADMN

    Suggested name: TickRestrict

    What I want: A better name than the one I thought up of in 5 seconds, lol. Actually though, there are plenty of plugins that outright disable certain blocks/items but I can't seem to find a single one after searching for a good hour that can give users a certain "threshold" for performing an action. By threshold, I imagine that the plugin would limit actions based on ticks.

    eg, I would be able to configure the plugin so users would only be able to launch fireworks every 20 ticks.

    Specifically, I wanted this plugin to reduce the amount of spam people throw up with fireworks/eggs/potions/etc on creative worlds. They do legitimately have their uses if used in moderation but can also get rather messy when you have half a dozen people spamming fireworks.

    I would imagine that this plugin might get a bit messy considering all the checks it would have to perform. If it seems a bit too difficult to check efficiently, perhaps a plugin specifically limiting fireworks, eggs, and xp bottles will work.

    Finally, if this plugin could perhaps have multiple "group" configurations in the config file, it would be nice. I imagine this sort of like how uHome's "limits" work. Basically, if I have in the config something like

    Code:
    players:
        groups:
            default:
                '401': (fireworks)
                    - 20 (ticks)
                '344': (regular eggs)
                    - 10 (ticks)
            trusted:
                '401':
                    - 10
                '344':
                    - 5

    I realize that there would be ways to bypass individual player actions by placing items into dispensers. One idea might possibly be that the plugin would check dispensers for items that the you can configure for the plugin to check for. If any of said items are in the dispenser, restrict the repeatable interval by x ticks. If multiple items that are being checked for are present, then the restricted time will be the longest tick. Eg if fireworks were limited to once every 15 ticks from dispensers and eggs were limited to once every 10, then the dispenser will only activate every 15 ticks even if the eggs can be activated every 10.

    Another idea, though this is more difficult and I'm not sure if even possible, is that the plugin won't "fire" any restricted items and resort to a different items instead. Taking the previous paragraph's example, let's say I fill a dispenser with both fireworks and eggs. I have a clock hooked up so that it activates the dispenser every 10 ticks. For the first round, the dispenser will fire either fireworks or eggs. Let's say it fired a firework. The plugin now saves that it fired and will restrict it from firing for another 15 ticks. Next time the pulse reaches the dispenser, it's at the 10 tick mark since the last time it's fired. The plugin will automatically diregard the firework from firing because it hasn't been its designated 15 tick restriction period and will automatically resort to firing the egg instead.

    example configuration:

    Code:
    dispensers:
        default:
            '401':
                - 15 (ticks)
            '344':
                - 10
        trusted:
            '401':
                - 10
            '344':
                - 5
        


    Ideas for commands: Perhaps just a reload command

    Ideas for permissions:
    tickrestrict.<groupname>(configurable)
    tickrestrict.reload



    When I'd like it by: Sooner the better. Maybe by February at latest.
     
  2. Offline

    7h3d4rkw0lf

    Bump, anyone interested? Or is the plugin just an impossible request in the first place? lol
     
  3. Offline

    Sven Olderaan

    This can be made, but I don't have the time for it.
    Sorry :(
     

Share This Page