Package noppes.npcs.api.entity
Interface IPlayer<T extends net.minecraft.entity.player.EntityPlayerMP>
-
- All Superinterfaces:
IEntity<T>,IEntityLivingBase<T>
- All Known Subinterfaces:
IDBCPlayer
public interface IPlayer<T extends net.minecraft.entity.player.EntityPlayerMP> extends IEntityLivingBase<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddFactionPoints(int faction, int points)booleanblocking()booleancanHarvestBlock(IBlock block)voidclearInventory()voidclearItemInUse()voidcloseGui()voidcloseOverlay(int id)booleanconqueredEnd()voidcontinueSounds()voiddisableMouseInput(long time, int... buttonIds)IEntitydropOneItem(boolean dropStack)voidfinishQuest(int id)voidfinishQuest(IQuest quest)Add the quest from finished quest listIQuest[]getActiveQuests()IAnimationDatagetAnimationData()ICustomGuigetCustomGui()IPlayerDatagetData()IDBCPlayergetDBCPlayer()java.lang.StringgetDisplayName()intgetExpLevel()intgetFactionPoints(int faction)IQuest[]getFinishedQuests()intgetHunger()IItemStack[]getInventory()intgetMode()java.lang.StringgetName()IContainergetOpenContainer()IOverlayHandlergetOverlays()IPixelmonPlayerDatagetPixelmonData()Requires pixelmon to be installedfloatgetSaturation()IScreenSizegetScreenSize()ITimersgetTimers()intgetType()booleangiveItem(java.lang.String id, int damage, int amount)booleangiveItem(IItemStack item, int amount)booleanhasAchievement(java.lang.String achievement)booleanhasActiveQuest(int id)booleanhasActiveQuest(IQuest quest)booleanhasBukkitPermission(java.lang.String permission)booleanhasFinishedQuest(int id)booleanhasFinishedQuest(IQuest quest)booleanhasReadDialog(int id)booleanhasReadDialog(IDialog dialog)booleaninteractWith(IEntity entity)intinventoryItemCount(IItemStack item, boolean ignoreNBT, boolean ignoreDamage)booleanisScriptingDev()voidkick(java.lang.String reason)voidmountEntity(net.minecraft.entity.Entity ridingEntity)voidpauseSounds()voidplaySound(int id, ISound sound)voidplaySound(java.lang.String name, float volume, float pitch)voidplaySound(ISound sound)voidreadDialog(int id)voidreadDialog(IDialog dialog)intremoveAllItems(IItemStack item, boolean ignoreNBT, boolean ignoreDamage)booleanremoveItem(java.lang.String id, int damage, int amount)booleanremoveItem(IItemStack item, int amount, boolean ignoreNBT, boolean ignoreDamage)voidremoveQuest(int id)voidremoveQuest(IQuest quest)Removes the quest from active and finished quest listvoidresetSpawnpoint()voidsendMessage(java.lang.String message)voidsetConqueredEnd(boolean conqueredEnd)voidsetDimension(int dimension)voidsetExpLevel(int level)voidsetFactionPoints(int faction, int points)voidsetHunger(int hunger)voidsetMode(int type)voidsetPosition(double x, double y, double z)voidsetPosition(double x, double y, double z, int dimensionId)voidsetPosition(double x, double y, double z, IWorld world)voidsetPosition(IPos pos)voidsetPosition(IPos pos, int dimensionId)voidsetPosition(IPos pos, IWorld world)voidsetRotation(float rotationYaw, float rotationPitch)voidsetSaturation(float saturation)voidsetSpawnpoint(int x, int y, int z)Same as the /spawnpoint commandvoidsetSpawnpoint(IPos pos)voidshowCustomGui(ICustomGui gui)voidshowCustomOverlay(ICustomOverlay overlay)voidshowDialog(int id)voidshowDialog(IDialog dialog)voidstartQuest(int id)voidstartQuest(IQuest quest)Add the quest from active quest listvoidstopQuest(int id)voidstopQuest(IQuest quest)Removes the quest from active quest listvoidstopSound(int id)voidstopSounds()voidstopUsingItem()booleantypeOf(int type)voidunreadDialog(int id)voidunreadDialog(IDialog dialog)voidupdatePlayerInventory()-
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
-
-
-
-
Method Detail
-
getDisplayName
java.lang.String getDisplayName()
- Returns:
- Returns the displayed name of the player
-
getName
java.lang.String getName()
- Returns:
- Returns the players name
-
kick
void kick(java.lang.String reason)
-
setPosition
void setPosition(double x, double y, double z)- Specified by:
setPositionin interfaceIEntity<T extends net.minecraft.entity.player.EntityPlayerMP>- Parameters:
x- The x positiony- The y positionz- The z position
-
setPosition
void setPosition(IPos pos)
- Specified by:
setPositionin interfaceIEntity<T extends net.minecraft.entity.player.EntityPlayerMP>
-
setPosition
void setPosition(double x, double y, double z, int dimensionId)
-
setPosition
void setPosition(IPos pos, int dimensionId)
-
setPosition
void setPosition(double x, double y, double z, IWorld world)
-
setDimension
void setDimension(int dimension)
- Specified by:
setDimensionin interfaceIEntity<T extends net.minecraft.entity.player.EntityPlayerMP>
-
getHunger
int getHunger()
-
setHunger
void setHunger(int hunger)
-
getSaturation
float getSaturation()
-
setSaturation
void setSaturation(float saturation)
-
showDialog
void showDialog(IDialog dialog)
-
hasReadDialog
boolean hasReadDialog(IDialog dialog)
-
readDialog
void readDialog(IDialog dialog)
-
unreadDialog
void unreadDialog(IDialog dialog)
-
showDialog
void showDialog(int id)
-
hasReadDialog
boolean hasReadDialog(int id)
-
readDialog
void readDialog(int id)
-
unreadDialog
void unreadDialog(int id)
-
hasFinishedQuest
boolean hasFinishedQuest(IQuest quest)
-
hasActiveQuest
boolean hasActiveQuest(IQuest quest)
-
startQuest
void startQuest(IQuest quest)
Add the quest from active quest list- Parameters:
quest- The quest
-
finishQuest
void finishQuest(IQuest quest)
Add the quest from finished quest list- Parameters:
quest- The quest
-
stopQuest
void stopQuest(IQuest quest)
Removes the quest from active quest list- Parameters:
quest- The quest
-
removeQuest
void removeQuest(IQuest quest)
Removes the quest from active and finished quest list- Parameters:
quest- The quest
-
hasFinishedQuest
boolean hasFinishedQuest(int id)
-
hasActiveQuest
boolean hasActiveQuest(int id)
-
startQuest
void startQuest(int id)
- Parameters:
id- The quest ID
-
finishQuest
void finishQuest(int id)
- Parameters:
id- The quest ID
-
stopQuest
void stopQuest(int id)
- Parameters:
id- The quest ID
-
removeQuest
void removeQuest(int id)
- Parameters:
id- The quest ID
-
getFinishedQuests
IQuest[] getFinishedQuests()
-
getType
int getType()
-
typeOf
boolean typeOf(int type)
-
addFactionPoints
void addFactionPoints(int faction, int points)- Parameters:
faction- The faction idpoints- The points to increase. Use negative values to decrease
-
setFactionPoints
void setFactionPoints(int faction, int points)- Parameters:
faction- The faction idpoints- The new point value for this faction
-
getFactionPoints
int getFactionPoints(int faction)
- Parameters:
faction- The faction id- Returns:
- points
-
sendMessage
void sendMessage(java.lang.String message)
- Parameters:
message- The message you want to send. Compatible with formatting codes, which can be found on the attached link.- See Also:
- Minecraft formatting codes
-
getMode
int getMode()
- Returns:
- Return gamemode. 0: Survival, 1: Creative, 2: Adventure
-
setMode
void setMode(int type)
- Parameters:
type- The gamemode type. 0:SURVIVAL, 1:CREATIVE, 2:ADVENTURE
-
getInventory
IItemStack[] getInventory()
- Returns:
- Returns a IItemStack array size 36
- Since:
- 1.7.10d
-
inventoryItemCount
int inventoryItemCount(IItemStack item, boolean ignoreNBT, boolean ignoreDamage)
- Parameters:
item- The item to be checkedignoreNBT- Whether the item's NBT tags will be checked to be equalignoreDamage- Whether the item's damage will be checked to be equal- Returns:
- How many of this item the player has
-
removeItem
boolean removeItem(java.lang.String id, int damage, int amount)- Parameters:
id- The items namedamage- The damage valueamount- How many will be removed- Returns:
- True if the items were removed succesfully. Returns false incase a bigger amount than what the player has was given or item doesnt exist
- Since:
- 1.7.10c
-
removeItem
boolean removeItem(IItemStack item, int amount, boolean ignoreNBT, boolean ignoreDamage)
- Parameters:
item- The Item type to be removedamount- How many will be removedignoreNBT- Whether the item's NBT tags will be checked to be equalignoreDamage- Whether the item's damage will be checked to be equal- Returns:
- True if the items were removed succesfully. Returns false incase a bigger amount than what the player has was given
-
removeAllItems
int removeAllItems(IItemStack item, boolean ignoreNBT, boolean ignoreDamage)
- Parameters:
item- The item to be removed from the players inventoryignoreNBT- Whether the item's NBT tags will be checked to be equalignoreDamage- Whether the item's damage will be checked to be equal- Returns:
- The amount of item stacks that were removed
-
giveItem
boolean giveItem(IItemStack item, int amount)
- Parameters:
item- Item to be addedamount- The amount of the item to be added- Returns:
- Returns whether or not it gave the item succesfully
- Since:
- 1.7.10c
-
giveItem
boolean giveItem(java.lang.String id, int damage, int amount)- Parameters:
id- The items namedamage- The damage valueamount- The amount of the item to be added- Returns:
- Returns whether or not it gave the item succesfully
- Since:
- 1.7.10c
-
setSpawnpoint
void setSpawnpoint(int x, int y, int z)Same as the /spawnpoint command- Parameters:
x- The x positiony- The y positionz- The z position
-
setSpawnpoint
void setSpawnpoint(IPos pos)
-
resetSpawnpoint
void resetSpawnpoint()
-
setRotation
void setRotation(float rotationYaw, float rotationPitch)- Specified by:
setRotationin interfaceIEntity<T extends net.minecraft.entity.player.EntityPlayerMP>
-
disableMouseInput
void disableMouseInput(long time, int... buttonIds)
-
stopUsingItem
void stopUsingItem()
-
clearItemInUse
void clearItemInUse()
-
clearInventory
void clearInventory()
-
playSound
void playSound(java.lang.String name, float volume, float pitch)
-
playSound
void playSound(int id, ISound sound)
-
playSound
void playSound(ISound sound)
-
stopSound
void stopSound(int id)
-
pauseSounds
void pauseSounds()
-
continueSounds
void continueSounds()
-
stopSounds
void stopSounds()
-
mountEntity
void mountEntity(net.minecraft.entity.Entity ridingEntity)
-
dropOneItem
IEntity dropOneItem(boolean dropStack)
-
canHarvestBlock
boolean canHarvestBlock(IBlock block)
-
interactWith
boolean interactWith(IEntity entity)
-
hasAchievement
boolean hasAchievement(java.lang.String achievement)
- Parameters:
achievement- The achievement id. For a complete list see http://minecraft.wiki/w/Achievements- Returns:
- Returns whether or not the player has this achievement
-
hasBukkitPermission
boolean hasBukkitPermission(java.lang.String permission)
- Parameters:
permission- Bukkit/Cauldron permission- Returns:
- Returns whether or not the player has the permission
-
getExpLevel
int getExpLevel()
- Returns:
- Returns the exp level
- Since:
- 1.7.10c
-
setExpLevel
void setExpLevel(int level)
- Parameters:
level- The new exp level you want to set- Since:
- 1.7.10c
-
getPixelmonData
IPixelmonPlayerData getPixelmonData()
Requires pixelmon to be installed- Since:
- 1.7.10d
-
getTimers
ITimers getTimers()
-
updatePlayerInventory
void updatePlayerInventory()
-
getDBCPlayer
IDBCPlayer getDBCPlayer()
-
blocking
boolean blocking()
-
getData
IPlayerData getData()
-
isScriptingDev
boolean isScriptingDev()
-
getActiveQuests
IQuest[] getActiveQuests()
-
getOpenContainer
IContainer getOpenContainer()
-
showCustomGui
void showCustomGui(ICustomGui gui)
-
getCustomGui
ICustomGui getCustomGui()
-
closeGui
void closeGui()
-
showCustomOverlay
void showCustomOverlay(ICustomOverlay overlay)
-
closeOverlay
void closeOverlay(int id)
-
getOverlays
IOverlayHandler getOverlays()
-
getAnimationData
IAnimationData getAnimationData()
-
setConqueredEnd
void setConqueredEnd(boolean conqueredEnd)
-
conqueredEnd
boolean conqueredEnd()
-
getScreenSize
IScreenSize getScreenSize()
-
-