Package net.lewmc.essence.utils
Class HomeUtil
java.lang.Object
net.lewmc.essence.utils.HomeUtil
/homes command helper utility.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Creates a new homeint
getHomeCount
(org.bukkit.entity.Player player) Returns the amount of homes that a user has set.getHomesList
(org.bukkit.entity.Player player) Gets a list of homes.int
getTeamHomeCount
(org.bukkit.entity.Player player) Returns the amount of team homes that a user has set.getTeamHomesList
(String team) Gets a list of team homes.
-
Constructor Details
-
HomeUtil
Constructor for the HomeUtil class.- Parameters:
plugin
- Essence - Reference to main class.
-
-
Method Details
-
getHomesList
Gets a list of homes.- Parameters:
player
- Player - The player whose homes to list.- Returns:
- StringBuilder|null - List of homes or null.
-
getTeamHomesList
Gets a list of team homes.- Parameters:
team
- String - The team whose homes to list.- Returns:
- StringBuilder|null - List of homes or null.
-
getHomeCount
public int getHomeCount(org.bukkit.entity.Player player) Returns the amount of homes that a user has set.- Parameters:
player
- Player - The player who should be checked.- Returns:
- int - The number of homes.
-
getTeamHomeCount
public int getTeamHomeCount(org.bukkit.entity.Player player) Returns the amount of team homes that a user has set.- Parameters:
player
- Player - The player who should be checked.- Returns:
- int - The number of team homes.
-
create
Creates a new home- Parameters:
homeName
- String - The name of the home.player
- Player - The player.loc
- Location - The location for the home.- Returns:
- boolean - If the operation was successful.
-