Anvil - A cross-platform database API / ORM / entity framework with useful services for minecraft plugins

This is a discussion topic for the Ore project, Anvil. View the full project on Ore for downloads and more information.


Anvil

Make sure to join our discord server if you have any questions or if you’d like to know more about our other plugins!

Anvil is a plugin API that aims to help developers create structured cross-platform plugins. Included in anvil is an entity framework and many services that abstract platform-specific actions so that they can be used in common code, which means you don’t need to create a completely rewritten plugin for each platform you’d like your plugin to run on - you write the common code and Anvil will help you easily integrate it into each platform.

Anvil is not only cross-platform for plugin platforms but also for databases. As of this writing, Anvil ships with MongoDB and Xodus support by default. With Anvil, you can write a central abstract set of logic that can work on several different database types.

The two databases that are natively supported at the moment are MongoDB and Xodus.

Anvil will use Xodus out of the box, meaning there is no configuring or set up required other than placing the jar in the appropriate folder in your server.

A new version has been released for Anvil, it is available for download here.


Anvil is a plugin API that aims to help developers create structured cross-platform plugins. Included in anvil is an entity framework and many services that abstract platform-specific actions so that they can be used in common code, which means you don’t need to create a completely rewritten plugin for each platform you’d like your plugin to run on - you write the common code and Anvil will help you easily integrate it into each platform.

Anvil is not only cross-platform for plugin platforms but also for databases. As of this writing, Anvil ships with MongoDB and Xodus support by default. With Anvil, you can write a central abstract set of logic that can work on several different database types.

The two databases that are natively supported at the moment are MongoDB and Xodus.

Anvil will use Xodus out of the box, meaning there is no configuring or set up required other than placing the jar in the appropriate folder in your server.

A new version has been released for Anvil, it is available for download here.


Fixed bug in BaseManager causing silent failure during DB access.

A new version has been released for Anvil, it is available for download here.


Fixed a critical bug preventing banning and muting with Xodus.

A new version has been released for Anvil, it is available for download here.


This release has breaking API changes.

New in this version:

  • Important! Registering a listener to a registry now requires you to add .register(); at the end of the call. Plugins will fail silently if this is not done. This was done to make it simpler to specify the scope and order for a listener.
  • Added ordering to registry listeners.
  • Added @RegistryScoped annotation.
  • Keys now require a namespace to register, this is to make inter-plugin data access easier and pave the way for future placeholder stuff.
  • TimeFormatService now uses FormatResult for some return types. Use toString() to capture the current state of the FormatResult as a String.
  • Updated MongoDB drivers
  • Started using checker framework

Removed in this version:

  • Nuked the Plugin interface. This interface added unnecessary weight to the API and wasn’t being used anywhere.
  • The PermissionService no longer has a generic type. This service only has one boolean method to check a permission for the provided subject. Checking the type of this parameter is now done at runtime.

A new version has been released for Anvil, it is available for download here.


Squashed bugs

  • Command suggestions work properly now
  • Fixed an NPE
  • Small code cleanups

A new version has been released for Anvil, it is available for download here.


This release has breaking changes. Exercise caution when updating as Anvil v0.2 plugins will not work with Anvil v0.3

New features

  • RegEdit
    • You can now edit the config with commands! Use /anvil[b|v] regedit start <env>
    • Requires permission anvil.admin.regedit, and access to sensitive settings (such as hostnames, passwords) is disabled by default
  • RestrictionService: you can freeze players via the api now. Pick from movement, interaction, inventory, commands and damage (or any combination thereof)
  • Added appendPrefix() in TextService that uses the bound PluginInfo
  • Added TIME_ZONE to config, used by the TimeFormatService
  • Added some useful methods to UserService

Changes

  • Bumped configurate to v3.7
  • Moved from kyori text to adventure for velocity
  • TimeFormatService now parses and returns formatted strings with weeks
  • Key stuff
    • Keys are now constructed with Key.builder() instead of anonymous class through protected constructor.
    • Primarily thanks to type erasure, Key no longer extends TypeToken
  • Flattened some unnecessarily nested packages

Fixes

  • Tab completion fixes on spigot/bungee
  • Fixed some bugs with load order in the BaseRegistry
  • Many more that aren’t listed here