Serverside:
1. Schiebe das Plugin in den Plugins ordner.
2. Reloade den Server mit /reload. Falls du diesen Command nicht hast Restarte den Server.
3. Config:
URL=phpURL - Kommen wir später zu. Erstmal leer lassen.
PASS=password - Hier kommt das Authentication Passwort rein mit der sich das PHP script am Server anmelden soll.
WEBLISTENER_ACTIVE=false/true - Damit kannst du das ganze Aktivieren oder deaktivieren.
ALTPORT= - Hier kannst du einen Port wählen wenn du nicht den Standartport (4445) nutzen möchtest.
HASH_ALGORITHM= - hier kannst du einen Hash Algorithmus (MD5, etc.) setzen wenn du das Passwort verschlüsseln möchtest. Musst du aber nicht.
Webside:
1. Erstelle eine neue PHP datei, in welche du das hier einfügst:
Code:
<?php
//variables
/*********************************** Variables ***********************************/
/**/ $checkpass = "PutYourPasswordHere";
/*********************************************************************************/
/**/ $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('/Output/PrintToPlayer:Example script from php.;');
print('/Output/PrintToPlayer:This command will show all possible colors;');
// use minecraft color codes to color the text
print("&aThis is green;");
print("&bThis is light blue;");
print("&cThis is red;");
print("&dThis is pink;");
print("&eThis is yellow;");
print("&fThis is white;");
print("&1This is dark blue;");
print("&2This is dark green;");
print("&3This is aqua;");
print("&4This is dark red;");
print("&5This is purple;");
print("&6This is gold;");
print("&7This is grey;");
print("&8This is dark grey;");
print("&9This is blue;");
print("&0This is black;");
print("&7These are &1multiple colors &cin one &5sentence;");
}
elseif($args[0] == "timeset") //script 2
{
print('/Output/PrintToPlayer:Success;');
print('/Output/PrintToPlayer:Example script from php.;');
print('/Output/PrintToPlayer: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("/Output/PrintToPlayer:Player = ".$player.";");
print("/Output/PrintToPlayer:Argument 1 = ".$args[0].";");
}
elseif($args[0] == "weatherset") //script 3
{
print('/Output/PrintToPlayer:Success;');
print('/Output/PrintToPlayer:Example script from php.;');
print('/Output/PrintToPlayer: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("/Output/PrintToPlayer:Player = ".$player.";");
print("/Output/PrintToPlayer:Argument 1 = ".$args[0].";");
}
elseif($args[0] == "consoleCommand") //script 4
{
print('/Output/PrintToPlayer:Example script from php.;');
print('/Output/PrintToPlayer:This command will send a command to the console.;');
if($player == 'console')
{
print('/Output/PrintToConsole:Error: Only in-game players can use this command.;');
}
else
{
print('/Output/PrintToPlayer:Proof it is send to console:;');
// use /Command/ExecuteConsoleCommand: to indicate a command from console.
print("/Command/ExecuteConsoleCommand:say Hello World;");
}
}
else
{
print('/Output/PrintToPlayer:Websend: Unknown command.;');
}
//Stop editing here.
}
else
{
print('/Output/PrintToConsole:Authorization Failed;');
}
}
else
{
print("/Output/PrintToConsole:No (enough) data provided.;");
}
?>
2. Ersetze
Code:
PutYourPasswordHere
durch dein Passwort
Wichtig die "" müssen bleiben!
3. Die datei auf deinen Webspace hochladen. Falls du einen Includes ordner o.ä. hast dann da rein.
4. Dann holst du dir die URL zu der Datei, (Bsp.:

) und fügst sie in der Config datei auf dem Server bei "URL" ein.
5. Jetzt mach in der Server Config die Raute (#) vor dem WEBLISTENER weg.
6. Und nun zum Command senden:
Code:
<?php
include_once 'Websend.php';
//Replace with bukkit server IP. To use a different port, change the constructor to new Websend(ip, port)
$ws = new Websend("123.456.789.123");
//Replace with password specified in Websend config file
$ws->connect("password");
$ws->doCommandAsConsole("time set 6000");
$ws->disconnect();
?>
Füge das hier in eine beliebige datei ein.
Code:
include_once 'Websend.php';
^Ersetze Websend.php durch deinen
Internen pfad zur datei.
Code:
$ws = new Websend("123.456.789.123");
^Da die IP von deinem Server rein
Code:
$ws->connect("password");
^Hier das Passwort aus der Serverconfig.
Code:
$ws->doCommandAsConsole("time set 6000");
^Ersetze time set 6000 durch deinen Command.
Die Anführungszeichen (") müssen bei allen da bleiben.