BukkitHTTPD
BukkitHTTPD
Faster then ever!
Overview
This is a continuation of BukkitHTTPD from codename_B.
Installation
- Put the BukkitHTTPD.jar in Bukkits plugins folder.
- Start up the server.
- Change the index.html.page
- Have a look at the <yourServerIP>:8107/test.v10 page and it's sources to see how to use the server-side scripting language.
- Change the test.v10 page.
- Add as many other pages as you want.
Configuration
The configuration can be found in the file plugins/BukkitHTTPD.yml.
After the first server startup you can configure it in-game (see Commands) or edit the file and reload it (see Commands/Reload).
You can also change the banner background by editing the BukkitHTTPD.jpg file in the web folder.
Commands
Use the following commands to configure the httpd server on the fly:
Port
"/httpd port" to view the server port or
"/httpd port newPort" to set the server port to "newPort" or (this is for the banner)
"/httpd port hide" to toggle the server port hide feature.
Banner
"/httpd banner" to toggle the banner switch.
This switch decides if the banner will be created or not.
Color
This is for the banners text color: "/httpd color" to view the color or
"/httpd color newColor" to change the color to "newColor".
Refresh
"/httpd refresh 60 to set the banner refresh time to 60 seconds (1 minute).
Plugins
"/httpd plugins to toggle the plugins switch.
This switch decides if plugins are shown on the banner.
Directory
"/httpd dir" to view the www folder or
"/httpd dir new/folder/" to change it to "new/folder/".
PHP
"/httpd php" to toogle PHP support.
"/httpd php /path/to/php.exe" path to the php(-cli) executable.
Bans
"/httpd bans" to toogle the minecraft ban feature.
This feature uses minecraft bans for the http access, too.
Admin
"/httpd admin playerName"
This toogles playerNames web admin state, used to administrate the minecraft server through the web browser. See V10 scripting language for more details.
Error
"/httpd error 404" to show the current 404 error page.
"/httpd error 403" to show the current 403 error page.
"/httpd error number file" to set the number error page to file.
v10, php and vhp files supported!
Reload
"/httpd reload" to reload the configuration from disk.
Password
"/httpd password pwd" to set your httpd password to "pwd".
"/httpd rmpwd user" to delete the password of user "user".
Update
"/update BukkitHTTPD" to update this plugin. Have a look here for more information.
Permissions
All httpd commands are secured with this superPerms node:
bukkithttpd.admin: description: Administrate BukkitHTTPD. default: op
except the /httpd password command, which is secured with this one instead:
bukkithttpd.user: description: Be able to change your BukkitHTTPD password. default: true
autoupdate.announce: description: Users with this node will be notified about new updates. default: op
autoupdate.update.bukkithttpd: description: Users with this node will be able to use /update this plugin. default: op
for more information about the autoupdate nodes have a look here.
V10 scripting language
Have a look at this page.
PHP
BukkitHTTPD uses the cli version of php (not tested with the cgi version), keep that in mind (different configs, ...)!
You can have a custom php.ini for BukkitHTTPD, simply save it into your bukkits folder (not the plugins folder!). But a few config values are hardcoded.
There's a new file extension, too: vhp. vhp files will get parsed for the V10scripting language and PHP (in that order).
The global php variables are slightly different. There's no $_POST or $_GET, it's all in $argv (and $_SERVER['argv']). Also the $_FILE array has changed. there's only $_FILE['*']['name'] and $_FILE['*']['tmp_name']. This is no longer the case since v0.2 That's the bad news, now the good: There's a new array: $_MINECRAFT ! :)
Please note that you should use .v10 files instead of .php or .vhp whenever you can, simply to reduce the math done on the server.
Integrated chat
To use the integrated chat simply access your BukkitHTTPD url and attach /chat to it. Example:
myBukkitServer:8107/chat
don't forget to set a httpd password first! :)
Since 0.1.5 web admins can reload and shutdown the server from the chat interface, too.
Banner
BukkitHTTPD will create a nice-looking banner for you. Example:
You'll find it as banner.png in your www folder. To change the background simply change the BukkitHTTPD.jpg file in the same directory.
Custom error pages
BukkitHTTPD supports custom pages for the 403 and 404 HTTP errors.
See Configuration for more information.
Thanks
- To codename_B for his awesome work.
To the original authors of NanoHTTPD, which is the base of this plugin.This is no longer the case since v0.2- To Luficer for updating the html/v10 files of the integrated chat.
License
This plugin is licensed under the GPLv3 and has it's sources included in the jar. With one exception: The files "NanoHTTPD.java" and "NanoHTTPD.class" which aren't present anymore since v0.2 are licensed under the NanoHTTPD License, which you can read here:
Copyright (C) 2001,2005-2011 by Jarno Elonen <[email protected]>
and Copyright (C) 2010 by 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.
might have to update it again for you scene your gone xD
I suggest adding a feature so that the chat can be a voice thing where people can have a brower behind minecraft with the chat so people don't have to download anything like mumble or teamspeak
@V10lator
Goodbye? You aren't updating this plugin anymore? :c Nooooo.
Good bye everyone!
whitelist system pls
Hi V10lator, very nice plugin, I've been searching so long for an functionaly webchat plugin. But, i've a little problem. Sometimes i can't login (yes i set and write in the right password) and get this error:
V10parse error: 5: Permissions error: Wrong password!
or sometimes i'm logged in write/send some words and then i'll got this error again. pls help (seems like i'll get logged out after some seconds.)
Kind regards Robben
BukkitHTTPD: 0.2.5 Spigot: 150 (implementing API version 1.3.2-R1.1)
http://pastebin.com/apDBNTaF
Just wanted to post this error: http:dev.bukkit.org/paste/6361/
(Not sure what prompted the error tbh)
Also included the updater message since it seems bugged a bit still (says there's an update to the current version from the current version).
I'm sure you've noticed, but going from the chat to the game, spaces and probably symbols are gone/replaced with "+", such as this:
@Cecelo126 Please give me the full stacktrace, cause knowing where something may be wrong but not what exactly (NullPojnterexception, ArrayOutOfrRangeException, ...) isn't good to fix it.
Hey, could you please tell me why when I write in the chat symbols doesn't appear and it changes the spaces with +?
In the console appears THIS D:
@domdomegg As long as you're allowed to claim this port (may be restricted from your operating system): Yes.
Is port 80 supported?
@V10lator
Sorry about i didnt reply i wasnt there, so the problem is that i don't know what is the os and php version of the server wheres my mc runs because it is in a hosting company, i know just that it is a linux system and have apache and php because theres a gamecp in the server. Sorry this is too little info i know maybe i should contact them... :S
@zsombi28 What operating system and what version of PHP are you using?
@zsombi28
Not entirely sure, but you may need to enable PHP for the plugin. Just a thought if ya haven't done that already.
http://dev.bukkit.org/server-mods/bukkithttpd/#w-php
Hi, this plugin works fine in my computer, but in my server i got this error for all php pages i upload:
Parse error: syntax error, unexpected T_STRING, expecting ')' in - on line 1
I dont know why, because there"s no pharse error. (e.g it displays this error if the php file is empty too.)
For an example this is my php file:
<?php
echo "asd";
?>
And you can see the result of it here: http://prowar.jatekszerver.net:8107/hello.php
Please help . Thx
@MERCHANToDEATH The script is called >>test<<.v10 for a reason. ;)
The line to change is line 72.
And yes, you have to write the port, cause it isn't the default http port... But you can change it in the config... ;)
That's what I was thinking. I don't know a lot about code script but it looks like the worlds command script just returns the names of the worlds, I don't see any obvious place to change the script to include the name of my world. I also am confused about how you reach the page, I thought it would show when people put my server host name into their browser, but I can only access it with the port number included. Thanks for your help, I'll keep trying stuff.
@MERCHANToDEATH
If I'm not mistaken, this happens when the world specified in test.v10 doesn't match the world your server is using. To fix it, you can usually change the world name in test.v10 to the name of the map specified in your server.properties. This is also likely case-sensitive mind you.