Interface Card
-
- All Implemented Interfaces:
-
org.bukkit.configuration.serialization.ConfigurationSerializable
public interface Card implements ConfigurationSerializableRepresents a BattleCard's Data before spawning.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classCard.Companion
-
Method Summary
Modifier and Type Method Description abstract BattleCard<?>spawnCard(Player owner)Spawns this Card Data into a BattleCard. IntegergetQuestLevel(CardQuest quest)Fetches the current level of the quest for this Card. DoublegetQuestCompletion(CardQuest quest)Fetches the quest completion percentage for this Card. abstract ByteArraytoByteArray()Serializes this Card Data into a Byte Array. StringgetCardID()Fetches the Card ID of this BattleCard. RaritygetRarity()Fetches the Rarity of this BattleCard. abstract DategetCreationDate()Fetches the Date this card was created. abstract BattleStatisticsgetStatistics()Fetches the Statistics of this BattleCard instance. abstract DategetLastUsed()Fetches the Date this BattleCard was last used. abstract OfflinePlayergetLastUsedPlayer()Fetches the player that last used this BattleCard. IntegergetLevel()Fetches the level of this BattleCard. UnitsetLevel(Integer level)Sets the level of this BattleCard. DoublegetExperience()Fetches the experience of this BattleCard. UnitsetExperience(Double experience)Sets the experience of this BattleCard. DoublegetRemainingExperience()Fetches the experience required to reach the next level. IntegergetMaxCardLevel()Fetches the maximum level that this Card can be. DoublegetMaxCardExperience()Fetches the maximum experience that this Card can have. IntegergetGeneration()Fetches the numerical identifier for the generation of BattleCards this card is from. abstract BattleCardTypegetType()Fetches the BattleCardType of this BattleCard. BattleCardClassgetCardClass()Fetches the BattleCardClass of this BattleCard. StringgetName()Fetches the name of this BattleCard. IntegergetDeployTime()Fetches the amount of <strong>seconds</strong> this card can be deployed for. abstract Class<out BattleCard<?>>getEntityCardClass()Fetches the BattleCard class for this Card Data. BooleanisMaxed()Whetehr or not this BattleCard is currently maxed. LonggetCooldownTime()Fetches how many milliseconds until this BattleCard can be deployed again. BooleangetCanUse()Whether this card can be deployed if cooldownTime is 0.Class<out LivingEntity>getEntityClass()Fetches the BattleCard Entity class for this Card Data. EntityTypegetEntityCardType()Fetches the EntityType of this BattleCard. ItemStackgetIcon()abstract Set<CardEquipment>getEquipment()Fetches an immutable copy of the CardEquipment for this Card. IntegergetEquipmentSlots()Fetches the amount of equipment slots this card has. abstract BooleanisRideable()Gets whether or not this card can be ridden. -
-
Method Detail
-
spawnCard
abstract BattleCard<?> spawnCard(Player owner)
Spawns this Card Data into a BattleCard. The Player must be holding a BattleCard Item.
- Parameters:
owner- The Player spawning this BattleCard
-
getQuestLevel
Integer getQuestLevel(CardQuest quest)
Fetches the current level of the quest for this Card.
- Parameters:
quest- Quest to Use
-
getQuestCompletion
Double getQuestCompletion(CardQuest quest)
Fetches the quest completion percentage for this Card.
- Parameters:
quest- Quest to Use
-
toByteArray
abstract ByteArray toByteArray()
Serializes this Card Data into a Byte Array.
-
getCreationDate
abstract Date getCreationDate()
Fetches the Date this card was created.
-
getStatistics
abstract BattleStatistics getStatistics()
Fetches the Statistics of this BattleCard instance.
-
getLastUsed
abstract Date getLastUsed()
Fetches the Date this BattleCard was last used. Will return null if never used.
-
getLastUsedPlayer
abstract OfflinePlayer getLastUsedPlayer()
Fetches the player that last used this BattleCard. Will return null if never used.
-
setLevel
Unit setLevel(Integer level)
Sets the level of this BattleCard.
- Parameters:
level- New Level
-
getExperience
Double getExperience()
Fetches the experience of this BattleCard.
-
setExperience
Unit setExperience(Double experience)
Sets the experience of this BattleCard.
- Parameters:
experience- New Experience
-
getRemainingExperience
Double getRemainingExperience()
Fetches the experience required to reach the next level.
-
getMaxCardLevel
Integer getMaxCardLevel()
Fetches the maximum level that this Card can be.
-
getMaxCardExperience
Double getMaxCardExperience()
Fetches the maximum experience that this Card can have.
-
getGeneration
Integer getGeneration()
Fetches the numerical identifier for the generation of BattleCards this card is from.
-
getType
abstract BattleCardType getType()
Fetches the BattleCardType of this BattleCard.
-
getCardClass
BattleCardClass getCardClass()
Fetches the BattleCardClass of this BattleCard.
-
getDeployTime
Integer getDeployTime()
Fetches the amount of <strong>seconds</strong> this card can be deployed for.
-
getEntityCardClass
abstract Class<out BattleCard<?>> getEntityCardClass()
Fetches the BattleCard class for this Card Data.
-
getCooldownTime
Long getCooldownTime()
Fetches how many milliseconds until this BattleCard can be deployed again.
-
getEntityClass
Class<out LivingEntity> getEntityClass()
Fetches the BattleCard Entity class for this Card Data.
-
getEntityCardType
EntityType getEntityCardType()
Fetches the EntityType of this BattleCard.
-
getIcon
ItemStack getIcon()
-
getEquipment
abstract Set<CardEquipment> getEquipment()
Fetches an immutable copy of the CardEquipment for this Card.
-
getEquipmentSlots
Integer getEquipmentSlots()
Fetches the amount of equipment slots this card has.
-
isRideable
abstract Boolean isRideable()
Gets whether or not this card can be ridden.
-
-
-
-