mirror of
https://github.com/BentoBoxWorld/Level.git
synced 2024-11-23 18:45:17 +01:00
Add getLevelsData method to Level for API compatibility
Biomes uses it.
This commit is contained in:
parent
f0e983db44
commit
071d3d06d5
@ -27,6 +27,7 @@ import world.bentobox.level.config.BlockConfig;
|
||||
import world.bentobox.level.config.ConfigSettings;
|
||||
import world.bentobox.level.listeners.IslandActivitiesListeners;
|
||||
import world.bentobox.level.listeners.JoinLeaveListener;
|
||||
import world.bentobox.level.objects.LevelsData;
|
||||
import world.bentobox.level.requests.LevelRequestHandler;
|
||||
import world.bentobox.level.requests.TopTenRequestHandler;
|
||||
|
||||
@ -282,4 +283,13 @@ public class Level extends Addon {
|
||||
Island island = getIslands().getIsland(world, playerUUID);
|
||||
if (island != null) getManager().calculateLevel(playerUUID, island);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load a player from the cache or database
|
||||
* @param targetPlayer - UUID of target player
|
||||
* @return LevelsData object or null if not found
|
||||
*/
|
||||
public LevelsData getLevelsData(UUID targetPlayer) {
|
||||
return getManager().getLevelsData(targetPlayer);
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,6 @@ import org.bukkit.World;
|
||||
import org.eclipse.jdt.annotation.NonNull;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
|
||||
import world.bentobox.bentobox.BentoBox;
|
||||
import world.bentobox.bentobox.api.events.addon.AddonEvent;
|
||||
import world.bentobox.bentobox.api.panels.PanelItem;
|
||||
import world.bentobox.bentobox.api.panels.builders.PanelBuilder;
|
||||
|
Loading…
Reference in New Issue
Block a user