Getting the Plugin Instance
To interact with SentryLore’s core managers, you can grab the main plugin instance using the staticgetPlugin() method.
Example 1: Creating Custom Loot Crates
If you are developing a custom Crates plugin or a webstore package distributor, you can hook into the SentryLore database to spawn in legendary items that an administrator saved via/lore save.
This ensures that the items spawned are exactly how the admin configured them in-game, complete with unique Dupe Protection NBT tags.
Example 2: Forcing Lore on Custom Mobs
SentryLore automatically formats vanilla items when they are picked up or moved. However, if you have a custom plugin that spawns a boss mob with custom drops, you can force the SentryLore engine to apply its RPG formatting (rarity, stats, classes) before the item even hits the ground! You achieve this using theLoreFormatter utility class.
.png?fit=max&auto=format&n=VrRd9ylcA_lbpmt6&q=85&s=4eb75c6784eda09d9cdee2d5224ca0e8)