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

Can anyone help me?

Comments in 'Plugin Development' started by Kiosek, May 24, 2015.

  1. Kiosek
    Offline

    Kiosek New Member

    Joined:
    Jun 17, 2014
    Posts:
    34
    Minecraft User:
    Cecil107
    I am working on a plugin but I don't know is it right,
    Code:
    <?php
    
    namespace Text{
    
    use pocketmine\plugin\PluginBase;
    use pocketmine\Command;
    use pocketmine\command\CommandSender;
    use pocketmine\event\Listener;
    use pocketmine\Player;
    use pocketmine\level\position;
    
        class Text extends PluginBase {
       
        public function onEnable(){
          $this->getLogger()->info("onEneble() has been called!");
        }
        public function onDisable() {
          $this->getLogger()->info("onDisable() has been called!"); 
        }    }
       
        public function onCommand(CommandSender $sender, Command $command, $label, array $args){
            switch($command->getName(text)){
                case "text":
                                .->addParticle(new FloatingTextParticle (new Vector3($player->getX(), $player->getY(), $player->getZ()), "§1Hello §aWorld§l!"), [$player])
                                    $sender->sendMessage("§1Finish §3lord§l!")
                                    }}}
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Why `.->addParticle()`?
  3. Kiosek
    Offline

    Kiosek New Member

    Joined:
    Jun 17, 2014
    Posts:
    34
    Minecraft User:
    Cecil107
  4. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    You're working on a Plugin? That's just copying..
  5. Kiosek
    Offline

    Kiosek New Member

    Joined:
    Jun 17, 2014
    Posts:
    34
    Minecraft User:
    Cecil107
  6. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    No what? You just copied the code from the GitHub.
  7. Kiosek
    Offline

    Kiosek New Member

    Joined:
    Jun 17, 2014
    Posts:
    34
    Minecraft User:
    Cecil107
    I am Cecil107 this is my pc username :D
  8. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Lol, well change it to to $player->getLevel()->addParticle
  9. Kiosek
    Offline

    Kiosek New Member

    Joined:
    Jun 17, 2014
    Posts:
    34
    Minecraft User:
    Cecil107
    Is it make text ?
  10. BalAnce
    Offline

    BalAnce Active Member

    Joined:
    Mar 10, 2015
    Posts:
    125
    Minecraft User:
    BalAnce
    Yes
    use $sender->getLevel()->addParticle
    you cant just add particle without defining the world

Share This Page

Advertisement