[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

    Parlez

    actually, i did. as it turns out it corrupted. Sorry :\
     
  3. Offline

    codename_B

    No worries - the error you got indicates that the problem was there - at least it's solved now!
     
  4. Offline

    rmb938

    After about 3 hours I get out of memory

    Before this happens the server starts lagging.

    Code:
    2011-06-09 12:31:23 [SEVERE] Exception in thread "Thread-33"
    2011-06-09 12:31:23 [SEVERE] java.lang.OutOfMemoryError: Java heap space
    2011-06-09 12:31:23 [SEVERE]     at java.awt.image.DataBufferByte.<init>(DataBufferByte.java:58)
    2011-06-09 12:31:23 [SEVERE]     at java.awt.image.ComponentSampleModel.createDataBuffer(ComponentSampleModel.java:397)
    2011-06-09 12:31:23 [SEVERE]     at java.awt.image.Raster.createWritableRaster(Raster.java:938)
    2011-06-09 12:31:24 [SEVERE]     at javax.imageio.ImageTypeSpecifier.createBufferedImage(ImageTypeSpecifier.java:1056)
    2011-06-09 12:31:24 [SEVERE]     at javax.imageio.ImageReader.getDestination(ImageReader.java:2879)
    2011-06-09 12:31:24 [SEVERE]     at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:980)
    2011-06-09 12:31:24 [SEVERE]     at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:948)
    2011-06-09 12:31:24 [SEVERE]     at javax.imageio.ImageIO.read(ImageIO.java:1422)
    2011-06-09 12:31:24 [SEVERE]     at javax.imageio.ImageIO.read(ImageIO.java:1282)
    2011-06-09 12:31:24 [SEVERE]     at visit.ube.pigsaddle.com.ImageCreator.main(ImageCreator.java:30)
    2011-06-09 12:31:24 [SEVERE]     at visit.ube.pigsaddle.com.BukkitHTTPDThread.run(BukkitHTTPDThread.java:108)
    2011-06-09 12:31:24 [SEVERE]     at java.lang.Thread.run(Thread.java:662)
     
  5. Offline

    codename_B

    Are you running minecraft with garbage collection switched on? This isn't an error in my code, it's an oversight on your part.

    http://wiki.bukkit.org/Setting_up_a_server

    Have a look at the startup lines, in particular pay attention to this option. -Xincgc
    Code:
    java -Xincgc -Xmx1G -jar craftbukkit-0.0.1-SNAPSHOT.jar
     
  6. Offline

    hi00ih

    hi @codename_B I'm having a problem with your plugin. I bought a web domain (www.allencraft.net) and i configured it to my IP and waited 3 days. I port forwarded port 80 and set it in the server.properties. I can access my website when my server is running by putting www.allencraft.net in my web browser, but nobody else can. I'm told this is a problem with my configuration. Would you happen to know the problem? I also get this sometimes when attempting to go to my site

    This site is running TeamViewer.
    Free Port 80 for other applications in advanced settings.
    [​IMG]
    [​IMG]

    Here is my properties file
    Code:
    #Minecraft server properties
    #Thu Jun 02 00:53:17 EDT 2011
    level-name=world
    hellworld=false
    allow-nether=true
    view-distance=10
    spawn-monsters=false
    online-mode=false
    spawn-animals=false
    max-players=20
    server-ip=
    pvp=false
    level-seed=
    server-port=25565
    allow-flight=true
    white-list=false
    spawn-protection=25
    http-daemon-port: 80
    server-name=Allencraft Server
    server-dns=www.allencraft.net
    text-color=FFFFFF
     
  7. Offline

    sintri

  8. Offline

    Devian50

    Why Megaupload?!? MY DOWNLOADS FAIL! 24hr wait per download = SADNESS
     
  9. Offline

    xHoRiiZoN

    Dayuum Code, sure are getting a lot of love. xD
     
  10. Offline

    codename_B

    Did you not notice the non-megaupload link?
     
  11. Offline

    sintri

    Any chance for a config on how often the sig is updated? Seems overly excessive at the moment.
     
  12. Offline

    codename_B

    No problem - I'll add that into the next version.
     
  13. Offline

    Devian50

    uhm... I guess not... sorry... :S
     
  14. Offline

    sintri

    Well ended up going with IIS for the PHP support for mcmmo stats, cause well it took me like 4 hours over the past couple days to figure out what was going on so figured might as well take advantage of it. Though suppose did see some interesting code that'll essentially let this function as a indicator of whether the server's up or not. At either rate nice work.
     
  15. Offline

    codename_B

    No problem, if you need php support, a seperate program is definately the way to go.
     
  16. Offline

    Stevenb88

    hey i like this can get everything to work apart from the banner stats page works and eveything just not sure how to get the banner to work
     
  17. Offline

    codename_B

    Patience, I just have to reupload the banners lol
     
  18. Offline

    sintri

    Server status for those running a standard httpd server with this.
    css code:
    Code:
                #status {
                    background-image: url([URL]http://address:port_for_this/online.png[/URL]);
                    height: 20px;
                    width: 20px;
                }
    
                #offline {
                    background-image: url(offline.png);
                    height: 20px;
                    width: 20px;
                }
    body:
    Code:
        <font color="white">Server Status</font>
        <div id="offline"><div id="status"></div></div>
    Probably plenty other ways to do this as well.
     
  19. Offline

    plutgamer

    awesome plugin
    useful for redirecting to the main page.
    like: play.blahblahcraft.com -> www.blahblahcraft.com.
     
  20. Offline

    Massacre_chips

  21. Offline

    codename_B

    is that PHP?
     
  22. Offline

    Massacre_chips

    Yes.
     
  23. Offline

    codename_B

    Then it won't work with this.
     
  24. Offline

    noahwhygodwhy

    i don't have time to look though the forum as i think someone just reported griefing, but how do you change the world name on the banner? mine just says unnamed server
     
  25. Offline

    codename_B

    Its in the original post - along with the rest of everything you need to know.
     
  26. Offline

    Kaffo

    How to edit the site?
     
  27. Offline

    codename_B

    Do you know what a text editor is?
     
  28. Offline

    Kaffo

    nop xD
     
  29. Offline

    codename_B

    Then why are you running a server?
     
  30. Offline

    Jazy Lopez

    I have a small problem and I can't fix it... I have my server running fine with your BMR and alls running smooth and clean on the counsel. When I use localhost or use my external or network ip IN my own network (Router) the site is perfect, I see the index page and I can access my worlds and stats and what not. But if I try to access it through my External IP on a computer that is NOT in my network, Only the first index page shows, when I try to access the other index's it just... Doesn't respond or says Connection Reset Peer 54.
    I port foward the necessary ports from my router and i even use DMZ (Opens all ports I suppose) and I have all firewalls disable on the server computer, but it still doesn't work.

    Am I doing something wrong? Am I supposed to name the other index's something else or did I create my original index incorrectly? Please help me, I'd really appreciate it.
    Note: On the index site I have links to other pages on the web and they work fine, also if I put a link to a directory it opens the directory and shows its contents, yet when I link it to another index file it just doesn't work outside of my network...

    Thanks :)
     
  31. Offline

    maetthew

    Does anyone know how this works with 860?
     

Share This Page