[INACTIVE][CHAT] ScheduledAnnouncer 1.8.1 - Auto Broadcasts by a Scheduler [1.1-R4]

Discussion in 'Inactive/Unsupported Plugins' started by MiHo, Apr 7, 2011.

  1. Offline

    MiHo

    ScheduledAnnouncer [Version 1.8.1]

    Scheduled Announcer is a very simple tool, which only does what's its name told us. It automatically sends a broadcast out of a list controlled by a schedule.

    Features:

    • Sends Scheduled Broadcast to all Players
    • Easy to configure by 'config.yml' or ingame with the '/announce' command.
    • Supports colors (&1, &2... &9, &a, &b... &f) and newlines with &n.
    • Supports executing commands inside Announcements. (Like "Now it will get day!&n/time day")
    • Supports newest Bukkit permissions system!

    How To Setup (open)

    1. Download the latest Release
    2. Drag&Drop the JAR file to your 'plugin/' directory
    3. Restart or reload your server

    There's a video tutorial on how to setup and configure that plugin on YouTube too. Thanks to BrandonHopkins!

    Configuration (open)
    Code:
    #
    #
    # ScheduledAnnouncer Configuration File
    # =====================================
    #
    # Don't use tabs in *.yml file!
    #
    
    announcement:
        # Use this flag to temporary disable the announcements.
        # enabled: false, means that there wouldn't be any announcements.
        enabled: true
    
        # Set this to true will announce in random order.
        # 'false' will announce in sequential (one after another) order.
        random: false
    
        # Defines the prefix for the announcement. Use & + hex char 
        # for color codes.
        prefix: '&c[Announcement] '
    
        # The time of one interval in seconds.
        interval: 100
    
        # List of messages to announce. You could use color codes by
        # using & + hex chars too. &n will produce a new line.
        messages:
        - 'This is the first default announcement!'
        - 'Use /announce help to get info how to config this plugin.'
        - 'You can also configure this plugin with its config.yml too!'

    Commands (open)
    Code:
    /announce add <message>
    Needed Permission: announcer.add
    Adds a new announcement with the Message: <message>
    Code:
    /announce broadcast [<index>]
    Needed Permissions: announcer.broadcast
    Broadcast an existing announcement NOW.
    Code:
    /announce delete <index>
    Needed Permissions: announcer.delete
    Removes the announcement with the passed index.
    Code:
    /announce enable [true|false]
    Needed Permissions: announcer.moderate
    Enables or disables the announcer.
    Code:
    /announce interval <seconds>
    Needed Permissions: announcer.moderate
    Sets the seconds between the announcements.
    Calling it without an interval to set will return the current interval.
    Code:
    /announce list
    Needed Permissions: announcer.moderate
    Lists all announcements.
    Code:
    /announce random [true|false]
    Needed Permissions: announcer.moderate
    Enables or disables the random announcing mode.
    Only calling /announce random without true or false, will return current mode.
    Code:
    /announce reload
    Needed Permissions: announcer.admin
    Reloads the config.yml.

    Changelog (Version 1.8.1):

    • Fixed problem with announcing randomly.

    Changelog (Version 1.8):

    • Made Prefix fully customizable. (Changed the configuration a bit...)
    • Added '/announce prefix <text>' command.
    • Default configuration file is now created if there isn't any. (No more ZIP-downloads necessary, simply drag&drop the JAR-file)
    Older Changelogs (open)
    Version 1.7.1:
    • Fix problems with executing commands
    • Works with 1.1-R5-SNAPSHOT
    Version 1.7.0:
    • Implemented support for new bukkit permissions system
    • Supports /announce now as alias for /announce broadcast
    Version 1.6.3:
    • Fixed 'sendToAll' bug, caused by invalid attaching process to Permissions.
    Version 1.6.2:
    • Fixed 'sendToAll' color codes bug.
    Version 1.6.1:
    • Do not show empty tag brackets. (When setting tag to '' or null)
    Version 1.6:
    • Added pages in /announce list command.
    • Fixed saving after deleting a Announcement.
    Version 1.5:
    • Added multiline support (with &n you could produce a new line inside one Announcement).
    • Added a support for executing Announcements as commands, if they start with a backslash.
    Version 1.4:
    • Added color support (with &1, &2, ... &f in Messages)
    • Added a seperated color setting for tag and message (See Config Spoiler this Thread)
    Version 1.3:
    • Added the feature to only send Announcement with the Permission "announcer.receiver". Need to set the flag: "announcement.sendToAll" in the ScheduledAnnouncer 'config.yml'.
    Version 1.2.2:
    • Changed the example config file, cause of a mistake in it.
    Version 1.2.1:
    • Bugfix for /announce interval bug.
    Version 1.2:
    • Added many new commands to configure it ingame. (/announce reload, /announce enable, /announce broadcast and /announce random)
    • Ability to choose between Random Mode and Sequential Mode.
    • Use different Permissions for different kind of tasks.
    Version 1.1:
    • Enables to change the color of the Broadcast in config.yml
    • Calling '/announce interval' without any paramater now returns the current interval.
    • Changed the name of the JAR to "ScheduledAnnouncer.jar" (Please delete the old one before update!)
    Version 1.0.2:
    • Support for CraftBukkit 670...
    Version 1.0.1:
    • Small bug fix...
    Version 1.0:
    • First Release!
     
  2. Offline

    Plague

    please update to latest RB
     
  3. Offline

    MiHo

    Done!
     
  4. Offline

    Pablomittens

    Awesome! what I've been looking for testing it Now
     
    MiHo likes this.
  5. Offline

    MiHo

    I'm glad to help you with my plugin!

    If you have any feature request or found any bugs, feel free to announce them here. I'll try to response to all requests.

    Added new functions. (See ChangeLog first post!)
    Also updatet this thread and added some additional information.

    Feel free to report bugs and feature requests!

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

    Dysalot

    I am not sure what I am doing wrong. I edited the file, and after about the interval time it started sending the announcements, but it would send the next one about every 2 seconds instead of the 100 set in the config. and it would keep sending them until I set enable to false.

    The other thing is some of the announcements are surrounded by { } but others are not. Oh yeah using CB #670
     
  7. Offline

    MiHo

    The error in the interval seems to be a bug.
    I'll have a look at it, and release a bugfix this afternoon. Already uploaded it!

    The { } - characters occur cause of a miss-interpreting of the YAML interpret. YAML interprets the ":", "[", "]"-characters as a special character. So as a workaround you could enclose your announcements with '-character.

    For example don't write:
    Code:
    messages:
        - Message 1
        - Message 2
    Instead write:
    Code:
    messages:
        - 'Message 1'
        - 'Message 2'
     
  8. Offline

    Dysalot

    Thank You!
     
  9. Offline

    MiHo

    You're welcome!
    Thank you for finding the interval bug.
    Feature Requests are welcome too!
     
  10. Offline

    Dysalot

    Okay how about this. I had a request from a player to turn off the announcements. Would there be a way to give players a command to stop the announcements running to them, but still going out globally otherwise?
     
  11. Offline

    MiHo

    Would be feasible, but is this a good way, to allow users not to receive the announcements?
    Probably a better would be make announcements only available to users with a special permission. (So, only newbees has this permissions.)
     
  12. Offline

    Tfs Halo

    Why don't my Announcements get updated.. if i use /announce list it displays default commands and if i try
    /announce reload it still is the same.

    Code:
    ##
    # ScheduledAnnouncer Configuration File
    # =====================================
    #
    # Don't use tabs in *.yml file!
    #
    
    announcement:
    # Use this flag to temporary disable the annoucements.
    # enabled: false, means that there wouldn't be any announcements.
    enabled: true
    
    # Set this to true will announce in random order.
    # False will announce in sequential (one after another) order.
    random: false
    
    # Defines the color and the tag used for the broadcasts
    broadcast-color: LIGHT_PURPLE
    broadcast-tag: Tip
    
    # The time of one interval in seconds.
    interval: 100
    
    # List of Announcements
    messages:
    - 'Testing1'
    - 'Testing2'
    - 'Testing3'
    
    i really don't want to do it ingame it will take a long time and i need to do something with a school partner atm.

    [​IMG]
     
  13. Offline

    MiHo

    It's because the example config script you get with the zip-package. (Missing spaces at the beginning of the line.)
    So the plugin restores the default settings. If you add one entry with the ingame menu the plugin would override the invalid example config script with a valid one, but now I have also uploaded a new version of the plugin, which includes a valid config.

    Have a look at it. (You only need some spaces on the start of the lines in the config.yml)
     
  14. Offline

    Tfs Halo

    ok and thank you

    edit: i don't know what to do :( :(

    i tryed putting spaces in front of the '-' but it didn't do anything then i tryed putting one more space after the dash please help

    i don't understand what you are trying to tell me what to do
     
  15. Offline

    Dysalot

    Thanks for the quick reply. That should probably work for my situation, even though I don't have a newbie class yet. But I thought of a couple other uses for such a class for new people, such as banning TNT.
     
  16. Offline

    Hakaslak

    Is this the proper format? How do we get the tag to work now?

    Code:
    announcement:
        enabled: true
        interval: 1000
        random: false
        broadcast-color: LIGHT_PURPLE
        broadcast-tag: GLaDOS
        messages:
        - Use /announce help to get info how to config this plugin.
        - 'Twitter for updates - twitter.com/HakaslakGaming '
        broadcast-tag: Announcement
     
  17. Offline

    MiHo

    You have set the "broadcast-tag" twice in the config. The config parser only mentions about the last one, you have to remove this on...

    So your config should look like this:
    Code:
    announcement:
        enabled: true
        interval: 1000
        random: false
        broadcast-color: LIGHT_PURPLE
        broadcast-tag: GLaDOS
        messages:
        - Use /announce help to get info how to config this plugin.
        - 'Twitter for updates - twitter.com/HakaslakGaming '
    Updated to version 1.3, now supports to only send Announcements to a selected group of users.
    For activating this feature, set the "sendToAll" flag in your config.yml to true false, and add to all users which have to receive the Announcements the Permission: "announcer.receiver"

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

    Birdie

    Shouldn't that be "false" at sendtoAll?
     
  19. Offline

    MiHo

    Sorry, my mistake. Of course you have to set the flag to false..
     
  20. Offline

    MaMaxGER

    My Error:
    Code:
    Could not load 'plugins/ScheduledAnnouncer.jar' in folder 'plugins':
    unacceptable character #FFFD special characters are not allowed
    in "<reader>", position 768
        at org.yaml.snakeyaml.reader.StreamReader.checkPrintable(StreamReader.java:68)
        at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:159)
        at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:117)
        at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:106)
        at org.yaml.snakeyaml.scanner.ScannerImpl.scanToNextToken(ScannerImpl.java:964)
        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:237)
        at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:183)
        at org.yaml.snakeyaml.parser.ParserImpl$ParseImplicitDocumentStart.produce(ParserImpl.java:200)
        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.getSingleNode(Composer.java:104)
        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:124)
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
        at org.bukkit.util.config.Configuration.load(Configuration.java:73)
        at org.bukkit.plugin.java.JavaPlugin.initialize(JavaPlugin.java:158)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:138)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:158)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:106)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:84)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    My config.yml

    Code:
    #
    # ScheduledAnnouncer Configuration File
    # =====================================
    #
    # Don't use tabs in *.yml file!
    #
    
    announcement:
        # Use this flag to temporary disable the annoucements.
        # enabled: false, means that there wouldn't be any announcements.
        enabled: true
    
        # Set this to true will announce in random order.
        # False will announce in sequential (one after another) order.
        random: false
    
        # Defines the color and the tag used for the broadcasts
        broadcast-color: LIGHT_PURPLE
        broadcast-tag: Info
    
        # The time of one interval in seconds.
        interval: 600
    
        # List of Announcements
        messages:
        - 'Auf dem Forum, bist du immer auf den neusten Stand: coolcraft.de'
        - 'Halte dich an die Regeln! /rules'
        - 'Erzähle jeden von CoolCraft um mehr Spieler und Spielspaß zu erreichen!'
    
        # If you set 'sendToAll' to false, only players with the permission:
        # - announcer.receive
        # will receive the Announcements. If you are using no Permissions
        # plugin this flag doesn't have any use for you.
        sendToAll: true
    
    Whats wrong ?
     
  21. Offline

    MiHo

    Hm... nice, German :D ... me too... and your problem is because of this ;P
    The 'ß'-char generally causes bugs in Minecraft, so replace your 'ß' with 'ss', like you do it in Switzerland.
    And you have to always save your YML-files with UTF8 Characters Encoding! Otherwise ä, ö and ü also wouldn't be supported in any of the YML-files
     
  22. Offline

    MaMaxGER

    sorry, I am an Idiot :)
     
  23. Offline

    Spider_J

    Thanks for the plugin. Got it working in my server that is running Bukkit 6.17 with no issues so far.
     
  24. Offline

    MiHo

    Makes me happy to hear that! :)
     
  25. Offline

    dirkson

    Could you please upload these somewhere wget-friendly? I'd like this functionality, but my home connection really doesn't have the spare bandwidth to be downloading everything locally before I stick it on my server.
     
  26. Offline

    MiHo

    Of course, I added the link to the first post!
     
  27. Offline

    xRedSn0w

    is there a way to make the broadcast name a different color from the message itself?
     
  28. Offline

    MiHo

    Currently not.. but I will add full color support in the release in the next days!
     
  29. Offline

    xRedSn0w

    awesome! thank you
     
  30. Offline

    MiHo

    Uploaded new release (1.4) with support for color codes (with &0 - &9 and &a - &f) as like two new properties:
    Code:
    broadcast-color = MESSAGE COLOR
    and
    Code:
    broadcast-tag-color = COLOR OF THE TAG
    Link in first thread!
     

Share This Page