Added convenience methods getPlayersManager() and getIslandsManager()

This just helps make the API more friendly and consistent with other
manager getters.
This commit is contained in:
tastybento 2021-01-24 14:14:31 -08:00
parent 01d8075318
commit 2bef0fe57c

View File

@ -169,7 +169,7 @@ public class BentoBox extends JavaPlugin {
Bukkit.getScheduler().runTask(instance, () -> { Bukkit.getScheduler().runTask(instance, () -> {
try { try {
completeSetup(loadTime); completeSetup(loadTime);
} catch (Exception e) { } catch (Exception e) {
fireCriticalError(e.getMessage(), ""); fireCriticalError(e.getMessage(), "");
} }
@ -316,18 +316,38 @@ public class BentoBox extends JavaPlugin {
} }
/** /**
* Returns the player database * Returns the player manager
* @return the player database * @return the player manager
* @see #getPlayersManager()
*/ */
public PlayersManager getPlayers(){ public PlayersManager getPlayers() {
return playersManager; return playersManager;
} }
/** /**
* Returns the island database * Returns the player manager
* @return the island database * @return the player manager
* @see #getPlayers()
*/ */
public IslandsManager getIslands(){ public PlayersManager getPlayersManager() {
return playersManager;
}
/**
* Returns the island manager
* @return the island manager
* @see #getIslandsManager()
*/
public IslandsManager getIslands() {
return islandsManager;
}
/**
* Returns the island manager
* @return the island manager
* @see #getIslands()
*/
public IslandsManager getIslandsManager() {
return islandsManager; return islandsManager;
} }