Class ShopPlotUtil
java.lang.Object
com.palmergames.bukkit.towny.utils.ShopPlotUtil
A util for Shop Plugin Developers to use,
given the player and location, the Util will return true if the
player should be able to create a shop at the given location.
- Author:
- LlmDl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleandoesPlayerHaveAbilityToEditShopPlot(org.bukkit.entity.Player player, org.bukkit.Location location) This tests if a player has the ability to build at the location, as well as the plot being a shop plot type.static booleandoesPlayerOwnShopPlot(org.bukkit.entity.Player player, org.bukkit.Location location) This tests that the player owns the plot at the location in question personally, as well as the plot being a shop plot type.static booleanisShopPlot(TownBlock townblock) Use this to determine if aTownBlockis a shop plot.static booleanisShopPlot(org.bukkit.Location location) Use this to determine if aLocationis a shop plot.
-
Constructor Details
-
ShopPlotUtil
public ShopPlotUtil()
-
-
Method Details
-
doesPlayerOwnShopPlot
public static boolean doesPlayerOwnShopPlot(org.bukkit.entity.Player player, org.bukkit.Location location) This tests that the player owns the plot at the location in question personally, as well as the plot being a shop plot type. This is a simpler, probably more likely scenario than thedoesPlayerHaveAbilityToEditShopPlot(Player, Location)test.- Parameters:
player- -Playerto testlocation- -Locationto test at- Returns:
- true if the player owns the plot, and it is a Shop plot
-
doesPlayerHaveAbilityToEditShopPlot
public static boolean doesPlayerHaveAbilityToEditShopPlot(org.bukkit.entity.Player player, org.bukkit.Location location) This tests if a player has the ability to build at the location, as well as the plot being a shop plot type. This would be used for plots that are not personally owned by the player, a public shop space in a town. This is a more complicated, but more permissive test than thedoesPlayerOwnShopPlot(Player, Location)test.- Parameters:
player- -Playerto testlocation- -Locationto test at- Returns:
- true if the player can build and the plot is a shop
-
isShopPlot
public static boolean isShopPlot(org.bukkit.Location location) Use this to determine if aLocationis a shop plot.- Parameters:
location- -Locationto be tested for shop plot type.- Returns:
- true if the location is a shop plot.
-
isShopPlot
Use this to determine if aTownBlockis a shop plot.- Parameters:
townblock- -TownBlockto be tested for shop type.- Returns:
- true if the townblock is a shop plot.
-