1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Add methods to pmmp classes

Discussion in 'Help' started by XenialDan, Oct 8, 2018.

  1. XenialDan

    XenialDan Baby Zombie

    Messages:
    141
    GitHub:
    thebigsmilexd
    I am currently stuck on an issue where i need to add functions to Level and Player class.. so far i stumbled over monkey patching via runkit or pecl override_function, but both look like they can only change existing classes, but not extend the classes with methods.

    I know one can change the Player class upon Player creation, but this option is not suitable to me, because if a server owner already has plugins that override the Player class the changes would be lost.

    Another thing would adding
    Code:
    __call
    to the classes so one can call user functions, but i do not want to change pmmp's source code (i want the plugin to be compatible with all servers, not just my debugging server)
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.