public class ScriptPlayer extends ScriptLivingBase
Constructor and Description |
---|
ScriptPlayer(net.minecraft.entity.player.EntityPlayerMP player) |
Modifier and Type | Method and Description |
---|---|
void |
addFactionPoints(int faction,
int points) |
void |
finishQuest(int id)
Add the quest from finished quest list
|
java.lang.String |
getDisplayName() |
int |
getExpLevel() |
int |
getFactionPoints(int faction) |
ScriptItemStack[] |
getInventory() |
int |
getMode() |
java.lang.String |
getName() |
ScriptPixelmonPlayerData |
getPixelmonData()
Requires pixelmon to be installed
|
int |
getType() |
boolean |
giveItem(ScriptItemStack 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) |
int |
inventoryItemCount(ScriptItemStack item) |
void |
removeAllItems(ScriptItemStack item) |
boolean |
removeItem(ScriptItemStack item,
int amount) |
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 |
setExpLevel(int level) |
void |
setMode(int type) |
void |
setPosition(double x,
double y,
double z) |
void |
setSpawnpoint(int x,
int y,
int z)
Same as the /spawnpoint command
|
void |
startQuest(int id)
Add the quest from active quest list
|
void |
stopQuest(int id)
Removes the quest from active quest list
|
boolean |
typeOf(int type) |
addPotionEffect, canSeeEntity, clearPotionEffects, getArmor, getAttackTarget, getHealth, getHeldItem, getMaxHealth, getMinecraftEntity, getPotionEffect, isAttacking, setArmor, setAttackTarget, setHealth, setHeldItem, swingHand
clearStoredData, clearTempData, despawn, dropItem, extinguish, getAge, getBlockX, getBlockY, getBlockZ, getMCEntity, getMount, getRider, getRotation, getStoredData, getSurroundingEntities, getSurroundingEntities, getTempData, getTypeName, getX, getY, getZ, hasStoredData, hasTempData, inFire, inLava, inWater, isAlive, isBurning, isSneaking, isSprinting, knockback, removeStoredData, removeTempData, setBurning, setMount, setRider, setRotation, setStoredData, setTempData, setX, setY, setZ
public ScriptPlayer(net.minecraft.entity.player.EntityPlayerMP player)
public java.lang.String getDisplayName()
public java.lang.String getName()
public void setPosition(double x, double y, double z)
setPosition
in class ScriptEntity
x
- The x positiony
- The y positionz
- The z positionpublic boolean hasFinishedQuest(int id)
public boolean hasActiveQuest(int id)
public boolean hasReadDialog(int id)
public void startQuest(int id)
id
- The Quest IDpublic void finishQuest(int id)
id
- The Quest IDpublic void stopQuest(int id)
id
- The Quest IDpublic void removeQuest(int id)
id
- The Quest IDpublic int getType()
getType
in class ScriptLivingBase
EntityType
public boolean typeOf(int type)
typeOf
in class ScriptLivingBase
type
- @EntityType to checkpublic void addFactionPoints(int faction, int points)
faction
- The faction idpoints
- The points to increase. Use negative values to decreasepublic int getFactionPoints(int faction)
faction
- The faction idpublic void sendMessage(java.lang.String message)
message
- The message you want to sendpublic int getMode()
public void setMode(int type)
type
- The gamemode type. 0:SURVIVAL, 1:CREATIVE, 2:ADVENTUREpublic int inventoryItemCount(ScriptItemStack item)
item
- The item to be checkedpublic ScriptItemStack[] getInventory()
public boolean removeItem(ScriptItemStack item, int amount)
item
- The Item type to be removedamount
- How many will be removedpublic boolean removeItem(java.lang.String id, int damage, int amount)
id
- The items namedamage
- The damage valueamount
- How many will be removedpublic boolean giveItem(ScriptItemStack item, int amount)
item
- Item to be addedamount
- The amount of the item to be addedpublic boolean giveItem(java.lang.String id, int damage, int amount)
id
- The items namedamage
- The damage valueamount
- The amount of the item to be addedpublic void setSpawnpoint(int x, int y, int z)
x
- The x positiony
- The y positionz
- The z positionpublic void resetSpawnpoint()
public void removeAllItems(ScriptItemStack item)
item
- The item to be removed from the players inventorypublic boolean hasAchievement(java.lang.String achievement)
achievement
- The achievement id. For a complete list see http://minecraft.gamepedia.com/Achievementspublic boolean hasBukkitPermission(java.lang.String permission)
permission
- Bukkit/Cauldron permissionpublic int getExpLevel()
public void setExpLevel(int level)
level
- The new exp level you want to setpublic ScriptPixelmonPlayerData getPixelmonData()