Inactive [MISC] bCoolDown 1.3.1 - CoolDown and WarmUp for every plugins commands [803]

Discussion in 'Inactive/Unsupported Plugins' started by beecub, Apr 30, 2011.

  1. Offline

    beecub

    bCoolDown - CoolDown und WarmUp for every command
    Version: 1.3.1
    Download bCoolDown
    [​IMG]



    You want to let your users use commands only every x seconds?
    You want to set a time between typing command and executing?
    This is your plugin.


    Features:
    • set WarmUp time for every command
    • set CoolDown time for every command
    • custom info messages
    • Permissions support (not necessary)

    Examples:
    Show Spoiler

    Explanation:
    If youre typing command /give it will take 60 seconds before you get your items.
    If youre typing command /home it will take 20 seconds before you get home and you have to wait 30 seconds before you can use thecommand again.
    If youre tpying command /spawn youre going to the spawn and you have to wait 60 seconds before you can use the command again.
    Explanation:
    Use &command& to show command in your message.
    Use &seconds& to show seconds in your message (not for already started warm-ups).

    Example-Config:
    Show Spoiler

    #Add your commands in lowercase!
    commands:
    warmup:​
    /give: 60​
    /home: 20​
    cooldown:​
    /spawn: 60​
    /home: 30​
    options:
    message_warmup_alreadystarted: '&6Warm-Up process for&e &command& &6has already started.&f'​
    message_warmup: '&6Wait&e &seconds& seconds&6 before command&e &command& &6has warmed up.&f'​
    message_cooldown: '&6Wait&e &seconds& seconds&6 before you can use command&e &command& &6again.&f'​



    Commands:
    /bCoolDown - reloads config file (use it after changes in your config)


    Permissions:
    Show Spoiler




    Changelog:
    Version 1.3.1
    • lowercase/uppercase - fix
    Show Spoiler

    Version 1.3.0
    • no WarmUp or CoolDown for OPs
    • Permissions support (not necessary)
    Version 1.2.0
    • totally changed Warm-Up management
    Version 1.1.0
    • custom messages
    Version 1.0.1
    • fix: remove done WarmUp procress from hashmap
    Version 1.0.0
    • Initial Release



    (Thanks to DevRW for idea. Thanks to spunkiie for testing, bug-finding and his incredible belief ins this plugin. ;))
    Request?, i wanna do it. Give me Feedback. I want to hear your opinion. Thanks a lot :).

     
    kahlilnc and Tonysp like this.
  2. Offline

    RomaClanServer

    nice, is it possible to make commands usable once per life on bukkit?
     
  3. Offline

    beecub

    should be easy to do :)
     
  4. Offline

    RomaClanServer

    Wow, that would be so awesome
     
  5. Offline

    Latros

    So can you make this work with the commands in other plugins?

    Like with DefaultCommands theres /home, /spawn, etcetc...setting warmups/cooldowns for commands in other plugins will work?

    Like;
    /home
    /sethome
    /spawn
    /mvtp nether
    /freeze
    /mvtp world

    Could I attach cooldowns/warmups to all of these, even though the commands are in other plugins?

    What about commands with spaces, like "/mvtp nether"

    And lastly; what plugin do YOU use for your /home, /spawn, etc, on your server? CommandBook? Essentials? DefaultCommands?
     
  6. Offline

    beecub

    This plugin is made for this, the commands in the examples above are not mine (not in this plugin) :)
    possible, setup a cooldown for "mvtp" it will work for all parameters given to that command :) .

    Using Essentials. Love it :)
     
  7. Offline

    DevRW

    Awesome, glad to see this came into existance!

    However, for some reason the warm up timer locks up and it just says 'warm up timer is already in use' every time, even after relogging. I'll try reinstalling it and readding the commands.

    Small request: Would it be possible, on warm up, to cancel it if the player moves or takes damage? So, if they are in lava or being attacked by a player, they can't use /home to escape. This is my biggest issue on a PvP server. Essentials had this feature with their /home command, I believe, so you may be familiar with it.

    Thanks again man. :)
     
    rnw159 likes this.
  8. Offline

    2Bucks

    you can look into some of the code for Command iConomy on how to set a variable for commands like /warp which may be followed by any warp name

    overall, great plugin, just what I needed.

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

    spunkiie

    You are my new fucking GOD!

    REQ: Custom messages (i.e: Wait before command has warmed up) so I can translate it to my users language :)
    Thank you again, this plugin totally r0x

    Think I found a bug. My /home was set to wait 10 seconds. Worked OK the first time, but, when (minutes later) I issued /home again, this message comes up:

    Warm-Up process for /home has already started.

    I have an 300+ server, many other users are having the same problem.

    Yeap! Bug confirmed.

    It only works for the first time, then you get "Warm-Up process for /home has already started." forever.

    had to disable .
    :(

    Here's a snippet from my users.yml (hope it helps)

    users:
    FireDick:
    warmup: {}
    cooldown:
    /spawn: 01.05.2011 05:28:24
    /home: 01.05.2011 05:27:37
    KawaN:
    warmup: {}
    cooldown:
    /home: 01.05.2011 05:27:30
    FiiM:
    warmup: {}
    cooldown:
    /spawn: 01.05.2011 05:27:14
    admin:
    warmup:
    /home: 0
    cooldown:
    /home: 01.05.2011 05:27:10
    monster_arth:
    warmup: {}
    Dorto123:
    warmup: {}
    cooldown:
    /spawn: 01.05.2011 05:27:17
    JoEy:
    warmup: {}
    cooldown:
    /home: 01.05.2011 05:28:17

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

    beecub

    going to investigate this.
    what plugin are you using for /home ?

    Should be no problem. Going to add this as an option.

    Guy, i found the error, uploaded Version 1.0.1.
    Sry for the trouble you had.

    Version 1.0.1
    • fix: remove done WarmUp procress from hashmap

    You want to use different cooldown times for different parameters?
    Like:
    /warp town
    /warp tower
    /warp house
    ?
    Should be no problem, dont have to look into iConomy to do that, going to add this.
    Or do you want to use CoolDown for commands like "/warp house", this already works, you only have to add /warp into your config, at this time iam ignoring all parameters and do only compare the command.

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

    spunkiie

    Beecub: please add custom messages!
     
  12. Offline

    beecub

    Your users dont like english? :D
    Ok, going to add this :), just for you :D
     
  13. Offline

    spunkiie

    I run a 300+ users Brazillian server :D

    Thank you a million
    btw: Even english admins could customize the alert message, so it isn't just for me :D
     
  14. Offline

    beecub

    guy, here you got it :)
    let the plugin create a new config for you.

    Version 1.1.0
    • custom messages
    Edit: We posted in the same minute (nearly) :D
     
  15. Offline

    spunkiie

    Tested the new bugfix version on my server. Works like a charm :D
     
  16. Offline

    beecub

    custum messages work too?
     
  17. Offline

    spunkiie

    Yeah, they work. But, think i found a new bug :(

    As i said, my server has 300+ users. The plugin was running fine for 5, 10 minutes.. but then suddenly the warmup time started to wait way more then in the config file (i.e: a command set to wait 10 seconds, was waiting 50 seconds). I think this is due my heavy CPU/RAM usage (300+ users remeber?) :(

    Can you make a separated thread just like proPertime plugin ? I was having the same issue with properTime till they change to a separated thread
     
  18. Offline

    beecub

    wanna have a look into properTime code, but i dont think theyre using a new thread in the OS, using properTime too, would have recognised this if they do :)
    i find a way to help you :)
     
  19. Offline

    spunkiie

    :)
     
  20. Offline

    2Bucks

    yeah for example, I want players to be able to use /town spawn, but with a 30 second warmup
    Meanwhile, I don't want them to have to wait to use any other town commands

    Awesome mod btw
     
  21. Offline

    Taemera

    This does not work well with your other plugin, bShortcut (as far as I can tell after using bCoolDown).
     
  22. Offline

    2Bucks

    and finally, I made it a 10 second warmup times for /warp commands (I'm using Essentials), but it took 40 seconds to warp
     
  23. Offline

    beecub

    why?, what does not work? thought i tested it :/
    There is a guy above having the same problem, going to find the solution for this.
     
  24. Offline

    thefoxygranpa

    What's the possibility of having OPs or select permissions exempt from the cooldown times?
     
  25. Offline

    Taemera

    First of all, when I start the server, I get this error:
    Show Spoiler
    [bCoolDown] version 1.1.0 is enabled!
    2011-05-02 12:43:40 [INFO] into
    2011-05-02 12:43:40 [SEVERE] com.beecub.bShortcut.bShortcut.setupDefaultShortcut(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; loading bCoolDown v1.1.0 (Is it up to date?)
    java.lang.NoSuchMethodError: com.beecub.bShortcut.bShortcut.setupDefaultShortcut(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    at com.beecub.bCoolDown.bCoolDown.setupDefaultShortcuts(bCoolDown.java:67)
    at com.beecub.bCoolDown.bCoolDown.onEnable(bCoolDown.java:43)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:632)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    2011-05-02 12:43:40 [INFO] [bShortcut] version 1.0.0 is enabled!

    CB: 740
    Plugins: Archers, Backup, bCoolDown, bShortcut, ChopTree, CookieMonster, FalseBookCore, FalseBookIC, FenceStack, FireFix, FishPeople, HelloWorld, HeroChat, iConomy, IOBookcase, ItemDetector, LWC, mcMMO, OpenInv, PaintingSwitch, Permissions, PlayerList, PorteCoulissante, Seats, SheepFeed, Snowballz, TentThis, ThunderTools, Towny, TradeCraft, Vampire, WeatherPlugin, WorldEdit, WorldGuard


    Sorry for not addressing what exactly was happening.
    Anyhow, I figured out what the problem was:
    I made the cooldown for the command /players all, but instead, I should've used /players.

    The error still shows up on every start.
     
  26. Offline

    beecub

    Ohh, its my fault, sry, seems that i uploaded a dev version of bCoolDown, its wrong. Plead download it again, fixed it :)
     
  27. Offline

    Taemera

    Hehe, not a problem at all ;)

    EDIT: I download the .zip file, extracted it but the error still shows up?
     
  28. Offline

    beecub

    Totally changed Warm-Up management.
    Please test it guys :)

    Version 1.2.0
    • totally changed Warm-Up management

    its done :)


    Version 1.3.0
    • no WarmUp or CoolDown for OPs
    • Permissions support (not necessary)

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

    thefoxygranpa

    Love the plugin, thanks again! Going to install ver 1.3 today :)

    I think this was mentioned before....but having an option to disable warmup if the player moves. This would be extremely useful for PVP servers to stop people from teleporting away in combat.

    Cheers!!
     
  30. Offline

    spunkiie

    1.3
    My console is getting flooded with:

    2011-05-02 16:05:01 [SEVERE] Could not pass event PLAYER_COMMAND_PREPROCESS to bCoolDown
    java.lang.NoClassDefFoundError: com/nijiko/permissions/PermissionHandler
    at com.beecub.bCoolDown.bCoolDownPlayerListener.onPlayerCommandPreprocess(bCoolDownPlayerListener.java:26)
    at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.java:230)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:669)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:640)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:634)
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
    at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)


    Btw: I don't use permissions (and won't use for while)
     

Share This Page