Skip to content

Addons #1

@nbdSteve

Description

@nbdSteve

Addon System

User Story

As a developer I want to be able to create a custom addon jar file that can be automatically loaded by the PrisonsPlus plugin by being dropped in the Addons Folder.

Background

Having customizable addons that can be easily created and loaded is extremely important to this project, not only for the base project, but the growing requirements of the development space as a whole.

Addons will rely on a developers to extend an Abstract class, PrisonPlusAddon.java, and then they can add custom event listeners, configuration files, commands, and any other custom code required.

Acceptance Criteria

  • I am able to extend the PrisonPlusAddon.java class, and I am prompted with override methods for version, author, loading, and shutdown.
  • I can register custom commands in the addon jar.
  • I can register custom events in the addon jar.
  • I can create custom resources in the addon jar that are automatically loaded and accessible from the main plugin without any files needing to be added to the main plugins resource folder.
  • I am able to drag and drop addon jar files, reload the main plugin, and the addon will be loaded by the plugin if it is the correct format.
  • I am able to uninstall an addon from the main plugin by running a command in game, my selection will be persistent through restarts.
  • I am able to uninstall an addon from the main plugin by running a command in game, my selection will be persistent through restarts.
  • I am able to list all of the installed addons using a command in game.

Implementation Plan

  • Create PrisonPlusAddon.java class. (30m)
  • Write loader class. (1h)
  • Write addon manager, and methods to load, list, install, uninstall and reload all addons. (2h)
  • Handle registering events when the addon is loaded. (15m)
  • Handle registering commands with the main plugin when the addon is loaded. (2h)
  • Handle loading and creating resource files from addons. (5h)
  • Enable database connectivity between addons. (15m)

Testing plan

Automated Testing

  • Loading an addon.
  • Verifying that commands are registered.
  • Verifying that events are registered.
  • Verifying that files are loaded by the plugin.
  • Check that all of the override methods in the PrisonPlusAddon.java are callable and accessible.
  • Database connectivity

Smoke Testing

  • Checking the output of the command in game.
  • Verifying addon functionality in game.

Development Estimate (15h)

  • Coding: 11h
  • Automated Testing: 3h 30m
  • Smoke Testing: 30m

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions