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

how to know what to import

Comments in 'Plugin Development' started by BalAnce, Aug 3, 2015.

  1. BalAnce
    Offline

    BalAnce Active Member

    Joined:
    Mar 10, 2015
    Posts:
    125
    Minecraft User:
    BalAnce
    ok so when i develop plugins on my mac your y eclipse it automatically importes all the use things on top of plugin. but I'm tryying to start development of smaller plugins on my phone and my questionn is how to do kbow what to import. like
    use pocketmine\plugin\PluginBase;
    how to do i knoww what to put and if its needed or not. thanks
  2. Xenturio
    Offline

    Xenturio Active Member

    Joined:
    Sep 19, 2014
    Posts:
    333
    Minecraft User:
    Xenturio
    hm... if u want to code something with items u need the items-php...
    if u want to code something with blocks u need block.php
    if u want to do something with events u need the event.php from the event what u want like PlayerMoveEvent.php...
  3. BalAnce
    Offline

    BalAnce Active Member

    Joined:
    Mar 10, 2015
    Posts:
    125
    Minecraft User:
    BalAnce
    yea no shit likee i know if you want event isuch as playerjoinevent it would bep
    pocketmine \event\player\PlayerJoinEvent;
    but i was asking if theere was a way totell if something is needed and what to import if that makes sense
  4. Dinokiller
    Offline

    Dinokiller Notable Member

    Joined:
    Sep 22, 2013
    Posts:
    376
    Minecraft User:
    Dinokiller_
    If you ever mention the class in a source file then you need to import it. Pretty simple really.
    PEMapModder, Legoboy0215 and BalAnce like this.
  5. BalAnce
    Offline

    BalAnce Active Member

    Joined:
    Mar 10, 2015
    Posts:
    125
    Minecraft User:
    BalAnce
    thanki you your response was simple and straight to the pointt and was helpful.
    Legoboy0215 likes this.

Share This Page

Advertisement