Repository navigation
Creating Custom Plugins
Note
This guide is for technical users who have knowledge of how to work with the C# programming language. If you need help with creating plugins for BingusNametags++, please see the Discord server.
BingusNametags++ loads plugins from two different places, in this order:
- BingusNametags++ itself: For the Default and Advanced nametags.
-
nametagsfolder: This is where.nametagfiles are stored, which are independent nametags rather than regular mods.
It will scan for any class that implements the IBaseNametag interface with the BingusNametagsPlugin. It will not run without the interface and attribut set up correctly.
The structure of a plugin generally looks like this, although it may be different based on your needs:
// names of any other nametags that your plugin may be incompatable with go in the last array
[BingusNametagsPlugin("plugin name", "author name", "general description of what the nametag does", ["Bad Plugin name", "Other plugin I don't like"])]
public class NametagThing : IBaseNametag
{
[BingusNametagsNametag("nametag name", 0.5f)] // 0.5f is the offset from the default nametag, which is equal to 0f.
public static void UpdateMyNametag(PlayerNametag nametag) {
nametag.Text = "hi nametag this is my nametag here and i will be nametagging this nametag anyway see ya nametags as i will nametag";
}
}PlayerNametag is passed through any functions that update nametags. It represents the nametag and also represents the player (see PlayerNametag.Owner). It does a lot more than just set text, as you can also customize the nametag with TextMeshPro rich text styles.
-
Textproperty: Sets the text of the nametag and applies rich text styles. -
Sizeproperty: Sets the percentage-based size of the nametag. The default nametag has a size of 100% (1f).
-
AddStyle(string tag)- equal to -
AddStyle(string tag, string value)- equal to <tag="text"> -
RemoveStyle(string tag)- removes "tag" from the rich text tags list
-
SpriteSheet: Sets the sprite sheet used on a nametag.
Documented Version: 1.7.1 / Downloads