Prism: Custom Event Tracking API - your input needed

Discussion in 'Plugin Development' started by darkhelmet, Mar 2, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    darkhelmet

    The upcoming Prism 1.5 will support an API that allows other plugins to register custom events, so that prism will track them as well.

    [​IMG]
    [​IMG][​IMG]
    It's an amazing way to log events to prism's system rather than the console, so all staff/players on the server can access the information through Prism's existing lookup system.

    This feature has already been added to the source but before I release 1.5 in the coming weeks I want to get input from other developers - plus I want anyone interested to let me know if you would like to add support to your plugin. I'd love to release 1.5 with an announcement including some plugins (besides mine) that support it.

    Essentially, here's how it works:

    1. Your plugin checks for Prism being there
    2. You tell prism about your custom action names. You're familiar with "block-break", so make something up for your plugin. Something that happens to people (and isn't related to a command - prism already offers command tracking).
    3. Your plugin fires a custom Prism event whenever you want to actually trigger a recording of the event.
    4. Prism records the data, so players using /pr near/lookup/etc will see the information.
    5. They can also use the parameters to search for your data just like they can with current actions.

    Right now, it only supports generic player actions but I'm planning on expanding it, as well as allowing custom action handlers (will cover that later)

    Here's an example the works with current dev builds of prism:

    https://github.com/botskonet/PrismA...e/botsko/prismapidemo/CustomEventExample.java

    Here are the questions I have for you:

    1. What kinds of events do you think your plugins might want Prism to know about?
    2. What kind of data is important to associate with that event?
    3. Any general wishes for what Prism allows via the api?
    Thanks!
     
    drtshock and ohtwo like this.
  2. Offline

    drtshock

    This looks awesome. I have a virtual inventory plugin and was working on adding logging to that. I think if I was able to use this for logging that would be even better. Something like adding location accessed, inventory type, and items taken or put. If you could add a way to add custom parameters I could work with that :)
     
  3. Offline

    ohtwo

    It would be nice to be able to take a "snapshot" an area, and add/remove/replace only blocks that have been edited. I figure that'd be better on performance than using using a schematic (WorldEdit) and replacing blocks that don't belong, since Prism would keep track of blocks edited. WorldEdit, I'm guessing, would have to scan every block in an area if it has a replace feature.
     
Thread Status:
Not open for further replies.

Share This Page