Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Server Plugin Development Help.

Comments in 'Plugin Development' started by NIM, Dec 29, 2013.

  1. NIM
    Offline

    NIM Active Member

    Joined:
    Nov 28, 2013
    Posts:
    74
    Minecraft User:
    NIMGamingPRO
    Hello everybody my name is NIM, and I am some what of a Plugin Dev. I need extra help with a spleef server.

    These are the plugins I will be using:
    +SimpleAuth
    +PlayerGiveSelf (custom)
    +Join MOTD (custom)
    +Countdown (custom)
    +SpawnWithItems
    +NoBlockDrop
    +AutoCommandBot
    +MineReset

    I need help with these plugins:

    LastPlayerStanding:
    After the last player wins spleef I need that player to be teleported to spawn

    NoSnowBlockProtection:
    I need every block to be protected except the snow.

    If any of these plugins exist please tell, if not, please tell me if they are possible and what I need to make them.
  2. Lambo
    Offline

    Lambo Notable Member Plugin Developer

    Joined:
    Sep 14, 2013
    Posts:
    431
    Plugins:
    4
    Minecraft User:
    Lambo
    I could maybe make NoSnowBlockProtection... and do you have a spleef plugin?!
  3. NIM
    Offline

    NIM Active Member

    Joined:
    Nov 28, 2013
    Posts:
    74
    Minecraft User:
    NIMGamingPRO
    No, I an currently making everything on my own with help from devs.
  4. Lambo
    Offline

    Lambo Notable Member Plugin Developer

    Joined:
    Sep 14, 2013
    Posts:
    431
    Plugins:
    4
    Minecraft User:
    Lambo
    Nice. LastPlayerStanding shouldn't be hard.
  5. Lambo
    Offline

    Lambo Notable Member Plugin Developer

    Joined:
    Sep 14, 2013
    Posts:
    431
    Plugins:
    4
    Minecraft User:
    Lambo
    I just realised Join MOTD, isn't that from me? xD
  6. NIM
    Offline

    NIM Active Member

    Joined:
    Nov 28, 2013
    Posts:
    74
    Minecraft User:
    NIMGamingPRO
    I'm making my own which shows how many players and etc. it's gonna be custom.
  7. Lambo
    Offline

    Lambo Notable Member Plugin Developer

    Joined:
    Sep 14, 2013
    Posts:
    431
    Plugins:
    4
    Minecraft User:
    Lambo
    Oh okay, and my plugin PlayerCounter already does that ;)
  8. NIM
    Offline

    NIM Active Member

    Joined:
    Nov 28, 2013
    Posts:
    74
    Minecraft User:
    NIMGamingPRO
    P.S You look like your good with plugins, would this be correct?

    PHP:
    <?php

    /*
    __PocketMine Plugin__
    name=SignCounter
    description=Count how many players are in the game on a sign.
    version=1.0
    author=NIM
    class=SignCounter
    apiversion=11
    */

    class SignCounter implements Plugin{
     private 
    $api$server$path;
     public function 
    __construct(ServerAPI $api$server false){
     
    $this->api $api;
     
    $this->server ServerAPI::request();
     }

     public function 
    init(){
     
    $this->api->addHandler("tile.update", array($this"eventHandler"));
     ));

     }
     public function 
    __destruct() {}

     public function 
    eventHandler(&$data$event){
     switch (
    $event) {
     case 
    "tile.update":
     if (
    $data->class === TILE_SIGN)
     if (
    $data->data['Text1'] == "[Server]"){
     
    $data->data['Text1'] = "Player Amount:";
     if (
    $data->data['Text2'] == "[Players]") {
     
    $data->data['Text2'] = "[".count($this->api->player->getAll())."/".$this->server->maxClients);"]";
     }
     return 
    true;
     }
     }
     break;
    }
  9. Lambo
    Offline

    Lambo Notable Member Plugin Developer

    Joined:
    Sep 14, 2013
    Posts:
    431
    Plugins:
    4
    Minecraft User:
    Lambo
    I'm actually not very good with PHP (I'm more of a, lets say, JavaScript person :) ), but this is what @wies said to get data from a sign:
  10. NIM
    Offline

    NIM Active Member

    Joined:
    Nov 28, 2013
    Posts:
    74
    Minecraft User:
    NIMGamingPRO
    But would this plugin work?
  11. Lambo
    Offline

    Lambo Notable Member Plugin Developer

    Joined:
    Sep 14, 2013
    Posts:
    431
    Plugins:
    4
    Minecraft User:
    Lambo
    I think it would.
    But you have a "&" before data parameter in the eventHandler function.
  12. NIM
    Offline

    NIM Active Member

    Joined:
    Nov 28, 2013
    Posts:
    74
    Minecraft User:
    NIMGamingPRO
    Ok, well if you can make The NoSnowProtection that would be great!

Share This Page

Advertisement