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 void
addFactionPoints(int faction, int points)
boolean
blocking()
boolean
canHarvestBlock(IBlock block)
void
clearInventory()
void
clearItemInUse()
void
closeGui()
void
closeOverlay(int id)
boolean
conqueredEnd()
void
continueSounds()
void
disableMouseInput(long time, int... buttonIds)
IEntity
dropOneItem(boolean dropStack)
void
finishQuest(int id)
void
finishQuest(IQuest quest)
Add the quest from finished quest listIQuest[]
getActiveQuests()
IAnimationData
getAnimationData()
ICustomGui
getCustomGui()
IPlayerData
getData()
IDBCPlayer
getDBCPlayer()
java.lang.String
getDisplayName()
int
getExpLevel()
int
getFactionPoints(int faction)
IQuest[]
getFinishedQuests()
int
getHunger()
IItemStack[]
getInventory()
int
getMode()
java.lang.String
getName()
IContainer
getOpenContainer()
IOverlayHandler
getOverlays()
IPixelmonPlayerData
getPixelmonData()
Requires pixelmon to be installedfloat
getSaturation()
IScreenSize
getScreenSize()
ITimers
getTimers()
int
getType()
boolean
giveItem(java.lang.String id, int damage, int amount)
boolean
giveItem(IItemStack item, int amount)
boolean
hasAchievement(java.lang.String achievement)
boolean
hasActiveQuest(int id)
boolean
hasActiveQuest(IQuest quest)
boolean
hasBukkitPermission(java.lang.String permission)
boolean
hasFinishedQuest(int id)
boolean
hasFinishedQuest(IQuest quest)
boolean
hasReadDialog(int id)
boolean
hasReadDialog(IDialog dialog)
boolean
interactWith(IEntity entity)
int
inventoryItemCount(IItemStack item, boolean ignoreNBT, boolean ignoreDamage)
boolean
isScriptingDev()
void
kick(java.lang.String reason)
void
mountEntity(net.minecraft.entity.Entity ridingEntity)
void
pauseSounds()
void
playSound(int id, ISound sound)
void
playSound(java.lang.String name, float volume, float pitch)
void
playSound(ISound sound)
void
readDialog(int id)
void
readDialog(IDialog dialog)
int
removeAllItems(IItemStack item, boolean ignoreNBT, boolean ignoreDamage)
boolean
removeItem(java.lang.String id, int damage, int amount)
boolean
removeItem(IItemStack item, int amount, boolean ignoreNBT, boolean ignoreDamage)
void
removeQuest(int id)
void
removeQuest(IQuest quest)
Removes the quest from active and finished quest listvoid
resetSpawnpoint()
void
sendMessage(java.lang.String message)
void
setConqueredEnd(boolean conqueredEnd)
void
setDimension(int dimension)
void
setExpLevel(int level)
void
setFactionPoints(int faction, int points)
void
setHunger(int hunger)
void
setMode(int type)
void
setPosition(double x, double y, double z)
void
setPosition(double x, double y, double z, int dimensionId)
void
setPosition(double x, double y, double z, IWorld world)
void
setPosition(IPos pos)
void
setPosition(IPos pos, int dimensionId)
void
setPosition(IPos pos, IWorld world)
void
setRotation(float rotationYaw, float rotationPitch)
void
setSaturation(float saturation)
void
setSpawnpoint(int x, int y, int z)
Same as the /spawnpoint commandvoid
setSpawnpoint(IPos pos)
void
showCustomGui(ICustomGui gui)
void
showCustomOverlay(ICustomOverlay overlay)
void
showDialog(int id)
void
showDialog(IDialog dialog)
void
startQuest(int id)
void
startQuest(IQuest quest)
Add the quest from active quest listvoid
stopQuest(int id)
void
stopQuest(IQuest quest)
Removes the quest from active quest listvoid
stopSound(int id)
void
stopSounds()
void
stopUsingItem()
boolean
typeOf(int type)
void
unreadDialog(int id)
void
unreadDialog(IDialog dialog)
void
updatePlayerInventory()
-
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:
setPosition
in 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:
setPosition
in 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:
setDimension
in 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:
setRotation
in 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()
-
-