[Req] RSS (Feed) MOTD

Discussion in 'Archived: Plugin Requests' started by WizardCM, Sep 26, 2011.

  1. Offline


    Truthfully I'm surprised a plugin like this doesn't exist, or if one does that I couldn't find it.

    I'm sure quite a few Minecraft servers have a website, and on that website is a blog with news. And every blog has an RSS feed.

    Well then, why not have a 'Bukkit RSS reader' that sends the title of the latest RSS item to the chat of a player when they connect. This would be a quick and easy way to inform players (when they connect) of new news, like if you've added a new plugin and want everyone to know.

    Obviously the config file would require the feed address, and an interval in which to check for new feed entries (instead of checking every time a player connects) and store the title in a text file. With this, could even have a /news command that shows the latest x amount of news posts, also specified in the config file.

    The best thing to do would to not require a permissions entry by default, but if servers want only specific groups to receive the news, then a switch in the config file would also be good (to enable this).

    A customizable prefix to the title in chat (like [News]) would also be nice.

    Thanks for reading my suggestion, and thanks in advance to whoever decides to make this. :)
  2. Offline


    So this is roughly what I'd like:

    On Player Connect:

    [News] Our server is now running Minecraft (Bukkit) 1.0!

    On /news Command:

    [News] ** All items can be read at http://{site} **
    [News] 1. Our server is now running Minecraft (Bukkit) 1.0!
    [News] 2. Plugins recently updated: ______
    [News] 3. Our dynamic map is now working!
    [News] 4. Recent downtime: 22/11/2011

    In config file:

    feed url: http://site.com/rss.xml
    feed items: 5 //how many items show up in /news command, 5 by default
    check interval: 30 //in minutes, 30 by default
    permissions: disabled //whether player requires newsplugin.read permissions, off by default (isn't needed, but would be nice to have)
    prefix: [News] //prefix for each line
    info: ** All news can be found at http://site.com ** //first line in /news command, before the list of posts
  3. Offline


    very interesting concept, I think i'm going to look into this.
  4. Offline


    Good idea ;)
  5. Offline


    I've begun working on this, hopefully I'll have a basic version tonight, though this external library i'm using is gonna make the file like 80kb lol

    edit: well i got it pulling one thing (the wrong thing), but it's looking promising

    Ok, so besides permission support, and by default it points to my websites RSS feed (which i feel is unnecessary for this kind of thing so will not implement unless asked to), its all done, heres a link while i set it up on bukkit dev, http://dcp.wwsean08.com/dl.php?id=news&ver=latest

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 20, 2016
  6. I think I may have gotten a lil of it working

    It also seems to be pulling the right thing
  7. Offline


    yah i have a working version up, i am waiting for it to get approved on bukkit dev, but its posted on my site and theres a link above, and heres the bukkitdev link for whenever it gets approved, http://dev.bukkit.org/server-mods/news-rss-feed/
  8. Offline


    Wow, I'm actually getting some replies now! Thanks guys for helping me out. :)

    Edit: Forgot one line in the config that I'd like (prefix). Added to post #2.
  9. Offline


    ok i'll take care of that right now, it'll probably be up within 10 minutes

    Ok there we go, here's a version with the prefix line, http://dcp.wwsean08.com/dl.php?id=news&ver=latest

    edit: and now i'm going to sleep

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


    I get the following error (guessing it's for 1.8.1? I should've specified 1.0.0, but I wrote the post late September...):

    2011-12-12 05:57:06 [SEVERE] Could not load 'plugins\News.jar' in folder 'plugins':
    java.lang.UnsupportedClassVersionError: com/wwsean08/RSSMOTD/RssMotd : Unsupported major.minor version 51.0
    	at java.lang.ClassLoader.defineClass1(Native Method)
    	at java.lang.ClassLoader.defineClassCond(Unknown Source)
    	at java.lang.ClassLoader.defineClass(Unknown Source)
    	at java.security.SecureClassLoader.defineClass(Unknown Source)
    	at java.net.URLClassLoader.defineClass(Unknown Source)
    	at java.net.URLClassLoader.access$000(Unknown Source)
    	at java.net.URLClassLoader$1.run(Unknown Source)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findClass(Unknown Source)
    	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
    	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	at java.lang.Class.forName0(Native Method)
    	at java.lang.Class.forName(Unknown Source)
    	at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:170)
    	at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:215)
    	at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:151)
    	at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:434)
    	at org.bukkit.Bukkit.reload(Bukkit.java:187)
    	at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:22)
    	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:165)
    	at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:378)
    	at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:756)
    	at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:721)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:714)
    	at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    	at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
    	at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
    	at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    Anyway, I'll let you sleep, and we'll see how BoomBox goes. Thanks again for the awesome help. :D

    Edit: Nope, same error on 1.8.1. I think you set the major version to 51.0 instead of 1.0

    Edit 2: One last request in the config file, check post #2 ("info").

    Edit 3: BoomBox finished the first version of his RSSFeeder, which works nicely. However, I'd still like to try your one out Sean.
  11. Offline


    ok so I'm pretty sure the error is happening because i compiled it against java 7 and you are using java 6, so I will make that adjustment. I also have added what you requested as well as the permission node so that players can ignore the message of the day so to speak. I finally made it so you can turn on and off the info on the onjoin (so you can have it so it only shows on /news).

    there we go, updated, you can either grab it from my site here or from bukkitdev

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


    Downloaded it from both your site and BukkitDev, same error as yesterday...
  13. Offline


    thats very odd since i'm not getting that locally on my test server. Mind running the command java -version and letting me know what it says
  14. Offline


    Java version "1.6.0_29"
    Java SE Runtime Environment (build 1.6.0_29-b11)
    Java HotSpot Client VM (build 20.4-b02, mised mode, sharing)
  15. Offline


    ok, try this one, it should work, http://dcp.wwsean08.com/dl.php?id=news&ver=1.0.3

    edit: I was able to test it on a server running java 6 so it should work for you as well

Share This Page