Open Neovitalism opened 2 years ago
This would definitely require quite big change in core payment handling if we would change Enum action types to basic Strings. Having Enums simplify things and prevents from mistakes happening. If we could work out solution which would allow for both systems to be a thing, that would be best way to go. Additionally, things like block place and break actions need to go over block protection mechanic, so something like this needs to be accounted in API too.
Yeah, that's why I went for a completely different approach entirely to begin with, to keep the API in-tact. It basically just requires injection of testing for custom action types after running through the initial enum, so that way, it keeps the plugin as is, and allows for custom action types as well.
Description of new idea or improvement on existing one With ActionType being an enum, it's currently not possible to create custom ActionTypes via an external plugin. It would break the current API, but I think allowing this would mean a great deal. I went to do this for a PR, but it basically requires a full re-write.
Detailed information what should do Add a class or interface that you can extend or implement to allow for custom ActionTypes. In the example below, I show my idea to make this possible:
Usage and Config Example: