Class SniperRegistry

java.lang.Object
com.thevoxelbox.voxelsniper.sniper.SniperRegistry

public class SniperRegistry extends Object
  • Constructor Details

    • SniperRegistry

      public SniperRegistry()
  • Method Details

    • register

      public void register(Sniper sniper)
      Register sniper in registry.
      Parameters:
      sniper - sniper to register
    • unregister

      public void unregister(Sniper sniper)
      Unregister sniper from registry.
      Parameters:
      sniper - sniper to unregister
    • getSniperCommander

      public SniperCommander getSniperCommander(CommandSender commandSender)
      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

      public Sniper registerAndGetSniper(Player player)
      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

      @Nullable public @Nullable Sniper getSniper(Player player)
    • getSniper

      @Nullable public @Nullable Sniper getSniper(UUID uuid)
    • getSnipers

      public Map<UUID,Sniper> getSnipers()