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

My Plugin is not Working

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

  1. TheKnightGamer
    Offline

    TheKnightGamer New Member

    Joined:
    Dec 25, 2015
    Posts:
    34
    Minecraft User:
    TheKnightGamerYT
    My Plugin is not working and need someone to fix it and and give me it back. Please need help.

    Attached Files:

  2. Flabe
    Offline

    Flabe Active Member

    Joined:
    Nov 17, 2015
    Posts:
    147
    Minecraft User:
    Flabe231
    show main php file , we don't need phar plugin-_-
  3. Antisober552
    Offline

    Antisober552 Staff Member Plugin Reviewer

    Joined:
    Aug 22, 2013
    Posts:
    35
    Plugins:
    3
    Minecraft User:
    Antisober552
    You will need to explain in more details on what the problem is, and what the plugin is meant to do. Also upload the code so people can view it without having to extract the plugin
  4. TheKnightGamer
    Offline

    TheKnightGamer New Member

    Joined:
    Dec 25, 2015
    Posts:
    34
    Minecraft User:
    TheKnightGamerYT
    Here You Go

    Attached Files:

  5. Antisober552
    Offline

    Antisober552 Staff Member Plugin Reviewer

    Joined:
    Aug 22, 2013
    Posts:
    35
    Plugins:
    3
    Minecraft User:
    Antisober552
    You have not explained on what you are trying to achieve with this plugin
  6. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    What's not working? Error messages in Console?
    ...
  7. Hittmana
    Offline

    Hittmana Active Member

    Joined:
    Jul 26, 2015
    Posts:
    224
    Minecraft User:
    move_it
    PHP:
    <?php

    namespace TheKnightGamer\SuperSmashMods;

    use 
    pocketmine\plugin\PluginBase;
    use 
    pocketmine\event\Listener;
    use 
    pocketmine\event\player\PlayerJoinEvent;
    use 
    pocketmine\utils\TextFormat;
    use 
    pocketmine\command\Command;
    use 
    pocketmine\command\CommandSender;

    class 
    Main extends PluginBase implements Listener{
         public function 
    onEnable(){
              
    $this->getServer()->getPluginManager()->registerEvents($this,$this);
              
    $this->getLogger()->info("Plugin Enabled");
         }
         public function 
    onJoin(PlayerJoinEvent $event){
              
    $player $event->getPlayer();
              
    $name $player->getName();
              
    $this->getServer()->broadcastMessage(TextFormat::GREEN."$name Joined the COOL Server! OMG Guys, LOL!");
         }
         public function 
    onCommand(CommandSender $senderCommand $cmd$label, array $args){
              if(
    $cmd->getName() == "ssm help"){
                   
    $sender->sendMessage("Main Commands!");
              }
              return 
    true;
         }
    }
    if(
    $cmd->getName() == "ssm get"){
         if(!
    $sender instanceof Player){ // Basically this checks if the Command Sender is NOT a player
              
    $sender->sendMessage("This Command Only Works for players!"); // For Console Command Sender
         
    }else{ //if not a CONSOLE
              
    $sender->getInventory()->addItem(Item::get(364,0,4));
              
    $sender->sendMessage("You Got 4 Steak!");
         }
    }
    return 
    true;

    if(
    $cmd->getName() == "ssm ban"){
         if(!isset(
    $args[0])){ // If Player Name was NOT Entered!
              
    $sender->sendMessage("Usage: /test <Player>"); //Send Sender Message how to use the command CORRECTLY!
         
    }else{
              
    $player $this->getServer()->getPlayer($args[0]);
              if(
    $player instanceof Player){ // Checks If Player is ONLINE
                   
    $sender->sendMessage("".$sender->getName()." says Hi to You!");
              }else{ 
    // If Player is NOT Online
                   
    $sender->sendMessage("Player Not Found!"); // Command Sender gets Message That the entered player is not Online!
                
                 
    if(!isset($args[0])){ 
    Here is what i believe is the corrected code.
  8. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    WE STILL NOT KNOW WHATS NOT WORKING/ERROR MESSAGES
    sorry for writing in caps
  9. TheKnightGamer
    Offline

    TheKnightGamer New Member

    Joined:
    Dec 25, 2015
    Posts:
    34
    Minecraft User:
    TheKnightGamerYT
    Error messages = yes
  10. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    And wich error messages
  11. Antisober552
    Offline

    Antisober552 Staff Member Plugin Reviewer

    Joined:
    Aug 22, 2013
    Posts:
    35
    Plugins:
    3
    Minecraft User:
    Antisober552
    The KnightGamer you are not making it easy for us to help you, Please explain what not working and what you need help with.
  12. TheKnightGamer
    Offline

    TheKnightGamer New Member

    Joined:
    Dec 25, 2015
    Posts:
    34
    Minecraft User:
    TheKnightGamerYT
    Ok wrong php here you go try to see what wrong. The problem is a error message

    Attached Files:

  13. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    WICH ERROR MSG
    Load the plugin yourself and post it here with [_CODE_] [_/CODE_] (Without _)
  14. TheKnightGamer
    Offline

    TheKnightGamer New Member

    Joined:
    Dec 25, 2015
    Posts:
    34
    Minecraft User:
    TheKnightGamerYT
    The Problem is that the file is to large.
  15. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    ??????
  16. TheKnightGamer
    Offline

    TheKnightGamer New Member

    Joined:
    Dec 25, 2015
    Posts:
    34
    Minecraft User:
    TheKnightGamerYT
    [13:27:56] error> Could not load 'C:\Users\Owner\Desktop\MCPE Server\PocketMine-MP\plugins\SmashHero_v0.0.1.phar' in folder 'C:\Users\Owner\Desktop\MCPE Server\PocketMine-MP\plugins\': manifest cannot be larger than 100 MB in phar "C:\Users\Owner\Desktop\MCPE Server\PocketMine-MP\plugins\SmashHero_v0.0.1.phar"
    [13:27:56] critical> UnexpectedValueException: "manifest cannot be larger than 100 MB in phar "C:\Users\Owner\Desktop\MCPE Server\PocketMine-MP\plugins\SmashHero_v0.0.1.phar"" (EXCEPTION) in "/src/pocketmine/plugin/PharPluginLoader" at line 90
  17. TheKnightGamer
    Offline

    TheKnightGamer New Member

    Joined:
    Dec 25, 2015
    Posts:
    34
    Minecraft User:
    TheKnightGamerYT
    Here You go Can you fix it.
  18. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    You compiled something wrong
    Use pmt.mcpe.net
    PocketKiller and PEMapModder like this.
  19. TheKnightGamer
    Offline

    TheKnightGamer New Member

    Joined:
    Dec 25, 2015
    Posts:
    34
    Minecraft User:
    TheKnightGamerYT
    Ok I think I fix it.

    Attached Files:

  20. TheKnightGamer
    Offline

    TheKnightGamer New Member

    Joined:
    Dec 25, 2015
    Posts:
    34
    Minecraft User:
    TheKnightGamerYT
    Never Mind can anyone please fix it for me.

Share This Page

Advertisement