Class TreasureData
java.lang.Object
com.Moshu.TreasureHunt.Components.TreasureData
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enumeration of different treasure types supported by the plugin. -
Constructor Summary
ConstructorsConstructorDescriptionTreasureData
(org.bukkit.configuration.ConfigurationSection defaultSection) Fetches all the data from the treasure file -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSpawnpoint
(org.bukkit.Location loc) boolean
boolean
boolean
boolean
boolean
static ArrayList
<TreasureScheduler> static TreasureData
int
int
int
int
int
org.bukkit.configuration.ConfigurationSection
int
getDelay()
int
@org.jetbrains.annotations.NotNull int
org.bukkit.Particle
@org.jetbrains.annotations.NotNull int
int
long
int
int
List
<org.bukkit.potion.PotionEffect> int
getSanitizedCommandRewards
(int max) getSanitizedRewards
(int max) getSanitizedTreasureKeepers
(int max) List
<org.bukkit.Location> static ArrayList
<TreasureData> org.bukkit.Material
org.bukkit.Particle
org.bukkit.World
getWorld()
boolean
static void
load()
static void
reload()
boolean
boolean
boolean
void
setIdentifier
(String identifier) void
boolean
boolean
boolean
-
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
-
getTreasureIdentifiers
-
getTreasureData
-
getOwnTreasureSchedulers
-
getAllTreasureSchedulers
-
canOpenChest
public boolean canOpenChest() -
getCooldownBetweenClicks
public int getCooldownBetweenClicks() -
getMenuItem
-
isSpawnsInside
public boolean isSpawnsInside() -
getRewardTopX
public int getRewardTopX() -
getDebuff
-
getByIdentifier
-
shouldOnlyRewardTopX
public boolean shouldOnlyRewardTopX() -
rewardMostDamageGiven
public boolean rewardMostDamageGiven() -
getIdentifier
-
setIdentifier
-
getTreasureKey
-
getTreasureKeepers
-
getItemRewards
-
getCommandRewards
-
getTreasureType
-
setTreasureType
-
getWorld
public org.bukkit.World getWorld() -
addSpawnpoint
public void addSpawnpoint(org.bukkit.Location loc) -
getSanitizedRewards
-
getSanitizedCommandRewards
-
getSanitizedTreasureKeepers
-
getCoordsNearTreasure
public int getCoordsNearTreasure() -
getWorldName
-
getTreasureName
-
getTreasureParticles
public org.bukkit.Particle getTreasureParticles() -
getTreasureAnimation
-
fallFromTheSky
public boolean fallFromTheSky() -
getTreasureIcon
public org.bukkit.Material getTreasureIcon() -
requireAllMobsDead
public boolean requireAllMobsDead() -
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
-
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
-
getPotionEffects
-
spawnToCertainCoords
public boolean spawnToCertainCoords() -
getSpawnCoords
-