[MECH] TimeAndWeatherControl v0.5 - Multi-World Compatible Control and Vote System [1.1-R3]

Discussion in 'Inactive/Unsupported Plugins' started by bassfader, Jul 11, 2011.

  1. Offline


    TimeAndWeatherControl v0.5 - Multi-World Compatible Control and Vote System
    Version: v0.5​
    Tested against CraftBukkit Release Build: 1.1-R3​
    TimeAndWeatherControl is a Multi-World Time and Weather Control System. It also supports changing Time and Weather from the Console.​

    TimeAndWeatherControl Moved to BukkitDev. Click here to visit the page

    Optional additional plugins:

    • Permissions Support!
      • If permissions is not used, the vote commands will be open to anybody, the set commands will default to OP only
    • Set the time in your current or any other world (ingame or via console!)
    • Set the weather in your current or any other world (ingame or via console!)
    • Start a timevote to change the time in your current world
    • Start a weathervote to change the weather in your current world
    • Configurable percentage for the number of people needed for a vote to succeed
    • ALL(!) messages displayed to the users are configurable supporting:
      • Multiline messages
      • Colored messages
    Plugin usage:
    • /timeset [time] [world]
    • /tset [time] [world]
      • Set the time in the world [world] to [time]
        Applicable [time] values: dusk, day, dawn, night
      • If no [world] specified it will default to your current world
      • Command can be used from the Console too! (but then [world] must be specified!)
    • /weatherset [time] [world]
    • /wset [weather] [world]
      • Set the weather in the world [world] to [weather]
        Applicable [weather] values: sun, rain, thunder, storm
      • If no [world] specified it will default to your current world
      • Command can be used from the Console too! (but then [world] must be specified!)
    • /timevote [time]
    • /tvote [time]
      • Start a vote to change the time in your current world to [time]
        Applicable [time] values: dusk, day, dawn, night
      • Use yes as [time] value to accept a vote
    • /weathervote [weather]
    • /wvote [weather]
      • Start a vote to change the weather in your current world to [weather]
        Applicable [weather] values: sun, rain, thunder, storm
      • Use yes as [weather] value to accept a vote
    • /timeset or /tset:
    • /weatherset or /wset
    • /timevote or /tvote
    • /weathervote or /wvote
    Plugin setup:

    Just copy the TimeAndWeatherControl.jar file into your Plugins folder. Upon first startup it will create a folder "TimeAndWeatherControl" containing the default config file (all messages in english) in which you can do all further configurations. The default config file is commented and should be pretty self-explanatory ;)

    I've also posted the links to ZIP-Archives including the Plugin and the Config-file (english, german one coming soon!).

    Downloads and Links:

    Direct Download (JAR) (Mirrors: Dropbox)
    Direct Download (ZIP file with Config - English) (Mirrors: Dropbox)
    Direct Download (ZIP file with Config - German) (Coming Soon!)

    You like my plugins? Please consider donating a little bit. Thanks!


    Version 0.5
        - Only players with permissions are counted for votes
    Version 0.4
        - Configuration for percentage of players needed for a
          vote to success
        - Alias handling
        - Added possible [weather] and [time] values to
          default messages
        - Rewritten Config file generation to (hopefully) fix a
          bug on Unix based systems
    Show Spoiler

    Version 0.3
    First public release
        - Configurable messages via config.yml (Supporting
          Colors and Multiline-Messages!)
        - Shorter aliases for the commands added (additional)
          /timeset = /tset
          /weatherset = /wset
          /timevote = /tvote
          /weathervote = /wvote
        - Permissions support
          "twc.timeset" for the /timeset command
          "twc.weatherset" for the /weatherset command
          "twc.timevote" for the /timevote command
          "twc.weathervote" for the /weathervote command
    Version 0.2
    Beta testing release
        - Basic vote system for weather and time:
          /timevote [time]
          /weathervote [time]
    Version 0.1
    Initial alpha testing release
        - /weatherset command to change weather
          Usage: /weatherset [weather] [world]
        - /timeset command to change Time
          Usage: /timeset [time] [world]
    ([world] is optional if you're a player,
      will default to your current world, but
      is mandatory for usage from Console!)
    Tim Visee likes this.
  2. Offline


    If you have NPC's on your it may be related to that. I am currently testing a new version which will only count people that have the permission for "twc.timevote" or "twc.weathervote", so it should compensate for NPC's (as long as you don't give them one of these permissions of course ^^).

    Should be up within the next hour.

    New Verion 0.5!
          - Only players with permissions are counted for votes
    @Monkey78 @Raspberry
    Well I finished testing successfully fast than I thought :) Heres a new version, please give it a try it should work as long as NPC's do not have the permission(s) for voting.

    For all the other changes requested: I am looking into these but I think it will take until next weekend, but maybe (if I finish the project at my "reallife job" fast than expected) I will also be able to be look into it during weekdays and can offer a new version sooner than that.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 17, 2016
    Raspberry likes this.
  3. Offline


    Hi, could you make a boolean option to count only players that voted? Would be a nice touch and help the admins on the server I'm currently playing on.
  4. Offline


    ah i see, i didn't realize that, and sorry for such a late reply i forgot i posted in the thread haha =S. Anyway thanks again for the awesome plugin!
  5. Offline


    Don't really get what you're meaning by that... Its not that several people start 1 vote, but 1 person starts a vote and then the others (that have the proper permissions) can accept it or not. "Counting only players that voted" doesn't really make sense to me in that context?!

    Could you please be a bit more specific about what you want so I can give you an appropriate answer?
  6. Offline


    Well, when there are 10 players on the server. You start a vote, 4/10 votes yes and others don't vote anything. The vote doesn't pass (50% for vote success) because 6 players didn't vote anything. So, you could have an on/off option: on = 4/10 voted yes, it passes because 100% of the voters voted yes. Off = 4/10 voted yes, 6/10 voted no. Vote doesn't pass because only 40% of the voters voted yes.
  7. Offline


    @Virkkte but you actually can not vote "no". Its just either you accept the vote or leave it time out, there is no command to vote "no". If someone is not voting that counts basically as a "no" or as "I don't care".
    The plugin just counts if x% of the people in a world want the weather/time to change and if so it changes it. If not enough people want the change it will not change it.
    Otherwise one would be forced to vote, or if only 1 person wants a change then the one player needs to wait for the vote to "finish" before it notices that he is the only one who voted.

    It basically asumes that all players are online and playing and see the message. If thats not the case you should maybe think about some "Anti-AFK-Soloution" (hint: my SimpleAFK has a AFK-Booter option in the works, but it will take some days for me to finish it as I am also working on this plugin and thinking about / concepting a new plugin, but the new one may be a private one for my server only since there are other plugins that do "basically" the same, just not exactly the way I want ^^)
  8. Offline


    I have it set to 50% required. There were 3 of us online, one guy started the vote and I said yes... and it failed. Wouldn't 2 of us have been 66%?
  9. Offline


    Its working here so either you have configured something wrong or there were other people online you didn't notice (Note: If someone is AFK he still counts as active player! So if overall 8 people were online, but only 3 active, it would still require 4 people agreeing to the vote - i.e. the starter of the vote + 3 people voting yes)

    Also if you are having NPC's on your server I just recently changed the behaviour of the voting system so only people with the correct permissions count in Version 0.5, so maybe you have an older version like 0.4 or even before that which doesn't take this into account? (Note: The NPC's must NOT have the permissions for voting for this to work properly!)
  10. Offline


    I used the default config. This is a new install.

    I moved it to 33%. Then, with 2 people on, it still takes both people to activate it. Maybe I misunderstand something fundamental hehe. I'll keep playing with it.

    Thanks for the tips.
  11. Offline

    Tim Visee

    Wow, this plugin looks great! :)
  12. Offline


    @Bronski I have tested it with 2, with 3, with 4 and with 5 players online, everything working perfectly. Also I guess if that didn't work for some reason many other people would have reported so here :p (no offense intended ^^)
    Please check if you have NPC's on your server, and if so, make sure that they do NOT have the permissions to vote, because they count as normal player (even if nobody is near them) and thus make the vote need more players to pass.

    @Tim Visee Thanx glad you like it. Liking your plugins too btw (especially Fast Mining is just perfect for my server :D )
  13. Offline


    No offense taken. I understand the many complexities of troubleshooting and rarely rule out my own failure as part of the equation :p

    Thanks for checking. You'll be happy to know that I tried 3 other time-voters as a replacement for the all-but-abandoned LightVote and all of them came up short in one way or another. I think yours is the closest to the look/feel/functionality I need. I'll just have to rename those Citizens NPCs something other than players (sadly, it's kind of fun to do that hehe). I'll post back if I think of anything else :D
  14. Offline


    Ahh ok now I do get whats the problem xD I will integrate a new check if players are really an NPC or not in the next version, so you then should be able keep your NPC's named like other players. Didn't think about that case :rolleyes: So stay tuned, its on my (big) todo list now ;)
    Bronski likes this.
  15. Offline


    We do have about 10 NPCs... that is the exact problem :)

    Thanks for the reply; I'll test the new version now.
  16. Offline

    Tim Visee

    Thanks, I and a lot of other pelople love it to because it works perfectly :)
  17. Offline


    Yes, that's a problem here too. I'd like people who don't vote to literally be "I don't care, do whatever you guys who bothered voting want," so they're not affecting the outcome by abstaining from the vote. It's usually people who really care one way or another that I want to defer to on the time of day and only when someone voices opposition (they want to check some lighting or something) do we make it night. It works well on a small server where everyone gets along (for me anyway).

    I guess the way I want it to work is for it to almost always succeed with very few players having to type anything (to vote). Counting those who don't vote as "no" makes that harder to do. That's how LightVote was I believe, and it might help others migrating also from that plugin to have an easier choice maybe :D

    Just a suggestion. I'll install this new version later to check my NPCs. Thanks for the update.
  18. Offline


    Well ok... if you all insist on that feature I'll make it an option. Its on my todo list now too, but don't expect it to be done for the next version, its more likely that it will come with the version after that (v0.7) as I've got some more stuff on the todo list allready xD
    Bronski likes this.
  19. Offline


    It's fine, thanks for the consideration :D
  20. Offline


    Could you make it possible to toggle how it shows "Courtney voted yes for day"? this creates an awful lot of spam and it'd help out a lot.
  21. Offline


    @Courtney Well the message is allready completely customizable... Or do you mean a true/false value in the config that indicates wether that message should be sent at all? If so: I am going to implent that in the next version, shouldn't be any problem ;)
  22. Offline


    Yeah that's what I meant the true/false thing, thanks a lot if that's going to be added :D
  23. Offline


    I do sort of wish I could customize the messages for each vote sub-type, so I could have "Vote for night succeeded: The zombies are coming!..." (<Plants Vs. Zombies reference) and "Vote for day succeeded. BURN, ZOMBIES, BURN!"

    Stuff like that :)
  24. Offline


    Maybe... But since I am going to implent customizable times (like you can define your own times instead of only my defaults Dusk, Day, Dawn and Night) it may be not that easy. But if I can get my head around it I'll implent that too ;)
  25. Offline


    I am using setting VoteSuccessPercentage: 51 so that it requires more then half to vote and it works great for the time voting but for some reason when i /wvote with 2 people on it instantly changes yet the /tvote still requires a vote like i want.
  26. Offline


    Well its the the exactly same class (code) for both votes, its just the vote type that changes. So there must be something else wrong. Do you have NPC's on your Server? Does 1 of the NPC's have the permission to participate in a weather-vote (or is named exactly like a player who has that permission)?
  27. Offline


    I do not have any npc's on the server.
  28. Offline


    Then there must be something else wrong, because it is impossible that this is caused by my code due to them using the exact same class, its just 1 switch that tells the vote class to either change date or time. Also I think others would've reported that here too...

    Except for NPC's I have no other Idea what could cause that, as it just counts players with the permission "twc.weathervote" (or "twc.timevote" depending on which vote type was started).
  29. Offline


    A user said: "I think /tvote needs to be shortened to /tv y and /tv n"

    Figured I'd pass it on :)
  30. Offline


    fixed was a typo on my end when adding the permission. ty for this great plugin =)
  31. Offline



    could you change were it says:
    [TWC] Type /tvote yes to accept the vote (1 more votes needed)
    to something like this:
    [TWC] Type /tvote yes to accept (1 more votes needed)

    because the current line takes up another line in the chat
    and with popular servers.. would be helpfull to have it on just 1 line :)
    or add it to config? unless its already there and i cant see it o.0

Share This Page