Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InventoryData ¶ added in v0.10.0
type InventoryData struct { // Items contains all the items in the player's main inventory. // This excludes armor and offhand. Items []item.Stack // Boots, Leggings, Chestplate, Helmet are armor pieces that belong to the slot corresponding to the name. Boots item.Stack Leggings item.Stack Chestplate item.Stack Helmet item.Stack // OffHand is what the player is carrying in their non-main hand, like a shield or arrows. OffHand item.Stack // MainHandSlot saves the slot in the hotbar that the player is currently switched to. // Should be between 0-8. MainHandSlot uint32 }
InventoryData is a struct that contains all data of the player inventories.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is a player data provider that uses a LevelDB database to store data. The data passed on will first be converted to make sure it can be marshaled into JSON. This JSON (in bytes) will then be stored in the database under a key that is the byte representation of the player's UUID.
func NewProvider ¶
NewProvider creates a new player data provider that saves and loads data using a LevelDB database.
Click to show internal directories.
Click to hide internal directories.