[REQUEST] Load scripts priority

  • It would be nice to have some way to specify the loading order of scripts. This way, a script could mark an event has "handled" and prevent other scripts from picking them up (i.e. short circuit the event, and stopping it from bubbling).


    My rationale is that, on some servers using AreaProtection or WorldEdit, even when entering a valid command, a "Unknown command" is still printed from some other scripts. This could also help ensuring that AreaProtection is loaded first, thus truly preventing any invalid editing by stopping the propagation of the event to other scripts.


    An idea would be to use the same principle as init.d in Linux, by prepanding a loading order in front of the script's directory. For example


    Code
    ./rising-world
    ./scripts
    ./00-area-protection
    ./05-trustlist
    ./14-teleport
    ./30-world-edit
    ./99-custom-script


    Any scripts not having a loading order prepanded would be loaded after in their normal alphabetical order.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!