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

API + Implementation Gradle Multiproject #3

Description

@boformer

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...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions