Stack tracing a method (without an error)

Discussion in 'Plugin Development' started by Digi, Sep 3, 2012.

Thread Status:
Not open for further replies.
  1. So basically I want o know what plugins trigger a method... more specifically, which plugin or mod registers a recipe, I'd very much like to detect that.

    I'm able to override NMS/CraftingManager which holds the root of registering workbench recipes and the RecipesFurance class as well, which is the root for registering furnace recipes.... so in those classes' methods, how would I get a stack trace (like when an error triggers but without the error) that I could search through to find the plugin/mod that registered the recipe ?
     
  2. Offline

    MrFigg

  3. Offline

    Courier

  4. Didn't think it was that easy xD

    Ok so this stack trace will *always* eventually trace back to the main class of the plugin ? I guess there's no way of triggering anything without having something in the main class... hmm, actually, events could do that, but who registers recipes in events surely don't want them to work properly.
    Well, if it always prints the main class I am able to find it because it should always be last before the org.bukkit.plugin.java.JavaPlugin.setEnabled() method and I am able to find the plugin by comparing the main class.

    But... how will I go for server mods ? Is there even a good way to detect them ?
     
Thread Status:
Not open for further replies.

Share This Page