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.
-
View User Profile
-
Send Message
Posted May 8, 2012I all time get this error : http://dev.bukkit.org/paste/5343.txt
What i am doing wrong?
-
View User Profile
-
Send Message
Posted May 5, 2012I have a question. When will a new version for Java 1.6. be released? I really love this Plugin, but the owner of my server can“t manage to update Java to 1.7.
-
View User Profile
-
Send Message
Posted Apr 30, 2012@uncovery
Its a known bug.
-
View User Profile
-
Send Message
Posted Apr 30, 2012@UbuntuFreak
Essentials has this Syntax if you run the command via Console:
time day world:: Set the Time | Make it Day | Specified World
-
View User Profile
-
Send Message
Posted Apr 29, 2012I get the following (1.5.1) when executing a save-all command from the code... normal?:
11:21:22 [INFO] CONSOLE: Forcing save..
11:21:22 [SEVERE] java.util.ConcurrentModificationException
11:21:22 [SEVERE] at java.util.HashMap$HashIterator.nextEntry(HashMap.java:806)
11:21:22 [SEVERE] at java.util.HashMap$KeyIterator.next(HashMap.java:841)
11:21:22 [SEVERE] at net.minecraft.server.World.a(World.java:2428)
11:21:22 [SEVERE] at net.minecraft.server.ChunkRegionLoader.a(ChunkRegionLoader.java:215)
11:21:22 [SEVERE] at net.minecraft.server.ChunkRegionLoader.a(ChunkRegionLoader.java:85)
11:21:22 [SEVERE] at net.minecraft.server.ChunkProviderServer.saveChunk(ChunkProviderServer.java:163)
11:21:22 [SEVERE] at net.minecraft.server.ChunkProviderServer.saveChunks(ChunkProviderServer.java:212)
11:21:22 [SEVERE] at net.minecraft.server.World.save(World.java:255)
11:21:22 [SEVERE] at org.bukkit.craftbukkit.CraftWorld.save(CraftWorld.java:655)
11:21:22 [SEVERE] at org.bukkit.command.defaults.SaveCommand.execute(SaveCommand.java:25)
11:21:22 [SEVERE] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
11:21:22 [SEVERE] at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:473)
11:21:22 [SEVERE] at Waterflames.websend.CommandParser.onExecuteConsoleCommand(CommandParser.java:145)
11:21:22 [SEVERE] at Waterflames.websend.CommandParser.parse(CommandParser.java:47)
11:21:22 [SEVERE] at Waterflames.websend.ComServer.handleLine(ComServer.java:153)
11:21:22 [SEVERE] at Waterflames.websend.ComServer.run(ComServer.java:96)
11:21:22 [SEVERE] java.util.ConcurrentModificationException
11:21:22 [SEVERE] at java.util.HashMap$HashIterator.nextEntry(HashMap.java:806)
11:21:22 [SEVERE] at java.util.HashMap$KeyIterator.next(HashMap.java:841)
11:21:22 [SEVERE] at net.minecraft.server.World.a(World.java:2428)
11:21:22 [SEVERE] at net.minecraft.server.ChunkRegionLoader.a(ChunkRegionLoader.java:215)
11:21:22 [SEVERE] at net.minecraft.server.ChunkRegionLoader.a(ChunkRegionLoader.java:85)
11:21:22 [SEVERE] at net.minecraft.server.ChunkProviderServer.saveChunk(ChunkProviderServer.java:163)
11:21:22 [SEVERE] at net.minecraft.server.ChunkProviderServer.saveChunks(ChunkProviderServer.java:212)
11:21:22 [SEVERE] at net.minecraft.server.World.save(World.java:255)
11:21:22 [SEVERE] at org.bukkit.craftbukkit.CraftWorld.save(CraftWorld.java:655)
11:21:22 [SEVERE] at org.bukkit.command.defaults.SaveCommand.execute(SaveCommand.java:25)
11:21:22 [SEVERE] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
11:21:22 [SEVERE] at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:473)
11:21:22 [SEVERE] at Waterflames.websend.CommandParser.onExecuteConsoleCommand(CommandParser.java:145)
11:21:22 [SEVERE] at Waterflames.websend.CommandParser.parse(CommandParser.java:47)
11:21:22 [SEVERE] at Waterflames.websend.ComServer.handleLine(ComServer.java:153)
11:21:22 [SEVERE] at Waterflames.websend.ComServer.run(ComServer.java:96)
11:21:22 [SEVERE] java.util.ConcurrentModificationException
11:21:22 [SEVERE] at java.util.HashMap$HashIterator.nextEntry(HashMap.java:806)
11:21:22 [SEVERE] at java.util.HashMap$KeyIterator.next(HashMap.java:841)
11:21:22 [SEVERE] at net.minecraft.server.World.a(World.java:2428)
11:21:22 [SEVERE] at net.minecraft.server.ChunkRegionLoader.a(ChunkRegionLoader.java:215)
11:21:22 [SEVERE] at net.minecraft.server.ChunkRegionLoader.a(ChunkRegionLoader.java:85)
11:21:22 [SEVERE] at net.minecraft.server.ChunkProviderServer.saveChunk(ChunkProviderServer.java:163)
11:21:22 [SEVERE] at net.minecraft.server.ChunkProviderServer.saveChunks(ChunkProviderServer.java:212)
11:21:22 [SEVERE] at net.minecraft.server.World.save(World.java:255)
11:21:22 [SEVERE] at org.bukkit.craftbukkit.CraftWorld.save(CraftWorld.java:655)
11:21:22 [SEVERE] at org.bukkit.command.defaults.SaveCommand.execute(SaveCommand.java:25)
11:21:22 [SEVERE] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
11:21:22 [SEVERE] at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:473)
11:21:22 [SEVERE] at Waterflames.websend.CommandParser.onExecuteConsoleCommand(CommandParser.java:145)
11:21:22 [SEVERE] at Waterflames.websend.CommandParser.parse(CommandParser.java:47)
11:21:22 [SEVERE] at Waterflames.websend.ComServer.handleLine(ComServer.java:153)
11:21:22 [SEVERE] at Waterflames.websend.ComServer.run(ComServer.java:96)
11:21:22 [INFO] CONSOLE: Save complete.
-
View User Profile
-
Send Message
Posted Apr 28, 2012@Defman0
I think "time day world" isn't a vaild command. I didn't get it to work with commands by CommandHelper and other plugins yet.
-
View User Profile
-
Send Message
Posted Apr 28, 2012config.txt - generate very bad ! with errors
ALTPORT=false/true
but this is not boolean type.... this is should be int ....
and plz more full exaples ...
i can't understand wtf in examples now
they don't work Oo or i do somthing wrong
in witch floder i need to upload examples Oo
-
View User Profile
-
Send Message
Posted Apr 25, 2012its not give error now but nothing hapen on the server
-
View User Profile
-
Send Message
Posted Apr 24, 2012@Fatih199415
If you use a bukkit => php => bukkit connection you had to set this var on your websend config file : URL=yourphpurl as say here : http://dev.bukkit.org/server-mods/websend/pages/config-file-options/
-
View User Profile
-
Send Message
Posted Apr 24, 2012there are a error in line 5 phpmyadmin tell
Link to test.php
-
View User Profile
-
Send Message
Posted Apr 24, 2012It does not work my server print me in the log:
22:26:38 [SCHWERWIEGEND] No url was found. Please check your configuration file. 22:26:38 [SCHWERWIEGEND] An error occured while trying to do a bukkit -> php connection. (POST) java.lang.NullPointerException at Waterflames.websend.POSTHandler.sendPOST(POSTHandler.java:88) at Waterflames.websend.PosterThread.run(PosterThread.java:48)
My config data:
-
View User Profile
-
Send Message
Posted Apr 24, 2012@GlabbichRulz
You might be interested in this:
http://dev.bukkit.org/server-mods/websend/forum/help/35318-sockets-disables-by-hoster-have-to-use-fsockopen/#p1
@Defman0 You will have to be more specific.
-
View User Profile
-
Send Message
Posted Apr 24, 2012still not work :(
-
View User Profile
-
Send Message
Posted Apr 24, 2012Hi, can you please write another PHP Skript which use fsockopen, fopen, cURL, FTP, etc and not Socket Open? Nearly every Host dont allow them :(
-
View User Profile
-
Send Message
Posted Apr 23, 2012@Defman0
On line 64 you have: }c Remove the c.
-
View User Profile
-
Send Message
Posted Apr 23, 2012My code to minecraft.php
My code to ExternalTimeSet.php
-
View User Profile
-
Send Message
Posted Apr 23, 2012@Defman0
Please post your code on http://pastie.org/ http://pastebin.com/ or even http://dev.bukkit.org/paste/ but not in the comments.
Due to the way bukkitdev handles indentations and new line characters by default, your code is really hard to read.
Also, it fills the entire comment section.
PLEASE just use one of those sites I referred you to.
-
View User Profile
-
Send Message
Posted Apr 23, 2012code from ExternalTimeSet.php
<?php $HOST = "87.104.72.100"; the ip of the bukkit server $password = "XXXXXXX"; Can't touch this: $sock = socket_create(AF_INET, SOCK_STREAM, 0) or die("error: could not create socket\n"); $succ = socket_connect($sock, $HOST, 4445) or die("error: could not connect to host\n"); Authentification socket_write($sock, $command = md5($password)."<Password>", strlen($command) + 1) or die("error: failed to write to socket\n"); Begin custom code here. socket_write($sock, $command = "/Command/ExecuteConsoleCommand:time day;", strlen($command) + 1) Writing text/command we want to send to the server or die("error: failed to write to socket\n"); socket_write($sock, $command = "Time set to day;", strlen($command) + 1) or die("error: failed to write to socket\n"); ?>
code from minecraft.php
<?php variables /******* Variables *******/ // $checkpass = "XXXXXXX"; /***************/ // $receivedMD5 = $_POST['authKey']; // $player = $_POST["player"]; // $args = $_POST["args"]; each argument is stored in an array called "args" /*****************/
Do not edit! if($receivedMD5 != "" && $args[0] != "") { if($receivedMD5 == md5($checkpass)) { Begin your code here.
if($args[0] == "checkcolors") script 1 { print('Example script from php.;'); print('This command will show different possible colors;'); use /Chatcolor-red: to set the text of a sentence to red. Other colors are: print("/Chatcolor-red:This is red;"); print("/Chatcolor-green:This is green;"); print("/Chatcolor-blue:This is blue;"); print("/Chatcolor-yellow:This is yellow;"); print("/Chatcolor-white:This is white;"); print("/Chatcolor-purple:This is purple;"); print("/Chatcolor-gray:This is gray;"); print("/Chatcolor-gray:These are /Chatcolor-blue:multiple colors/Chatcolor-red: in one/Chatcolor-purple: sentence;"); } elseif($args[0] == "timeset") script 2 { print('Success;'); print('Example script from php.;'); print('This will set the time of players world to day.;'); use /Command/ExecuteBukkitCommand: to indicate a command sent by $player. Behind that line you can put any player chat command. print("/Command/ExecuteBukkitCommand:time day;"); print("Player = ".$player.";"); print("Argument 1 = ".$args[0].";"); } elseif($args[0] == "weatherset") script 3 { print('Success;'); print('Example script from php.;'); print('This will set the weather of players world to sun.;'); use /Command/ExecuteBukkitCommand: to indicate a command sent by $player. Behind that line you can put any player chat command. print("/Command/ExecuteBukkitCommand:weather sun;"); print("Player = ".$player.";"); print("Argument 1 = ".$args[0].";"); } elseif($args[0] == "consoleCommand") script 4 { print('Example script from php.;'); print('This command will send a command to the console.;'); if($player == 'console') { print('"Error: Only in-game players can use this command.";'); }c else { print('Proof it is send to console:;'); use /Command/ExecuteConsoleCommand: to indicate a command from console. print("/Command/ExecuteConsoleCommand:say Hello World;"); } } else { print('Websend: Unknown command.;'); }
Stop editing here. } else { print('Authorization Failed;'); } } else { print("No (enough) data provided.;"); } ?> ?>
-
View User Profile
-
Send Message
Posted Apr 23, 2012Can you pastbin your code please ? so we can see the error =)
-
View User Profile
-
Send Message
Posted Apr 23, 2012its work better now but i still have one error
i have a error on my main php websend site
and its say
( ! ) Parse error: syntax error, unexpected T_ELSE in C:\wamp\www\mc\minecraft.php on line 65
line 65 (else) and
and a error on my time set site (you exelmpel)
line 5 ($sock = socket_create(AF_INET, SOCK_STREAM, 0))