Class Sniper
java.lang.Object
com.thevoxelbox.voxelsniper.sniper.Sniper
- All Implemented Interfaces:
 SniperCommander
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddToolkit(Toolkit toolkit) Return the command sender@Nullable Toolkit@Nullable ToolkitgetToolkit(ItemType itemType) @Nullable ToolkitgetToolkit(String toolkitName) getUuid()booleanvoidprint(com.sk89q.worldedit.util.formatting.text.Component component, boolean prefix) Sends a component to a sniper.voidremoveToolkit(Toolkit toolkit) voidsendInfo(boolean prefix) voidsetEnabled(boolean enabled) voidSet the player.booleansnipe(Player player, Action action, ItemType usedItem, @Nullable Block clickedBlock, BlockFace clickedBlockFace) Sniper execution call.booleansnipeOnCurrentThread(Player wePlayer, Player player, Action action, @Nullable Block clickedBlock, BlockFace clickedBlockFace, Toolkit toolkit, ToolAction toolAction, BrushProperties currentBrushProperties) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.thevoxelbox.voxelsniper.sniper.SniperCommander
createParserContext, print 
- 
Constructor Details
- 
Sniper
 - 
Sniper
Create a sniper from a player.- Parameters:
 player- the player- Since:
 - 3.0.0
 
 
 - 
 - 
Method Details
- 
getPlayer
 - 
setPlayer
Set the player.- Parameters:
 player- the player- Since:
 - 3.1.0
 
 - 
getCommandSender
Description copied from interface:SniperCommanderReturn the command sender- Specified by:
 getCommandSenderin interfaceSniperCommander- Returns:
 - the command sender
 
 - 
getCurrentToolkit
 - 
addToolkit
 - 
getToolkit
 - 
getToolkit
 - 
removeToolkit
 - 
snipe
public boolean snipe(Player player, Action action, ItemType usedItem, @Nullable @Nullable Block clickedBlock, BlockFace clickedBlockFace) Sniper execution call.- Parameters:
 action- Action player performedusedItem- Item in hand of playerclickedBlock- Block that the player targeted/interacted withclickedBlockFace- Face of that targeted Block- Returns:
 trueif command visibly processed,falseotherwise.
 - 
snipeOnCurrentThread
public boolean snipeOnCurrentThread(Player wePlayer, Player player, Action action, @Nullable @Nullable Block clickedBlock, BlockFace clickedBlockFace, Toolkit toolkit, ToolAction toolAction, BrushProperties currentBrushProperties)  - 
sendInfo
public void sendInfo(boolean prefix)  - 
print
public void print(com.sk89q.worldedit.util.formatting.text.Component component, boolean prefix) Description copied from interface:SniperCommanderSends a component to a sniper. This method potentially adds the prefix and handle translations.- Specified by:
 printin interfaceSniperCommander- Parameters:
 component- componentprefix- prefix
 - 
getUuid
 - 
isEnabled
public boolean isEnabled() - 
setEnabled
public void setEnabled(boolean enabled)  - 
getToolkits
 
 -