mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 01:49:40 +00:00
Merge branch 'master' into dev
# Conflicts: # src/main/java/noppes/npcs/scripted/ScriptFaction.java # src/main/java/noppes/npcs/scripted/ScriptWorld.java # src/main/java/noppes/npcs/scripted/entity/ScriptNpc.java # src/main/java/noppes/npcs/scripted/entity/ScriptPlayer.java # src/main/java/noppes/npcs/scripted/interfaces/IEntity.java # src/main/java/noppes/npcs/scripted/interfaces/IWorld.java # src/main/java/noppes/npcs/scripted/interfaces/entity/ICustomNpc.java # src/main/java/noppes/npcs/scripted/interfaces/entity/IPlayer.java
This commit is contained in:
commit
ec5fc71413
300 files changed
+9920
-2959
No files matched your search
@@ -0,0 +1,11 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.interfaces.entity;
|
||||
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
|
||||
public interface IAnimal<T extends EntityAnimal> extends IEntityLiving<T> {
|
||||
}
|
||||
@@ -0,0 +1,766 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.interfaces.entity;
|
||||
|
||||
import net.minecraft.entity.EntityCreature;
|
||||
import noppes.npcs.scripted.ScriptFaction;
|
||||
import noppes.npcs.scripted.interfaces.ISkinOverlay;
|
||||
import noppes.npcs.scripted.interfaces.handler.IOverlayHandler;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.scripted.interfaces.ITimers;
|
||||
import noppes.npcs.scripted.roles.*;
|
||||
|
||||
public interface ICustomNpc<T extends EntityCreature> extends IEntityLiving<T> {
|
||||
/**
|
||||
* @return Returns the current npcs size 1-30
|
||||
*/
|
||||
int getSize();
|
||||
|
||||
/**
|
||||
* @param size The size of the npc (1-30) default is 5
|
||||
*/
|
||||
void setSize(int size);
|
||||
|
||||
/**
|
||||
* @return Returns the current npcs modelType of the NPC
|
||||
*/
|
||||
int getModelType();
|
||||
|
||||
/**
|
||||
* @param modelType The modelType of the NPC. 0: Steve, 1: Steve64, 2: Alex
|
||||
*/
|
||||
void setModelType(int modelType);
|
||||
|
||||
/**
|
||||
* @return The npcs name
|
||||
*/
|
||||
String getName();
|
||||
|
||||
void setRotation(float rotation);
|
||||
|
||||
void setRotationType(int rotationType);
|
||||
|
||||
int getRotationType();
|
||||
|
||||
/**
|
||||
* @param name The name of the npc
|
||||
*/
|
||||
void setName(String name);
|
||||
|
||||
/**
|
||||
* @since 1.7.10
|
||||
* @return The npcs title
|
||||
*/
|
||||
String getTitle();
|
||||
|
||||
/**
|
||||
* @since 1.7.10
|
||||
* @param title The title of the npc
|
||||
*/
|
||||
void setTitle(String title);
|
||||
|
||||
/**
|
||||
* @return The npcs texture
|
||||
*/
|
||||
String getTexture();
|
||||
|
||||
/**
|
||||
* @param texture The texture of the npc
|
||||
*/
|
||||
void setTexture(String texture);
|
||||
|
||||
/**
|
||||
* @return Home position x
|
||||
*/
|
||||
int getHomeX();
|
||||
|
||||
/**
|
||||
* @param x The home x position
|
||||
*/
|
||||
void setHomeX(int x);
|
||||
|
||||
/**
|
||||
* @return Home position x
|
||||
*/
|
||||
int getHomeY();
|
||||
|
||||
/**
|
||||
* @param y The home y position
|
||||
*/
|
||||
void setHomeY(int y);
|
||||
|
||||
/**
|
||||
* @return Home position x
|
||||
*/
|
||||
int getHomeZ();
|
||||
|
||||
/**
|
||||
* @param z The home x position
|
||||
*/
|
||||
void setHomeZ(int z);
|
||||
|
||||
/**
|
||||
* @param x The home x position
|
||||
* @param y The home y position
|
||||
* @param z The home z position
|
||||
*/
|
||||
void setHome(int x, int y, int z);
|
||||
/**
|
||||
* @param health New max health
|
||||
*/
|
||||
void setMaxHealth(double health);
|
||||
|
||||
/**
|
||||
* @param bo Whether or not the npc will try to return to his home position
|
||||
*/
|
||||
void setReturnToHome(boolean bo);
|
||||
|
||||
/**
|
||||
* @return Whether or not the npc returns home
|
||||
*/
|
||||
boolean getReturnToHome();
|
||||
|
||||
/**
|
||||
* @return The faction of the npc
|
||||
*/
|
||||
ScriptFaction getFaction();
|
||||
|
||||
/**
|
||||
* @param id The id of the new faction
|
||||
*/
|
||||
void setFaction(int id);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param attackOtherFactions True if you want the NPC to attack other factions, false otherwise.
|
||||
*/
|
||||
void setAttackFactions(boolean attackOtherFactions);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Returns true if the NPC attacks other factions, false otherwise.
|
||||
*/
|
||||
boolean getAttackFactions();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param defendFaction True if the NPC should defend faction members, false otherwise.
|
||||
*/
|
||||
void setDefendFaction(boolean defendFaction);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Returns true if the NPC should defend faction members, false otherwise.
|
||||
*/
|
||||
boolean getDefendFaction();
|
||||
|
||||
int getType();
|
||||
|
||||
boolean typeOf(int type);
|
||||
|
||||
/**
|
||||
* @param target The targeted npc
|
||||
* @param item The item you want to shoot
|
||||
* @param accuracy Accuracy of the shot (0-100)
|
||||
*/
|
||||
void shootItem(IEntityLivingBase target, IItemStack item, int accuracy);
|
||||
|
||||
void setProjectilesKeepTerrain(boolean b);
|
||||
|
||||
boolean getProjectilesKeepTerrain();
|
||||
|
||||
/**
|
||||
* @param message The message the npc will say
|
||||
*/
|
||||
void say(String message);
|
||||
|
||||
/**
|
||||
* @param message The message the npc will say
|
||||
*/
|
||||
void say(IPlayer player, String message);
|
||||
|
||||
/**
|
||||
* Kill the npc, doesnt't despawn it
|
||||
*/
|
||||
void kill();
|
||||
|
||||
/**
|
||||
* Basically completely resets the npc. This will also call the Init script
|
||||
*/
|
||||
void reset();
|
||||
|
||||
/**
|
||||
* @return Returns the npcs current role
|
||||
*/
|
||||
ScriptRoleInterface getRole();
|
||||
|
||||
void setRole(int role);
|
||||
|
||||
/**
|
||||
* @return Returns the npcs current job
|
||||
*/
|
||||
ScriptJobInterface getJob();
|
||||
|
||||
void setJob(int job);
|
||||
|
||||
/**
|
||||
* @return The item held in the right hand
|
||||
*/
|
||||
IItemStack getRightItem();
|
||||
|
||||
/**
|
||||
* @param item Item to be held in the right hand
|
||||
*/
|
||||
void setRightItem(IItemStack item);
|
||||
|
||||
/**
|
||||
* @return The item held in the left hand
|
||||
*/
|
||||
IItemStack getLefttItem();
|
||||
|
||||
/**
|
||||
* @param item Item to be held in the left hand
|
||||
*/
|
||||
void setLeftItem(IItemStack item);
|
||||
|
||||
/**
|
||||
* @return Returns the projectile the npc uses
|
||||
*/
|
||||
IItemStack getProjectileItem();
|
||||
|
||||
/**
|
||||
* @param item Item to be used as projectile
|
||||
*/
|
||||
void setProjectileItem(IItemStack item);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Returns true if the NPC can aim while shooting.
|
||||
*/
|
||||
boolean canAimWhileShooting();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param aimWhileShooting Set to true if you want the NPC to aim while shooting, false otherwise.
|
||||
*/
|
||||
void aimWhileShooting(boolean aimWhileShooting);
|
||||
|
||||
void setMinProjectileDelay(int minDelay);
|
||||
int getMinProjectileDelay();
|
||||
|
||||
void setMaxProjectileDelay(int maxDelay);
|
||||
int getMaxProjectileDelay();
|
||||
|
||||
void setRangedRage(int rangedRange);
|
||||
int getRangedRage();
|
||||
|
||||
void setFireRate(int rate);
|
||||
int getFireRate();
|
||||
|
||||
void setBurstCount(int burstCount);
|
||||
int getBurstCount();
|
||||
|
||||
void setShotCount(int shotCount);
|
||||
int getShotCount();
|
||||
|
||||
void setAccuracy(int accuracy);
|
||||
int getAccuracy();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The directory of the sound that plays when a projectile is shot
|
||||
*/
|
||||
String getFireSound();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param fireSound The new directory of the sound that plays when a projectile is shot
|
||||
*/
|
||||
void setFireSound(String fireSound);
|
||||
|
||||
/**
|
||||
* @param slot The armor slot to return. 0:head, 1:body, 2:legs, 3:boots
|
||||
* @return Returns the worn armor in slot
|
||||
*/
|
||||
IItemStack getArmor(int slot);
|
||||
|
||||
/**
|
||||
* @param slot The armor slot to set. 0:head, 1:body, 2:legs, 3:boots
|
||||
* @param item Item to be set as armor
|
||||
*/
|
||||
void setArmor(int slot, IItemStack item);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param slot The slot from the NPC's drop list to return (0-8)
|
||||
* @return The item in the NPC's drop list slot
|
||||
*/
|
||||
IItemStack getLootItem(int slot);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param slot The slot from the NPC's drop list to change
|
||||
* @param item The item the drop list slot will be changed to
|
||||
*/
|
||||
void setLootItem(int slot, IItemStack item);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param slot The slot from the NPC's drop list to return (0-8)
|
||||
* @return The chance of dropping the item in this slot. Returns 100 if the slot is not found.
|
||||
*/
|
||||
double getLootChance(int slot);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param slot The slot from the NPC's drop list to change
|
||||
* @param chance The new chance of dropping the item in this slot
|
||||
*/
|
||||
void setLootChance(int slot, double chance);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The NPC's loot mode. 0 = Normal, 1 = Auto Pickup
|
||||
*/
|
||||
int getLootMode();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param lootMode The NPC's loot mode. 0 = Normal, 1 = Auto Pickup
|
||||
*/
|
||||
void setLootMode(int lootMode);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param lootXP The new minimum XP gained from killing the NPC. If greater than the max XP, it will be set to it.
|
||||
*/
|
||||
void setMinLootXP(int lootXP);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param lootXP The new maximum XP gained from killing the NPC. If less than the min XP, it will be set to it.
|
||||
*/
|
||||
void setMaxLootXP(int lootXP);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The minimum XP gained from killing the NPC.
|
||||
*/
|
||||
int getMinLootXP();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The maximum XP gained from killing the NPC.
|
||||
*/
|
||||
int getMaxLootXP();
|
||||
|
||||
boolean getCanDrown();
|
||||
|
||||
void setCanDrown(boolean b);
|
||||
|
||||
/**
|
||||
* @param type The AnimationType
|
||||
*/
|
||||
void setAnimation(int type);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param variant Changes the tactical variant of the NPC.
|
||||
* 0 - Rush
|
||||
* 1 - Dodge
|
||||
* 2 - Surround
|
||||
* 3 - Hit N Run
|
||||
* 4 - Ambush
|
||||
* 5 - Stalk
|
||||
* 6 - None
|
||||
*
|
||||
*/
|
||||
void setTacticalVariant(int variant);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Returns the tactical variant of the NPC.
|
||||
* 0 - Rush
|
||||
* 1 - Dodge
|
||||
* 2 - Surround
|
||||
* 3 - Hit N Run
|
||||
* 4 - Ambush
|
||||
* 5 - Stalk
|
||||
* 6 - None
|
||||
*
|
||||
*/
|
||||
int getTacticalVariant();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param variant Sets the NPC's tactical variant by name.
|
||||
*/
|
||||
void setTacticalVariant(String variant);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Returns the name of the NPc's tactical variant.
|
||||
*/
|
||||
String getTacticalVariantName();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param tacticalRadius Sets the radius in which the tactical variant is affected, if any. Effective for all tactical variants except Rush and None.
|
||||
*/
|
||||
void setTacticalRadius(int tacticalRadius);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Gets the radius in which the tactical variant is affected, if any. Effective for all tactical variants except Rush and None.
|
||||
*/
|
||||
int getTacticalRadius();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ignore True if the NPC goes through cobwebs
|
||||
*/
|
||||
void setIgnoreCobweb(boolean ignore);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return True if the NPC goes through cobwebs
|
||||
*/
|
||||
boolean getIgnoreCobweb();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Changes what the NPC does when it finds an enemy based on the integer given.
|
||||
* 0 - Retaliate
|
||||
* 1 - Panic
|
||||
* 2 - Retreat
|
||||
* 3 - Nothing
|
||||
*/
|
||||
void setOnFoundEnemy(int onAttack);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Returns an integer representing what the NPC does when it finds an enemy.
|
||||
* 0 - Retaliate
|
||||
* 1 - Panic
|
||||
* 2 - Retreat
|
||||
* 3 - Nothing
|
||||
*/
|
||||
int onFoundEnemy();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param shelterFrom An integer representing what conditions the NPC seeks shelter under.
|
||||
* 0 - Darkenss
|
||||
* 1 - Sunlight
|
||||
* 2 - Disabled
|
||||
*/
|
||||
void setShelterFrom(int shelterFrom);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Returns an integer representing what conditions the NPC seeks shelter under.
|
||||
* 0 - Darkenss
|
||||
* 1 - Sunlight
|
||||
* 2 - Disabled
|
||||
*/
|
||||
int getShelterFrom();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Whether the NPC has a living animation
|
||||
*/
|
||||
boolean hasLivingAnimation();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param livingAnimation True if you want the NPC to have a living animation, false otherwise
|
||||
*/
|
||||
void setLivingAnimation(boolean livingAnimation);
|
||||
|
||||
/**
|
||||
* @param type The visibility type of the npc, 0:visible, 1:invisible, 2:semi-visible
|
||||
*/
|
||||
void setVisibleType(int type);
|
||||
|
||||
/**
|
||||
* @return The visibility type of the npc, 0:visible, 1:invisible, 2:semi-visible
|
||||
*/
|
||||
int getVisibleType();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param player The player this NPC becomes visible/invisible to
|
||||
* @param visible True if you want the NPC to be invisible to the player, false otherwise
|
||||
*/
|
||||
void setVisibleTo(IPlayer player, boolean visible);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param player The player this NPC is visible/invisible to
|
||||
* @return False if the NPC has been toggled to be invisible to this player, true otherwise.
|
||||
* If setVisibleTo(player,visible) was not called to make this NPC invisible to the player at any point
|
||||
* in the NPC's life, this function will return true regardless of the value of isVisible().
|
||||
*/
|
||||
boolean isVisibleTo(IPlayer player);
|
||||
|
||||
/**
|
||||
* @param type The visibility type of the name, 0:visible, 1:invisible, 2:when-attacking
|
||||
*/
|
||||
void setShowName(int type);
|
||||
|
||||
/**
|
||||
* @return Returns the visibility type of the name, 0:visible, 1:invisible, 2:when-attacking
|
||||
*/
|
||||
int getShowName();
|
||||
|
||||
/**
|
||||
* @return Returns the visiblity of the boss bar, 0:invisible, 1:visible, 2:when-attacking
|
||||
*/
|
||||
int getShowBossBar();
|
||||
|
||||
/**
|
||||
* @param type The visibility type of the boss bar, 0:invisible, 1:visible, 2:when-attacking
|
||||
*/
|
||||
void setShowBossBar(int type);
|
||||
|
||||
/**
|
||||
* @return The melee strength
|
||||
*/
|
||||
float getMeleeStrength();
|
||||
|
||||
/**
|
||||
* @param strength The melee strength
|
||||
*/
|
||||
void setMeleeStrength(float strength);
|
||||
|
||||
/**
|
||||
* @return The melee speed
|
||||
*/
|
||||
int getMeleeSpeed();
|
||||
|
||||
/**
|
||||
* @param speed The melee speed
|
||||
*/
|
||||
void setMeleeSpeed(int speed);
|
||||
|
||||
/**
|
||||
* @return The ranged strength
|
||||
*/
|
||||
float getRangedStrength();
|
||||
|
||||
/**
|
||||
* @param strength The ranged strength
|
||||
*/
|
||||
void setRangedStrength(float strength);
|
||||
|
||||
/**
|
||||
* @return The ranged speed
|
||||
*/
|
||||
int getRangedSpeed();
|
||||
|
||||
/**
|
||||
* @param speed The ranged speed
|
||||
*/
|
||||
void setRangedSpeed(int speed);
|
||||
|
||||
/**
|
||||
* @return The ranged burst count
|
||||
*/
|
||||
int getRangedBurst();
|
||||
|
||||
/**
|
||||
* @param count The ranged burst count
|
||||
*/
|
||||
void setRangedBurst(int count);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The amount of ticks before this entity respawns
|
||||
*/
|
||||
int getRespawnTime();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param time The new amount of ticks before this entity respawns
|
||||
*/
|
||||
void setRespawnTime(int time);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Respawn: 0 - Yes (Always), 1 - Day, 2 - Night, 3 - No (Dies permanently)
|
||||
*/
|
||||
int getRespawnCycle();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param cycle Sets when the NPC respawns. Respawn: 0 - Yes (Always), 1 - Day, 2 - Night, 3 - No (Dies permanently)
|
||||
*/
|
||||
void setRespawnCycle(int cycle);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Whether the NPC is hidden when it dies
|
||||
*/
|
||||
boolean getHideKilledBody();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param hide True if the NPC is hidden when it dies. False otherwise.
|
||||
*/
|
||||
void hideKilledBody(boolean hide);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Returns true if the NPC naturally despawns.
|
||||
*/
|
||||
boolean naturallyDespawns();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param canDespawn True if the NPC should naturally despawn. False otherwise.
|
||||
*/
|
||||
void setNaturallyDespawns(boolean canDespawn);
|
||||
|
||||
/**
|
||||
* @param player The player to give the item to
|
||||
* @param item The item given to the player
|
||||
*/
|
||||
void giveItem(IPlayer player, IItemStack item);
|
||||
|
||||
|
||||
/**
|
||||
* On servers the enable-command-block option in the server.properties needs to be set to true
|
||||
* @param command The command to be executed
|
||||
*/
|
||||
void executeCommand(String command);
|
||||
|
||||
void setHeadScale(float x, float y, float z);
|
||||
|
||||
void setBodyScale(float x, float y, float z);
|
||||
|
||||
void setArmsScale(float x, float y, float z);
|
||||
|
||||
void setLegsScale(float x, float y, float z);
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @param resistance Explosion resistance (0-2) default is 1
|
||||
*/
|
||||
void setExplosionResistance(float resistance);
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @return Returns Explosion Resistance
|
||||
*/
|
||||
float getExplosionResistance();
|
||||
|
||||
/**
|
||||
* @param resistance Melee resistance (0-2) default is 1
|
||||
*/
|
||||
void setMeleeResistance(float resistance);
|
||||
|
||||
/**
|
||||
* @return Returns Melee Resistance
|
||||
*/
|
||||
float getMeleeResistance();
|
||||
|
||||
/**
|
||||
* @param resistance Arrow resistance (0-2) default is 1
|
||||
*/
|
||||
void setArrowResistance(float resistance);
|
||||
|
||||
/**
|
||||
* @return Returns Arrow Resistance
|
||||
*/
|
||||
float getArrowResistance();
|
||||
|
||||
/**
|
||||
* @param resistance Knockback resistance (0-2) default is 1
|
||||
*/
|
||||
void setKnockbackResistance(float resistance);
|
||||
|
||||
/**
|
||||
* @return Returns Knockback Resistance
|
||||
*/
|
||||
float getKnockbackResistance();
|
||||
|
||||
/**
|
||||
* @param type Retaliation type. 0:normal, 1:panic, 2:retreat, 3:nothing
|
||||
*/
|
||||
void setRetaliateType(int type);
|
||||
|
||||
/**
|
||||
* @return Returns the combat health regen per second
|
||||
*/
|
||||
float getCombatRegen();
|
||||
|
||||
/**
|
||||
* @param regen The combat health regen per second
|
||||
*/
|
||||
void setCombatRegen(float regen);
|
||||
|
||||
/**
|
||||
* @return Returns the health regen per second when not in combat
|
||||
*/
|
||||
float getHealthRegen();
|
||||
|
||||
/**
|
||||
* @param regen The health regen per second when not in combat
|
||||
*/
|
||||
void setHealthRegen(float regen);
|
||||
|
||||
long getAge();
|
||||
|
||||
ITimers getTimers();
|
||||
|
||||
void setFly(int fly);
|
||||
|
||||
boolean canFly();
|
||||
|
||||
void setFlySpeed(double flySpeed);
|
||||
|
||||
double getFlySpeed(double flySpeed);
|
||||
|
||||
void setFlyGravity(double flyGravity);
|
||||
|
||||
double getFlyGravity(double flyGravity);
|
||||
|
||||
void setFlyHeightLimit(int flyHeightLimit);
|
||||
|
||||
int getFlyHeightLimit(int flyHeightLimit);
|
||||
|
||||
void limitFlyHeight(boolean limit);
|
||||
|
||||
boolean isFlyHeightLimited(boolean limit);
|
||||
|
||||
void setSpeed(int speed);
|
||||
|
||||
int getSpeed();
|
||||
|
||||
void setSkinType(byte type);
|
||||
|
||||
byte getSkinType();
|
||||
|
||||
void setSkinUrl(String url);
|
||||
|
||||
String getSkinUrl();
|
||||
|
||||
void setCloakTexture(String cloakTexture);
|
||||
|
||||
String getCloakTexture();
|
||||
|
||||
void setOverlayTexture(String overlayTexture);
|
||||
|
||||
String getOverlayTexture();
|
||||
|
||||
IOverlayHandler getOverlays();
|
||||
|
||||
void setCollisionType(int type);
|
||||
|
||||
int getCollisionType();
|
||||
|
||||
void updateClient();
|
||||
}
|
||||
@@ -0,0 +1,346 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.interfaces.entity;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import noppes.npcs.scripted.ScriptParticle;
|
||||
import noppes.npcs.scripted.ScriptWorld;
|
||||
import noppes.npcs.scripted.interfaces.INbt;
|
||||
import noppes.npcs.scripted.interfaces.IPos;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
|
||||
public interface IEntity<T extends Entity> {
|
||||
|
||||
void spawnParticle(ScriptParticle entityParticle);
|
||||
|
||||
int getEntityId();
|
||||
|
||||
String getUniqueID();
|
||||
|
||||
double getYOffset();
|
||||
|
||||
/**
|
||||
* @return The entities width
|
||||
*/
|
||||
double getWidth();
|
||||
|
||||
/**
|
||||
* @return The entities height
|
||||
*/
|
||||
double getHeight();
|
||||
|
||||
/**
|
||||
* @return The entities x position
|
||||
*/
|
||||
double getX();
|
||||
|
||||
/**
|
||||
* @param x The entities x position
|
||||
*/
|
||||
void setX(double x);
|
||||
|
||||
/**
|
||||
* @return The entities y position
|
||||
*/
|
||||
double getY();
|
||||
|
||||
/**
|
||||
* @param y The entities y position
|
||||
*/
|
||||
void setY(double y);
|
||||
|
||||
/**
|
||||
* @return The entities x position
|
||||
*/
|
||||
double getZ();
|
||||
|
||||
/**
|
||||
* @param z The entities x position
|
||||
*/
|
||||
void setZ(double z);
|
||||
|
||||
/**
|
||||
* @return The entities z motion
|
||||
*/
|
||||
double getMotionX();
|
||||
|
||||
/**
|
||||
* @param x The entities x motion
|
||||
*/
|
||||
void setMotionX(double x);
|
||||
|
||||
/**
|
||||
* @return The entities x motion
|
||||
*/
|
||||
double getMotionY();
|
||||
|
||||
/**
|
||||
* @param y The entities y motion
|
||||
*/
|
||||
void setMotionY(double y);
|
||||
|
||||
/**
|
||||
* @return The entities y motion
|
||||
*/
|
||||
double getMotionZ();
|
||||
|
||||
/**
|
||||
* @param z The entities z motion
|
||||
*/
|
||||
void setMotionZ(double z);
|
||||
|
||||
void setMotion(double x, double y, double z);
|
||||
|
||||
boolean isAirborne();
|
||||
|
||||
/**
|
||||
* @return The block x position
|
||||
*/
|
||||
int getBlockX();
|
||||
|
||||
/**
|
||||
* @return The block y position
|
||||
*/
|
||||
int getBlockY();
|
||||
|
||||
/**
|
||||
* @return The block z position
|
||||
*/
|
||||
int getBlockZ();
|
||||
|
||||
/**
|
||||
* @param x The x position
|
||||
* @param y The y position
|
||||
* @param z The z position
|
||||
*/
|
||||
void setPosition(double x, double y, double z);
|
||||
|
||||
IPos getPos();
|
||||
|
||||
void setPos(IPos pos);
|
||||
|
||||
int getDimension();
|
||||
|
||||
/**
|
||||
* @param range The search range for entities around this entity
|
||||
* @return Array of entities within range
|
||||
*/
|
||||
IEntity[] getSurroundingEntities(int range);
|
||||
|
||||
/**
|
||||
* @param range The search range for entities around this entity
|
||||
* @param type The EntityType you want to find
|
||||
* @return Array of entities within range
|
||||
*/
|
||||
IEntity[] getSurroundingEntities(int range, int type);
|
||||
|
||||
/**
|
||||
* @return Whether the entity is alive or not
|
||||
*/
|
||||
boolean isAlive();
|
||||
|
||||
/**
|
||||
* @param key Get temp data for this key
|
||||
* @return Returns the stored temp data
|
||||
*/
|
||||
Object getTempData(String key);
|
||||
|
||||
/**
|
||||
* Tempdata gets cleared when the entity gets unloaded or the world restarts
|
||||
* @param key The key for the data stored
|
||||
* @param value The data stored
|
||||
*/
|
||||
void setTempData(String key, Object value);
|
||||
|
||||
/**
|
||||
* @param key The key thats going to be tested against the temp data
|
||||
* @return Whether or not temp data containes the key
|
||||
*/
|
||||
boolean hasTempData(String key);
|
||||
|
||||
/**
|
||||
* @param key The key for the temp data to be removed
|
||||
*/
|
||||
void removeTempData(String key);
|
||||
|
||||
/**
|
||||
* Remove all tempdata
|
||||
*/
|
||||
void clearTempData();
|
||||
|
||||
/**
|
||||
* @param key The key of the data to be returned
|
||||
* @return Returns the stored data
|
||||
*/
|
||||
Object getStoredData(String key);
|
||||
|
||||
/**
|
||||
* Stored data persists through world restart. Unlike tempdata only Strings and Numbers can be saved
|
||||
* @param key The key for the data stored
|
||||
* @param value The data stored. This data can be either a Number or a String. Other data is not stored
|
||||
*/
|
||||
void setStoredData(String key, Object value);
|
||||
|
||||
/**
|
||||
* @param key The key of the data to be checked
|
||||
* @return Returns whether or not the stored data contains the key
|
||||
*/
|
||||
boolean hasStoredData(String key);
|
||||
|
||||
/**
|
||||
* @param key The key of the data to be removed
|
||||
*/
|
||||
void removeStoredData(String key);
|
||||
|
||||
/**
|
||||
* Remove all stored data
|
||||
*/
|
||||
void clearStoredData();
|
||||
|
||||
/**
|
||||
* @return The age of this entity in ticks
|
||||
*/
|
||||
long getAge();
|
||||
|
||||
/**
|
||||
* Despawns this entity. Removes it permanently
|
||||
*/
|
||||
void despawn();
|
||||
|
||||
/**
|
||||
* @return Return whether or not this entity is standing in water
|
||||
*/
|
||||
boolean inWater();
|
||||
|
||||
/**
|
||||
* @return Return whether or not this entity is standing in lava
|
||||
*/
|
||||
boolean inLava();
|
||||
|
||||
/**
|
||||
* @return Return whether or not this entity is standing in fire
|
||||
*/
|
||||
boolean inFire();
|
||||
|
||||
/**
|
||||
* @return Return whether or not this entity is on fire
|
||||
*/
|
||||
boolean isBurning();
|
||||
|
||||
/**
|
||||
* @param ticks Amount of world ticks this entity will burn. 20 ticks equals 1 second
|
||||
*/
|
||||
void setBurning(int ticks);
|
||||
|
||||
/**
|
||||
* Removes fire from this entity
|
||||
*/
|
||||
void extinguish();
|
||||
|
||||
/**
|
||||
* @return Name as which it's registered in minecraft
|
||||
*/
|
||||
String getTypeName();
|
||||
|
||||
/**
|
||||
* @param item Item to be dropped
|
||||
*/
|
||||
void dropItem(IItemStack item);
|
||||
|
||||
/**
|
||||
* @return Return the rider
|
||||
*/
|
||||
IEntity getRider();
|
||||
|
||||
/**
|
||||
* @param entity The entity to ride this entity
|
||||
*/
|
||||
void setRider(IEntity entity);
|
||||
|
||||
/**
|
||||
* @return Return the entity, this entity is riding
|
||||
*/
|
||||
IEntity getMount();
|
||||
|
||||
/**
|
||||
* @param entity The entity this entity will mount
|
||||
*/
|
||||
void setMount(IEntity entity);
|
||||
|
||||
/**
|
||||
* @see noppes.npcs.scripted.constants.EntityType
|
||||
* @return Returns the EntityType of this entity
|
||||
*/
|
||||
int getType();
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @param type @EntityType to check
|
||||
* @return Returns whether the entity is type of the given @EntityType
|
||||
*/
|
||||
boolean typeOf(int type);
|
||||
|
||||
/**
|
||||
* @param rotation The rotation to be set (0-360)
|
||||
*/
|
||||
void setRotation(float rotation);
|
||||
|
||||
/**
|
||||
* @return Current rotation of the npc
|
||||
*/
|
||||
float getRotation();
|
||||
|
||||
public void setPitch(float pitch);
|
||||
|
||||
public float getPitch();
|
||||
|
||||
/**
|
||||
* @param power How strong the knockback is
|
||||
* @param direction The direction in which he flies back (0-360). Usually based on getRotation()
|
||||
*/
|
||||
void knockback(int power, float direction);
|
||||
|
||||
void knockback(int xpower, int ypower, int zpower, float direction);
|
||||
|
||||
void setImmune(int ticks);
|
||||
|
||||
public void setInvisible(boolean invisible);
|
||||
|
||||
public void setSneaking(boolean sneaking);
|
||||
|
||||
public void setSprinting(boolean sprinting);
|
||||
|
||||
boolean hasCollided();
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @return Returns whether or not this entity is sneaking
|
||||
*/
|
||||
boolean isSneaking();
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @return Returns whether or not this entity is sprinting
|
||||
*/
|
||||
boolean isSprinting();
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* Expert users only
|
||||
* @return Returns minecrafts entity
|
||||
*/
|
||||
T getMCEntity();
|
||||
|
||||
public INbt getNbt();
|
||||
|
||||
public INbt getAllNbt();
|
||||
|
||||
public void setNbt(INbt nbt);
|
||||
|
||||
void storeAsClone(int tab, String name);
|
||||
|
||||
ScriptWorld getWorld();
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.interfaces.entity;
|
||||
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
|
||||
public interface IEntityLiving<T extends EntityLiving> extends IEntityLivingBase<T> {
|
||||
boolean isNavigating();
|
||||
|
||||
void clearNavigation();
|
||||
|
||||
void navigateTo(double var1, double var3, double var5, double var7);
|
||||
|
||||
T getMCEntity();
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package noppes.npcs.scripted.interfaces.entity;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.scripted.ScriptDamageSource;
|
||||
|
||||
public interface IEntityLivingBase<T extends EntityLivingBase> extends IEntity<T> {
|
||||
/**
|
||||
* @return The entity's current health
|
||||
*/
|
||||
float getHealth();
|
||||
|
||||
/**
|
||||
* @param health The new health of this entity
|
||||
*/
|
||||
void setHealth(float health);
|
||||
|
||||
void hurt(float damage);
|
||||
|
||||
void hurt(float damage, IEntity source);
|
||||
|
||||
void hurt(float damage, ScriptDamageSource damageSource);
|
||||
|
||||
/**
|
||||
* @return Entity's max health
|
||||
*/
|
||||
double getMaxHealth();
|
||||
/**
|
||||
* @return Whether or not this entity is attacking something
|
||||
*/
|
||||
boolean isAttacking();
|
||||
|
||||
/**
|
||||
* @param living Entity which this entity will attack
|
||||
*/
|
||||
void setAttackTarget(IEntityLivingBase living);
|
||||
|
||||
/**
|
||||
* @return The entity which this entity is attacking
|
||||
*/
|
||||
IEntityLivingBase getAttackTarget();
|
||||
|
||||
int getType();
|
||||
|
||||
boolean typeOf(int type);
|
||||
|
||||
/**
|
||||
* @param entity Entity to check
|
||||
* @return Whether or not this entity can see the given entity
|
||||
*/
|
||||
boolean canSeeEntity(IEntity entity);
|
||||
|
||||
/**
|
||||
* Expert use only
|
||||
* @return Returns the minecraft entity object
|
||||
*/
|
||||
T getMCEntity();
|
||||
|
||||
/**
|
||||
* Makes the entity swing its hand
|
||||
*/
|
||||
void swingHand();
|
||||
|
||||
/**
|
||||
* Works the same as the <a href="http://minecraft.gamepedia.com/Commands#effect">/effect command</a>
|
||||
* @param effect
|
||||
* @param duration The duration in seconds
|
||||
* @param strength The amplifier of the potion effect
|
||||
* @param hideParticles Whether or not you want to hide potion particles
|
||||
*/
|
||||
void addPotionEffect(int effect, int duration, int strength, boolean hideParticles);
|
||||
|
||||
/**
|
||||
* Clears all potion effects
|
||||
*/
|
||||
void clearPotionEffects();
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @param effect Potion effect to check
|
||||
* @return Returns -1 if its not active. Otherwise returns the strenght of the potion
|
||||
*/
|
||||
int getPotionEffect(int effect);
|
||||
|
||||
/**
|
||||
* Note not all Living Entities support this
|
||||
* @since 1.7.10c
|
||||
* @return The item the entity is holding
|
||||
*/
|
||||
IItemStack getHeldItem();
|
||||
|
||||
/**
|
||||
* Note not all Living Entities support this
|
||||
* @since 1.7.10c
|
||||
* @param item The item to be set
|
||||
*/
|
||||
void setHeldItem(IItemStack item);
|
||||
|
||||
/**
|
||||
* Note not all Living Entities support this
|
||||
* @param slot Slot of what armor piece to get, 0:boots, 1:pants, 2:body, 3:head
|
||||
* @return The item in the given slot
|
||||
*/
|
||||
IItemStack getArmor(int slot);
|
||||
|
||||
/**
|
||||
* Note not all Living Entities support this
|
||||
* @since 1.7.10c
|
||||
* @param slot Slot of what armor piece to set, 0:boots, 1:pants, 2:body, 3:head
|
||||
* @param item Item to be set
|
||||
*/
|
||||
void setArmor(int slot, IItemStack item);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.interfaces.entity;
|
||||
|
||||
import net.minecraft.entity.monster.EntityMob;
|
||||
|
||||
public interface IMonster<T extends EntityMob> extends IEntityLiving<T> {
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.interfaces.entity;
|
||||
|
||||
import net.minecraft.entity.passive.EntityTameable;
|
||||
|
||||
public interface IPixelmon<T extends EntityTameable> extends IAnimal<T> {
|
||||
boolean getIsShiny();
|
||||
|
||||
void setIsShiny(boolean bo);
|
||||
|
||||
int getLevel();
|
||||
|
||||
void setLevel(int level);
|
||||
|
||||
/**
|
||||
* @param type 0:HP, 1:Attack, 2:Defense, 3:SpAttack, 4:SpDefense, 5:Speed
|
||||
*/
|
||||
int getIV(int type);
|
||||
|
||||
|
||||
/**
|
||||
* @param type 0:HP, 1:Attack, 2:Defense, 3:SpAttack, 4:SpDefense, 5:Speed
|
||||
*/
|
||||
void setIV(int type, int value);
|
||||
|
||||
/**
|
||||
* @param type 0:HP, 1:Attack, 2:Defense, 3:SpAttack, 4:SpDefense, 5:Speed
|
||||
*/
|
||||
int getEV(int type);
|
||||
|
||||
|
||||
/**
|
||||
* @param type 0:HP, 1:Attack, 2:Defense, 3:SpAttack, 4:SpDefense, 5:Speed
|
||||
*/
|
||||
void setEV(int type, int value);
|
||||
|
||||
/**
|
||||
* @param type 0:HP, 1:Attack, 2:Defense, 3:SpAttack, 4:SpDefense, 5:Speed
|
||||
*/
|
||||
int getStat(int type);
|
||||
|
||||
|
||||
/**
|
||||
* @param type 0:HP, 1:Attack, 2:Defense, 3:SpAttack, 4:SpDefense, 5:Speed
|
||||
*/
|
||||
void setStat(int type, int value);
|
||||
|
||||
/**
|
||||
* @return type 0:Pygmy, 1:Runt, 2:Small, 3:Normal, 4:Huge, 5:Giant, 6:Enormous, 7:Ginormous, 8:Microscopic
|
||||
*/
|
||||
int getSize();
|
||||
|
||||
/**
|
||||
* @param type 0:Pygmy, 1:Runt, 2:Small, 3:Normal, 4:Huge, 5:Giant, 6:Enormous, 7:Ginormous, 8:Microscopic
|
||||
*/
|
||||
void setSize(int type);
|
||||
|
||||
/**
|
||||
* @return 0-255
|
||||
*/
|
||||
int getHapiness();
|
||||
|
||||
/**
|
||||
* @param value 0-255
|
||||
*/
|
||||
void setHapiness(int value);
|
||||
|
||||
/**
|
||||
* @return 0:Hardy, 1:Serious, 2:Docile, 3:Bashful, 4:Quirky, 5:Lonely, 6:Brave, 7:Adamant, 8:Naughty, 9:Bold, 10:Relaxed, 11:Impish, 12:Lax, 13:Timid, 14:Hasty, 15:Jolly, 16:Naive, 17:Modest, 18:Mild, 19:Quiet, 20:Rash, 21:Calm, 22:Gentle, 23:Sassy, 24:Careful
|
||||
*/
|
||||
int getNature();
|
||||
|
||||
/**
|
||||
* @param type 0:Hardy, 1:Serious, 2:Docile, 3:Bashful, 4:Quirky, 5:Lonely, 6:Brave, 7:Adamant, 8:Naughty, 9:Bold, 10:Relaxed, 11:Impish, 12:Lax, 13:Timid, 14:Hasty, 15:Jolly, 16:Naive, 17:Modest, 18:Mild, 19:Quiet, 20:Rash, 21:Calm, 22:Gentle, 23:Sassy, 24:Careful
|
||||
*/
|
||||
void setNature(int type);
|
||||
|
||||
/**
|
||||
* @return -1:Uncaught, 0:Pokeball, 1:GreatBall, 2:UltraBall, 3:MasterBall, 4:LevelBall, 5:MoonBall, 6:FriendBall, 7:LoveBall, 8:SafariBall, 9:HeavyBall, 10:FastBall, 11:RepeatBall, 12:TimerBall, 13:NestBall, 14:NetBall, 15:DiveBall, 16:LuxuryBall, 17:HealBall, 18:DuskBall, 19:PremierBall, 20:SportBall, 21:QuickBall, 22:ParkBall, 23:LureBall, 24:CherishBall, 25:GSBall
|
||||
*/
|
||||
int getPokeball();
|
||||
|
||||
/**
|
||||
* @param type -1:Uncaught, 0:Pokeball, 1:GreatBall, 2:UltraBall, 3:MasterBall, 4:LevelBall, 5:MoonBall, 6:FriendBall, 7:LoveBall, 8:SafariBall, 9:HeavyBall, 10:FastBall, 11:RepeatBall, 12:TimerBall, 13:NestBall, 14:NetBall, 15:DiveBall, 16:LuxuryBall, 17:HealBall, 18:DuskBall, 19:PremierBall, 20:SportBall, 21:QuickBall, 22:ParkBall, 23:LureBall, 24:CherishBall, 25:GSBall
|
||||
*/
|
||||
void setPokeball(int type);
|
||||
|
||||
String getNickname();
|
||||
|
||||
boolean hasNickname();
|
||||
|
||||
void setNickname(String name);
|
||||
|
||||
String getMove(int slot);
|
||||
|
||||
void setMove(int slot, String move);
|
||||
}
|
||||
@@ -0,0 +1,251 @@
|
||||
package noppes.npcs.scripted.interfaces.entity;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.Vec3;
|
||||
import noppes.npcs.scripted.ScriptItemStack;
|
||||
import noppes.npcs.scripted.ScriptBlock;
|
||||
import noppes.npcs.scripted.entity.ScriptDBCPlayer;
|
||||
import noppes.npcs.scripted.interfaces.handler.IOverlayHandler;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuest;
|
||||
import noppes.npcs.scripted.interfaces.*;
|
||||
import noppes.npcs.scripted.interfaces.gui.ICustomGui;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.scripted.interfaces.overlay.ICustomOverlay;
|
||||
import noppes.npcs.scripted.ScriptPixelmonPlayerData;
|
||||
|
||||
public interface IPlayer<T extends EntityPlayerMP> extends IEntityLivingBase<T> {
|
||||
/**
|
||||
* @return Returns the displayed name of the player
|
||||
*/
|
||||
String getDisplayName();
|
||||
|
||||
/**
|
||||
* @return Returns the players name
|
||||
*/
|
||||
String getName();
|
||||
|
||||
void setPosition(double x, double y, double z);
|
||||
|
||||
void setPosition(double x, double y, double z, int dimensionId);
|
||||
|
||||
int getHunger();
|
||||
|
||||
void setHunger(int hunger);
|
||||
|
||||
float getSaturation();
|
||||
|
||||
void setSaturation(float saturation);
|
||||
|
||||
public boolean hasReadDialog(int id);
|
||||
|
||||
public void readDialog(int id);
|
||||
|
||||
public void unreadDialog(int id);
|
||||
|
||||
boolean hasFinishedQuest(int id);
|
||||
|
||||
boolean hasActiveQuest(int id);
|
||||
|
||||
/**
|
||||
* Add the quest from active quest list
|
||||
* @param id The Quest ID
|
||||
*/
|
||||
void startQuest(int id);
|
||||
|
||||
/**
|
||||
* Add the quest from finished quest list
|
||||
* @param id The Quest ID
|
||||
*/
|
||||
void finishQuest(int id);
|
||||
/**
|
||||
* Removes the quest from active quest list
|
||||
* @param id The Quest ID
|
||||
*/
|
||||
void stopQuest(int id);
|
||||
|
||||
/**
|
||||
* Removes the quest from active and finished quest list
|
||||
* @param id The Quest ID
|
||||
*/
|
||||
void removeQuest(int id);
|
||||
|
||||
IQuest[] getFinishedQuests();
|
||||
|
||||
int getType();
|
||||
|
||||
boolean typeOf(int type);
|
||||
/**
|
||||
* @param faction The faction id
|
||||
* @param points The points to increase. Use negative values to decrease
|
||||
*/
|
||||
void addFactionPoints(int faction, int points);
|
||||
|
||||
/**
|
||||
* @param faction The faction id
|
||||
* @param points The new point value for this faction
|
||||
*/
|
||||
void setFactionPoints(int faction, int points);
|
||||
|
||||
/**
|
||||
* @param faction The faction id
|
||||
* @return points
|
||||
*/
|
||||
int getFactionPoints(int faction);
|
||||
|
||||
/**
|
||||
* @param message The message you want to send
|
||||
*/
|
||||
void sendMessage(String message);
|
||||
|
||||
public void sendMessage(String message);
|
||||
|
||||
public void sendMessage(String message, EnumChatFormatting color, boolean bold, boolean italic, boolean underlined);
|
||||
|
||||
public void sendMessage(String message, EnumChatFormatting color, boolean bold, boolean italic, boolean obfuscated, boolean strikethrough, boolean underlined);
|
||||
|
||||
/**
|
||||
* @return Return gamemode. 0: Survival, 1: Creative, 2: Adventure
|
||||
*/
|
||||
int getMode();
|
||||
|
||||
/**
|
||||
* @param type The gamemode type. 0:SURVIVAL, 1:CREATIVE, 2:ADVENTURE
|
||||
*/
|
||||
void setMode(int type);
|
||||
|
||||
/**
|
||||
* @param item The item to be checked
|
||||
* @return How many of this item the player has
|
||||
*/
|
||||
int inventoryItemCount(IItemStack item);
|
||||
|
||||
/**
|
||||
* @since 1.7.10d
|
||||
* @return Returns a IItemStack array size 36
|
||||
*/
|
||||
IItemStack[] getInventory();
|
||||
|
||||
/**
|
||||
* @param item The Item type to be removed
|
||||
* @param amount How many will be removed
|
||||
* @return Returns true if the items were removed succesfully. Returns false incase a bigger amount than what the player has was given
|
||||
*/
|
||||
boolean removeItem(IItemStack item, int amount);
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @param id The items name
|
||||
* @param damage The damage value
|
||||
* @param amount How many will be removed
|
||||
* @return 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
|
||||
*/
|
||||
boolean removeItem(String id, int damage, int amount);
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @param item Item to be added
|
||||
* @param amount The amount of the item to be added
|
||||
* @return Returns whether or not it gave the item succesfully
|
||||
*/
|
||||
boolean giveItem(IItemStack item, int amount);
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @param id The items name
|
||||
* @param damage The damage value
|
||||
* @param amount The amount of the item to be added
|
||||
* @return Returns whether or not it gave the item succesfully
|
||||
*/
|
||||
boolean giveItem(String id, int damage, int amount);
|
||||
|
||||
/**
|
||||
* Same as the /spawnpoint command
|
||||
* @param x The x position
|
||||
* @param y The y position
|
||||
* @param z The z position
|
||||
*/
|
||||
void setSpawnpoint(int x, int y, int z);
|
||||
|
||||
void resetSpawnpoint();
|
||||
|
||||
/**
|
||||
* @param item The item to be removed from the players inventory
|
||||
*/
|
||||
void removeAllItems(IItemStack item);
|
||||
|
||||
void setRotation(float rotationYaw, float rotationPitch);
|
||||
|
||||
void stopUsingItem();
|
||||
|
||||
void clearItemInUse();
|
||||
|
||||
public void clearInventory();
|
||||
|
||||
void playSound(String name, float volume, float pitch);
|
||||
|
||||
void mountEntity(Entity ridingEntity);
|
||||
|
||||
IEntity dropOneItem(boolean dropStack);
|
||||
|
||||
boolean canHarvestBlock(IBlock block);
|
||||
|
||||
boolean interactWith(IEntity entity);
|
||||
|
||||
/**
|
||||
* @param achievement The achievement id. For a complete list see http://minecraft.gamepedia.com/Achievements
|
||||
* @return Returns whether or not the player has this achievement
|
||||
*/
|
||||
boolean hasAchievement(String achievement);
|
||||
|
||||
/**
|
||||
* @param permission Bukkit/Cauldron permission
|
||||
* @return Returns whether or not the player has the permission
|
||||
*/
|
||||
boolean hasBukkitPermission(String permission);
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @return Returns the exp level
|
||||
*/
|
||||
int getExpLevel();
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @param level The new exp level you want to set
|
||||
*/
|
||||
void setExpLevel(int level);
|
||||
|
||||
/**
|
||||
* Requires pixelmon to be installed
|
||||
* @since 1.7.10d
|
||||
*/
|
||||
ScriptPixelmonPlayerData getPixelmonData();
|
||||
|
||||
IBlock getLookingAtBlock(int maxDistance);
|
||||
|
||||
ITimers getTimers();
|
||||
|
||||
void updatePlayerInventory();
|
||||
|
||||
ScriptDBCPlayer<T> getDBCPlayer();
|
||||
|
||||
boolean blocking();
|
||||
|
||||
IQuest[] getActiveQuests();
|
||||
|
||||
IContainer getOpenContainer();
|
||||
|
||||
void showCustomGui(ICustomGui gui);
|
||||
|
||||
ICustomGui getCustomGui();
|
||||
|
||||
void closeGui();
|
||||
|
||||
void showCustomOverlay(ICustomOverlay overlay);
|
||||
|
||||
void closeOverlay(int id);
|
||||
|
||||
IOverlayHandler getOverlays();
|
||||
}
|
||||
Reference in new issue
Block a user