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.
@runelynx
Add http: in the config? I had a similar error.
Is anyone able to confirm whether 2.5.1 works on the current Bukkit 1.7-friendly build? It runs and all, but it doesn't execute the commands for me... even using the demo minecraft.php file :(
The console gives me this:
11:15:20 PM CONSOLE: runelynx issued server command: /ws checkcolors 11:15:20 PM CONSOLE: Failed to construct URL from config. 11:15:20 PM CONSOLE: protocol: runic-paradise.com/minecraft.php 11:15:20 PM CONSOLE: Source) [?:1.7.0] 11:15:20 PM CONSOLE: Source) [?:1.7.0] 11:15:20 PM CONSOLE: Source) [?:1.7.0]
@stgram
Yes, I changed the project to a maven structure because that allows me to build the project with a minimizejar option. This should exclude any unused library class files from the jar. This is also what the mod suggested. The mod responded to my last message about 22 hours ago stating that he/she would review the new version ASAP.
@Waterflames
I am so relieved to hear that the problem is nearly solved! I am curious though, what exactly do the denial message and report answer have in common? If the methods are forbidden, how are you supposed to circumvent that? Or is it just a matter of including unused classes?
So I received a response (which you can read here) to my report and it basically states that the libraries I use in the project contain methods that are not allowed. I reorganized the project and made another build with the specifications that were specified in his response. I submitted the build and am now waiting for a response on whether the new build is allowed or not.
@stgram
I know security is currently lacking and it is on my TODO list. It will definitely be improved in future versions. That doesn't explain why they suddenly change their mind about allowing Websend tho. I haven't gotten an answer yet, so I guess I'll just have to wait for that. If Bukkit decides it doesn't want to host Websend anymore, I'll just host them somewhere else. Websend will continue to exist.
Also, I most certainly catch your drift. :) I am providing a platform, not a private code writing service.
@Waterflames
Also, lets think in terms of security. Double whitelisting would prove rather perfect, think about adding that to the default php files. A single md5 hashing is simply not enough. Add salt? Require 20-string all character passwords? Change the md5 to a more secure one, even SHA1 is not good enough nowadays. Nested hashing? If you could borrow the WPA algorithm, that'd be nice! :D Encrypt the data. Can you do that? The arguments are passed in plain text, and I doubt it that any sensitive information is ever passed on, but still. I dont have much knowledge about HTPPS certificates, but I've heard you can request a custom one, "uncertfied", just for your own security. Quick link, I found that interesting, I dont know if it could be implemented though. http://security.stackexchange.com/questions/4781/do-any-security-experts-recommend-bcrypt-for-password-storage/6415#6415
Also, I really hope your plugin does not work in the main thread? I do some SQL queries on php, and it would be bad...
@MattIPv4
If you scream already, perhaps you should try one of the finished solutions, like BuyCraft. This plugin here is for people with at least some knowledge in scripting, and it simply wont work to just paste you a code, because things are way too flexible. (Waterflames, I hope you catch my drift, not wanting to go anti-you or whatever. :) )
CAN SOMEONE PLEASE SHOW ME HOW TO USE THIS FOR A STORE??
I REALLY WANT TO USE IT, BUT DON'T KNOW HOW TO DO SO WITH PAYPAL?
PLEASE???
@Waterflames
Please get a dev bukkit admin here. I want to personally explain the security and usefulness of this plugin. I am a security freak, and would never use it, unless I was sure that the communication was secure. May we create reports too?
Thank you all for using my plugin and I'm glad you like it! Now about a week ago I uploaded a new version of Websend to bukkitdev that fixes a couple of bugs. It took 5 days to get reviewed and this morning I received this message: http:pastebin.com/h2rKv19b
Now if you read the message, it says that Websend 2.5.2 is rejected because it "executes non-hardcoded strings". Now obviously, this is required for Websend. Without this, your webpage cannot execute commands remotely.
I am now going to file a report and see what this is about. I will post back as soon as I get an answer. Thank you for your patience.
Lol, I just noticed that I am still using version 2.3 xD Will update now.
@stgram: Yeah, this plugin is extremely cool :)
Awesome plugin! Just installed it, had a few problems at first figuring out how to use it, because the documentation seemed scary, but then I found the example files.Yah, I am a lazyass.
Once I realized how flexible your plugin is, my jaw dropped. I spent days looking for a plugin for ingame premium currency(donations), and now I can make my own stuff with a few custom alias and a lengthy but simple php file. YOU ROCK!
Hello, How can I check if a player is online in real time?
I tried writeOutputToPlayer which return true if a player was found but it returns true even if the player isn't online in a case:
For example:
If Waterflames is online, when I use writeOutputToPlayer('Hello', 'Water'), it will send the message to Waterflames which is online and the function will return true...
@reldeam
Newest version (2.5.2, should be approved soon) should capture this output if you set WRAP_COMMAND_EXECUTOR=true
EDIT: Its been 4 days and Websend 2.5.2 is still "Under review". Thank you for your patience.
@tenten8401
You can always make query code to get online players.
Dude. I have a banner generator script. I need to know how to get the players online from my server. can you give me an example or some code?
@reldeam
I'll see what I can do.
I'm also getting no data back when using the Output listener. I have tried Vault, Fe, Essentials and more, none of them return anything with any command. My set up is below, (it does work aka, connects and runs the console command).
echo gives "0" every time.
@Valoncz
So I looked this up and this is a quite complicated problem. The "Jobs" plugin responds to commands using CommandSender.sendMessage which, in the craftbukkit implementation, means that a command send by the console will be answered through System.out. Due to technical reasons Websend currently only supports output sent through the designated plugin logger.
@Waterflames
I sincerely hope we're not linking to unapproved, external files.