[INACTIVE][ADMN/WEB] BukkitHTTPD 0.0.4 - now with more themable signatures [1000]

Discussion in 'Inactive/Unsupported Plugins' started by codename_B, May 13, 2011.

  1. Offline

    codename_B

    BukkitHTTPD 0.0.4
    For simple HTML based sites, on the same ip as your server. With stats. And signatures.

    [​IMG]
    Now with automatic banner creation! This is an actual banner from my actual server!



    History:
    • So for quite a while now, I've been annoyed at the lack of a "default html" page in bukkit - I want something that I can just set my DNS to and not have to install NGINX or apache, I just want to install my minecraft server and let it run. Well this is just that! No extra programs to install, no extra config files to edit. Just place your html in the right place and it does the rest. Now you can finally have a landing page on the same ip as your server, run by your server! Example: my server
    Usage:
    • Download BukkitHTTP.jar and install in /plugins
    • Run the server once, then stop it.
    • Change the default index.html in /plugins/BukkitHTTPD/index.html to whatever you wish your small html based site to be.
    • Start the server again, once it's started navigate to localhost:8107 (or whatever port you have configured) on the machine the server is hosted on. This should display your index.html
    • There is several configurable options which you must add to server.properties.
    Code:
    http-daemon-port: 8107
    server-name=Localhost Test Server
    server-dns=localhost
    text-color=000000
    • If you want your server to listen on port 80 (ie the standard web port you will need to set it to something like this)
    Code:
    http-daemon-port: 80
    server-name=MyAwesomeMinecraftServer
    server-dns=my.ip.com
    text-color=FFFFFF
    Screenshot:
    [​IMG]


    Current Themes:
    • These are all the themes that I have created/have been created for you by players.
    [​IMG]
    Simple dirt theme. Just replace BukkitHTTPD.jpg with this.
    [​IMG]
    Simple sand theme. Just replace BukkitHTTPD.jpg with this.
    [​IMG]
    Elegance theme by @eastonch with no branding. Just replace BukkitHTTPD.jpg with this.
    [​IMG]
    Simple minecraft theme. Just replace BukkitHTTPD.jpg with this.
    [​IMG]
    Flow theme. Just replace BukkitHTTPD.jpg with this.

    Download:
    • Version 0.0.4 zip bundled with player stats and signature generator Megaupload Mirror
    • Version 0.0.4 zip bundled with player stats and signature generator Main Mirror
    Source
    Thanks:
    • Thanks to spacemaniac and pluckerpluck on #bukkitdev for their help with debugging the exception code.
    • Thanks to the original authors of NanoHTTPD, from which this plugin is based.
    A bit more about:
    • The default port number had to be above 1024 incase users were not running bukkit as root on their system, similar to my hosting setup. If you get a socket error of some kind after trying a port below 1024, this is probably because you're not running as root on a *nix system - windows users should be fine. In which case, you should just direct your users to :8107, talk to your host about running as root, or get a minecraft server from someone who offers extensive NAT configuration such as PigSaddleHost ie. my server listens and serves on port :8107, but you all connect to it on port :80 in your browsers. Fantastic! You can also do this yourself with iptables.
    • I'm also working on modding a version of MCStats to work plug and play with this - providing you with player stats on your webhost!
    • There is now a signature generator bundled with BukkitHTTPD! You can mod this with any image you like, just swap out BukkitHTTPD.jpg for any image of the same dimensions, it will work right away. This will be at yourip/image.png
    • If you have any questions about the stats plugin please ask on their thread. I have bundled a modified version of it with this plugin for ease of use, it will work straight out the box.
    NanoHTTPD License:

    Copyright © 2001,2005-2011 Jarno Elonen <[email protected]> and Copyright © 2010 Konstantinos Togias <[email protected]>
    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    Changelog:
    • 14/05/2011 - v0.0.1: wrote source code and released plugin on bukkit.org after extensive testing and going live with it on my server.
    • 15/05/2011 - v0.0.2: changed default html page and bundled a stats plugin.
    • 25/05/2011 - v0.0.3: bundled themable banner creation.
    • 25/05/2011 - v0.0.4: added configurable color for the text. Changed output to .png
     
    Blechbuexse, JWhy, dark1256 and 3 others like this.
  2. Offline

    codename_B

    Sure, the same way it's worked with every other build, by initialising a listener on the specified port and serving http files on an incoming HTTP GET request.
     
  3. Offline

    maetthew

    Okay not how it works, more like if it works. Assuming it does from your answer, thanks :)
     
  4. Offline

    DarkAge

    Can you implement a way to switch off the image generator or edit what it displays?
     
  5. Offline

    Dewtah

    HI does it still work with latest build?
    Since i cant reach your own site in the link and i cant seem to get it working myself with your toturial.?
    It seem like a verry nice plugin verry basic and yet a lot of possibilities.
     
  6. Uh.......

    Why is trying to connect to X11?

    I get this error on my server:

    Code:
    09:47:26 [SEVERE] Exception in thread "Thread-37"
    09:47:26 [SEVERE] java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
    09:47:26 [SEVERE]       at java.lang.Class.forName0(Native Method)
    09:47:26 [SEVERE]       at java.lang.Class.forName(Class.java:169)
    09:47:26 [SEVERE]       at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
    09:47:26 [SEVERE]       at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1135)
    09:47:26 [SEVERE]       at visit.ube.pigsaddle.com.ImageCreator.main(ImageCreator.java:44)
    09:47:26 [SEVERE]       at visit.ube.pigsaddle.com.BukkitHTTPDThread.run(BukkitHTTPDThread.java:108)
    09:47:26 [SEVERE]       at java.lang.Thread.run(Thread.java:662)
     
  7. Offline

    ewized

    can this plugin have index.php as the default home page
     
  8. I really doubt it has php interpreter built-in. You'll want a full-blown web server for that.
     
  9. Offline

    oxguy3

    You can probably use this mod, HTTPConsole, and decent knowledge of JavaScript to get the player list, parse it, and add it to your webpage.

    It can't handle PHP; that's way more difficult than returning HTML.

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

    Clucky

    Is this compatable with linux? Because im typing localhost:80 into the web browser and its just saying error, unable to connect. (I do have the web server listening on port 80) heres my server.properties:

    Code:
    #Minecraft server properties
    #Wed Jun 29 15:09:10 EDT 2011
    level-name=Japitaja
    allow-nether=true
    view-distance=10
    spawn-monsters=true
    online-mode=false
    spawn-animals=true
    server-ip=
    max-players=20
    server-name=Japitaja
    pvp=false
    level-seed=
    server-port=25565
    allow-flight=true
    white-list=false
    http-daemon-port: 80
    server-dns=localhost
    text-color=000000
    There are no errors in the terminal:

    Code:
    05:34:36 [INFO] NanoHTTPD 1.21 (C) 2001-2011 J Elonen and K Togias
    Modified for use with bukkit.
    BukkitHTTPD 0.0.1 (C) 2011 codename_B
    05:34:36 [INFO] Now serving files in port 80 from "/home/clucky/Desktop/MC_Server"
    
    Get back to me soon :D
     
  11. Offline

    sat0n101

    i Know its compatible with Ubuntu 11.04 desktop, i run my server off of it !

    it works with craftbukkit #953

    Is there anyway to edit what the banner displays plugin wise, i have over 30 plugins its trying to display some of which are stuff like minecart mania which because it has multiple .jars it displayes it multiple times

    [​IMG]

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

    mrvertigo27

    i was lookig at your site, the example and noticed every 30 seconds or so the page refreshed and tool me back to the top left of the page, this is annoying if your trying to read content. i have only tested on IE as thats all i have at work (grumble) is this a bug or working as intended?
     
  13. Offline

    Gabriel333

    The download links point to a version 0.0.3. Is the link wrong or is it the versionnumber in the jar ?
     
  14. Offline

    Parlez

    i use this with player editor to host the skins and cape urls instead of using an external source. It works, and i can have a webstie as well :D
     
  15. Offline

    sintri

    <meta http-equiv='refresh' content='###' >
    Pretty sure, haven't done http in least a decade and this wasn't even around back then and too lazy to double check. But should be able to replace the ### with how often you want it to refresh, probably in seconds.

    Any updates for this coming?
     
  16. Offline

    NotYetRated

    Getting this error...

    Code:
    2011-07-26 12:11:54 [SEVERE] Exception in thread "Thread-15"
    2011-07-26 12:11:54 [SEVERE] java.lang.UnsatisfiedLinkError: /tmp/tcloop/openjdk-7-jre/usr/local/openjdk-7/jre/lib/i386/libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
    2011-07-26 12:11:54 [SEVERE] at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    2011-07-26 12:11:54 [SEVERE] at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1922)
    2011-07-26 12:11:54 [SEVERE] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1840)
    2011-07-26 12:11:54 [SEVERE] at java.lang.Runtime.loadLibrary0(Runtime.java:840)
    2011-07-26 12:11:54 [SEVERE] at java.lang.System.loadLibrary(System.java:1078)
    2011-07-26 12:11:54 [SEVERE] at sun.font.FontManagerNativeLibrary$1.run(FontManagerNativeLibrary.java:61)
    2011-07-26 12:11:54 [SEVERE] at java.security.AccessController.doPrivileged(Native Method)
    2011-07-26 12:11:54 [SEVERE] at sun.font.FontManagerNativeLibrary.(FontManagerNativeLibrary.java:32)
    2011-07-26 12:11:54 [SEVERE] at sun.font.SunFontManager$1.run(SunFontManager.java:330)
    2011-07-26 12:11:54 [SEVERE] at java.security.AccessController.doPrivileged(Native Method)
    2011-07-26 12:11:54 [SEVERE] at sun.font.SunFontManager.(SunFontManager.java:326)
    2011-07-26 12:11:54 [SEVERE] at java.lang.Class.forName0(Native Method)
    2011-07-26 12:11:54 [SEVERE] at java.lang.Class.forName(Class.java:264)
    2011-07-26 12:11:54 [SEVERE] at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:85)
    2011-07-26 12:11:54 [SEVERE] at java.awt.Font.getFont2D(Font.java:485)
    2011-07-26 12:11:54 [SEVERE] at java.awt.Font.access$000(Font.java:223)
    2011-07-26 12:11:54 [SEVERE] at java.awt.Font$FontAccessImpl.getFont2D(Font.java:227)
    2011-07-26 12:11:54 [SEVERE] at sun.font.FontUtilities.getFont2D(FontUtilities.java:174)
    2011-07-26 12:11:54 [SEVERE] at sun.java2d.SunGraphics2D.checkFontInfo(SunGraphics2D.java:596)
    2011-07-26 12:11:54 [SEVERE] at sun.java2d.SunGraphics2D.getFontInfo(SunGraphics2D.java:757)
    2011-07-26 12:11:54 [SEVERE] at sun.java2d.pipe.GlyphListPipe.drawString(GlyphListPipe.java:50)
    2011-07-26 12:11:54 [SEVERE] at sun.java2d.pipe.ValidatePipe.drawString(ValidatePipe.java:165)
    2011-07-26 12:11:54 [SEVERE] at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2807)
    2011-07-26 12:11:54 [SEVERE] at visit.ube.pigsaddle.com.ImageCreator.main(ImageCreator.java:55)
    2011-07-26 12:11:54 [SEVERE] at visit.ube.pigsaddle.com.BukkitHTTPDThread.run(BukkitHTTPDThread.java:108)
    2011-07-26 12:11:54 [SEVERE] at java.lang.Thread.run(Thread.java:717) 
    At the bottom of my startup log dump. Though,

    Code:
    2011-07-26 12:11:49 [INFO] NanoHTTPD 1.21 (C) 2001-2011 J Elonen and K Togias
    Modified for use with bukkit.
    BukkitHTTPD 0.0.1 (C) 2011 codename_B
    2011-07-26 12:11:49 [INFO] Now serving files in port 25566 from "/usr/games/minecraft/ram-worlds/one" 
    Is coming up earlier in the log when starting the server.

    Ideas?

    CB 1000
    Latest DL of your plugin.
    Port is open and forwarding.

    When trying to access *myip*:25566

    I get a page that says "NO DATA RECEIVED" in chrome and in IE8.
     
  17. Offline

    codename_B

    Can't you read? It means that you don't have fonts installed on your java installation. Nothing to do with my plugin, it's not my job to install fonts for you.
     
  18. Offline

    Sh00ck

    Is this compatible with CB 1000 ?​
     
  19. Offline

    ewized

    Will this support PHP very soon, and is this using some type of apache.
     
  20. Offline

    codename_B

    no and no
     
  21. Offline

    Juze

    @codename_B : Please test against latest RB (#1000) and update title.
     
  22. Offline

    neo6633

    Code:
    #Fri Aug 05 14:31:36 KST 2011
    level-name=world
    allow-nether=false
    view-distance=10
    spawn-monsters=true
    online-mode=false
    spawn-animals=true
    pvp=true
    max-players=40
    server-ip=
    level-seed=
    server-port=79
    hold-message=
    allow-flight=false
    white-list=false
    http-daemon-port: 79
    server-name=MyAwesomeMinecraftServer
    server-dns=neoworld.no-ip.org:79
    text-color=FFFFFF
    I think I should change.
    Plz commend
     
  23. Offline

    codename_B

    Both on port 79? How's that working out for you?
     
  24. I have a feature request: Some kind of scripting language so that we can easily write custom web pages which show server informations. This language should be invisible to other web servers (like:
    Code:
    <!--
    <bukkit>
    echo "Players: " + players.size;
    </bukkit>
    -->
    This is just an example (something like html + php + java :D).
     
  25. Offline

    codename_B

    It's going to be added - excellent idea.

    However it's going to be more like this:
    <--[onlinePlayers.size]-->
    <--[onlinePlayers]-->
    <--[serverPlugins]-->
    etc - basically any ideas you have in that area I'll add.
     
  26. Yay! If you need alpha/beta testers, you know where you can find me. ;)
    Short and clean, fine. :)
     
  27. Offline

    Andrew

    Why does the mcstats html page keep getting updated? What if I want to make my own layout?
     
  28. Offline

    SLUGAKARL

    Im having trouble with the png, How do u actiavte it to show up on ur website or the ip u put in the server.properties

    Where do you put the png image or do u have to add in some code to activate it and make it show up
    when you type in localhost:80 or ur ip or ur website url?
     
  29. SLUGAKARL: Re-read the description, you set the host and the port to connect to.
    The web folder is plugins/BukkitHTTPD so put in what ever you want and open it with the host, port, subfolder and filename...

    //EDIT: BTW: Which png?
     
  30. The download link still points to version 0.0.3 or you did not edit the plugin.yml as it is still saying 0.0.3
     
  31. Offline

    FarSideX

    It gets updated because people are playing on your server and their stats are changing. You can prevent this by removing them.
    To make your own layout for the page requires you to read. In particular you would be required to read the README file for MCStats. Basic comprehension of CSS will also be required. This information was found in the OP.
     
    codename_B likes this.

Share This Page