Filled Per World, Multi-Line Broadcasting Plugin.

Discussion in 'Plugin Requests' started by rxnni, Jul 6, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    rxnni

    Plugin category: Management/Broadcashing

    Minecraft version: 1.8 Spigot

    Suggested name: n/a

    What I want: A plugin that can
    • broadcast different messages on different worlds,
    • broadcast messages that have several lines, and
    • format text, i.e. &4&lHello! &cVisit &bwebsite.com&c.

    Ideas for commands: No commands needed for this plugin.

    Ideas for permissions: No permissions needed for this plugin.

    When I'd like it by: n/a
     
  2. Offline

    Jkaay

    Will make this. I'll post a link here when done.
     
  3. Offline

    rxnni

    Thank you so much! You will be credited appropriately on our server.
     
  4. Offline

    Jkaay

    Np, glad I could help out :)

    It's finished now. Link below
    I know you didn't ask for commands but you weren't too clear about whether or not you wanted an autobroadcaster or a broadcaster that went off when a command was typed. So I added both.
    Command to alert every player in a specific world is: /pwalert <world> <message>
    I added color code and multi-line support. To add another line, simply type "|" in the message and this will move everything after that to a new line.

    The autobroadcast section is in "broadcasts.txt" with the config.yml. Same format is for this file, just add a "|" to separate everything to a new line.

    To toggle between using the autobroadcast method or the command broadcast method I'd added a toggle command: /pwtoggle. Typing it once will enable autobroadcast and typing it again will disable it and re-enable command broadcasts. The toggle data is held in the plugin instance so multiple players can type this without interfering with the broadcast method.
    Permission for /pwalert is: 'pw.alert' and /pwtoggle is 'pw.toggle'

    Link: https://www.dropbox.com/s/x4sdsbj1m5po34s/PerWorldAlert.jar?dl=0
     
    Last edited: Jul 7, 2017
  5. Offline

    rxnni

    WOW! This is more than I requested - you ROCK!

    I did mean it to be an automatic broadcasting system, but the manual world broadcast is a bonus!
    Thanks so much!

    EDIT: How do I set different messages for different worlds in the broadcasts.txt? I am able to input messages, but I'm not sure where to put them for specific worlds.
     
    Last edited: Jul 8, 2017
  6. Offline

    Jkaay

    There's a "broadcast_world" option in the config.yml, but that only allows one world. If you want I can add different files named "broadcasts_worldname.txt" for each of your worlds and send an updated version here in a few minutes. :)
     
  7. Offline

    rxnni

    Yes - this would be PERFECT!! Thank you.
     
  8. Offline

    Jkaay

    Sorry for the wait, took awhile to figure out how to do this and read the files with the names.
    Updated version is done now. When the server starts or the plugin is loaded for the first time it creates .txt files for every world on your server in /plugins/PerWorldAlert/broadcasts with the name "broadcasts_<world>.txt"

    If you create a new world lets say with multiverse or another world creating plugin the plugin with automatically generate a new text file with that world name. Same format applies for these files, just add a "|" to separate everything after that to a new line. You can do this as many times as you like.
    There's a new config.yml item called "default_broadcast_world" that will only broadcast the messages of that world in the text files to that world. (If that makes sense)

    Link: https://www.dropbox.com/s/gdv1ke6ryes4u1l/PerWorldAlert.jar?dl=0
     
  9. Offline

    rxnni

     
  10. Offline

    Jkaay

    If everything is right please mark the thread as "Filled" :)
     
  11. Offline

    rxnni

    Hi there -- almost! It seems that manual broadcasting is the default, and I have to do /pwtoggle every time the server starts up again. Is there a way to make it so that autobroadcasting is default/automatic?
     
  12. Offline

    S1ant

    @rxnni This shouldn't be a problem for him, he seems like a good developer.
     
    Jkaay likes this.
  13. Offline

    Jkaay

    Sure, I did this on purpose because I was unsure which part of the toggle you wanted to be manual/autobroadcasting.
    Auto broadcasting is now default, whenever the server starts or reloads the autobroadcasting starts. To disable this and re-enable manual broadcasting, just type /pwtoggle.

    Link: https://www.dropbox.com/s/wp1kg7b7qbd4062/PerWorldAlert.jar?dl=0 :)
     
    CWKFR likes this.
  14. Offline

    CWKFR

    Thanks for this <3

    EDIT: you might forget some null check or something https://hastebin.com/ogenujosav.md
    EDIT 2: A reload command would be useful
    EDIT 3: Wait, I miss understand this, but can you make auto alert in multiple world?
    EDIT 4: Last, make it open source if possible <3
     
    Last edited: Jul 10, 2017
  15. Offline

    rxnni

    Ah, this is perfect!

    Thank you so much for your help.

    Ronniƫ
     
    Last edited by a moderator: Jul 10, 2017
Thread Status:
Not open for further replies.

Share This Page