Skip to content
This repository has been archived by the owner on Apr 2, 2020. It is now read-only.

API + Implementation Gradle Multiproject #3

Open
boformer opened this issue Mar 1, 2015 · 1 comment
Open

API + Implementation Gradle Multiproject #3

boformer opened this issue Mar 1, 2015 · 1 comment

Comments

@boformer
Copy link

boformer commented Mar 1, 2015

It would be great to have a "boilerplate" for plugins with a separate API.
The plugin should contain a simple service interface and an implementation. This way we can also show how to register and use custom services.

Structure:

  • Project: notification
    • Subproject: notification-api
      • Interface: NotificationService
    • Subproject: notification-sponge
      • Class: NotificationPlugin
      • Class: SimpleNotificationService

The plugin displays a notification to players when they login.

They can mark the notification as read with /notification clear.
Admins can set the notification with /notification set <msg> or delete it with /notification delete.
The command uses the SimpleDispatcher class for subcommands.

Other plugins can get the NotificationService from the service manager and modify the notification. Plugins can also set an expiration date for the notification.

For simplicity, the notification is not persistent when the server restarts.

Right now I don't have the time to work on this, that's why I created this issue as a reminder. If you want to work on this, go ahead...

@parlough
Copy link
Contributor

parlough commented Jan 2, 2018

This isn't done yet, but if anyone comes here, for now you can find an example of a project with a separate API using services and similar with Nucleus.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants