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

Seperating functions

Comments in 'Plugin Development' started by MinePocket Servers, Apr 26, 2016.

  1. MinePocket Servers
    Offline

    MinePocket Servers Active Member

    Joined:
    Mar 6, 2014
    Posts:
    69
    Minecraft User:
    MinePocket
    I have multiple listeners and commands and tons of functions. Leaving it in one file is becoming very messy. I need to separate my functions, commands, and listeners into different files in different folders. Right now if I separate my listeners, it no longer works.

    Dir sturcture is
    ROOT-> base.php
    ---------> Listener
    ______|______> break.php, place.php, command.php etc...
    ----------> Command
    _______|________> action1.php, action2.php etc...


    1) How do I register my listeners to work
    2) How would I call my cmd functions from command.php
  2. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    MinePocket Servers and Vaivez66 like this.

Share This Page

Advertisement