NO SPAMMING BLOCKS! "You must wait 10 seconds before placing block!" [FORMATTED]!

Discussion in 'Archived: Plugin Requests' started by zecheesy, May 30, 2012.

  1. Offline

    zecheesy

    Plugin category:
    [MECH] [MISC] [SEC]

    Suggested name: SpamBlock, AntiSpamBlock, WaitBlock, TimedBlock, BlockWait... ect.


    A bit about me: My item spawning server has too much lag, due to TNT, EXP bottle, LAVA, and WATER spamming. I need a plugin that makes you wait X seconds before you can place the block / throw the item again.


    What I want: A plugin that makes you wait X seconds before you can place the block. You can define the X seconds inside the config.

    And also, you must wait X seconds before THROWING the item. You can define X seconds inside the config.

    Also eject a message saying: You must wait X seconds before using this item/block unless you donate.
    Example config:

    Code:
    blocks:
    - 1 = 1 #which would make you wait 1 second before placing stone
    - 3 = 60 #wait 60 seconds before placing dirt
    - 87 = 300 #wait 300 seconds before placing netherrack
    - 17 = 3 #ect..
    throws:
    - 332 = 10 #wait 10 seconds before throwing snowballs
    - 344 = 1 #wait 1 second before throwing egg
    - 384 = 100 #wait 100 seconds before throwing each exp bottle
    basically, the format is - (item ID) = (seconds)

    Ideas for commands: /spamblock reload (or /<plugin name> reload) Leave this permissions default as OP. It reloads the config

    Ideas for permissions:
    - spamblock.bypass (bypasses the timed stuff)

    When I'd like it by: As soooon as possible please!!


    Similar plugin requests: THIS ONE!


    Devs who might be interested in this: How about you?
     
  2. Offline

    Elon_Than

    Sounds interesting, I can write this plugin.

    I think it'll be done until monday.
     
    zecheesy likes this.
  3. Offline

    zecheesy

    YAY! My server's lag will be over! Thank you :D
     
  4. Offline

    notrodash

    10 SECONDS??? How long will building a house take then? Just get NoCheat+ and WorldGuard
     
  5. Offline

    DocRedstone

    I'd be happy to work on this for you if you still want it! zecheesy
     
  6. Offline

    Elon_Than

    I said I'll write this plugin, but you can do that if you want ;)
     
  7. Offline

    zecheesy

    Dude.. My server allows people to use TNT (unlike a ton of noob servers), since it's an item spawning server.
    But the server lags when someone decides to 1000 tnt, so I would like a wait between placing certain blocks.
    It also lags when eggs/snowballs/EXP potions are excessively thrown.
    I have both of em.
    Thanks! It's not my choice.. but whoever can do it quick, do it ;)
     
  8. Offline

    DocRedstone

    Oh my apologies. I never saw that post. Be my guest you had dibs.
     
  9. Offline

    Elon_Than

    So like I said, it'll be done until monday :)

    Ok, I've something, but it's not all. There is problem when you drop items by drag&drop, item is going back to inventory but is invisible, you have to pick up something to refresh inventory. I'll try to find solution, but maybe someone know what to do?

    Temporary download link: http://core.hws.pl/bukkit/pluginTesting/ForceDelay.jar
    Drop listener:
    Config:
    You can use forcedelay.immunity and forcedelay.reload permissions to get immunity or to get ability to reload config file by command /fd reload

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

    zecheesy

    Umm, why is there a delay when you drop items? Oh, and is there a delay for throwing items (like EXP potions)?
     
  11. Offline

    Elon_Than

    Ups, I thought you want item drop delay :D I'll add throwing delay, but I don't know if I can do that today.

    Throwing delay added. Also you can set removeExpOrbs and detonateTNT to true in config to remove orbs and detonate tnt instantly (as you requested in another topic :) ). removeExpOrbs works also for exp potions, so when someone throw it all exp will be added to his exp level without dropping orbs.

    There is still problem with dropping items using drag&drop but I'll work on in today.

    Example config:
    Code:
    language: EN
    removeExpOrbs: true
    detonateTNT: true
    actions:
      place:
        '3': 25
      drop:
        '3': 10
      throw:
        '384': 10 # exp point throwing delay
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  12. Offline

    Elon_Than

    Once again, updated :)
    Everything seems to work (I have no time for detailed testing now).

    Link stays the same: http://core.hws.pl/bukkit/pluginTesting/ForceDelay.jar
    Current version: 1.0.3

    If someone is interested in solution for drag&drop problem, just add player.updateInventory() in delayed task one tick after event.
     
  13. Offline

    zecheesy

    Thanks! Ill test it now1

    Error:
    http://i.imgur.com/g5Q0C.png
    [​IMG]

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

    Elon_Than

  15. Offline

    zecheesy

    WOw this is great! NO LAG :D
    But is there a way to make all drops take X seconds restriction?
    Example
    Code:
    actions:
      place:
        '46': 10
      drop:
        'all': 5 #makes all drops take 5 seconds
      throw:
        '384': 10 # exp point throwing delay
     
  16. Offline

    Elon_Than

    Updated :)
    You can use 'all' in every section in 'actions'. When 'all' is set, you can also set delay for specified action.

    Code:
    actions:
      place:
        '46': 10
      drop:
        'all': 5 # minimum delay for dropping all items is 5 seconds
        '3': 10 # but minimum delay for dropping dirt is 10 seconds
      throw:
     
  17. Offline

    Elon_Than

    @zecheesy
    Did you test this plugin?
     
  18. Offline

    zecheesy

    yes! yes it works :) Thank you so much :D
     

Share This Page