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

SpazzyTp

Comments in 'Plugin Development' started by Skullex, Jan 22, 2016.

Thread Status:
Not open for further replies.
  1. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    What is ocd?

    Attached Files:

  2. TheDeibo
    Offline

    TheDeibo Notable Member

    Joined:
    Sep 8, 2014
    Posts:
    693
    Minecraft User:
    TheDeibo
    OCD means, everything has to be right, or perfect(depends on their ocd), and if they dont get it fixed, it will really annoy them.
    applqpak and Skullex like this.
  3. Skullex
    Offline

    Skullex Active Member

    Joined:
    Nov 14, 2015
    Posts:
    212
    Minecraft User:
    Skullex
    Or drive them crazy to the point of hospitalization (panic attack..etc) or a trip to the asylum
    applqpak and TheDeibo like this.
  4. TheDeibo
    Offline

    TheDeibo Notable Member

    Joined:
    Sep 8, 2014
    Posts:
    693
    Minecraft User:
    TheDeibo
    that too! xD
    applqpak and Skullex like this.
  5. Skullex
    Offline

    Skullex Active Member

    Joined:
    Nov 14, 2015
    Posts:
    212
    Minecraft User:
    Skullex
    Lol xP
  6. Skullex
    Offline

    Skullex Active Member

    Joined:
    Nov 14, 2015
    Posts:
    212
    Minecraft User:
    Skullex
    @TheDeibo @PocketKiller @Vaivez66 @MichaelM04 @AndrewBit I have found another issue within the code in which I have now edited for the 5th time

    PHP:
    <?php

    namespace Spazzy;

    use 
    pocketmine\plugin\PluginBase;
    use 
    pocketmine\event\Listener;
    use 
    pocketmine\command\Command;
    use 
    pocketmine\command\CommandSender;
    use 
    pocketmine\Player;
    use 
    pocketmine\event\entity\EntityTeleportEvent;
    use 
    pocketmine\level\particle\PortalParticle;
    use 
    pocketmine\level\sound\EndermanTeleportSound;

    class 
    Main extends PluginBase implements Listener {

        public function 
    onEnable(){
            
    $this->getServer()->getPluginManager()->registerEvents($this$this);
        }

        public function 
    onLoad(){
            
    $this->getLogger()->info("SpazzyTp §aenabled");
        }

        public function 
    onCommand(CommandSender $senderCommand $command$label, array $args){
            switch(
    $command->getName()){
                case 
    "pos":
                    if(
    $sender instanceof Entity){
                        
    $entityX $sender->getX();
                        
    $entityY $sender->getY();
                        
    $entityZ $sender->getZ();

                        
    $outX=round($entityX,1);
                        
    $outY=round($entityY,1);
                        
    $outZ=round($entityZ,1);

                        
    $entityLevel $sender->getLevel()->getName();

                        
    $sender->sendMessage("§bPosition: §ax:" $outX ", §ey:" $outY ", §9z:" $outZ ". §dOn:§f " $playerLevel);
                        return 
    true;
                    }

                    else{
                        
    $sender->sendMessage("§cThis command only works §ein§f-§egame.");
                }
            }
        }    

        public function 
    onTeleport(EntityTeleportEvent $event){
            
    $entity $event->getEntity();
            
    $fizz = new EndermanTeleportSound($entity);
            
    $particle = new PortalParticle($entity);
            
    $entity->getLevel()->addSound($fizz);
            
    $entity->getLevel()->addParticle($particle);
         }
       
        public function 
    onDisable(){
            
    $this->getLogger()->info("SpazzyTp §cdisabled.");
            return 
    true;
        }
    }
    The command /pos fails to work. Once ran in the server it says unknown command type /help. What did I do wrong this time??? :(
  7. TheDeibo
    Offline

    TheDeibo Notable Member

    Joined:
    Sep 8, 2014
    Posts:
    693
    Minecraft User:
    TheDeibo
    can you show us your plugin.yml?
  8. MichaelM04
    Offline

    MichaelM04 Active Member Plugin Developer

    Joined:
    Nov 12, 2015
    Posts:
    213
    Plugins:
    1
    Minecraft User:
    Michael
    yeah that would help :)
    TheDeibo likes this.
  9. Skullex
    Offline

    Skullex Active Member

    Joined:
    Nov 14, 2015
    Posts:
    212
    Minecraft User:
    Skullex
    Code:
    name: SpazzyTp
    main: Spazzy\Main
    author: Skullex
    version: 0.0.1
    api: [1.0.0, 1.1.0]
    description: Plays a Enderman teleport sound on teleport event with other cool stuff!
    
  10. TheDeibo
    Offline

    TheDeibo Notable Member

    Joined:
    Sep 8, 2014
    Posts:
    693
    Minecraft User:
    TheDeibo
    thats your problem. you need a propper plugin.yml
    applqpak likes this.
  11. Skullex
    Offline

    Skullex Active Member

    Joined:
    Nov 14, 2015
    Posts:
    212
    Minecraft User:
    Skullex
    Hm, ok :D
  12. TheDeibo
    Offline

    TheDeibo Notable Member

    Joined:
    Sep 8, 2014
    Posts:
    693
    Minecraft User:
    TheDeibo
    use this as an example.

    Code:
    name: FOTD
    main: FOTD\Main
    version: "1.0.0"
    api: [1.11.0]
    load: POSTWORLD
    author: TheDeibo-and-Driesboy
    commands:
    fact1:
      permission: fotd.command.fact1
      description: Fact of the Day 1
      usage: /fact1
    
    simply copy and paste it, and change the infomation to your own.
    Vaivez66 and Skullex like this.
  13. Skullex
    Offline

    Skullex Active Member

    Joined:
    Nov 14, 2015
    Posts:
    212
    Minecraft User:
    Skullex
    You're one of the most helpful people I know!! <3 ty so much ;-;
    applqpak and TheDeibo like this.
  14. TheDeibo
    Offline

    TheDeibo Notable Member

    Joined:
    Sep 8, 2014
    Posts:
    693
    Minecraft User:
    TheDeibo
    Awwww :3
    i do try my best
    /me is blushing
    TheDeibo * is blushing *
    applqpak and Skullex like this.
  15. Vaivez66
    Offline

    Vaivez66 Notable Member Plugin Developer

    Joined:
    Jun 10, 2015
    Posts:
    402
    Plugins:
    2
    Mention us doesn't sent alert to us :p
  16. TheDeibo
    Offline

    TheDeibo Notable Member

    Joined:
    Sep 8, 2014
    Posts:
    693
    Minecraft User:
    TheDeibo
    Your very lucky i decided to stay awake pass Mid-night tonight :)
    Skullex likes this.
  17. MichaelM04
    Offline

    MichaelM04 Active Member Plugin Developer

    Joined:
    Nov 12, 2015
    Posts:
    213
    Plugins:
    1
    Minecraft User:
    Michael
    Its 6PM Here :p
    Skullex and TheDeibo like this.
  18. Vaivez66
    Offline

    Vaivez66 Notable Member Plugin Developer

    Joined:
    Jun 10, 2015
    Posts:
    402
    Plugins:
    2
    And it's 7 A.M. here :p (Btw, should we close this thread?)
  19. TheDeibo
    Offline

    TheDeibo Notable Member

    Joined:
    Sep 8, 2014
    Posts:
    693
    Minecraft User:
    TheDeibo
    not close it yet until the plugin is up and running :) .
  20. Vaivez66
    Offline

    Vaivez66 Notable Member Plugin Developer

    Joined:
    Jun 10, 2015
    Posts:
    402
    Plugins:
    2
    Did you notice that @Intyre watch this thread? *scary*
    PocketKiller and Skullex like this.
Thread Status:
Not open for further replies.

Share This Page

Advertisement