Class SniperRegistry
java.lang.Object
com.thevoxelbox.voxelsniper.sniper.SniperRegistry
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable Sniper
@Nullable Sniper
getSniperCommander
(CommandSender commandSender) Return the associated sniper commander.void
Register sniper in registry.registerAndGetSniper
(Player player) Register the player as a sniper if not already done.void
unregister
(Sniper sniper) Unregister sniper from registry.
-
Constructor Details
-
SniperRegistry
public SniperRegistry()
-
-
Method Details
-
register
Register sniper in registry.- Parameters:
sniper
- sniper to register
-
unregister
Unregister sniper from registry.- Parameters:
sniper
- sniper to unregister
-
getSniperCommander
Return the associated sniper commander. This method returns the usual sniper and registers, if necessary, for a player.- Parameters:
commandSender
- the command sender- Returns:
- the sniper commander
- Since:
- 3.0.0
-
registerAndGetSniper
Register the player as a sniper if not already done. Return the sniper directly or after registration.- Parameters:
player
- player to register and or get as sniper- Returns:
- sniper
-
getSniper
-
getSniper
-
getSnipers
-