Class TreasureData

java.lang.Object
com.Moshu.TreasureHunt.Components.TreasureData

public class TreasureData extends Object
Represents the configuration data for a treasure hunt. This class contains all the settings and properties that define how a treasure hunt behaves, including spawn conditions, rewards, keepers, and various gameplay mechanics. TreasureData objects are loaded from configuration files and used to create Treasure instances when hunts are initiated.
  • Constructor Details

    • TreasureData

      public TreasureData(org.bukkit.configuration.ConfigurationSection defaultSection)
      Fetches all the data from the treasure file
      Parameters:
      defaultSection - the treasure's path
  • Method Details

    • load

      public static void load()
    • reload

      public static void reload()
    • getDefaultSection

      public org.bukkit.configuration.ConfigurationSection getDefaultSection()
    • getTreasureBlockString

      public String getTreasureBlockString()
    • getTreasureIdentifiers

      public static ArrayList<String> getTreasureIdentifiers()
    • getTreasureData

      public static ArrayList<TreasureData> getTreasureData()
    • getOwnTreasureSchedulers

      public ArrayList<TreasureScheduler> getOwnTreasureSchedulers()
    • getAllTreasureSchedulers

      public static ArrayList<TreasureScheduler> getAllTreasureSchedulers()
    • canOpenChest

      public boolean canOpenChest()
    • getCooldownBetweenClicks

      public int getCooldownBetweenClicks()
    • getMenuItem

      public String getMenuItem()
    • isSpawnsInside

      public boolean isSpawnsInside()
    • getRewardTopX

      public int getRewardTopX()
    • getDebuff

      public TreasureDebuff getDebuff()
    • getByIdentifier

      public static TreasureData getByIdentifier(String id)
    • shouldOnlyRewardTopX

      public boolean shouldOnlyRewardTopX()
    • rewardMostDamageGiven

      public boolean rewardMostDamageGiven()
    • getIdentifier

      public String getIdentifier()
    • setIdentifier

      public void setIdentifier(String identifier)
    • getTreasureKey

      public TreasureKey getTreasureKey()
    • getTreasureKeepers

      public List<TreasureKeeper> getTreasureKeepers()
    • getItemRewards

      public List<ItemReward> getItemRewards()
    • getCommandRewards

      public List<CommandReward> getCommandRewards()
    • getTreasureType

      public TreasureData.TreasureType getTreasureType()
    • setTreasureType

      public void setTreasureType(TreasureData.TreasureType type)
    • getWorld

      public org.bukkit.World getWorld()
    • addSpawnpoint

      public void addSpawnpoint(org.bukkit.Location loc)
    • getSanitizedRewards

      public String getSanitizedRewards(int max)
    • getSanitizedCommandRewards

      public String getSanitizedCommandRewards(int max)
    • getSanitizedTreasureKeepers

      public String getSanitizedTreasureKeepers(int max)
    • getCoordsNearTreasure

      public int getCoordsNearTreasure()
    • getWorldName

      public String getWorldName()
    • getTreasureName

      public String getTreasureName()
    • getTreasureParticles

      public org.bukkit.Particle getTreasureParticles()
    • getTreasureAnimation

      public String getTreasureAnimation()
    • fallFromTheSky

      public boolean fallFromTheSky()
    • getTreasureIcon

      public org.bukkit.Material getTreasureIcon()
    • requireAllMobsDead

      public boolean requireAllMobsDead()
    • getFlareType

      public String getFlareType()
    • getFlareParticle

      public org.bukkit.Particle getFlareParticle()
    • shootFireworks

      public boolean shootFireworks()
    • getMaxTreasureDistance

      public int getMaxTreasureDistance()
    • getDelay

      public int getDelay()
    • getChanceForTreasure

      public int getChanceForTreasure()
    • rewardAllPlayersWhoParticipated

      public boolean rewardAllPlayersWhoParticipated()
    • dropsItemsOnGround

      public boolean dropsItemsOnGround()
    • getWaypoint

      public TreasureWaypoint getWaypoint()
    • getDistanceFromPlayerToSpawnMobs

      public int getDistanceFromPlayerToSpawnMobs()
    • getMobWanderingDistance

      public int getMobWanderingDistance()
    • enableMobTracker

      public boolean enableMobTracker()
    • animateMobSpawning

      public boolean animateMobSpawning()
    • getInterval

      @NotNull public @org.jetbrains.annotations.NotNull int getInterval()
    • getDuration

      @NotNull public @org.jetbrains.annotations.NotNull int getDuration()
    • getCooldown

      public int getCooldown()
    • getMinutesBeforePickup

      public int getMinutesBeforePickup()
    • getMilliesBeforePickup

      public long getMilliesBeforePickup()
    • getClicksToOpen

      public int getClicksToOpen()
    • getDroppedItemName

      public String getDroppedItemName()
    • getPotionEffects

      public List<org.bukkit.potion.PotionEffect> getPotionEffects()
    • spawnToCertainCoords

      public boolean spawnToCertainCoords()
    • getSpawnCoords

      public List<org.bukkit.Location> getSpawnCoords()