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.
Ok, so now it works fine, but I have problem with function stopPluginOutputListening()... When I change "return $data;" to "echo 'something';" it write "something" in PHP file, bude "return $data;" does nothing... I guess it's beacause it's empty, but when I have command "jobs" and I listen plugin "Jobs", it shouldn't be empty, when output in console is list of Jobs commands, right?
@Waterflames
With this version I get this error on my website, when I run PHP file http://pastebin.com/c2iYNjc4
@Valoncz
Staff edit: Removed external download link.
@Waterflames
Ok, this is whole error (I guess) http://pastebin.com/hfsXtquc
@NemesisMate
The error you posted seems to be caused by Authme and not by Websend. If the connection fails that probably means that on the php side fsockopen is unable to establish a connection to the Websend server. This could be caused by a variety of problems. Please double check if the port forwarding is ok as this is most often the problem in this scenario.
@Valoncz
Is your Websend.php and Websend bukkit plugin fully updated to 2.5.1? For the second error: The top is missing that specifies the actual exception. I need the full stacktrace.
Yeah, so obviously I can't do OOP... Can you help me please? This is my PHP file http://pastebin.com/cG249XMP. When I run it, I get hese errors on my page http://pastebin.com/4AH16CtU and those in my console http://pastebin.com/FQtxWsbX Thnaks for help
@Waterflames
It just doesn't connect, I'm trying:
And I'm getting Failed to connect.
Password and IP are well configured (I didn't change anything but the bukkit version before it stopped to work)
EDIT: Ok, I looked in logs and I got this: http://pastebin.com/uqR1GXsW
@Valoncz http://dl.dropboxusercontent.com/u/35774053/Websend/docs/PHPToBukkit.html#outcap
@NemesisMate Could you be a bit more specific about what you mean by "not working"?
@Waterflames
I'm using Websend 2.4 with Bukkit 1.6.4 but is not working when with 1.6.2 worked fine (or that I think). Is 2.5.1 working for 1.6.4?
Hi, is there way, how to get any output from console? ExternalTimeSet.php works fine, but I need some output from console (for example if I use command "/list" from Essentials, I need list of players as output, or if I use "/time set xx" I would like to know, if it works, so true/false as output will be fine. Thnaks for respond
@marick0073
The first error indicates that the host "test1.ru" could not be found. The second error is Websend failing to restart after it encounters an error. I'll rewrite the restarting code to fix this.
@Waterflames
Here:
2013-10-24 21:06:19 [SEVERE] [Websend] An exception occured while running a POST request. java.net.UnknownHostException: test1.ru: Name or service not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:894) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1286) at java.net.InetAddress.getAllByName0(InetAddress.java:1239) at java.net.InetAddress.getAllByName(InetAddress.java:1155) at java.net.InetAddress.getAllByName(InetAddress.java:1091) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:278) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:162) at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784) at com.github.websend.post.POSTRequest.doRequest(POSTRequest.java:121) at com.github.websend.post.POSTRequest.run(POSTRequest.java:70) at com.github.websend.post.POSTHandlerThread.run(POSTHandlerThread.java:28)
and here:
2013-10-24 21:06:08 [SEVERE] [Websend] Server encountered an error. Attempting restart. java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376) at java.net.ServerSocket.bind(ServerSocket.java:376) at java.net.ServerSocket.<init>(ServerSocket.java:237) at java.net.ServerSocket.<init>(ServerSocket.java:128) at com.github.websend.server.CommunicationServer.startServer(CommunicationServer.java:78) at com.github.websend.server.CommunicationServer.run(CommunicationServer.java:42)
@Waterflames
I do thank you for all of it, too.
I agree that Jenkins is complete overkill, and I'm not suggesting anything so elaborate. I see no need for an all-or-nothing view of having one's own site.
Moreover, .info domains (and others) are frequently just 99 cents (US) per year, and many providers (I use one, but won't spam here) give away domain names along with free hosting, databases, etc. - and yes, with no ads.
As for time and effort, even a single, plain-text file is enough, which might take a couple minutes to copy & paste, and only need be done once.
I'm not trying to pressure you in any way, I'm just pointing out that, contrary to your assertion, my suggested solution actually requires zero cost, and nearly zero time and effort to setup, with zero up-keep.
I realize that I'm preaching to you - and I hate that too - but I honestly have no need to convince you of anything; I'm only describing one viable option. I think most people have similar false ideas about the work and costs in owning/running a website, which some pros like to encourage for profit, so I'm a bit of a hippie-dippie, free-web advocate. :D
I'll shut up now. Carry on.
@marick0073 Is there any websend error in the server log?
@Ezriilc I did it because it was a pain to give good documentation on the build in system in bukkitdev. Thats why I centralized all documentation here..
Note that I added a notice to all the pages on bukkitdev that tells users that the information they are viewing is outdated and a link to the new documentation. I appreciate the input and I'd love to hire a domain name for Websend and setup a complete website with Jenkins system for builds, but this is still a hobby project for me and stuff like that requires money and time.
@marick0073
Have you tried turning it off and on again?
Plugin is working for some time and then plugin not recieve commands. What's the problem ?
@WaterflamesThanks for the response, and I mean no offense but, "I did it because I did it." isn't really an explanation, and doesn't address the problem - that users are confused and lost.
To a tech-savvy developer, piece-meal information scattered across long, ugly URLs, may be no big deal; but to the average user, it's a huge problem - as we can see by the constant repetition of the most basic questions, and inquiries about how to find information here. If a writer doesn't care about reaching average users, that may be workable in certain circumstances, but not for a wide, international audience like you have here.
A centralized, dedicated, and official site, with comprehensive information, that's easy to identify, access, and use for everyone, is so dead-simple, absolutely free, and critically important for a public project, that I'd call it a no-brainer.
That's just my 2 cents - take it or leave it. Again, I only mention this because of the problems users are having. I personally have no issues with Websend, and I'm very appreciative of all you've done.
@Ezriilc
Because I released the official documentation for all versions 2.5 and up here:
http://dl.dropboxusercontent.com/u/35774053/Websend/docs/index.html
but I'm keeping the pages for legacy reasons.
http://dl.dropboxusercontent.com/u/35774053/Websend/index.htmlThis is the official website.
@Waterflames That's excellent, and not to sound ungrateful, but... why is the info spread across different sites? I think this is where the confusion stems from.
Is there no official website for Websend?