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

New plugin help

Comments in 'Plugin Development' started by GamesLoad, Jun 30, 2014.

  1. GamesLoad
    Offline

    GamesLoad Active Member

    Joined:
    Jun 28, 2014
    Posts:
    106
    Minecraft User:
    GamesLoad
    hello I would like to know if there a way that when I press a cartel run a command on the console. Please let me help you in your code.
  2. iFootball
    Offline

    iFootball Active Member

    Joined:
    Jun 9, 2014
    Posts:
    84
    Minecraft User:
    iFootball
    "cartel"?
  3. MinecrafterJPN
    Offline

    MinecrafterJPN Active Member Plugin Developer

    Joined:
    Aug 26, 2013
    Posts:
    154
    Plugins:
    9
    Minecraft User:
    MinecrafterJPN
    What is "cartel".
    Cart?
  4. iFootball
    Offline

    iFootball Active Member

    Joined:
    Jun 9, 2014
    Posts:
    84
    Minecraft User:
    iFootball
    Posibliy... If so which API?
  5. GamesLoad
    Offline

    GamesLoad Active Member

    Joined:
    Jun 28, 2014
    Posts:
    106
    Minecraft User:
    GamesLoad
    is sign
    sorry for my english
  6. iFootball
    Offline

    iFootball Active Member

    Joined:
    Jun 9, 2014
    Posts:
    84
    Minecraft User:
    iFootball
    Tapcmd and SignConsole work good for this
  7. GamesLoad
    Offline

    GamesLoad Active Member

    Joined:
    Jun 28, 2014
    Posts:
    106
    Minecraft User:
    GamesLoad
  8. iFootball
    Offline

    iFootball Active Member

    Joined:
    Jun 9, 2014
    Posts:
    84
    Minecraft User:
    iFootball
    Their is a way for both old and new API.
    Last edited: Jun 30, 2014
  9. GamesLoad
    Offline

    GamesLoad Active Member

    Joined:
    Jun 28, 2014
    Posts:
    106
    Minecraft User:
    GamesLoad
    Please let me help you with the code when I press a sign must execute a command
  10. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Really, improve your english...
    Killman2 likes this.
  11. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    Lol...but you understand...
    he means for example tap to join a tournament in Arena 1
    Last edited: Jun 30, 2014
  12. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    Italian's english teachers dont teach well...thats a big problem for us...
  13. Killman2
    Offline

    Killman2 Active Member Plugin Developer

    Joined:
    May 5, 2014
    Posts:
    81
    Plugins:
    1
    Minecraft User:
    Killman2
    I agree.
  14. GamesLoad
    Offline

    GamesLoad Active Member

    Joined:
    Jun 28, 2014
    Posts:
    106
    Minecraft User:
    GamesLoad
    jon puoi spiegare tu
  15. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    In this forum you need to talk english...everyone need to do it...if you want to talk it. Go in the appropriate section or by PM

    -non possiamo parlare in italiano a meno che non sia un messaggio privato o che siamo nella sezione del forum italiana
    Cmq ha capito
    PEMapModder likes this.
  16. xionbig
    Offline

    xionbig Active Member Plugin Developer

    Joined:
    Jun 11, 2014
    Posts:
    106
    Plugins:
    2
    Minecraft User:
    NikoZazza
    ciao italiani
    PHP:
    <?php
    namespace xXx;

    use 
    pocketmine\command\Command;
    use 
    pocketmine\event\Listener;
    use 
    pocketmine\Player;
    use 
    pocketmine\plugin\PluginBase;
    use 
    pocketmine\Server;
    use 
    pocketmine\event\player\PlayerJoinEvent;
    use 
    pocketmine\event\block\BlockBreakEvent;
    use 
    pocketmine\event\Event;
    use 
    pocketmine\event\player\PlayerInteractEvent;
    use 
    pocketmine\level\Level;
    use 
    pocketmine\item\Block;
    class 
    xXx extends PluginBase implements Listener{
        public function 
    onLoad(){}
        public function 
    onEnable() {
            
    $this->getServer()->getPluginManager()->registerEvents($this$this);
        }
        public function 
    playerBlockTouch(PlayerInteractEvent $event){
            
    $player $event->getPlayer();
            
    $block $event->getBlock()->getID();       
            if(
    $block == 323 || $block == 63 || $block == 68){
                
    //run command...
            
    }
        }
        public function 
    onDisable(){
        }
    }
    iFootball likes this.
  17. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    Xionbig attualmente ne conto 5 XD


    I think there are only 5 italians...mean this...not the same translation but...xD
  18. xionbig
    Offline

    xionbig Active Member Plugin Developer

    Joined:
    Jun 11, 2014
    Posts:
    106
    Plugins:
    2
    Minecraft User:
    NikoZazza
    missing syntax to run the command, now I will try in the documentation

    manca la sintassi per eseguire il comando, adesso cercherò nella documentazione
    Jon likes this.
  19. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    Che fai mi copi?
    XD
    I am kidding
    xionbig likes this.
  20. GamesLoad
    Offline

    GamesLoad Active Member

    Joined:
    Jun 28, 2014
    Posts:
    106
    Minecraft User:
    GamesLoad
    needs to be more signs then
    Code:
    public function eventHandle($data, $event) {
    if (isset($this->picked[$data["player"]->username])) {
    $block = $data["target"];
        $read = $this->api->plugin->readYAML($this->api->plugin->configPath($this). "blocks.yml");
        $x = $block->x;
        $y = $block->y;
        $z = $block->z;
        $level = $block->level->getName();
        $id = $x . "!" . $y . "!" . $z . "!" . $level;
        $read[$id][] = $this->picked[$data["player"]->username];
    

Share This Page

Advertisement