[Bukkit Services] EventFilterServices

Discussion in 'Resources' started by _LB, Jul 28, 2014.

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

    _LB

    I have created some Bukkit Services for public use in the form of a plugin called EventFilterServices. You can view the source code, documentation, maven repo information, etc at the GitHub repository.

    ChatFilterService (on GitHub)
    With this service, you can have more fine-grained control over chat in your plugin. It will convert AsyncPlayerChatEvent into multiple events, one for each mapping from source to target. This way, each player can see a different version of the message another player sent, or nothing at all. The readme on GitHub explains how to use it.

    Example use cases:
    - Party chat (as used in my plugin)
    - Only displaying disallowed words/links to players with a permission node
    - Localized chat (simply cancel the events where the target is too far from the source)
    - Highlighting a all or part of a chat message when it contains the name of the target, while leaving it intact for others
    - Changing the formatting of a chat message only for the person who sent it (source == target)

    PotionFilterService (on GitHub)
    This service, similar to ChatFilterService.java, will take PotionSplashEvent and convert it into multiple events, one for each mapping from source to target. You then have full control over which affects are applied to which entities and with what intensities. A side effect of using this service is that the client will see and hear multiple potion splashes - this is unavoidable with the current Bukkit API. I have no plans to interface with CraftBukkit or to use something like ProtocolLib. The readme on GitHub explains how to use it.

    Example use cases:
    - Preventing potions from hurting teammates (as used in my plugin)
    - Allowing only positive potion effects to be applied to players with pvp off, or pets
    - Anything else that involves preventing some effects but not all, depending on which entities are involved


    Those are the only Bukkit Services I have made for now, I will update this thread when I create more (if any).[/url][/url]
     
  2. Offline

    Gamecube762

    Interesting, I have never heard of the Services feature to Bukkit. This is going to be something I'll have to look into as this could be a good way for some APIs.

    The chat filter also sounds interesting. =P
     
  3. Offline

    jthort

    _LB Looks interesting, as Gamecube762 said. I'm eager to see what other people have to say about this
     
  4. Offline

    _LB

    Due do an oversight the original way I had things designed meant that plugins using the services would conflict with each other. I've reworked everything and now it is a proper API like TagAPI. If you were using the services as they were before, your plugin(s) is/are incompatible. If you released incompatible versions please let me know so I can add them to the list.
     
    Phasesaber likes this.
Thread Status:
Not open for further replies.

Share This Page