Package kamkeel.npcdbc.api
Interface IDBCAddon
-
- All Superinterfaces:
IDBCPlayer
,IEntity
,IEntityLivingBase
,IPlayer
public interface IDBCAddon extends IDBCPlayer
This interface acts as a replacement forIPlayer.getDBCPlayer()
It extends features of the base IDBCPlayer as well adds functionality to integrate it with the various CNPC+ DBC Addon frameworks such as custom forms and auras.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addCustomMastery(int formID, float value)
Modifies the mastery of a form ONLY if the player has the form unlocked.void
addCustomMastery(int formID, float value, boolean ignoreUnlockCheck)
Modifies the mastery of a form.void
addCustomMastery(IForm form, float value)
Modifies the mastery of a form ONLY if the player has the form unlocked.void
addCustomMastery(IForm form, float value, boolean ignoreUnlockCheck)
Modifies the mastery of a form.void
changeDBCMastery(String formName, double amount, boolean add)
int[]
getAllAttributes()
String
getAllDBCMasteries()
int[]
getAllFullAttributes()
float
getBodyPercentage()
String
getCurrentDBCFormName()
IForm
getCurrentForm()
double
getCurrentFormMultiplier()
int
getCurrentStat(int attribute)
float
getCustomMastery(int formID)
Check the form mastery.float
getCustomMastery(int formID, boolean checkFusion)
Check the form mastery.float
getCustomMastery(IForm form)
Check the form mastery.float
getCustomMastery(IForm form, boolean checkFusion)
Check the form mastery.double
getDBCMasteryValue(String formName)
int
getFullAttribute(int statid)
A "Full" stat is a stat that has all form multipliers calculated.int
getMajinAbsorptionPower()
int
getMajinAbsorptionRace()
int
getMaxBody()
int
getMaxHP()
int
getMaxKi()
int
getMaxStamina()
int
getMaxStat(int attribute)
IOutline
getOutline()
String
getRaceName()
int
getSkillLevel(String skillname)
void
giveAura(int auraID)
Unlocks the given aura for the player.void
giveAura(String auraName)
Unlocks the given aura for the player.void
giveAura(IAura aura)
Unlocks the given aura for the player.void
giveCustomForm(String formName)
Gives a player a custom form by the given name.void
giveCustomForm(IForm form)
Gives a player a custom form.boolean
isChargingKi()
boolean
isDBCFusionSpectator()
boolean
isDivine()
boolean
isFlying()
boolean
isGOD()
boolean
isInAura()
boolean
isInAura(int auraID)
boolean
isInAura(String auraName)
boolean
isInAura(IAura aura)
boolean
isInCustomForm()
boolean
isInCustomForm(int formID)
boolean
isInCustomForm(IForm form)
boolean
isKaioken()
boolean
isKO()
boolean
isLegendary()
boolean
isMajin()
boolean
isMUI()
boolean
isMystic()
boolean
isTurboOn()
Checks if player has turbo on.boolean
isUI()
void
modifyAllAttributes(int[] submitted, boolean setStats)
If not setStats, then it will ADD submitted[0] to stats[0].void
modifyAllAttributes(int[] attri, boolean multiplyAddedAttris, double multiValue)
void
modifyAllAttributes(int Num, boolean setStatsToNum)
void
multiplyAllAttributes(double multi)
void
multiplyAttribute(int statid, double multi)
0 for strength, 1 dex, 2 constitution, 3 willpower, 4 mind, 5 spiritvoid
removeAura(int auraID)
Remove an aura from the player.void
removeAura(String auraName)
Removes an aura from the player.void
removeAura(IAura aura)
Remove an aura from the player.void
removeAuraSelection()
Removes a custom aura selection for the player.void
removeCustomForm(String formName)
Removes the given form by name.void
removeCustomForm(IForm form)
Removes the given form.void
removeCustomMastery(int formID)
void
removeCustomMastery(IForm form)
void
removeSelectedForm()
Clears form selection.void
setAllowFlight(boolean allowFlight)
void
setAura(int auraID)
Sets the custom aura for the playervoid
setAura(String auraName)
Sets the custom aura for the playervoid
setAura(IAura aura)
Sets the custom aura for the playervoid
setAuraSelection(int auraID)
Sets the current custom aura if the player has it unlocked.void
setAuraSelection(String auraName)
Sets the current custom aura if the player has it unlocked.void
setAuraSelection(IAura aura)
Sets the current custom aura if the player has it unlocked.void
setBaseFlightSpeed(float speed)
void
setCustomForm(int formID)
If the player has a given form, it forces them to transform to that form.void
setCustomForm(IForm form)
If the player has a given form, it forces them to transform to that form.void
setCustomMastery(int formID, float value)
Sets the mastery of a form if the player has it unlocked, otherwise it won't change anything.void
setCustomMastery(int formID, float value, boolean ignoreUnlockCheck)
Sets the mastery of a form.void
setCustomMastery(IForm form, float value)
Sets the mastery of a form if the player has it unlocked, otherwise it won't change anything.void
setCustomMastery(IForm form, float value, boolean ignoreUnlockCheck)
Sets the mastery of a form.void
setDynamicFlightSpeed(float speed)
void
setFlight(boolean flightOn)
void
setFlightDefaults()
void
setFlightGravity(boolean isEffected)
void
setFlightSpeedRelease(int release)
void
setLockOnTarget(IEntityLivingBase lockOnTarget)
Set a players lock on state!void
setMajinAbsorptionPower(int power)
void
setMajinAbsorptionRace(int race)
void
setOutline(int outlineID)
void
setOutline(String outlineName)
void
setOutline(IOutline outline)
void
setSelectedForm(int formID)
Selects a custom form for the player.void
setSelectedForm(IForm form)
Selects a custom form for the player.void
setSprintSpeed(float speed)
void
setTurboState(boolean on)
Sets the turbo state for the player-
Methods inherited from interface noppes.npcs.api.entity.IDBCPlayer
addBonusAttribute, addBonusAttribute, addOtherFormMastery, addRacialFormMastery, addToBonusAttribute, bonusAttribute, bonusAttribute, clearBonusAttribute, getAuraColor, getBody, getBonusAttribute, getDBCClass, getExtraCode, getForm, getForm2, getFormLevel, getFusionString, getGravity, getHairCode, getHP, getInventory, getItem, getJRMCSE, getKi, getKillCount, getOtherFormMastery, getPowerPoints, getPowerType, getRace, getRacialFormMastery, getRelease, getSkills, getStamina, getStat, getTP, isBlocking, removeBonusAttribute, setAuraColor, setBody, setBonusAttribute, setDBCClass, setExtraCode, setForm, setForm2, setFormLevel, setGravity, setHairCode, setHP, setItem, setJRMCSE, setKi, setOtherFormMastery, setPowerPoints, setPowerType, setRace, setRacialFormMastery, setRelease, setSkills, setStamina, setStat, setTP
-
Methods inherited from interface noppes.npcs.api.entity.IEntity
capturesDrops, clearStoredData, clearTempData, despawn, dropItem, extinguish, getAge, getAllNbt, getBlockX, getBlockY, getBlockZ, getCapturedDrops, getDimension, getEntityId, getHeight, getMotion, getMotionX, getMotionY, getMotionZ, getMount, getNbt, getNbtOptional, getPitch, getPosition, getRider, getRotation, getStoredData, getStoredDataKeys, getSurroundingEntities, getSurroundingEntities, getTempData, getTempDataKeys, getTypeName, getUniqueID, getWidth, getWorld, getX, getY, getYOffset, getZ, hasCollided, hasCollidedHorizontally, hasCollidedVertically, hasStoredData, hasTempData, inFire, inLava, inWater, isAirborne, isAlive, isBurning, isSneaking, isSprinting, knockback, knockback, knockback, removeStoredData, removeTempData, setBurning, setCapturedDrops, setCapturesDrops, setImmune, setInvisible, setMotion, setMotion, setMotionX, setMotionY, setMotionZ, setMount, setNbt, setPitch, setRider, setRotation, setSneaking, setSprinting, setStoredData, setTempData, setX, setY, setZ, spawnParticle, storeAsClone, updateEntity
-
Methods inherited from interface noppes.npcs.api.entity.IEntityLivingBase
addPotionEffect, canBreatheUnderwater, canSeeEntity, clearPotionEffects, dismountEntity, getAbsorptionAmount, getAIMoveSpeed, getArmor, getArrowCountInEntity, getAttackTarget, getAttackTargetTime, getFollowRange, getHealth, getHeldItem, getKnockbackResistance, getLastAttacker, getLastAttackerTime, getLookingAtBlock, getLookingAtBlock, getLookingAtEntities, getLookingAtEntities, getLookingAtEntities, getLookingAtPos, getLookingAtPos, getLookVector, getMaxHealth, getMCEntity, getMeleeStrength, getPotionEffect, getSpeed, getTotalArmorValue, hurt, hurt, hurt, isAttacking, isChild, isOnLadder, renderBrokenItemStack, setAbsorptionAmount, setAIMoveSpeed, setArmor, setArrowCountInEntity, setAttackTarget, setFollowRange, setHealth, setHeldItem, setKnockbackResistance, setLastAttacker, setMaxHealth, setMaxHurtTime, setMaxHurtTime, setMeleeStrength, setSpeed, swingHand
-
Methods inherited from interface noppes.npcs.api.entity.IPlayer
addFactionPoints, blocking, canHarvestBlock, clearInventory, clearItemInUse, closeGui, closeOverlay, conqueredEnd, continueSounds, disableMouseInput, dropOneItem, finishQuest, finishQuest, getActiveQuests, getAnimationData, getCustomGui, getData, getDBCPlayer, getDisplayName, getExpLevel, getFactionPoints, getFinishedQuests, getHunger, getMode, getName, getOpenContainer, getOverlays, getPixelmonData, getSaturation, getScreenSize, getTimers, getType, giveItem, giveItem, hasAchievement, hasActiveQuest, hasActiveQuest, hasBukkitPermission, hasFinishedQuest, hasFinishedQuest, hasReadDialog, hasReadDialog, interactWith, inventoryItemCount, isScriptingDev, kick, mountEntity, pauseSounds, playSound, playSound, playSound, readDialog, readDialog, removeAllItems, removeItem, removeItem, removeQuest, removeQuest, resetSpawnpoint, sendMessage, setConqueredEnd, setDimension, setExpLevel, setFactionPoints, setHunger, setMode, setPosition, setPosition, setPosition, setPosition, setPosition, setPosition, setRotation, setSaturation, setSpawnpoint, setSpawnpoint, showCustomGui, showCustomOverlay, showDialog, showDialog, startQuest, startQuest, stopQuest, stopQuest, stopSound, stopSounds, stopUsingItem, typeOf, unreadDialog, unreadDialog, updatePlayerInventory
-
-
-
-
Method Detail
-
getAllFullAttributes
int[] getAllFullAttributes()
-
setLockOnTarget
void setLockOnTarget(IEntityLivingBase lockOnTarget)
Set a players lock on state!- Parameters:
lockOnTarget
- Reference to new target Entity or null to remove lock on.
-
isTurboOn
boolean isTurboOn()
Checks if player has turbo on.- Returns:
- True or false
-
setTurboState
void setTurboState(boolean on)
Sets the turbo state for the player- Parameters:
on
- true turns turbo on, false turns it off.
-
getMaxBody
int getMaxBody()
- Returns:
- Player's max body
-
getMaxHP
int getMaxHP()
- Returns:
- Player's max hp (body)
-
getBodyPercentage
float getBodyPercentage()
- Returns:
- Current body as a percentage of max hp (body)
-
getMaxKi
int getMaxKi()
- Returns:
- Player's max ki
-
getMaxStamina
int getMaxStamina()
- Returns:
- Player's max stamina
-
getAllAttributes
int[] getAllAttributes()
- Returns:
- an array of all player attributes
-
modifyAllAttributes
void modifyAllAttributes(int[] attri, boolean multiplyAddedAttris, double multiValue)
- Parameters:
attri
- adds attri to player statsmultiplyAddedAttris
- if true, adds first then multiplies by multivaluemultiValue
- value to multiply with
-
modifyAllAttributes
void modifyAllAttributes(int Num, boolean setStatsToNum)
- Parameters:
Num
- adds all attributes by NumsetStatsToNum
- sets all attributes by Num
-
modifyAllAttributes
void modifyAllAttributes(int[] submitted, boolean setStats)
If not setStats, then it will ADD submitted[0] to stats[0]. Submitted must be length of 6- Parameters:
submitted
- Adds all attributes by array of attributes respectively i.e atr 0 gets added to index 0 of asetStats
- sets all attributes to submitted array
-
multiplyAttribute
void multiplyAttribute(int statid, double multi)
0 for strength, 1 dex, 2 constitution, 3 willpower, 4 mind, 5 spirit- Parameters:
statid
- statID to multiplymulti
- value to multi by
-
multiplyAllAttributes
void multiplyAllAttributes(double multi)
- Parameters:
multi
- multiplies all attributes by multi
-
getFullAttribute
int getFullAttribute(int statid)
A "Full" stat is a stat that has all form multipliers calculated. i.e if base Strength is 10,000, returns 10,000. if SSJ form multi is 20x and is SSJ, returns 200,000. LSSJ returns 350,000, LSSJ Kaioken x40 returns 1,000,000 and so on 0 for strength, 1 dex, 2 constitution, 3 willpower, 4 mind, 5 spirit- Parameters:
statid
- ID of attribute- Returns:
- attribute value
-
getRaceName
String getRaceName()
- Returns:
- Player's race name
-
getCurrentDBCFormName
String getCurrentDBCFormName()
- Returns:
- Name of form player is currently in
-
changeDBCMastery
void changeDBCMastery(String formName, double amount, boolean add)
- Parameters:
formName
- name of form to change mastery ofamount
- sets the current mastery value to amountadd
- adds the amount to current mastery, instead of setting it to it
-
getDBCMasteryValue
double getDBCMasteryValue(String formName)
- Parameters:
formName
- name of form- Returns:
- Form mastery value
-
getAllDBCMasteries
String getAllDBCMasteries()
- Returns:
- Entire form mastery NBT string, aka data32
-
isDBCFusionSpectator
boolean isDBCFusionSpectator()
- Returns:
- True if player is fused and spectator
-
isChargingKi
boolean isChargingKi()
- Returns:
- True if player is charging a ki attack
-
getSkillLevel
int getSkillLevel(String skillname)
- Parameters:
skillname
- Check JRMCoreH.DBCSkillNames- Returns:
- skill level from 1 to 10
-
getMaxStat
int getMaxStat(int attribute)
- Parameters:
attribute
- 0 for Melee Dmg, 1 for Defense, 3 for Ki Power- Returns:
- Player's stat, NOT attributes i.e Melee Dmg, not STR
-
getCurrentStat
int getCurrentStat(int attribute)
- Parameters:
attribute
- check getMaxStat- Returns:
- Player's stat as a percentage of MaxStat through power release i.e if MaxStat is 1000 and release is 10, returns 100
-
getCurrentFormMultiplier
double getCurrentFormMultiplier()
- Returns:
- if Form player is in is 10x base, returns 10
-
getMajinAbsorptionRace
int getMajinAbsorptionRace()
-
setMajinAbsorptionRace
void setMajinAbsorptionRace(int race)
-
getMajinAbsorptionPower
int getMajinAbsorptionPower()
-
setMajinAbsorptionPower
void setMajinAbsorptionPower(int power)
-
isMUI
boolean isMUI()
- Returns:
- True if player is transformed into white MUI
-
isKO
boolean isKO()
- Returns:
- True if player is currently KO
-
isUI
boolean isUI()
- Returns:
- True if either MUI or UI Omen
-
isMystic
boolean isMystic()
- Returns:
- True if Mystic
-
isKaioken
boolean isKaioken()
- Returns:
- True if in Kaioken
-
isGOD
boolean isGOD()
- Returns:
- True if in God of Destruction
-
isLegendary
boolean isLegendary()
- Returns:
- True if in Legendary
-
isDivine
boolean isDivine()
- Returns:
- True if Divine
-
isMajin
boolean isMajin()
- Returns:
- True if player is using Majin
-
setCustomForm
void setCustomForm(int formID)
If the player has a given form, it forces them to transform to that form.- Parameters:
formID
- Form ID of the custom form you want to force the player into
-
setCustomForm
void setCustomForm(IForm form)
If the player has a given form, it forces them to transform to that form.- Parameters:
form
- Form object of the custom form you want to force the player into
-
setFlight
void setFlight(boolean flightOn)
-
isFlying
boolean isFlying()
-
setAllowFlight
void setAllowFlight(boolean allowFlight)
-
setFlightSpeedRelease
void setFlightSpeedRelease(int release)
-
setBaseFlightSpeed
void setBaseFlightSpeed(float speed)
-
setDynamicFlightSpeed
void setDynamicFlightSpeed(float speed)
-
setFlightGravity
void setFlightGravity(boolean isEffected)
-
setFlightDefaults
void setFlightDefaults()
-
setSprintSpeed
void setSprintSpeed(float speed)
-
giveCustomForm
void giveCustomForm(String formName)
Gives a player a custom form by the given name.- Parameters:
formName
- Name of the form to give the player.
-
giveCustomForm
void giveCustomForm(IForm form)
Gives a player a custom form.- Parameters:
form
- Form object to give the player.
-
removeCustomForm
void removeCustomForm(String formName)
Removes the given form by name.- Parameters:
formName
- Name of the form to remove.
-
removeCustomForm
void removeCustomForm(IForm form)
Removes the given form.- Parameters:
form
- Form object to remove.
-
setSelectedForm
void setSelectedForm(IForm form)
Selects a custom form for the player.
This does not force a transformation.
It only selects the form they will transform into whenever they choose to transform.- Parameters:
form
- Form object.
-
setSelectedForm
void setSelectedForm(int formID)
Selects a custom form for the player.
This does not force a transformation.
It only selects the form they will transform into whenever they choose to transform.- Parameters:
formID
- Form ID.
-
removeSelectedForm
void removeSelectedForm()
Clears form selection.
-
setAuraSelection
void setAuraSelection(String auraName)
Sets the current custom aura if the player has it unlocked.- Parameters:
auraName
- Name of the aura to set.
-
setAuraSelection
void setAuraSelection(IAura aura)
Sets the current custom aura if the player has it unlocked.- Parameters:
aura
- Aura object to set.
-
setAuraSelection
void setAuraSelection(int auraID)
Sets the current custom aura if the player has it unlocked.- Parameters:
auraID
- ID of the aura to set.
-
giveAura
void giveAura(String auraName)
Unlocks the given aura for the player.- Parameters:
auraName
- Name of the aura to unlock.
-
giveAura
void giveAura(IAura aura)
Unlocks the given aura for the player.- Parameters:
aura
- Aura object to unlock for the player.
-
giveAura
void giveAura(int auraID)
Unlocks the given aura for the player.- Parameters:
auraID
- ID of the aura to unlock for the player.
-
removeAura
void removeAura(String auraName)
Removes an aura from the player.- Parameters:
auraName
- Name of the aura to remove.
-
removeAura
void removeAura(IAura aura)
Remove an aura from the player.- Parameters:
aura
- Aura object to remove.
-
removeAura
void removeAura(int auraID)
Remove an aura from the player.- Parameters:
auraID
- ID of the aura to remove.
-
setAura
void setAura(String auraName)
Sets the custom aura for the player
THE PLAYER DOESN'T NEED TO HAVE THIS AURA UNLOCKED
- Parameters:
auraName
- ID of the aura.
-
setAura
void setAura(IAura aura)
Sets the custom aura for the player
THE PLAYER DOESN'T NEED TO HAVE THIS AURA UNLOCKED
- Parameters:
aura
- Aura object
-
setAura
void setAura(int auraID)
Sets the custom aura for the player
THE PLAYER DOESN'T NEED TO HAVE THIS AURA UNLOCKED
- Parameters:
auraID
- ID of the aura.
-
removeAuraSelection
void removeAuraSelection()
Removes a custom aura selection for the player.
-
isInCustomForm
boolean isInCustomForm()
- Returns:
- True if player is in any CNPC+ custom form
-
isInCustomForm
boolean isInCustomForm(IForm form)
- Parameters:
form
- Form object.- Returns:
- True if the player is in a given form.
-
isInCustomForm
boolean isInCustomForm(int formID)
- Parameters:
formID
- formID- Returns:
- True if player is in formID
-
setCustomMastery
void setCustomMastery(int formID, float value)
Sets the mastery of a form if the player has it unlocked, otherwise it won't change anything.- Parameters:
formID
- ID of the form to change the mastery of.value
- New mastery value.
-
setCustomMastery
void setCustomMastery(IForm form, float value)
Sets the mastery of a form if the player has it unlocked, otherwise it won't change anything.- Parameters:
form
- The form you want to change the mastery of.value
- New mastery value.
-
setCustomMastery
void setCustomMastery(int formID, float value, boolean ignoreUnlockCheck)
Sets the mastery of a form.- Parameters:
formID
- ID of the form to change the mastery of.value
- New mastery value.ignoreUnlockCheck
- If set to true, it will adjust the form mastery even if the player doesn't have the form unlocked.
-
setCustomMastery
void setCustomMastery(IForm form, float value, boolean ignoreUnlockCheck)
Sets the mastery of a form.- Parameters:
form
- The form you want to change the mastery of.value
- New mastery value.ignoreUnlockCheck
- If set to true, it will adjust the form mastery even if the player doesn't have the form unlocked.
-
addCustomMastery
void addCustomMastery(int formID, float value)
Modifies the mastery of a form ONLY if the player has the form unlocked.- Parameters:
formID
- ID of the form to change the mastery of.value
- Amount of mastery to add.
-
addCustomMastery
void addCustomMastery(IForm form, float value)
Modifies the mastery of a form ONLY if the player has the form unlocked.- Parameters:
form
- The form you want to change the mastery of.value
- Amount of mastery to add.
-
addCustomMastery
void addCustomMastery(int formID, float value, boolean ignoreUnlockCheck)
Modifies the mastery of a form.- Parameters:
formID
- ID of the form to change the mastery of.value
- Amount of mastery to add.ignoreUnlockCheck
- If set to true, it will adjust the form mastery even if the player doesn't have the form unlocked.
-
addCustomMastery
void addCustomMastery(IForm form, float value, boolean ignoreUnlockCheck)
Modifies the mastery of a form.- Parameters:
form
- The form you want to change the mastery of.value
- Amount of mastery to add.ignoreUnlockCheck
- If set to true, it will adjust the form mastery even if the player doesn't have the form unlocked.
-
getCustomMastery
float getCustomMastery(int formID)
Check the form mastery. If the player is fused, it sums masteries of both players.- Parameters:
formID
- Form ID to check.- Returns:
- Mastery of the given form.
-
getCustomMastery
float getCustomMastery(IForm form)
Check the form mastery. If the player is fused, it sums masteries of both players.- Parameters:
form
- Form to check.- Returns:
- Mastery of the given form.
-
getCustomMastery
float getCustomMastery(int formID, boolean checkFusion)
Check the form mastery.- Parameters:
formID
- Form ID to check.checkFusion
- Should it perform a fusion check? If the player is fused, it sums masteries of both players.- Returns:
- Mastery of the given form.
-
getCustomMastery
float getCustomMastery(IForm form, boolean checkFusion)
Check the form mastery.- Parameters:
form
- Form to check.checkFusion
- Should it perform a fusion check? If the player is fused, it sums masteries of both players.- Returns:
- Mastery of the given form.
-
removeCustomMastery
void removeCustomMastery(int formID)
-
removeCustomMastery
void removeCustomMastery(IForm form)
-
getCurrentForm
IForm getCurrentForm()
-
isInAura
boolean isInAura()
-
isInAura
boolean isInAura(IAura aura)
-
isInAura
boolean isInAura(String auraName)
-
isInAura
boolean isInAura(int auraID)
-
setOutline
void setOutline(IOutline outline)
-
setOutline
void setOutline(String outlineName)
-
setOutline
void setOutline(int outlineID)
-
getOutline
IOutline getOutline()
-
-