BungeeTabListPlus icon indicating copy to clipboard operation
BungeeTabListPlus copied to clipboard

API Suggestion: Unregister variables

Open kmecpp opened this issue 3 years ago • 2 comments

It doesn't seem like variables registered with BungeeTabListPlusAPI.registerVariable() can be unregistered easily which makes it difficult to modify them

A BungeeTabListPlusAPI.unregisterVariables(Plugin) would be very useful, as well as the ability to unregister them by name.

kmecpp avatar Jul 10 '22 01:07 kmecpp

I do not like the idea of unregistering variables. Either a variable is present or not. If a variable is used to display data in the tab list, then the plugin requires its presence. It cannot just go away.

As for modifying variables, I am certain you can come up with a way to do this without unregistering the variable.

CodeCrafter47 avatar Aug 26 '22 11:08 CodeCrafter47

The purpose of this was so that I could fully unload my own plugin which registers BTLP variables.

Functionally this is the same thing that would happen if the variable didn't exist in the first place since the plugin providing the variable is no longer loaded.

kmecpp avatar Aug 28 '22 16:08 kmecpp