public class ScriptPlayer<T extends net.minecraft.entity.player.EntityPlayerMP> extends ScriptLivingBase<T> implements IPlayer
| Constructor and Description |
|---|
ScriptPlayer(T player) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFactionPoints(int faction,
int points) |
boolean |
blocking() |
boolean |
canHarvestBlock(IBlock block) |
boolean |
checkGUIOpen()
Deprecated.
|
void |
clearInventory() |
void |
clearItemInUse() |
void |
closeGui() |
void |
closeOverlay(int id) |
void |
disableMouseInput(long time,
int... buttonIds) |
IEntity |
dropOneItem(boolean dropStack) |
void |
finishQuest(int id)
Add the quest from finished quest list
|
IQuest[] |
getActiveQuests() |
ICustomGui |
getCustomGui() |
noppes.npcs.controllers.data.PlayerData |
getData() |
ScriptDBCPlayer<T> |
getDBCPlayer() |
java.lang.String |
getDisplayName() |
int |
getExpLevel() |
int |
getFactionPoints(int faction) |
IQuest[] |
getFinishedQuests() |
int |
getHunger() |
IItemStack[] |
getInventory() |
IBlock |
getLookingAtBlock(int maxDistance) |
int |
getMode() |
java.lang.String |
getName() |
IContainer |
getOpenContainer() |
IOverlayHandler |
getOverlays() |
noppes.npcs.scripted.ScriptPixelmonPlayerData |
getPixelmonData()
Requires pixelmon to be installed
|
float |
getSaturation() |
ITimers |
getTimers() |
int |
getType() |
boolean |
giveItem(IItemStack item,
int amount) |
boolean |
giveItem(java.lang.String id,
int damage,
int amount) |
boolean |
hasAchievement(java.lang.String achievement) |
boolean |
hasActiveQuest(int id) |
boolean |
hasBukkitPermission(java.lang.String permission) |
boolean |
hasFinishedQuest(int id) |
boolean |
hasReadDialog(int id) |
boolean |
interactWith(IEntity entity) |
int |
inventoryItemCount(IItemStack item) |
int |
inventoryItemCount(IItemStack item,
boolean ignoreNBT,
boolean ignoreDamage) |
void |
mountEntity(net.minecraft.entity.Entity ridingEntity) |
void |
playSound(java.lang.String name,
float volume,
float pitch) |
void |
readDialog(int id) |
void |
removeAllItems(IItemStack item) |
int |
removeAllItems(IItemStack item,
boolean ignoreNBT,
boolean ignoreDamage) |
boolean |
removeItem(IItemStack item,
int amount) |
boolean |
removeItem(IItemStack item,
int amount,
boolean ignoreNBT,
boolean ignoreDamage) |
boolean |
removeItem(java.lang.String id,
int damage,
int amount) |
void |
removeQuest(int id)
Removes the quest from active and finished quest list
|
void |
resetSpawnpoint() |
void |
sendMessage(java.lang.String message) |
void |
sendMessage(java.lang.String message,
java.lang.String color,
boolean bold,
boolean italic,
boolean underlined) |
void |
sendMessage(java.lang.String message,
java.lang.String color,
boolean bold,
boolean italic,
boolean obfuscated,
boolean strikethrough,
boolean underlined) |
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 |
setRotation(float rotationYaw) |
void |
setRotation(float rotationYaw,
float rotationPitch) |
void |
setSaturation(float saturation) |
void |
setSpawnpoint(int x,
int y,
int z)
Same as the /spawnpoint command
|
void |
showCustomGui(ICustomGui gui) |
void |
showCustomOverlay(ICustomOverlay overlay) |
void |
showDialog(int id) |
void |
spawnParticle(IParticle entityParticle) |
void |
startQuest(int id)
Add the quest from active quest list
|
void |
stopQuest(int id)
Removes the quest from active quest list
|
void |
stopUsingItem() |
void |
swingHand()
Makes the entity swing its hand
|
boolean |
typeOf(int type) |
void |
unreadDialog(int id) |
void |
updatePlayerInventory() |
addPotionEffect, canSeeEntity, clearPotionEffects, getArmor, getAttackTarget, getHealth, getHeldItem, getLookVec, getMaxHealth, getMCEntity, getMinecraftEntity, getPotionEffect, hurt, hurt, hurt, isAttacking, setArmor, setAttackTarget, setHealth, setHeldItemclearStoredData, clearTempData, despawn, dropItem, extinguish, getAge, getAllNbt, getBlockX, getBlockY, getBlockZ, getDimension, getEntityId, getHeight, getMotionX, getMotionY, getMotionZ, getMount, getNbt, getPitch, getPos, getRider, getRotation, getStoredData, getSurroundingEntities, getSurroundingEntities, getTempData, getTypeName, getUniqueID, getWidth, getWorld, getX, getY, getYOffset, getZ, hasCollided, hasStoredData, hasTempData, inFire, inLava, inWater, isAirborne, isAlive, isBurning, isSneaking, isSprinting, knockback, knockback, removeStoredData, removeTempData, setBurning, setImmune, setInvisible, setMotion, setMotionX, setMotionY, setMotionZ, setMount, setNbt, setPitch, setPos, setRider, setSneaking, setSprinting, setStoredData, setStoredData, setTempData, setX, setY, setZ, spawnParticle, spawnParticle, spawnParticle, spawnParticle, spawnParticle, spawnParticle, storeAsCloneequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPotionEffect, canSeeEntity, clearPotionEffects, getArmor, getAttackTarget, getHealth, getHeldItem, getMaxHealth, getMCEntity, getPotionEffect, hurt, hurt, hurt, isAttacking, setArmor, setAttackTarget, setHealth, setHeldItemclearStoredData, clearTempData, despawn, dropItem, extinguish, getAge, getAllNbt, getBlockX, getBlockY, getBlockZ, getDimension, getEntityId, getHeight, getMotionX, getMotionY, getMotionZ, getMount, getNbt, getPitch, getPos, getRider, getRotation, getStoredData, getSurroundingEntities, getSurroundingEntities, getTempData, getTypeName, getUniqueID, getWidth, getWorld, getX, getY, getYOffset, getZ, hasCollided, hasStoredData, hasTempData, inFire, inLava, inWater, isAirborne, isAlive, isBurning, isSneaking, isSprinting, knockback, knockback, removeStoredData, removeTempData, setBurning, setImmune, setInvisible, setMotion, setMotionX, setMotionY, setMotionZ, setMount, setNbt, setPitch, setPos, setRider, setSneaking, setSprinting, setStoredData, setTempData, setX, setY, setZ, storeAsClonepublic T extends net.minecraft.entity.player.EntityPlayerMP player
public ScriptPlayer(T player)
public java.lang.String getDisplayName()
getDisplayName in interface IPlayerpublic java.lang.String getName()
public void spawnParticle(IParticle entityParticle)
spawnParticle in interface IEntityspawnParticle in class ScriptEntity<T extends net.minecraft.entity.player.EntityPlayerMP>public void setPosition(double x,
double y,
double z)
setPosition in interface IEntitysetPosition in interface IPlayersetPosition in class ScriptEntity<T extends net.minecraft.entity.player.EntityPlayerMP>x - The x positiony - The y positionz - The z positionpublic void setPosition(double x,
double y,
double z,
int dimensionId)
setPosition in interface IPlayerpublic float getSaturation()
getSaturation in interface IPlayerpublic void setSaturation(float saturation)
setSaturation in interface IPlayerpublic boolean hasFinishedQuest(int id)
hasFinishedQuest in interface IPlayerpublic boolean hasActiveQuest(int id)
hasActiveQuest in interface IPlayerpublic void showDialog(int id)
public boolean hasReadDialog(int id)
hasReadDialog in interface IPlayerpublic void readDialog(int id)
readDialog in interface IPlayerpublic void unreadDialog(int id)
unreadDialog in interface IPlayerpublic void startQuest(int id)
startQuest in interface IPlayerid - The Quest IDpublic void finishQuest(int id)
finishQuest in interface IPlayerid - The Quest IDpublic void stopQuest(int id)
public void removeQuest(int id)
removeQuest in interface IPlayerid - The Quest IDpublic int getType()
getType in interface IEntitygetType in interface IEntityLivingBasegetType in interface IPlayergetType in class ScriptLivingBase<T extends net.minecraft.entity.player.EntityPlayerMP>EntityTypepublic boolean typeOf(int type)
typeOf in interface IEntitytypeOf in interface IEntityLivingBasetypeOf in interface IPlayertypeOf in class ScriptLivingBase<T extends net.minecraft.entity.player.EntityPlayerMP>type - @EntityType to checkpublic void addFactionPoints(int faction,
int points)
addFactionPoints in interface IPlayerfaction - The faction idpoints - The points to increase. Use negative values to decreasepublic void setFactionPoints(int faction,
int points)
setFactionPoints in interface IPlayerfaction - The faction idpoints - The new point value for this factionpublic int getFactionPoints(int faction)
getFactionPoints in interface IPlayerfaction - The faction idpublic void sendMessage(java.lang.String message)
sendMessage in interface IPlayermessage - The message you want to send. Compatible with formatting codes, which can be found on the attached link.public void sendMessage(java.lang.String message,
java.lang.String color,
boolean bold,
boolean italic,
boolean underlined)
public void sendMessage(java.lang.String message,
java.lang.String color,
boolean bold,
boolean italic,
boolean obfuscated,
boolean strikethrough,
boolean underlined)
public int getMode()
public void setMode(int type)
public IItemStack[] getInventory()
getInventory in interface IPlayerpublic int inventoryItemCount(IItemStack item)
public int inventoryItemCount(IItemStack item, boolean ignoreNBT, boolean ignoreDamage)
inventoryItemCount in interface IPlayeritem - 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 equalpublic boolean removeItem(java.lang.String id,
int damage,
int amount)
removeItem in interface IPlayerid - The items namedamage - The damage valueamount - How many will be removedpublic boolean removeItem(IItemStack item, int amount)
public boolean removeItem(IItemStack item, int amount, boolean ignoreNBT, boolean ignoreDamage)
removeItem in interface IPlayeritem - 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 equalpublic void removeAllItems(IItemStack item)
public int removeAllItems(IItemStack item, boolean ignoreNBT, boolean ignoreDamage)
removeAllItems in interface IPlayeritem - 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 equalpublic boolean giveItem(IItemStack item, int amount)
public boolean giveItem(java.lang.String id,
int damage,
int amount)
public void setSpawnpoint(int x,
int y,
int z)
setSpawnpoint in interface IPlayerx - The x positiony - The y positionz - The z positionpublic void resetSpawnpoint()
resetSpawnpoint in interface IPlayerpublic void clearInventory()
clearInventory in interface IPlayerpublic void setRotation(float rotationYaw)
setRotation in interface IEntitysetRotation in class ScriptEntity<T extends net.minecraft.entity.player.EntityPlayerMP>rotationYaw - The rotation to be set (0-360)public void setRotation(float rotationYaw,
float rotationPitch)
setRotation in interface IPlayerpublic void swingHand()
ScriptLivingBaseswingHand in interface IEntityLivingBaseswingHand in class ScriptLivingBase<T extends net.minecraft.entity.player.EntityPlayerMP>public void disableMouseInput(long time,
int... buttonIds)
disableMouseInput in interface IPlayerpublic void stopUsingItem()
stopUsingItem in interface IPlayerpublic void clearItemInUse()
clearItemInUse in interface IPlayerpublic void playSound(java.lang.String name,
float volume,
float pitch)
playSound in interface IPlayerplaySound in class ScriptEntity<T extends net.minecraft.entity.player.EntityPlayerMP>public void mountEntity(net.minecraft.entity.Entity ridingEntity)
mountEntity in interface IPlayerpublic IEntity dropOneItem(boolean dropStack)
dropOneItem in interface IPlayerpublic boolean canHarvestBlock(IBlock block)
canHarvestBlock in interface IPlayerpublic boolean interactWith(IEntity entity)
interactWith in interface IPlayerpublic boolean hasAchievement(java.lang.String achievement)
hasAchievement in interface IPlayerachievement - The achievement id. For a complete list see http://minecraft.gamepedia.com/Achievementspublic boolean hasBukkitPermission(java.lang.String permission)
hasBukkitPermission in interface IPlayerpermission - Bukkit/Cauldron permissionpublic int getExpLevel()
getExpLevel in interface IPlayerpublic void setExpLevel(int level)
setExpLevel in interface IPlayerlevel - The new exp level you want to setpublic noppes.npcs.scripted.ScriptPixelmonPlayerData getPixelmonData()
getPixelmonData in interface IPlayerpublic IBlock getLookingAtBlock(int maxDistance)
getLookingAtBlock in interface IPlayerpublic void updatePlayerInventory()
updatePlayerInventory in interface IPlayer@Deprecated public boolean checkGUIOpen()
public ScriptDBCPlayer<T> getDBCPlayer()
getDBCPlayer in interface IPlayerpublic noppes.npcs.controllers.data.PlayerData getData()
public IQuest[] getActiveQuests()
getActiveQuests in interface IPlayerpublic IContainer getOpenContainer()
getOpenContainer in interface IPlayerpublic void showCustomGui(ICustomGui gui)
showCustomGui in interface IPlayerpublic ICustomGui getCustomGui()
getCustomGui in interface IPlayerpublic void showCustomOverlay(ICustomOverlay overlay)
showCustomOverlay in interface IPlayerpublic void closeOverlay(int id)
closeOverlay in interface IPlayerpublic IOverlayHandler getOverlays()
getOverlays in interface IPlayerpublic IQuest[] getFinishedQuests()
getFinishedQuests in interface IPlayer