Websend
Websend
EOL notice:
After almost 6 years, this plugin has reached an end-of-life status.
I will no longer be maintaining this plugin. If you are a developer and are interested in the source code of this project, feel free to use it as it is published under an MIT license.
To all the great people in the community: Thank you for the wonderful time!
Documentation can be found on Github wiki. (Edit: 9/2/2017: link fixed)
Source code can be found on Github.
What does this plugin do?
This plugin enables PHP developers to access minecraft commands from a web-based script.
A scheme: Ingame command -> Your php-enabled server -> Your PHP file does stuff and provides output/commands -> Plugin executes commands and prints output. Or: Webpage command -> bukkit server -> Plugin executes commands and prints output.
A few of the possibilities:
Online adminstration screen Online console Membership system (become VIP with a donation) Paypal donation system ...
Features:
Seperate thread (no server lag because of the wait.) Commands (ingame or console emulation) Command to color output send from php. Secure connection (protected with password hash) Permissions support (just "websend") Both ways enabled (PHP -> bukkit | bukkit -> php (-> bukkit))
Head over to the files for the latest version, and here for installation instructions.
Documentation and more.
@n3wton
Wait, so let me get this straight. You want people to come to you website, fill out a form or something and then you want the PEX permissions of that player to be changed?
Thats not hard, and you don't need votifier for that. Simply make the form and make it so the button that users press to change the permissions does a POST to the PHP file you make. In that PHP file, make something starting from this template. Just edit it to make it send the PEX command. Make sure your websend config is setup correctly.
Hey, I really like the idea of this plugin, but I was hoping to use it to rank up users (using PEX) if they did certain things on our website. However, I can't seem to get it to work.
I was wondering if you had seen the votifier plugin (http://dev.bukkit.org/server-mods/votifier/) this allows us to write our own listeners. If you could add this feature to websend then it would be easy to intergrate any plugin people want with the web.
Keep up the good work! N3wton.
@RedSea1
Websend doesn't have functions for editing files. What you intend to do is still posible tho: If your php server runs on the same server as bukkit, then you could us the php file methods. If not you could either look for a permissions plugin which uses mysql, or you could look for a plugin that allows the permissions to be changed using commands.
Maybe permissions phoenix even has those functions. EDIT: Seems like I was right about that last thing. Take a look at their wiki on github, they support both methods.
I've started studying the syntax, but i have one question. How can i make it so that Websend'll write to my permissions "world.yml" file? I use permissions phoenix 2.x, and i need to make commands for different things regarding user management. I've already started on the codes, but i can't seem to figure out how to make it write to my .yml file, and change e.g "Citizen" into "VIP".
Other than this, the plugin is damn epic!
@Swiftek
First of all, tnx for answering some questions for me. Second, I won't be releasing the source in public for now. Those who really need or want it, are able to reach it ;) Third: That is the correct behavior, because of the no player envirement. Nice catch there. If you want messages to be forced into the chat system: use Chatcolor- or use a plugin command.
@jeremybombed
The 403 HTTP response means "Forbidden", and is happening because your web server is blocking your Bukkit server from accessing the minecraft.php script.
The easiest way to begin troubleshooting that is to access the script from a browser on the same machine that the server is running on. I am able to access that page on your webserver and it displays "No (enough) data provided.;" which is to be expected.
Perhaps you fixed it before I tried it from my end? If so, grats!
@user44
The ExternalTimeSet.php script will not display any output unless there are errors. You should see the result of the time change in the game, and the script's plain text raw output in the console.
I like this plugin a lot! Thanks for the release, but we'd love to see the SOURCE. ;)
I have just one issue so far. The Readme.txt says:
However, I'm only getting the output in the Console, and not in the game chat where players can see. I've even tried adding "say" to the beginning of the output line.
EDIT: I'm of course referring to when there is no player context, such as the ExternalTimeSet.php script (PHP > Bukkit only). I understood the Readme to mean that plain text would show in the chat with a special prefix when no player context exists, and it doesn't do that for me.
Is that the intended behavior?
Thanks for all your hard work! I signed up here just to tell you that.
When I connect to my ExternalTimeSet.php I just get an white Sheet :(. No Errors, nothing ...
00:21:47 [SEVERE] null
java.io.IOException: Server returned HTTP response code: 403 for URL: http://www.arubacraft.com/console/minecraft.php
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
at websend.Communicator.sendPOST(Communicator.java:56)
at websend.ComThread.run(Main.java:286)
00:21:56 [INFO] /Command/ExecuteConsoleCommand:time day
00:21:56 [SEVERE] Exception in thread "Thread-1659"
00:21:56 [SEVERE] java.lang.NoSuchMethodError: org.bukkit.Server.getConsoleSender()Lorg/bukkit/command/ConsoleCommandSender;
00:21:56 [SEVERE] at websend.Interpretator.NoPlayerInterpretate(Interpretator.java:86)
00:21:56 [SEVERE] at websend.PHPSktSrvrThread.run(Main.java:368)
Is this working on 1337?
@Grifhell
Thank you, this will be fixed in the next version.
When i stoped server:
Please add permissions support!
Can I use socket_read to get the answer of a commad?
@GigaToni1993
If it works, ignore it. Error reporting is still beta.
With the example i get an error:
02:42:18 [INFO] /Command/ExecuteConsoleCommand:time night 02:42:18 [INFO] The time was set to 20:00 or 8:00PM or 14000ticks in: world, world_nether 02:42:18 [INFO] ERROR: While parsing php output, websend found 02:42:18 [INFO] an error on line 1: Invalid command. 02:42:18 [INFO] Time set to night
Are you going to be adding permissions support?
@jt3w
This is not planned for the near future :)
Are you going to release the source brother? That would be very nice of you and helpful for the greater good!