[INFO] Announcer 0.5 - display a message periodically [766]

Discussion in 'Inactive/Unsupported Plugins' started by Haerar, Feb 11, 2011.

  1. Offline


    Version: v0.5
    This is my first plugin - it allows server owners to write their own announcements in the file "Announcements.txt", which will be displayed at random every 2 minutes.

    • Capability to add and alter custom announcements.
    • Announces a random one of these announcements server-wide every X minutes - you get to choose whatever X is ;) - that said, please use integers (whole numbers). I will add support for Floats (partial numbers like 1.5) later.

    Version 0.5

    • Compatibility issues fixed - sorry it took a while!
    Version 0.4
    • Various Bug Fixes
    Version 0.3
    • Now supports custom delay on announcements - you can set this in the first line of the Announcements.txt file.
    • Removed on-the-fly announcement alteration - was necessary to get custom delay, but will be fixed in the next release
    Version 0.2
    • Updated to non-testing version - so no message spam now.
    • Fixed issue where on VERY rare occasion the plugin would attempt to read a non-existent line. Less common the more lines in the Announcements file - but fixed now. :)
    • Removed an unnecessary line in the OnEnable.
    • Credited @eisental :)
    Version 0.1
    • Custom Announcement Support
    • Announcements set to every 2 minutes
    Intended Features:
    • Customisable message colour
    • Capability to disable/enable the announcements using commands
    Any ideas for improvements on this one are welcome, so please feel free to criticise and suggest!

    Note: Extract the entire contents of the .zip into your plugins folder! Otherwise, it will notify you in-game that the announcements file doesn't exist! :p
    EDIT: Now updated - it will now force a frequent announcement of the missing file (30 seconds between each), and actually do that.

    Attached Files:

  2. Thats awesome, ive been looking for a such plugin :)
  3. Offline


    Any way to make it not 2 minutes? 5-10 would be better for my server
  4. Offline


    Very nice, Now I can have millions of random messages on my server XD

    edit : is this every 2 minutes real time, or 2 minutes game time?
  5. Offline


    Can you make it so you can Edit the 2 Minuites to like 10-20 Minutes so it doesnt spam the server?
  6. Offline


  7. Offline


    Yeah uhh mines more like every 30 seconds please help...
  8. Offline


    Apologies, you're right :p I got the idea off one of my friends so it's not exactly theft but sorry nonetheless :)

    Still, not terrible for my first attempt? >_>

    @Walker Crouse - every 30 seconds? Will take a look into that, it shouldn't be the case.

    @NikkyyyHD/Latros - That is in intended features ;)

    @jugglerrob - It's 2 minutes real-time. Or rather, it should be (see walker's post? :confused:)


    Found the issue walker - I've accidently uploaded an older version that I was using to test the announcements were working correctly. Thus I set it to every 30 seconds. Every 2 minutes is actually alright whereas every 30 seconds is - as Nikkyyy suggests: spam-tastic. I'll re-upload here as 0.2 since there's been a fix. ;)
  9. And this is why you need version control Haerar [​IMG]
    gnftoxic likes this.
  10. Offline


    Very nice. I had created this exact plugin a few days ago, along with ingame commands to manage the announcements. Good work :)
  11. Offline


    Thank you. [​IMG]

    One last thing (unless this is in the new version)

    Is there a way we can change the color of the announcements? White just doesn't catch the eye, and it's easy to miss.
  12. Offline


    @gnftoxic - thanks toxic :) I'll be working on this one a while until I get used to coding - after that I'll probly move onto bigger and better things ;)

    @Walker Crouse - Colour is going to be added in the version after next - just working on customisable timing, atm. Equally in demand, I feel.
  13. Offline


  14. Offline


    Hit a roadblock, I'm gonna hit the development forums for some input. In the meantime - to the API reference!
  15. Offline


    Mowed over the roadblock :)

    Now supports custom timing :D

    Simply put the delay (in minutes) that you want on the top line of the announcements.txt
  16. Offline


    I just downloaded it, but where is the config file or announcement file or w/e... so I can configure the plugin.
  17. Offline


    Jeez how do I keep managing this? x.x; will re-upload -.-


    Done, should now contain everything you need. :)
  18. Offline


    Nope... doesn't work for me anymore..

    Or at least I think it might conflict with iConomy and Essentials now
  19. Offline


    Could you post a server log, if it's coming up with anything? It's working fine for me - with the latest build of both Minecraft (1.3) and the Bukkit Server...

    Will look into iConomy and Essentials

    EDIT: Working with Essentials, but which modules of Essentials are you using? Just tested with a few of them.

    EDIT 2: iConomy is broken since the Bukkit update, apparently. It's completely seperate to my plugin afaik, since I've tested both with and without my plugin, with no difference. iConomy simply won't work. :(

    Also, must re-upload - for some reason it didn't replace the old upload correctly and it still displays the timing of the announcement each time it announces... which is still there on my development copy, but not the final...

    FINAL EDIT: Woo, sorted :) now doesn't display that annoying tick counter. >_>
  20. Offline


    That's the problem..

    iConomy works fine for me without Announcer, but with it it doesn't work :-/

    And for Essentials, not sure if it is Essentials at all anymore, but all I know is... with the whole wget and announcer: no motd or help menu.
  21. Offline


    Well that's a bit strange... are you using the latest build of CraftBukkit? Cause whether I run the Announcer Plugin or not - iConomy isn't working... having said that, I am using the Development build. I can understand how my plugin might be affecting the MOTD from essentials though. Will look into it in more detail now - but the help menu still works fine for me :confused:
  22. Offline


    Look at the new 3.0 method!
  23. Offline


    Okay, Iconomy, Essentials, and a tonne of other plugins are all working fine with this one... If anyone else can evidence Walker's situation, then I'll have to take a longer examination of it. However, I have done multiple re-uploads lately to get the correct version on here Walker, so please try redownloading. Also make sure your other plugins are up to date, because I've gotten all the latest versions of essentials and iConomy just now - they're working fine. Sorry but other than that it's the whole "I can't replicate the problem" situation. :/

    Thanks for the 3.0 tip Nijikokun :D I admire your work :)
  24. Offline


    2011-02-26 19:29:47 [SEVERE] Index: 0, Size: 0 (Is it up to date?)
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.RangeCheck(ArrayList.java:547)
    at java.util.ArrayList.get(ArrayList.java:322)
    at com.bukkit.Haerar.Announcer.Announcer$MyRunnable2.run(Announcer.java:87)
    at com.bukkit.Haerar.Announcer.Announcer.onEnable(Announcer.java:39)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:140)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:426)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:76)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:57)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:187)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:174)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:120)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:227)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Outdated plugin?

  25. Offline


    That's a Java error which shouldn't be affected by Bukkit Versions. It's referring to the array I'm using not having any fields - which has nothing to do with the bukkit API. In fact not one part of that method (section of code) uses the bukkit API. The only way I can replicate that error is to remove the announcements.txt from the location it's meant to be in. Make sure that the Announcements.txt is in your plugins/Announcer folder, and get back to me if it's still not working :)

    EDIT: I'll make a slight modification to it to counteract the error, and have it display something meaningful in-game to let you know what's wrong with your setup :)

    Sorted - shouldn't provide any error messages now, should just notify you on the CMD console and in-game that the Announcements.txt isn't in the right spot.
  26. Offline


    OoOoOo,me likey likey. I will try this out.
  27. Offline


    Any update for the latest version?

    Getting the invalid plugin exception
  28. Offline


    The recommended build it still runs fine on, the development build it and all my other plugins have the invalid plugin exception... what did they change? :confused:; anyway. I'll be looking into that ASAP but I need to head off to college now. Will work on it later today ^^
  29. Offline


    wil you add colors with the next update? can't really tell difference between player chat and the announces because they're both white
  30. Offline


    Still working on the InvalidPluginException atm. Any passing plugin devs that can enlighten me on this I'd be grateful. Been roaming the forums with little luck, atm.

Share This Page