java.lang.Object
io.github.sparkletinkercat.creaturesPlugin.Managers.Beacon

public class Beacon extends Object
  • Constructor Details

    • Beacon

      public Beacon(org.bukkit.plugin.java.JavaPlugin plugin)
  • Method Details

    • summonBeaconDisplay

      public void summonBeaconDisplay(org.bukkit.Location loc)
      Summons the custom beacon display at a specified location
      Parameters:
      loc - The location of the beacon
    • summonBeaconDisplay

      public void summonBeaconDisplay(double x, double y, double z)
      Summons the custom beacon display at a specified location
      Parameters:
      x - The beacons x coordinate
      y - The beacons y coordinate
      z - The beacons z coordinate
    • removeBeaconDisplay

      public void removeBeaconDisplay(org.bukkit.Location loc)
      Removes the custom beacon display at a specified location
      Parameters:
      loc - The beacons location
    • removeBeaconDisplay

      public void removeBeaconDisplay(double x, double y, double z)
      Removes the custom beacon display at a specified location
      Parameters:
      x - The beacons x coordinate
      y - The beacons y coordinate
      z - The beacons z coordinate
    • returnBeaconAtLocation

      public org.bukkit.entity.Entity returnBeaconAtLocation(double x, double y, double z)
    • changeBeaconDisplay

      public void changeBeaconDisplay(io.papermc.paper.command.brigadier.CommandSourceStack source, int type)
    • changeBeaconDisplay

      public void changeBeaconDisplay(int display, double x, double y, double z)
      Changes the beacons display to another custom look
      Parameters:
      display - The number of the resource file of the texture.
      x - The beacons x coordinate
      y - The beacons y coordinate
      z - The beacons z coordinate
    • registerBeacon

      public void registerBeacon(org.bukkit.entity.Player player, String name)
      Registers a beacon for gameplay, updating its metadata and adding it to the yml file.
      Parameters:
      player - The player who ran the command
      name - The name of the beacon
    • updateMetaData

      public void updateMetaData(String name, String metadata, double x, double y, double z)
      Updates the Meta Data for a beacon
      Parameters:
      name - The exact name of the beacon
      metadata - Where the metadata is located
      x - The beacons x coordinate
      y - The beacons y coordinate
      z - The beacons z coordinate
    • storeBeaconInFile

      public void storeBeaconInFile(String beaconName, double x, double y, double z)
      Stores a beacon for later reference in the beacon.yml file
      Parameters:
      beaconName - The exact name of the beacon
      x - The beacons x coordinate
      y - The beacons y coordinate
      z - The beacons z coordinate
    • retrieveBeaconByNameFromFile

      public Beacon.BeaconItem retrieveBeaconByNameFromFile(String beaconName)
      Retrieves the x,y, and z for a registered beacon in the beacon.yml file
      Parameters:
      beaconName - The exact name of the beacon
      Returns:
      Returns a beacon item with the data from the yml file for that beacon
    • retrieveAllBeaconsFromFile

      public List<Beacon.BeaconItem> retrieveAllBeaconsFromFile()
      Retrieves the x,y,z and name for all registered beacon in the beacon.yml file
      Returns:
      Returns an arraylist of beacon items with the data from the yml file for all registered beacons
    • createBeaconInformationBars

      public Map<String,InformationBar> createBeaconInformationBars(List<Beacon.BeaconItem> beaconItems)
    • getBeaconMetadata

      public String getBeaconMetadata(org.bukkit.entity.Entity entity, String metadata)
    • getBeaconMetadata

      public String getBeaconMetadata(org.bukkit.inventory.ItemStack stack, String metadata)
    • checkIfBeaconNearby

      public org.bukkit.inventory.ItemStack checkIfBeaconNearby(org.bukkit.entity.Player player, int radius)