Getting the Plugin Instance
To interact with SentryLore’s core managers, you can grab the main plugin instance using the staticgetPlugin() method.
Core API Reference
Database Item Registry
string
required
The unique alphanumeric ID of the saved custom item in the database (e.g.
excalibur_v1).String
The serialized Bukkit
ItemStack encoded as a Base64 string, containing all NBT data, lore lines, and persistent dupe tokens. Returns null if the item is not registered.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)