Inactive [ADMN] SimpleTips v1.2 - Display Periodic Messages via Chat [1938/1.1-R4]

Discussion in 'Inactive/Unsupported Plugins' started by keithlawless, May 14, 2011.

  1. Offline

    keithlawless

    SimpleTips - Display Periodic Message (Tips) via Chat:
    Version: v1.2

    This is a simple plug-in that allows a server administrator to display periodic/recurring messages via chat. These messages can be hints, announcements or server rules.

    Features:
    • Post messages to the server via chat
    • Rotate messages (as many or few as needed)
    • Set the delay between messages
    • Now supports color text!
    • Manage the list of tips using in-game commands
    • Permissions support
    • Optionally send a different set of messages to different groups of users.
    Download SimpleTips v1.2
    Source Code

    Installation
    • Unzip into your plugins directory.
    • Edit file SimpleTips/config.yml to set the message list and delay between messages. That's it!
    Commands and Permissions:
    • /tip
      • Display a random tip.
    • /tip list
      • List all tips.
      • Permission: tip.list
    • /tip add [text]
      • Add a tip.
      • Permission: tip.add
    • /tip del [num]
      • Delete a tip. The number can found using the list command.
      • Permission: tip.del
    • /tip replace [num] [text]
      • Replace a tip with new text.
      • Permission: tip.replace
    Changelog:

    Version 1.2
    • Rebuild and test against Recommended Build 1938/1.1-R4

    Version 1.1
    • Rebuild and test against Recommended Build 1818.
    • Bug fixes.
    Version 1.0
    • Rebuild and test against Recommended Build 1597.
    • Switched permissions to use "built it" Bukkit permissions API.
    • Added optional support for message groups. Use permission tip.show.[groupname] to allow a Permissions group to see a message group.
    Version 0.6
    • Rebuild and test against Recommended Build 1000.
    Version 0.5
    • Rebuild and test against Recommended Build 935.
    Version 0.4
    • Restored ability to use without Permissions. Op's have access to all commands. Players can only use the /tip command.
    • Tested using Permissions 3.x. Still compiled against Permissions 2.x. Seems to work fine with both.
    • Tested against Recommended Build 818.
    Version 0.3
    • Added in-game commands
    • Adding configuration parameter to allow messages to be displayed in random order
    Version 0.2
    • Changed name to avoid confusion with a similar plug-in (my bad)
    • Color text support for messages
    Version 0.1

    • Initial release. Currently used on two public servers.
    TODO:

    • Support color text.
    • Maintain message list from within game (/tips command).
    • Randomize the display of messages (good for a large list of tips)
    • Maintain separate lists of messages for different permissions groups.
     
    SuperNyanNyan and Habbo4Life like this.
  2. Offline

    IIGoldII

    Yea,some colored text would be fabulous!
    Looking forward to it!

    Also:
    You have a typo in [ADMN]....
    :p
     
  3. Offline

    xsolar66

    request - randomly selected tips, instead of the same sequence of tips each time, so people get a variety and learn new tips every time they log in.
     
  4. Offline

    keithlawless

  5. Offline

    xsolar66

    thanks for that :)
     
  6. Offline

    keithlawless

    Tested with Recommended Build 798. Good to go.
     
  7. Offline

    gasparn

    It'd be nice if we could configure this to broadcast different messages to different Permissions groups... hint hint
     
  8. Offline

    keithlawless

    @gasparn Your suggestion has been added to the ToDo list. When I add in-game commands, I'll have to hook up to permissions anyway, so I'll add this feature at the same time.
     
  9. Offline

    Dr Danco

    works just as advertised. just what i needed. thanks :D
     
  10. Offline

    keithlawless

    Version 0.3 has been released. This release features displaying "random" messages, and adds in-game commands to allow the message list to be changed without needing to touch the config.yml.

    Version 0.4 is coming up soon! Group specific messages will be the main feature of that version.

    Enjoy!
     
  11. Hmm loaded this plugin live with Plugman, but /tip is not responsive, does this require a full restart?

    ===

    Edit: Well they are displaying, so it's just the commands not yet working.

    Request: permission node to even see Tips.
     
  12. Offline

    Tarnacki

    permissions isnt needed, right?

    EDIT: for the 600 in the config is that seconds?
     
  13. Offline

    Clem

    1.6.6 #818 support :)?
     
  14. Offline

    gasparn

    Looks like it's working on my server :)
     
  15. Offline

    Clem

    @gasparn What permissions/GM version and bukkit build please :)?
     
  16. Offline

    blackdeath911

    I have Bukkit #818 and it works fine :)
    What Time i have to set up if i want to give a tip all 120 seconds?
     
  17. Offline

    keithlawless

    Delay is in "ticks" which are 1/20th of a second. So 120 seconds would be 2400. I'll consider changing this - however, with over 1500 downloads I'm concerned that it might break more than a few server configs. Probably inevitable.

    I'll certify the plugin for 818 this weekend - however, I'm running on 815 right now with no problems, and have heard directly from server admins that it works OK. Thanks to all who have reporting on this thread as well.

    The server I test against is running permissions 2.x. I'll upgrade the server to 3.x of permissions this weekend and confirm everything works.

    Does anyone know of "plug-in neutral" Permissions library that would be better to compile against?
     
  18. Offline

    Asphodan

    Show Spoiler

    2011-06-03 14:30:20 [SEVERE] Could not load 'plugins\SimpleTips.jar' in folder 'plugins':
    while parsing a block collection
    in "<reader>", line 22, column 5:
    - " %BTip Of The Hour!: %6As l ...
    ^
    expected <block end>, but found Key
    in "<reader>", line 29, column 5:
    -" %BTip Of The Hour!: %2 Be ...
    ^

    at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockSequenceEntry.produce(ParserImpl.java:520)
    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.composeSequenceNode(Composer.java:203)
    at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:158)
    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:122)
    at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
    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:74)
    at org.bukkit.plugin.java.JavaPlugin.initialize(JavaPlugin.java:156)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:174)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:194)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:117)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:103)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)


    Permissions 2.7.4. -Please- don't compile against Permissions 3; it's so unstable.
     
  19. Offline

    Mighty Mackinac

    When might we see this? some of my users are getting tired of messages spamming their screen.
     
  20. Offline

    keithlawless

    Hi all,

    Version 0.4 is now up. Mostly a testing/bug fix release. Works with RB #818.

    This version can be used either without any Permissions plugin, with Permissions 2.x or 3.x. Probably works with other solutions as well.

    Different lists for different Permissions groups is next on my list. I have a working prototype that I need to clean up and put into the Git repository.
     
    Mighty Mackinac likes this.
  21. Offline

    EMOberger

    It is not allowing me to have commands in the tips ex: "Don't forget to type "/logout" before exiting game." says there is an error at the "/" also "[" <--that
     
  22. Offline

    keithlawless

    I'll take a look at that EMOberger. Probably a YAML syntax issue that I need to handle before storing the message.

    @EMOberger I was able to add the example tip above using both the ingame commands and by editing the config file. I suggest you check your YAML syntax. Here's what worked for me:

    Code:
    msgList:
    - 'Don''t forget to type "/logout" before you leave.'
    - 'Sometimes you need to [bracket] a tip.'
    If this doesn't help you please repost with more detail on what you were trying to do.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  23. Offline

    Niels762

    how to use color??
     
  24. Offline

    christley

    with b860
    Code:
    2011-06-14 03:07:14 [SEVERE] Could not load 'plugins\SimpleTips.jar' in folder 'plugins':
    unacceptable character #FFFD special characters are not allowed
    in "<reader>", position 988
        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:82)
        at org.bukkit.plugin.java.JavaPlugin.initialize(JavaPlugin.java:156)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:174)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:194)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:117)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:109)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    found error. it doesnt support foreign letters
     
  25. Offline

    an0x

    is there a color list? :D
     
  26. Offline

    keithlawless

    @an0x - the default configuration file has the color values in it, as well as an example of using color text. Please download the zip file and take a look at the default config for guidance.

    @christley - I'll take a look at adding support for Unicode.

    Support for Unicode characters should work fine if specified using Yaml syntax:

    - "This is a message in fran\u00E7ais"

    Would be displayed with fran├žais in tip.

    The error message you are getting happens when using keyboard escape sequences (or probably a non-English keyboard) to put the character directly into the file. This is a YAML limitation - there isn't much I can do about it.

    New version is up. Only change was to rebuild again Recommended Build #935 and test.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  27. Offline

    christley

    a good thing would be to put the messages in a txt file since that allows unicode. also the config can still be in YML
     
  28. Offline

    Mighty Mackinac

    Just wondering how the group based display was going? can't find anything else that does it, so I'm counting on this to come through.
     
  29. Offline

    keithlawless

    I have a working version that I'm tweaking. A few issues that have come up involve how to handle users that are in multiple groups (using Permissions v3 for example). It opens the possibility that a user will see either two tips at once or might miss a tip if the plugin decides which tip to display. For those that are interested in this feature, I'd like to hear your opinions.
     
  30. Offline

    Mighty Mackinac

    Perhaps find a way to stack conflicting groups? If one person inhabits two groups, make it so that instead of two at once, it fires one off, and then next cycle fire the other one off. Have it alternate between the two groups.

    As for me and my server, it wont matter, as everyone is in separate groups.
     

Share This Page