[ADMN/MISC] ButtonControl v3.0 - Control the weather/time with buttons [Vault] [1531]

Discussion in 'Inactive/Unsupported Plugins' started by Johni0702, May 27, 2011.

     
  1. Offline

    Johni0702

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    ButtonControl
    v3.0
    BukkitDev (download here)



    As of the fact i recoded the whole datastructure of the plugin, all configfiles before 3.0 are NOT compatible with newer versions!


    A simple plugin to control the weather or time with buttons. Your servervisitors can switch the weather and time for free or for items (Vault economy is supported too). You can use Buttons or Pressure Plates. I´ll include new things too, simple write it in the comments.

    Features:
    • Control weather or time using buttons
    • Control weather or time can cost something
    • You can use (Stone) Pressure Plates too
    • All messages can be modified
    • Vault economy support
    • MultiWorld
    • BukkitPermissions support
    • Cooldown
    How to set buttons:

    The command depends on wheather Vault is installed or not.

    1.type (buttoncontrol.set Permission needed)
    "/buttoncontrol <sunny/rain/thunder/day/night> <Money> <Receiver>"
    or
    "/bc <sunny/rain/thunder/day/night> <Money> <Receiver>"

    <Receiver> is the person who gets the money whenever some uses the button/pressureplate



    1.type (buttoncontrol.set Permission needed)
    "/buttoncontrol [sunny/rain/thunder/day/night] <amount> <item>"
    or
    "/bc [sunny/rain/thunder/day/night] <amount> <item>"


    2.You´ll get a message "Press a button!"
    3.Do what the message says.
    Press the button/pressure plate which should become the rain/thunder/stop/day/night button.
    4.If you get an other message, the creation was succesfull

    How to remove buttons:
    Destroy them ingame and they´r gone. (if you have permission to do so)

    How to use buttons:
    1(only without Vault).Take the required items in your inventory.
    2.Click the button./Walk on the pressure plate.
    3.You get a message and your "money" was take away
    4.Look at the sky -> the weather/time changed

    Permissions:
    To set Buttons: buttoncontrol.set
    To destroy Buttons : buttoncontrol.destroy
    To use buttons:
    -day: buttoncontrol.time.day
    -night: buttoncontrol.time.night
    -sunny: buttoncontrol.weather.sunny
    -rain: buttoncontrol.weather.rain
    -thunder: buttoncontrol.weather.thunder

    Configuration:
    Default conig file:
    Code:
    Cooldown: 0 //time in sec you have to wait befor an button can be pressed again
    Buttons: []          //DO NOT CHANGE ANYTHING HERE (exept you know what you do)
    Duration:              //how long the changed weather MUST be in secounds(if not changed again)
        thunder: 10
        rain: 10
        sun: 10
    messages:  //a lot of configurable messages
        ...
        ...
    
    Github

    Todo:
    • Add iConomy support(Vault)
    • Add permissions support
    • Add Essentials support(Vault)
    • Add MultiWorld support
    • Search bugs
    • Fix bugs
    • Add BOSEconomy support(Vault)
    • You can set the money for every button different
    • add an account that earns money when a player pushs an button
    • add an cooldown
    Changelog:

    v 3.0:
    • Recoded the inner data structure of the plugin
    • Updated to new Listener API
    • Updated to BukkitPermissions
    • Added Vault support instead of only iConomy
    v 2.3:
    • Added an Cooldown
    • Added an account that earns money if an player pushs an button
    • fixed "No Permissions" message

    v 2.2:
    • Addded Permissions support (thx to flames)
    • Fixed: If a button is free , now you can hold anything in your hand
    • Fixed: All the time MultiWorld didn´t work
    v 2.1.1:
    • Fixed Bug: iConomy takes one prize even if the buttons have all different
    v 2.1:
    • All buttons can cost different
    v 2.0:
    • Renamed the plugin from "ButtonWeather" to "ButtonControl"
    • Added: control time by buttons/pressure plates
    • fixed one very little bug
    v 1.5.2:
    • fixed bug again: changed messages didn´t load from the config
    v 1.5.1:
    • fixed bug: changed messages didn´t load from the config
    v 1.5:
    • fixed bug: if you hold the exact amount of money it won´t disapear
    • added Pressure Plates support
    • fixed bug: if you break an button and anyone (without he´s OP) place it again, the button works
    v 1.4:
    • all messages can be changed in the config now
    v 1.3:
    • now you haven´t to take the EXACT amount of money in your hand
    v 1.2.3:
    • fixed error if klick in the air
    v 1.2.2:
    • fixed an bug in the savesystem that saved the count of the stop/thunder buttons wrong
    v 1.2.1:
    • fixed an bug on the stormbutton
    • fixed an bug in the savesystem
    v 1.2:
    • added MultiWorld support
    • fix a lot of bugs
    • now unlimited buttons can be set
    • changed weather is now longer (configurable)
    v 1.1:
    • added iConomy support
    v 1.0:
    • Main plugin

    This post has been edited 2 times. It was last edited by Johni0702 Aug 24, 2012.
    nicoxxl, vrox and Lolmewn like this.
  2.  
  3. Offline

    Johni0702

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    1. move the ButtonControl.jar form the ButtonControl.zip into your plugins folder
    2.restart the server
    3.nothing more
    4.didn´t you read 3. there is nothing more
    5. see 4.
  4. Offline

    Joeyderijk

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    huh? i saw a meta inf folder, a me (?) folder and a plugin.yml :S
  5. Offline

    Tehminecraft97

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Great plugin, love it! ;D ;)
  6. Offline

    Johni0702

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    If you downloaded from File-Upload you got a ButtonControlv2.2.zip. In the .zip folder is a ButtonControl.jar.
    Move the ButtonControl.jar into your plugins folder.
    If you downloaded from DropBox (the secound link in the threat) you got the ButtonControl.jar.
    Move the ButtonControl.jar into your plugins folder.
    But don´t open the ButtonControl.jar. It is the plugin, there´s nothing inside you have to take out. So DON´T OPEN IT.
  7. Offline

    Inf

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I would love to see a cooldown on these. Onbig servers its a problem if ppl can change it every 2 sec... a configurable CD would be the best!

    Btw, nice plugin!
  8. Offline

    fsmain

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    how do i control which iConomy account the proceeds go to? didn't find that option anywhere, would be great if it were possible to give the money to our "city" account. Really great plugin though, at first thought of making one myself but seeing this was already here ;) huge thanks!
    sbeex likes this.
  9. Offline

    ThaRebel

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Awesum, can i ask you if you can put players that push buttons put in certain groups? would be awesum!
  10. Offline

    Johni0702

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    sorry but i didn´t understand what you mean (maybe because my english is not very good).
    do you mean something like permissions?
  11. Offline

    Johni0702

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    will add this with the next version i hope :)
  12. Offline

    Johni0702

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    no account will get the money the plugin eats it alone.
    but i think i´ll add this feature with the next version
  13. Offline

    fsmain

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    that'd be really cool, thx :)

    nebenbei, woher aus deutschland kommst? raum stuttgart hier ;)
  14. Offline

    Johni0702

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    nähe Nürnberg,Bayern
  15. Offline

    Linkage

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    This is exactly what I need, but do you think you could add BOSEconomy support?

    EDIT: Also, your download is broken.
  16. Offline

    Johni0702

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Will take a look at BOSEconomy.

    will fix the link thx for report ;)
    but my other dowloadlink worked all the time :p
  17. Offline

    BloodyDie

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Awsome Plugin !!!
    I'm Use This !!!
  18. Offline

    matiyarosz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I can't download from this link. Please help me
  19. Offline

    Johni0702

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    sorry instead i fixed it i broke that linke too :oops:
    try it again, now it works
  20. Offline

    tytytoy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    hey when are you going to add Essentials support because i use essentials but it wont work with it yet plz tell and add essentials support (hopefuly soon)
  21. Offline

    SphereCat1

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Awesome idea! Would it be possible to add lever support, so you could use a lever to lock each option as on or disabled? When the lever is on, it would force the option to happen, and when it's off, it would let the normal behavior happen. So for example you could configure a lever to make it always day when on, and do the normal cycle when off. Or, a lever to disable rain when on, and rain randomly as usual when off.

    Thanks!
    SphereCat1

    EDIT: I also noticed that wooden pressure plates don't work, only stone. Not critical, just moderately annoying.
  22. Offline

    Johni0702

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    i think i´ll add lever.
    oh damm. i didn´t noticed that wooden and stone pressure plates have different numbers
  23. Offline

    Victor S.S

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    i really like this plugin but when i change in the cong file UseIconomy to true i get this error :

    19:13:56 [GRAVE] Error occurred while enabling ButtonControl v2.2 (Is it up to d
    ate?): null; mapping values are not allowed here
    mapping values are not allowed here
    in "<reader>", line 27, column 32:
    useiConomy: true account:
    ^
    at org.yaml.snakeyaml.scanner.ScannerImpl.fetchValue(ScannerImpl.java:74
    5)
    at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.ja
    va:307)
    at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:18
    3)
    at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(Par
    serImpl.java:564)
    at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
    at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
    at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java
    :228)
    at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java
    :230)
    at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:12
    2)
    at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
    at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseCons
    tructor.java:124)
    at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
    at org.bukkit.util.config.Configuration.load(Configuration.java:82)
    at me.johni0702.ButtonControl.ButtonControl.loadFile(ButtonControl.java:
    145)
    at me.johni0702.ButtonControl.ButtonControl.onEnable(ButtonControl.java:
    125)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:878)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:272)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:162)
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:146
    )
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
  24. Offline

    Johni0702

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    please show me your config.
  25. Offline

    Victor S.S

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    there it is ^^
    Cost:
    Item: 331
    Messages:
    day_set: The day-button has been set.
    day_comes: Good morning!
    night_set: The night-button has been set.
    thunder_set: The thunder-button has been set.
    rain_set: The rain-button has been set.
    sunny_set: The sunny-button has been set.
    rain_comes: Let it rain
    not_use: You don't have permission to use button controls
    sun_comes: The sun comes out.
    night_comes: It's late, go home.
    not_enough_money: You don't have enough money
    not_permissions: You have no permissions to set button controls.
    push_a_button: Push a Button!
    thunder_comes: GO! A STORM IS COMING!
    Buttons:
    RainAnzahl: 0
    SunnyAnzahl: 0
    ThunderAnzahl: 0
    Duration:
    thunder: 10
    rain: 10
    sun: 10
    iConomy:
    useiConomy: true account:
    Cooldown: 0
  26. Offline

    Johni0702

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    you haven´t set an account. so it should work (the red thing is new):

    Cost:
    Item: 331
    Messages:
    day_set: The day-button has been set.
    day_comes: Good morning!
    night_set: The night-button has been set.
    thunder_set: The thunder-button has been set.
    rain_set: The rain-button has been set.
    sunny_set: The sunny-button has been set.
    rain_comes: Let it rain
    not_use: You don't have permission to use button controls
    sun_comes: The sun comes out.
    night_comes: It's late, go home.
    not_enough_money: You don't have enough money
    not_permissions: You have no permissions to set button controls.
    push_a_button: Push a Button!
    thunder_comes: GO! A STORM IS COMING!
    Buttons:
    RainAnzahl: 0
    SunnyAnzahl: 0
    ThunderAnzahl: 0
    Duration:
    thunder: 10
    rain: 10
    sun: 10
    iConomy:
    useiConomy: true account: NONE
    Cooldown: 0


    Edit: you can put configs,consoleoutput,etc. in a spoiler:
    simple use
    Code:
    [SPOILER]here comes the config[/SPOILER]

    This post has been edited 1 time. It was last edited by Johni0702 Aug 5, 2011.
  27. Offline

    Victor S.S

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thanks its now working !!:D
  28. Offline

    Deathnite

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Idk if this is my fault or if its script, but when i push the button i get charged 2 times.
    once for when i press the button and once when i release.
    AND
    everytime i relog the code on the button disapears...

    my script:
    Code:
    Cost:
        Item: 331
        Amount: 2
    Messages:
        day_set: The day-button has been set.
        day_comes: Good morning!
        night_set: The night-button has been set.
        thunder_set: The thunder-button has been set.
        rain_set: The rain-button has been set.
        sunny_set: The sunny-button has been set.
        rain_comes: Let it rain
        not_use: You don't have permission to use button controls
        sun_comes: The sun comes out.
        night_comes: It's late, go home.
        not_enough_money: You don't have enough money
        not_permissions: You have no permissions to set button controls.
        push_a_button: Push a Button!
        thunder_comes: GO! A STORM IS COMING!
    Buttons:
        RainAnzahl: 0
        SunnyAnzahl: 5
        ThunderAnzahl: 0
        DayAnzahl: 5
        NightAnzahl: 0
        Sunny:
            Y:
                '0': 67
                '1': 67
                '2': 67
                '3': 67
                '4': 67
            cost:
                '0': 0
                '1': 0
                '2': 5
                '3': 5
                '4': 5
            X:
                '0': 50
                '1': 50
                '2': 50
                '3': 50
                '4': 50
            world:
                '0': DevilTrigger Craft
                '1': DevilTrigger Craft
                '2': DevilTrigger Craft
                '3': DevilTrigger Craft
                '4': DevilTrigger Craft
            Z:
                '0': 202
                '1': 202
                '2': 202
                '3': 202
                '4': 202
        day:
            Y:
                '0': 67
                '1': 67
                '2': 67
                '3': 67
                '4': 67
            cost:
                '0': 0
                '1': 0
                '2': 5
                '3': 5
                '4': 5
            X:
                '0': 50
                '1': 50
                '2': 50
                '3': 50
                '4': 50
            world:
                '0': DevilTrigger Craft
                '1': DevilTrigger Craft
                '2': DevilTrigger Craft
                '3': DevilTrigger Craft
                '4': DevilTrigger Craft
            Z:
                '0': 204
                '1': 204
                '2': 204
                '3': 204
                '4': 204
    Duration:
        thunder: 10
        rain: 10
        sun: 10
    iConomy:
        useiConomy: false
        account:
    Cooldown: 0
    
  29. Offline

    Johni0702

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    you have set every button 5 times:
    Code:
    world:
                '0': DevilTrigger Craft
                '1': DevilTrigger Craft
                '2': DevilTrigger Craft
                '3': DevilTrigger Craft
                '4': DevilTrigger Craft
  30. Offline

    Deathnite

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    thats correct, but everytime i restart the server, the buttons code disapear. so when i click it nothing happens. (it works be4 the restart)
  31. Offline

    Henker355

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hello There!
    I have install your Plugin v2.3. On my Server runs SuperPerms and Superperm Bridge.
    CraftBukkit 1060 runs on the Server too. After Restart no Failure Notice! But it dosen`t create a "config.yml". I have write the config self. Your Example was my assistance.
    Code:
    Cooldown: 0 //time in sec you have to wait befor an button can be pressed again
    
    Cost:
      Item: 331      //what item weatherchanging costs (set to 0 for free change)
    iConomy:
      useiConomy: true     //set to "true" if you want to use iConomy
      account: buttonmoney //the account that earns money if somebody pushs an button
    Buttons:            //DO NOT CHANGE ANYTHING HERE
        StormAnzahl 0
        RainAnzahl 0
        StopAnzahl 0
        DayAnzahl 0
        NightAnzahl 0
    Duration:              //how long the changed weather MUST be in minutes(if not changed again)
        thunder 10
        rain 10
        sun 10
    messages:   //a lot of configurable messages
        ...
        ...
    I can set an bind the Button`s. But if i use the Button.. i become the Notice:
    "You don`t have enough money".
    I have 3000 Money.
    Can you help me please? Where is my Failure?
    I can`t found him.

    This post has been edited 4 times. It was last edited by Henker355 Sep 16, 2011.
  32. Offline

    DQuaN

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Any plans to update this? Mine has stopped working with the latest build.

Share This Page