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

Solved AutoSmelt : Help

Comments in 'Plugin Development' started by iDirtPlayzMC, Oct 18, 2015.

  1. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    PHP:
    <?php
    namespace MCPH\NIBTO;

    use 
    pocketmine\Server;
    use 
    pocketmine\item\Item;
    use 
    pocketmine\event\block\BlockBreakEvent;
    use 
    pocketmine\event\Listener;
    use 
    pocketmine\plugin\PluginBase as Base;

    class 
    Main extends Base implements Listener{
       
        public function 
    onEnable(){
            
    $this->getServer()->getPluginManager()->registerEvents($this$this);
            
    $this->getLogger()->info("NIBTO has been enabled.")
        }
       
        public function 
    onDisable(){
            
    $this->getLogger()->info("NIBTO has been disabled.")
        }
       
        public function 
    onBreak(BlockBreakEvent $event){
                if(
    $event->getBlock()->getId() === 57){
                    
    $event->setDrops(array(Item::get(26409)));
                }
                if(
    $event->getBlock()->getId() === 42){
                    
    $event->setDrops(array(Item::get(26509)));
                }
                if(
    $event->getBlock()->getId() === 41){
                    
    $event->setDrops(array(Item::get(26609)));
                }
                if(
    $event->getBlock()->getId() === 22){
                    
    $event->setDrops(array(Item::get(351:409)));
                }
                if(
    $event->getBlock()->getId() === 133){
                    
    $event->setDrops(array(Item::get(38809)));
                }
                if(
    $event->getBlock()->getId() === 152){
                    
    $event->setDrops(array(Item::get(33109)));
                }
                if(
    $event->getBlock()->getId() === 173){
                    
    $event->setDrops(array(Item::get(26309)));
                }
            }
       }

    said error on line 15
  2. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    We cannot help you until you give us the error.
  3. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    PHP:
    Parse errorsyntax errorunexpected '}' in C:\Users\Rin\Desktop\Work\PocketMine-MP\plugins\NineIsBetterThanOne\src\MCPH\NIBTO\Main.php on line 15

  4. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    You forgot lots of ;
  5. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    :O ok
  6. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    PHP:
    class main extends Base implements Listener
    PHP:
    nameAutoSmelt
    main
    AutoSmelt\main
    author
    : [ iDirtPlayzMC ]
    version0.0.1
    api
    1.12.0
    description
    AutoSmelt!
    websitehttp://prxmc.cf
    PHP:
    ClassNotFoundException"Class AutoSmelt\main not found" (EXCEPTIONin "/src/spl/BaseClassLoader" at line 131
    what happen ?
  7. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    Namespace has to be
    PHP:
    namespace AutoSmelt;
    iDirtPlayzMC likes this.
  8. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    lol sorry i forgot xD
  9. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    Like My posts Please :D
  10. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    it only drop 1 :( its sopose to drop 9
  11. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    nvmmvmvnnmvnm WRONG lol Its block not Ore xD
  12. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    works fine thanks ;3
    Taha_The_Hacker likes this.

Share This Page

Advertisement