Class AnimatedArchitectureToolUtilSpigot
java.lang.Object
nl.pim16aap2.animatedarchitecture.spigot.core.implementations.AnimatedArchitectureToolUtilSpigot
- All Implemented Interfaces:
IAnimatedArchitectureToolUtil
@Singleton
public class AnimatedArchitectureToolUtilSpigot
extends Object
implements IAnimatedArchitectureToolUtil
Implementation of
IAnimatedArchitectureToolUtil for Spigot.
This class is responsible for giving the player the Animated Architecture tool and removing it from the player.
-
Constructor Summary
ConstructorsConstructorDescriptionAnimatedArchitectureToolUtilSpigot(org.bukkit.plugin.java.JavaPlugin javaPlugin) -
Method Summary
Modifier and TypeMethodDescriptionvoidgiveToPlayer(IPlayer player, String name, String lore) Gives a player a AnimatedArchitecture.booleanisPlayerHoldingTool(IPlayer player) Checks if a player is currently holding a AnimatedArchitecture tool in their main hand.booleanisPlayerHoldingTool(org.bukkit.entity.Player player) booleanisTool(@Nullable org.bukkit.inventory.ItemStack item) voidremoveTool(IPlayer player) Removes any AnimatedArchitecture tools from a player's inventory.
-
Constructor Details
-
AnimatedArchitectureToolUtilSpigot
@Inject public AnimatedArchitectureToolUtilSpigot(org.bukkit.plugin.java.JavaPlugin javaPlugin)
-
-
Method Details
-
giveToPlayer
Description copied from interface:IAnimatedArchitectureToolUtilGives a player a AnimatedArchitecture.- Specified by:
giveToPlayerin interfaceIAnimatedArchitectureToolUtil- Parameters:
player- The player to give the tool to.name- The name of the tool.lore- The lore of the tool.
-
removeTool
Description copied from interface:IAnimatedArchitectureToolUtilRemoves any AnimatedArchitecture tools from a player's inventory.- Specified by:
removeToolin interfaceIAnimatedArchitectureToolUtil- Parameters:
player- The player whose inventory will be checked.
-
isTool
public boolean isTool(@Nullable @Nullable org.bukkit.inventory.ItemStack item) -
isPlayerHoldingTool
Description copied from interface:IAnimatedArchitectureToolUtilChecks if a player is currently holding a AnimatedArchitecture tool in their main hand.- Specified by:
isPlayerHoldingToolin interfaceIAnimatedArchitectureToolUtil- Parameters:
player- The player to check.- Returns:
- True if they are currently holding a AnimatedArchitecture tool in their main hand.
-
isPlayerHoldingTool
public boolean isPlayerHoldingTool(org.bukkit.entity.Player player)
-