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

Fix this plugin

Comments in 'Plugin Development' started by TheKnightGamer, Feb 18, 2016.

  1. TheKnightGamer
    Offline

    TheKnightGamer New Member

    Joined:
    Dec 25, 2015
    Posts:
    34
    Minecraft User:
    TheKnightGamerZ
    This is my plugin and it not working here is the folder and phar. Fix it pls.

    Attached Files:

  2. Vaivez66
    Offline

    Vaivez66 Notable Member Plugin Developer

    Joined:
    Jun 10, 2015
    Posts:
    402
    Plugins:
    2
    Since this is Plugin Development section, why don't you just post the problem with
    Code:
    [PHP]# Code here[/PHP]
    
    ?
  3. TheKnightGamer
    Offline

    TheKnightGamer New Member

    Joined:
    Dec 25, 2015
    Posts:
    34
    Minecraft User:
    TheKnightGamerZ
    But I don't know what the problem.
  4. Vaivez66
    Offline

    Vaivez66 Notable Member Plugin Developer

    Joined:
    Jun 10, 2015
    Posts:
    402
    Plugins:
    2
    Could you explain why it doesn't work? Any crashdumps or errors?
  5. MCUnderground
    Offline

    MCUnderground New Member

    Joined:
    Feb 6, 2016
    Posts:
    10
    Minecraft User:
    MCUnderground
    Copy content from your Main.php file.
    Paste it like @Vaivez66 said.
  6. MCUnderground
    Offline

    MCUnderground New Member

    Joined:
    Feb 6, 2016
    Posts:
    10
    Minecraft User:
    MCUnderground
    This is his php

    PHP:
    <?php
    namespace TheKnightGamer\ModBattle;
    use 
    pocketmine\command\CommandSender;
    use 
    pocketmine\command\Command;
    use 
    pocketmine\event\Listener;
    use 
    pocketmine\plugin\PluginBase;
    class 
    Main extends PluginBase{
      public function 
    onEnable(){
        
    $this->saveDefaultConfig();
        
    // $this->getServer()->getPluginManager()->registerEvents($this, $this);
      
    }
      public function 
    onCommand(CommandSender $issuerCommand $cmd$label, array $params){
        switch(
    $cmd->getName()){
        }
        return 
    false;
      }
    }
  7. MCUnderground
    Offline

    MCUnderground New Member

    Joined:
    Feb 6, 2016
    Posts:
    10
    Minecraft User:
    MCUnderground
    Wow... Your folder is called "scr" should be 'src" you plugin.yml is not in right format. In Main.php you are doing nothing...
  8. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
    Instead of giving is your plugin telling us to fix it. Why don't you postthe code, explain what's not working, post the error messages if any, and fix YOUR plugin yourself.
  9. Vaivez66
    Offline

    Vaivez66 Notable Member Plugin Developer

    Joined:
    Jun 10, 2015
    Posts:
    402
    Plugins:
    2
    Just it? That plugin doesn't do anything :p
  10. TheKnightGamer
    Offline

    TheKnightGamer New Member

    Joined:
    Dec 25, 2015
    Posts:
    34
    Minecraft User:
    TheKnightGamerZ
    Thank I didn't notice
  11. Vaivez66
    Offline

    Vaivez66 Notable Member Plugin Developer

    Joined:
    Jun 10, 2015
    Posts:
    402
    Plugins:
    2
    Remember this:
    Code:
    src = source code
    scr = screen recorder
    
    :p
  12. TheKnightGamer
    Offline

    TheKnightGamer New Member

    Joined:
    Dec 25, 2015
    Posts:
    34
    Minecraft User:
    TheKnightGamerZ
    OK it solved yeah now how to get the plugin to do something.
  13. Vaivez66
    Offline

    Vaivez66 Notable Member Plugin Developer

    Joined:
    Jun 10, 2015
    Posts:
    402
    Plugins:
    2
    Just code by yourself. Then, if you had some problem, ask here. We don't know what do you want to do with your plugin
  14. TheKnightGamer
    Offline

    TheKnightGamer New Member

    Joined:
    Dec 25, 2015
    Posts:
    34
    Minecraft User:
    TheKnightGamerZ
    But the name of the plugin is ModBattle
    how can you not know what to do for this plugin turn into mod and fight.
  15. Vaivez66
    Offline

    Vaivez66 Notable Member Plugin Developer

    Joined:
    Jun 10, 2015
    Posts:
    402
    Plugins:
    2
    You can't just know with its name
  16. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    A simple way to remember src:
    scr means scream, which means you will be screaming and throwing your computer out of the window when you found out that your error came from such a simple mistake. You scream when you found out that you wrote scr.
  17. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
    Learn PHP and pocketmine API.
    It won't magically do something by itself ;)

Share This Page

Advertisement