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

Can I submit a plugin which uses abstract classes?

Comments in 'Plugin Development' started by EvolSoft, Dec 14, 2014.

  1. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    Hi
    I'm developing a plugin with a small API.
    I'm using some abstract classes.
    My question is: Can I submit a plugin which uses abstract classes?
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    What abstract classes?

    Why not? What does an abstract class have that makes you think you can't?
    EvolSoft likes this.
  3. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    I thought it because another plugin that i made which used "self" to store some values was rejected :)
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    That is because it uses static properties, which is disallowed. Abstract classes have nothing to do with static properties.

    Abstract classes are just like interfaces. Interfaces are used in SimpleAuth.
  5. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    Yes, I know :)
  6. Dinokiller
    Offline

    Dinokiller Notable Member

    Joined:
    Sep 22, 2013
    Posts:
    376
    Minecraft User:
    Dinokiller_
    Your plugin that was rejected used static properties. Under normal circumstances there is nothing wrong with this. But because of how buggy pthreads is, it's not safe and can cause crashes. I corrupted a folder by misusing it once. I must say, it was a pain to remove.
    Last edited: Dec 14, 2014
    iksaku, EvolSoft and PEMapModder like this.
  7. ProjectInfinity
    Offline

    ProjectInfinity Active Member Plugin Developer

    Joined:
    Sep 7, 2014
    Posts:
    112
    Plugins:
    3
    Minecraft User:
    ProjectInfinity
    pthreads is a testament to why PocketMine has outgrown PHP in my honest opinion.
    PEMapModder, Falk and Dinokiller like this.
  8. Dinokiller
    Offline

    Dinokiller Notable Member

    Joined:
    Sep 22, 2013
    Posts:
    376
    Minecraft User:
    Dinokiller_
    I couldn't agree more.
  9. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,130
    Plugins:
    4
    Minecraft User:
    iksaku
    You can :3

Share This Page

Advertisement