I did everything as you said and my terrain got green and white and no blocks show and no gui changed. I tried the TP you have in screenshots. Any idea what happened?
api is without capital letters, so it needs to be:
$this->api->chat->broadcast("User " .$user. ". is now AFK!");
Thanks such a simple mistake but you are awesome thanks a million!! You are really helpful and a plugin MASTER!
Alos sorry one more question how could i track aplyer movement say after they start moving after the enter the /afk command how would i get so it say
$this->api->chat->broadcast("User " .$user. ". is no longer AFK!");
Another quick question not relating to the code. How come you dont make public plugins because your like a Plugin GOD. You could make a some really awesome stuff. I know you make PMChero plugins but you should make public one too. Your just so great!!!!
Thanks again! Your the best!
Ok so ive tried making a simple AFK plugin so when they do /afk it broadcasts the Player is AFK but everytime i do the command it crashes the server. Could someone please help. Thanks in advance. It does not give me errors on startup.
<?php
/*
__PocketMine Plugin__
name=AFK Plugin
version=0.0.1
author=Xfusionios
class=AfkPlugin
apiversion=9
*/
class AfkPlugin implements Plugin{
private $api;
public function __construct(ServerAPI $api, $server = false){
$this->api = $api;
}
public function init(){
$this->api->console->register("afk", "tells everyone your AFK", array($this, "afk"));
}
public function __destruct(){
}
public function afk($cmd, $arg, $issuer, $alias){
switch($cmd){
case "afk":
$user = strtolower($args[0]);
$this->API->chat->broadcast("User " .$user. ". is now AFK!");
break;
}
}
}
I've got a question. I'm making a simple little plugin command and I just need the code so that when u enter the specific command it would give u a item that you set in the code.(I do not need config) thanks. This tutorial helped me alot.
First I love ur plugins thy are so very useful. Thanks also I was wondering if u could make a plugin that allows any op/admin to be able to join a full server. Thanks you
-xfusionios
0
0
I know right. It's becoming better and better. Just wish I still had time for my server..
0
Minebuilder has there own server software that supports plugins but the plugins are written in java not PHP.
0
0
0
-XFusionios
1
AFK Plugin
This is my first plugin that i have made it simple with two commands.
/afk = Tells everyone your afk
/afkoff = tells everyone your no longer AFK
Thats it for now. I will soon make more modifications to this soon.
DOWNLOAD: https://www.dropbox.com/s/nv7qq9hkrwjj1iz/afkCommand.php
Thanks to
Weizz: for helping me and answering my dumb questions
0
Thanks such a simple mistake but you are awesome thanks a million!! You are really helpful and a plugin MASTER!
Alos sorry one more question how could i track aplyer movement say after they start moving after the enter the /afk command how would i get so it say
Another quick question not relating to the code. How come you dont make public plugins because your like a Plugin GOD. You could make a some really awesome stuff. I know you make PMChero plugins but you should make public one too. Your just so great!!!!
Thanks again! Your the best!
0
0
Yes I was running this before but it could not fine th is username but I figured it out. Thanks for helping!
0
0
Do you know how do so? If u do please could you tell me how. Please
0
-xfusionios
0
0