Skip to content

API Mine Storage

UntouchedOdin0 edited this page Jan 24, 2022 · 4 revisions

Mine Storage

This page explains how to use the Mine Storage of which stores all of the Private Mines!

First of all you're going to need to get the Private Mines storage instance by using

MineStorage mineStorage = privateMinesAPI.getMineStorage();

To check if the player has a mine, you can use

boolean hasMine = mineStorage.hasWorldEditMine(UUID uuid);

This'll return true or false if the player has a mine or not.

To get a list of all the player mines you can create a map and get it from that using the following code

Map<UUID, WorldEditMine> worldEditMineMap = privateMinesAPI.getMineStorage().getWorldEditMines();

If you know the player has a mine and you'd like to get it you can do

WorldEditMine worldEditMine = mineStorage.getWorldEditMine(UUID uuid);