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

Solved Class substitution.

Discussion in 'Development' started by alexwolf_dev, Nov 23, 2017.

  1. alexwolf_dev

    alexwolf_dev Spider Jockey

    Messages:
    43
    GitHub:
    Frago9876543210
    How can I replace a class function without making changes to the file? Yes, I can make a fork but this is not a good idea. For example, I need to change something in the player class. What are the ways to do this?
     
  2. Teamblocket

    Teamblocket Zombie

    Messages:
    301
    GitHub:
    teamblocket
    Reflection class
     
  3. alexwolf_dev

    alexwolf_dev Spider Jockey

    Messages:
    43
    GitHub:
    Frago9876543210
    Example pls
     
  4. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    Create a custom class extending Player, and then use PlayerCreationEvent to change the class used to your class.
     
  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.