mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-26 13:53:07 +00:00
Proper Reformating
This commit is contained in:
1 parent
ce75880aba
commit
180d257024
1179 files changed
+59847
-61583
No files matched your search
@@ -68,7 +68,7 @@ public abstract class AnimationEvent extends CustomNPCsEvent implements IAnimati
|
||||
public FrameEvent(IAnimation animation, IFrame frame) {
|
||||
super(animation);
|
||||
this.frame = frame;
|
||||
this.index = ((Animation)this.getAnimation()).frames.indexOf((Frame) this.frame);
|
||||
this.index = ((Animation) this.getAnimation()).frames.indexOf((Frame) this.frame);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,7 +13,8 @@ import noppes.npcs.scripted.NpcAPI;
|
||||
|
||||
public class BlockEvent extends CustomNPCsEvent implements IBlockEvent {
|
||||
public IBlock block;
|
||||
public BlockEvent(IBlock block){
|
||||
|
||||
public BlockEvent(IBlock block) {
|
||||
this.block = block;
|
||||
}
|
||||
|
||||
@@ -26,10 +27,11 @@ public class BlockEvent extends CustomNPCsEvent implements IBlockEvent {
|
||||
* fallenUpon
|
||||
*/
|
||||
@Cancelable
|
||||
public static class EntityFallenUponEvent extends BlockEvent implements IBlockEvent.EntityFallenUponEvent{
|
||||
public static class EntityFallenUponEvent extends BlockEvent implements IBlockEvent.EntityFallenUponEvent {
|
||||
public final IEntity entity;
|
||||
public float distanceFallen;
|
||||
public EntityFallenUponEvent(IBlock block, Entity entity, float distance){
|
||||
|
||||
public EntityFallenUponEvent(IBlock block, Entity entity, float distance) {
|
||||
super(block);
|
||||
this.distanceFallen = distance;
|
||||
this.entity = NpcAPI.Instance().getIEntity(entity);
|
||||
@@ -55,7 +57,7 @@ public class BlockEvent extends CustomNPCsEvent implements IBlockEvent {
|
||||
* interact
|
||||
*/
|
||||
@Cancelable
|
||||
public static class InteractEvent extends BlockEvent implements IBlockEvent.InteractEvent{
|
||||
public static class InteractEvent extends BlockEvent implements IBlockEvent.InteractEvent {
|
||||
public final IPlayer player;
|
||||
|
||||
public final float hitX, hitY, hitZ;
|
||||
@@ -106,8 +108,9 @@ public class BlockEvent extends CustomNPCsEvent implements IBlockEvent {
|
||||
/**
|
||||
* redstone
|
||||
*/
|
||||
public static class RedstoneEvent extends BlockEvent implements IBlockEvent.RedstoneEvent{
|
||||
public static class RedstoneEvent extends BlockEvent implements IBlockEvent.RedstoneEvent {
|
||||
public final int prevPower, power;
|
||||
|
||||
public RedstoneEvent(IBlock block, int prevPower, int power) {
|
||||
super(block);
|
||||
this.power = power;
|
||||
@@ -134,7 +137,7 @@ public class BlockEvent extends CustomNPCsEvent implements IBlockEvent {
|
||||
/**
|
||||
* broken
|
||||
*/
|
||||
public static class BreakEvent extends BlockEvent implements IBlockEvent.BreakEvent{
|
||||
public static class BreakEvent extends BlockEvent implements IBlockEvent.BreakEvent {
|
||||
public BreakEvent(IBlock block) {
|
||||
super(block);
|
||||
}
|
||||
@@ -149,7 +152,7 @@ public class BlockEvent extends CustomNPCsEvent implements IBlockEvent {
|
||||
* exploded
|
||||
*/
|
||||
@Cancelable
|
||||
public static class ExplodedEvent extends BlockEvent implements IBlockEvent.ExplodedEvent{
|
||||
public static class ExplodedEvent extends BlockEvent implements IBlockEvent.ExplodedEvent {
|
||||
public ExplodedEvent(IBlock block) {
|
||||
super(block);
|
||||
}
|
||||
@@ -163,7 +166,7 @@ public class BlockEvent extends CustomNPCsEvent implements IBlockEvent {
|
||||
/**
|
||||
* rainFilled
|
||||
*/
|
||||
public static class RainFillEvent extends BlockEvent implements IBlockEvent.RainFillEvent{
|
||||
public static class RainFillEvent extends BlockEvent implements IBlockEvent.RainFillEvent {
|
||||
public RainFillEvent(IBlock block) {
|
||||
super(block);
|
||||
}
|
||||
@@ -177,8 +180,9 @@ public class BlockEvent extends CustomNPCsEvent implements IBlockEvent {
|
||||
/**
|
||||
* neighborChanged
|
||||
*/
|
||||
public static class NeighborChangedEvent extends BlockEvent implements IBlockEvent.NeighborChangedEvent{
|
||||
public static class NeighborChangedEvent extends BlockEvent implements IBlockEvent.NeighborChangedEvent {
|
||||
public final IPos changedPos;
|
||||
|
||||
public NeighborChangedEvent(IBlock block, IPos changedPos) {
|
||||
super(block);
|
||||
this.changedPos = changedPos;
|
||||
@@ -198,7 +202,7 @@ public class BlockEvent extends CustomNPCsEvent implements IBlockEvent {
|
||||
/**
|
||||
* init
|
||||
*/
|
||||
public static class InitEvent extends BlockEvent implements IBlockEvent.InitEvent{
|
||||
public static class InitEvent extends BlockEvent implements IBlockEvent.InitEvent {
|
||||
public InitEvent(IBlock block) {
|
||||
super(block);
|
||||
}
|
||||
@@ -212,7 +216,7 @@ public class BlockEvent extends CustomNPCsEvent implements IBlockEvent {
|
||||
/**
|
||||
* tick
|
||||
*/
|
||||
public static class UpdateEvent extends BlockEvent implements IBlockEvent.UpdateEvent{
|
||||
public static class UpdateEvent extends BlockEvent implements IBlockEvent.UpdateEvent {
|
||||
public UpdateEvent(IBlock block) {
|
||||
super(block);
|
||||
}
|
||||
@@ -226,8 +230,9 @@ public class BlockEvent extends CustomNPCsEvent implements IBlockEvent {
|
||||
/**
|
||||
* clicked
|
||||
*/
|
||||
public static class ClickedEvent extends BlockEvent implements IBlockEvent.ClickedEvent{
|
||||
public static class ClickedEvent extends BlockEvent implements IBlockEvent.ClickedEvent {
|
||||
public final IPlayer player;
|
||||
|
||||
public ClickedEvent(IBlock block, EntityPlayer player) {
|
||||
super(block);
|
||||
this.player = (IPlayer) NpcAPI.Instance().getIEntity(player);
|
||||
@@ -248,8 +253,9 @@ public class BlockEvent extends CustomNPCsEvent implements IBlockEvent {
|
||||
* harvested
|
||||
*/
|
||||
@Cancelable
|
||||
public static class HarvestedEvent extends BlockEvent implements IBlockEvent.HarvestedEvent{
|
||||
public static class HarvestedEvent extends BlockEvent implements IBlockEvent.HarvestedEvent {
|
||||
public final IPlayer player;
|
||||
|
||||
public HarvestedEvent(IBlock block, EntityPlayer player) {
|
||||
super(block);
|
||||
this.player = (IPlayer) NpcAPI.Instance().getIEntity(player);
|
||||
@@ -269,8 +275,9 @@ public class BlockEvent extends CustomNPCsEvent implements IBlockEvent {
|
||||
/**
|
||||
* collide
|
||||
*/
|
||||
public static class CollidedEvent extends BlockEvent implements IBlockEvent.CollidedEvent{
|
||||
public static class CollidedEvent extends BlockEvent implements IBlockEvent.CollidedEvent {
|
||||
public final IEntity entity;
|
||||
|
||||
public CollidedEvent(IBlock block, Entity entity) {
|
||||
super(block);
|
||||
this.entity = NpcAPI.Instance().getIEntity(entity);
|
||||
@@ -290,7 +297,7 @@ public class BlockEvent extends CustomNPCsEvent implements IBlockEvent {
|
||||
/**
|
||||
* timer
|
||||
*/
|
||||
public static class TimerEvent extends BlockEvent implements IBlockEvent.TimerEvent{
|
||||
public static class TimerEvent extends BlockEvent implements IBlockEvent.TimerEvent {
|
||||
public final int id;
|
||||
|
||||
public TimerEvent(IBlock block, int id) {
|
||||
|
||||
@@ -151,7 +151,7 @@ public class CustomGuiEvent extends CustomNPCsEvent implements ICustomGuiEvent {
|
||||
public final int clickType;
|
||||
|
||||
public SlotClickEvent(IPlayer player, ICustomGui gui, int slotId, IItemSlot slot, IItemStack stack, int dragType, int clickType) {
|
||||
super(player,gui);
|
||||
super(player, gui);
|
||||
this.slotId = slotId;
|
||||
this.stack = stack;
|
||||
this.dragType = dragType;
|
||||
|
||||
@@ -22,11 +22,13 @@ public class CustomNPCsEvent extends Event implements ICustomNPCsEvent {
|
||||
public CustomNPCsEvent() {
|
||||
}
|
||||
|
||||
public void setCancelled(boolean bo){
|
||||
public void setCancelled(boolean bo) {
|
||||
this.setCanceled(bo);
|
||||
}
|
||||
|
||||
public boolean isCancelled(){return this.isCanceled();}
|
||||
public boolean isCancelled() {
|
||||
return this.isCanceled();
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class CNPCNaturalSpawnEvent extends CustomNPCsEvent implements ICustomNPCsEvent.CNPCNaturalSpawnEvent {
|
||||
@@ -95,7 +97,7 @@ public class CustomNPCsEvent extends Event implements ICustomNPCsEvent {
|
||||
public String[] args;
|
||||
public String replyMessage = "";
|
||||
|
||||
public ScriptedCommandEvent(IWorld world, IPos pos, String senderName, String id, String[] args){
|
||||
public ScriptedCommandEvent(IWorld world, IPos pos, String senderName, String id, String[] args) {
|
||||
this.world = world;
|
||||
this.pos = pos;
|
||||
this.senderName = senderName;
|
||||
|
||||
@@ -10,7 +10,7 @@ public class DialogEvent extends CustomNPCsEvent implements IDialogEvent {
|
||||
public final IDialog dialog;
|
||||
public final IPlayer player;
|
||||
|
||||
public DialogEvent(IPlayer player, IDialog dialog){
|
||||
public DialogEvent(IPlayer player, IDialog dialog) {
|
||||
this.dialog = dialog;
|
||||
this.player = player;
|
||||
}
|
||||
@@ -51,7 +51,7 @@ public class DialogEvent extends CustomNPCsEvent implements IDialogEvent {
|
||||
}
|
||||
|
||||
public static class DialogClosed extends DialogEvent implements IDialogEvent.DialogClosed {
|
||||
public DialogClosed(IPlayer player, IDialog dialog){
|
||||
public DialogClosed(IPlayer player, IDialog dialog) {
|
||||
super(player, dialog);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ public class FactionEvent extends CustomNPCsEvent implements IFactionEvent {
|
||||
public final IFaction faction;
|
||||
public final IPlayer player;
|
||||
|
||||
public FactionEvent(IPlayer player, IFaction faction){
|
||||
public FactionEvent(IPlayer player, IFaction faction) {
|
||||
this.faction = faction;
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ForgeEvent extends CustomNPCsEvent implements IForgeEvent {
|
||||
|
||||
public static class InitEvent extends ForgeEvent implements IForgeEvent.InitEvent {
|
||||
public InitEvent() {
|
||||
super((Event)null);
|
||||
super((Event) null);
|
||||
}
|
||||
|
||||
public String getHookName() {
|
||||
|
||||
@@ -95,7 +95,7 @@ public class ItemEvent extends CustomNPCsEvent implements IItemEvent {
|
||||
public static class SpawnEvent extends ItemEvent implements IItemEvent.SpawnEvent {
|
||||
public final IEntity entity;
|
||||
|
||||
public SpawnEvent(IItemCustomizable item, IEntity entity){
|
||||
public SpawnEvent(IItemCustomizable item, IEntity entity) {
|
||||
super(item);
|
||||
this.entity = entity;
|
||||
}
|
||||
@@ -208,7 +208,7 @@ public class ItemEvent extends CustomNPCsEvent implements IItemEvent {
|
||||
public final IPlayer player;
|
||||
public final int duration;
|
||||
|
||||
public StartUsingItem(IItemCustomizable item, IPlayer player, int duration){
|
||||
public StartUsingItem(IItemCustomizable item, IPlayer player, int duration) {
|
||||
super(item);
|
||||
this.player = player;
|
||||
this.duration = duration;
|
||||
@@ -232,7 +232,7 @@ public class ItemEvent extends CustomNPCsEvent implements IItemEvent {
|
||||
public final IPlayer player;
|
||||
public final int duration;
|
||||
|
||||
public UsingItem(IItemCustomizable item, IPlayer player, int duration){
|
||||
public UsingItem(IItemCustomizable item, IPlayer player, int duration) {
|
||||
super(item);
|
||||
this.player = player;
|
||||
this.duration = duration;
|
||||
@@ -256,7 +256,7 @@ public class ItemEvent extends CustomNPCsEvent implements IItemEvent {
|
||||
public final IPlayer player;
|
||||
public final int duration;
|
||||
|
||||
public StopUsingItem(IItemCustomizable item, IPlayer player, int duration){
|
||||
public StopUsingItem(IItemCustomizable item, IPlayer player, int duration) {
|
||||
super(item);
|
||||
this.player = player;
|
||||
this.duration = duration;
|
||||
@@ -280,7 +280,7 @@ public class ItemEvent extends CustomNPCsEvent implements IItemEvent {
|
||||
public final IPlayer player;
|
||||
public final int duration;
|
||||
|
||||
public FinishUsingItem(IItemCustomizable item, IPlayer player, int duration){
|
||||
public FinishUsingItem(IItemCustomizable item, IPlayer player, int duration) {
|
||||
super(item);
|
||||
this.player = player;
|
||||
this.duration = duration;
|
||||
|
||||
@@ -43,7 +43,7 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
return EnumScriptType.TIMER.function;
|
||||
}
|
||||
|
||||
public int getId(){
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
@@ -92,38 +92,38 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
/**
|
||||
* @return The source of the damage
|
||||
*/
|
||||
public IEntity getSource(){
|
||||
public IEntity getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public IDamageSource getDamageSource(){
|
||||
public IDamageSource getDamageSource() {
|
||||
return damageSource;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the damage value
|
||||
*/
|
||||
public float getDamage(){
|
||||
public float getDamage() {
|
||||
return damage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param damage The new damage value
|
||||
*/
|
||||
public void setDamage(float damage){
|
||||
public void setDamage(float damage) {
|
||||
this.damage = damage;
|
||||
}
|
||||
|
||||
public void setClearTarget(boolean bo){
|
||||
public void setClearTarget(boolean bo) {
|
||||
this.clearTarget = bo;
|
||||
this.clear = bo;
|
||||
}
|
||||
|
||||
public boolean getClearTarget(){
|
||||
public boolean getClearTarget() {
|
||||
return clearTarget && clear;
|
||||
}
|
||||
|
||||
public String getType(){
|
||||
public String getType() {
|
||||
return damageSource.getMCDamageSource().damageType;
|
||||
}
|
||||
}
|
||||
@@ -135,7 +135,7 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
|
||||
public RangedLaunchedEvent(ICustomNpc npc, float damage, EntityLivingBase target) {
|
||||
super(npc);
|
||||
this.target = (IEntityLivingBase)NpcAPI.Instance().getIEntity(target);
|
||||
this.target = (IEntityLivingBase) NpcAPI.Instance().getIEntity(target);
|
||||
this.damage = damage;
|
||||
}
|
||||
|
||||
@@ -147,14 +147,14 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
* @return The source of the damage
|
||||
* @deprecated
|
||||
*/
|
||||
public IEntityLivingBase getTarget(){
|
||||
public IEntityLivingBase getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param damage The new damage value
|
||||
*/
|
||||
public void setDamage(float damage){
|
||||
public void setDamage(float damage) {
|
||||
this.damage = damage;
|
||||
}
|
||||
|
||||
@@ -162,14 +162,14 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
/**
|
||||
* @return Returns the damage value
|
||||
*/
|
||||
public float getDamage(){
|
||||
public float getDamage() {
|
||||
return damage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the damage type
|
||||
*/
|
||||
public boolean isRange(){
|
||||
public boolean isRange() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -181,7 +181,7 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
|
||||
public MeleeAttackEvent(ICustomNpc npc, float damage, EntityLivingBase target) {
|
||||
super(npc);
|
||||
this.target = (IEntityLivingBase)NpcAPI.Instance().getIEntity(target);
|
||||
this.target = (IEntityLivingBase) NpcAPI.Instance().getIEntity(target);
|
||||
this.damage = damage;
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
* @return The source of the damage
|
||||
* @deprecated
|
||||
*/
|
||||
public IEntityLivingBase getTarget(){
|
||||
public IEntityLivingBase getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
@@ -201,21 +201,21 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
/**
|
||||
* @return Returns the damage value
|
||||
*/
|
||||
public float getDamage(){
|
||||
public float getDamage() {
|
||||
return damage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param damage The new damage value
|
||||
*/
|
||||
public void setDamage(float damage){
|
||||
public void setDamage(float damage) {
|
||||
this.damage = damage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the damage type
|
||||
*/
|
||||
public boolean isRange(){
|
||||
public boolean isRange() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -226,7 +226,7 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
|
||||
public SwingEvent(ICustomNpc npc, ItemStack itemStack) {
|
||||
super(npc);
|
||||
this.itemStack = itemStack == null ? null : (IItemStack)NpcAPI.Instance().getIItemStack(itemStack);
|
||||
this.itemStack = itemStack == null ? null : (IItemStack) NpcAPI.Instance().getIItemStack(itemStack);
|
||||
}
|
||||
|
||||
public String getHookName() {
|
||||
@@ -246,7 +246,7 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
|
||||
public KilledEntityEvent(ICustomNpc npc, EntityLivingBase entity) {
|
||||
super(npc);
|
||||
this.entity = (IEntityLivingBase)NpcAPI.Instance().getIEntity(entity);
|
||||
this.entity = (IEntityLivingBase) NpcAPI.Instance().getIEntity(entity);
|
||||
}
|
||||
|
||||
public String getHookName() {
|
||||
@@ -288,16 +288,18 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
/**
|
||||
* @return The source of the damage
|
||||
*/
|
||||
public IEntity getSource(){
|
||||
public IEntity getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public IDamageSource getDamageSource() { return damageSource; }
|
||||
public IDamageSource getDamageSource() {
|
||||
return damageSource;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the damage type
|
||||
*/
|
||||
public String getType(){
|
||||
public String getType() {
|
||||
return damageSource.getMCDamageSource().damageType;
|
||||
}
|
||||
|
||||
@@ -324,7 +326,7 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
|
||||
public InteractEvent(ICustomNpc npc, EntityPlayer player) {
|
||||
super(npc);
|
||||
this.player = (IPlayer)NpcAPI.Instance().getIEntity(player);
|
||||
this.player = (IPlayer) NpcAPI.Instance().getIEntity(player);
|
||||
}
|
||||
|
||||
public String getHookName() {
|
||||
@@ -345,7 +347,7 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
|
||||
public DialogEvent(ICustomNpc npc, EntityPlayer player, int id, int optionId, Dialog dialog) {
|
||||
super(npc);
|
||||
this.player = (IPlayer)NpcAPI.Instance().getIEntity(player);
|
||||
this.player = (IPlayer) NpcAPI.Instance().getIEntity(player);
|
||||
this.id = id;
|
||||
this.optionId = optionId;
|
||||
this.dialogObj = dialog;
|
||||
@@ -374,7 +376,7 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public boolean isClosing(){
|
||||
public boolean isClosing() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -387,7 +389,7 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
|
||||
public DialogClosedEvent(ICustomNpc npc, EntityPlayer player, int id, int optionId, Dialog dialog) {
|
||||
super(npc);
|
||||
this.player = (IPlayer)NpcAPI.Instance().getIEntity(player);
|
||||
this.player = (IPlayer) NpcAPI.Instance().getIEntity(player);
|
||||
this.id = id;
|
||||
this.optionId = optionId;
|
||||
this.dialogObj = dialog;
|
||||
@@ -416,7 +418,7 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public boolean isClosing(){
|
||||
public boolean isClosing() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -458,14 +460,14 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
return EnumScriptType.TARGET.function;
|
||||
}
|
||||
|
||||
public void setTarget(IEntityLivingBase entity){
|
||||
public void setTarget(IEntityLivingBase entity) {
|
||||
this.entity = entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The target source
|
||||
*/
|
||||
public IEntityLivingBase getTarget(){
|
||||
public IEntityLivingBase getTarget() {
|
||||
return entity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ public class PlayerEvent extends CustomNPCsEvent implements IPlayerEvent {
|
||||
public final int mouseWheel;
|
||||
public final boolean buttonDown;
|
||||
|
||||
public MouseClickedEvent(IPlayer player, int button, int mouseWheel, boolean buttonDown, boolean isCtrlPressed, boolean isAltPressed, boolean isShiftPressed, boolean isMetaPressed, int[] heldKeys){
|
||||
public MouseClickedEvent(IPlayer player, int button, int mouseWheel, boolean buttonDown, boolean isCtrlPressed, boolean isAltPressed, boolean isShiftPressed, boolean isMetaPressed, int[] heldKeys) {
|
||||
super(player);
|
||||
this.button = button;
|
||||
this.mouseWheel = mouseWheel;
|
||||
@@ -234,7 +234,7 @@ public class PlayerEvent extends CustomNPCsEvent implements IPlayerEvent {
|
||||
public final int fromDim;
|
||||
public final int toDim;
|
||||
|
||||
public ChangedDimension(IPlayer player, int fromDim, int toDim){
|
||||
public ChangedDimension(IPlayer player, int fromDim, int toDim) {
|
||||
super(player);
|
||||
this.fromDim = fromDim;
|
||||
this.toDim = toDim;
|
||||
@@ -376,7 +376,7 @@ public class PlayerEvent extends CustomNPCsEvent implements IPlayerEvent {
|
||||
public static class FallEvent extends PlayerEvent implements IPlayerEvent.FallEvent {
|
||||
public final float distance;
|
||||
|
||||
public FallEvent(IPlayer player, float distance){
|
||||
public FallEvent(IPlayer player, float distance) {
|
||||
super(player);
|
||||
this.distance = distance;
|
||||
}
|
||||
@@ -391,7 +391,7 @@ public class PlayerEvent extends CustomNPCsEvent implements IPlayerEvent {
|
||||
}
|
||||
|
||||
public static class JumpEvent extends PlayerEvent implements IPlayerEvent.JumpEvent {
|
||||
public JumpEvent(IPlayer player){
|
||||
public JumpEvent(IPlayer player) {
|
||||
super(player);
|
||||
}
|
||||
|
||||
@@ -667,7 +667,7 @@ public class PlayerEvent extends CustomNPCsEvent implements IPlayerEvent {
|
||||
public final IItemStack item;
|
||||
public final int duration;
|
||||
|
||||
public StartUsingItem(IPlayer player, ItemStack item, int duration){
|
||||
public StartUsingItem(IPlayer player, ItemStack item, int duration) {
|
||||
super(player);
|
||||
|
||||
this.item = NpcAPI.Instance().getIItemStack(item);
|
||||
@@ -692,7 +692,7 @@ public class PlayerEvent extends CustomNPCsEvent implements IPlayerEvent {
|
||||
public final IItemStack item;
|
||||
public final int duration;
|
||||
|
||||
public UsingItem(IPlayer player, ItemStack item, int duration){
|
||||
public UsingItem(IPlayer player, ItemStack item, int duration) {
|
||||
super(player);
|
||||
|
||||
this.item = NpcAPI.Instance().getIItemStack(item);
|
||||
@@ -717,7 +717,7 @@ public class PlayerEvent extends CustomNPCsEvent implements IPlayerEvent {
|
||||
public final IItemStack item;
|
||||
public final int duration;
|
||||
|
||||
public StopUsingItem(IPlayer player, ItemStack item, int duration){
|
||||
public StopUsingItem(IPlayer player, ItemStack item, int duration) {
|
||||
super(player);
|
||||
|
||||
this.item = NpcAPI.Instance().getIItemStack(item);
|
||||
@@ -741,7 +741,7 @@ public class PlayerEvent extends CustomNPCsEvent implements IPlayerEvent {
|
||||
public final IItemStack item;
|
||||
public final int duration;
|
||||
|
||||
public FinishUsingItem(IPlayer player, ItemStack item, int duration){
|
||||
public FinishUsingItem(IPlayer player, ItemStack item, int duration) {
|
||||
super(player);
|
||||
|
||||
this.item = NpcAPI.Instance().getIItemStack(item);
|
||||
@@ -973,6 +973,7 @@ public class PlayerEvent extends CustomNPCsEvent implements IPlayerEvent {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class Ticked extends PlayerEvent.EffectEvent implements IPlayerEvent.EffectEvent.Ticked {
|
||||
|
||||
public Ticked(IPlayer player, IPlayerEffect statusEffect) {
|
||||
@@ -980,6 +981,7 @@ public class PlayerEvent extends CustomNPCsEvent implements IPlayerEvent {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class Removed extends PlayerEvent.EffectEvent implements IPlayerEvent.EffectEvent.Removed {
|
||||
|
||||
private final ExpirationType type;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class ProjectileEvent extends CustomNPCsEvent implements IProjectileEvent
|
||||
/**
|
||||
* projectileImpact
|
||||
*/
|
||||
public static class ImpactEvent extends ProjectileEvent implements IProjectileEvent.ImpactEvent {
|
||||
public static class ImpactEvent extends ProjectileEvent implements IProjectileEvent.ImpactEvent {
|
||||
/**
|
||||
* 0:entity, 1:block
|
||||
*/
|
||||
@@ -52,13 +52,13 @@ public class ProjectileEvent extends CustomNPCsEvent implements IProjectileEvent
|
||||
}
|
||||
|
||||
public IEntity getEntity() {
|
||||
if(type == 0)
|
||||
if (type == 0)
|
||||
return (IEntity) target;
|
||||
return null;
|
||||
}
|
||||
|
||||
public IBlock getBlock() {
|
||||
if(type == 1)
|
||||
if (type == 1)
|
||||
return (IBlock) target;
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user