Class Beacon
java.lang.Object
io.github.sparkletinkercat.creaturesPlugin.Managers.Beacon
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeBeaconDisplay(int display, double x, double y, double z) Changes the beacons display to another custom lookvoidchangeBeaconDisplay(io.papermc.paper.command.brigadier.CommandSourceStack source, int type) org.bukkit.inventory.ItemStackcheckIfBeaconNearby(org.bukkit.entity.Player player, int radius) createBeaconInformationBars(List<Beacon.BeaconItem> beaconItems) getBeaconMetadata(org.bukkit.entity.Entity entity, String metadata) getBeaconMetadata(org.bukkit.inventory.ItemStack stack, String metadata) voidregisterBeacon(org.bukkit.entity.Player player, String name) Registers a beacon for gameplay, updating its metadata and adding it to the yml file.voidremoveBeaconDisplay(double x, double y, double z) Removes the custom beacon display at a specified locationvoidremoveBeaconDisplay(org.bukkit.Location loc) Removes the custom beacon display at a specified locationRetrieves the x,y,z and name for all registered beacon in the beacon.yml fileretrieveBeaconByNameFromFile(String beaconName) Retrieves the x,y, and z for a registered beacon in the beacon.yml fileorg.bukkit.entity.EntityreturnBeaconAtLocation(double x, double y, double z) voidstoreBeaconInFile(String beaconName, double x, double y, double z) Stores a beacon for later reference in the beacon.yml filevoidsummonBeaconDisplay(double x, double y, double z) Summons the custom beacon display at a specified locationvoidsummonBeaconDisplay(org.bukkit.Location loc) Summons the custom beacon display at a specified locationvoidupdateMetaData(String name, String metadata, double x, double y, double z) Updates the Meta Data for a beacon
-
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 coordinatey- The beacons y coordinatez- 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 coordinatey- The beacons y coordinatez- 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 coordinatey- The beacons y coordinatez- The beacons z coordinate
-
registerBeacon
Registers a beacon for gameplay, updating its metadata and adding it to the yml file.- Parameters:
player- The player who ran the commandname- The name of the beacon
-
updateMetaData
Updates the Meta Data for a beacon- Parameters:
name- The exact name of the beaconmetadata- Where the metadata is locatedx- The beacons x coordinatey- The beacons y coordinatez- The beacons z coordinate
-
storeBeaconInFile
Stores a beacon for later reference in the beacon.yml file- Parameters:
beaconName- The exact name of the beaconx- The beacons x coordinatey- The beacons y coordinatez- The beacons z coordinate
-
retrieveBeaconByNameFromFile
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
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
-
getBeaconMetadata
-
getBeaconMetadata
-
checkIfBeaconNearby
public org.bukkit.inventory.ItemStack checkIfBeaconNearby(org.bukkit.entity.Player player, int radius)
-