mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 20:25:13 +00:00
Implemented event interfaces, made more events cancellable.
This commit is contained in:
1 parent
aa02e5dcc3
commit
0414817673
32 files changed
+1298
-175
No files matched your search
@@ -18,27 +18,40 @@ import noppes.npcs.api.IDamageSource;
|
||||
import noppes.npcs.api.entity.IEntity;
|
||||
import noppes.npcs.api.entity.IEntityLivingBase;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.api.event.IPlayerEvent;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
|
||||
public class PlayerEvent extends CustomNPCsEvent {
|
||||
public class PlayerEvent extends CustomNPCsEvent implements IPlayerEvent {
|
||||
public final IPlayer player;
|
||||
|
||||
public PlayerEvent(IPlayer player) {
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
public IPlayer getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class ChatEvent extends PlayerEvent {
|
||||
public static class ChatEvent extends PlayerEvent implements IPlayerEvent.ChatEvent {
|
||||
public String message;
|
||||
|
||||
public ChatEvent(IPlayer player, String message) {
|
||||
super(player);
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
||||
public static class KeyPressedEvent extends PlayerEvent {
|
||||
public static class KeyPressedEvent extends PlayerEvent implements IPlayerEvent.KeyPressedEvent {
|
||||
public final int key;
|
||||
public final boolean isCtrlPressed;
|
||||
public final boolean isAltPressed;
|
||||
@@ -57,9 +70,37 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
this.keyDown = keyDown;
|
||||
this.keysDown = heldKeys;
|
||||
}
|
||||
|
||||
public int getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public boolean isCtrlPressed() {
|
||||
return isCtrlPressed;
|
||||
}
|
||||
|
||||
public boolean isAltPressed() {
|
||||
return isAltPressed;
|
||||
}
|
||||
|
||||
public boolean isShiftPressed() {
|
||||
return isShiftPressed;
|
||||
}
|
||||
|
||||
public boolean isMetaPressed() {
|
||||
return isMetaPressed;
|
||||
}
|
||||
|
||||
public boolean keyDown() {
|
||||
return keyDown;
|
||||
}
|
||||
|
||||
public int[] getKeysDown() {
|
||||
return keysDown;
|
||||
}
|
||||
}
|
||||
|
||||
public static class MouseClickedEvent extends PlayerEvent {
|
||||
public static class MouseClickedEvent extends PlayerEvent implements IPlayerEvent.MouseClickedEvent {
|
||||
public final boolean isCtrlPressed;
|
||||
public final boolean isAltPressed;
|
||||
public final boolean isShiftPressed;
|
||||
@@ -81,45 +122,85 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
this.isMetaPressed = isMetaPressed;
|
||||
this.keysDown = heldKeys;
|
||||
}
|
||||
|
||||
public int getButton() {
|
||||
return button;
|
||||
}
|
||||
|
||||
public int getMouseWheel() {
|
||||
return mouseWheel;
|
||||
}
|
||||
|
||||
public boolean buttonDown() {
|
||||
return buttonDown;
|
||||
}
|
||||
|
||||
public boolean isCtrlPressed() {
|
||||
return isCtrlPressed;
|
||||
}
|
||||
|
||||
public boolean isAltPressed() {
|
||||
return isAltPressed;
|
||||
}
|
||||
|
||||
public boolean isShiftPressed() {
|
||||
return isShiftPressed;
|
||||
}
|
||||
|
||||
public boolean isMetaPressed() {
|
||||
return isMetaPressed;
|
||||
}
|
||||
|
||||
public int[] getKeysDown() {
|
||||
return keysDown;
|
||||
}
|
||||
}
|
||||
|
||||
public static class PickupXPEvent extends PlayerEvent {
|
||||
public static class PickupXPEvent extends PlayerEvent implements IPlayerEvent.PickupXPEvent {
|
||||
public final int amount;
|
||||
|
||||
public PickupXPEvent(IPlayer player, EntityXPOrb orb) {
|
||||
super(player);
|
||||
this.amount = orb.xpValue;
|
||||
}
|
||||
|
||||
public int getAmount() {
|
||||
return amount;
|
||||
}
|
||||
}
|
||||
|
||||
public static class LevelUpEvent extends PlayerEvent {
|
||||
public static class LevelUpEvent extends PlayerEvent implements IPlayerEvent.LevelUpEvent {
|
||||
public final int change;
|
||||
|
||||
public LevelUpEvent(IPlayer player, int change) {
|
||||
super(player);
|
||||
this.change = change;
|
||||
}
|
||||
|
||||
public int getChange() {
|
||||
return change;
|
||||
}
|
||||
}
|
||||
|
||||
public static class LogoutEvent extends PlayerEvent {
|
||||
public static class LogoutEvent extends PlayerEvent implements IPlayerEvent.LogoutEvent {
|
||||
public LogoutEvent(IPlayer player) {
|
||||
super(player);
|
||||
}
|
||||
}
|
||||
|
||||
public static class LoginEvent extends PlayerEvent {
|
||||
public static class LoginEvent extends PlayerEvent implements IPlayerEvent.LoginEvent {
|
||||
public LoginEvent(IPlayer player) {
|
||||
super(player);
|
||||
}
|
||||
}
|
||||
|
||||
public static class RespawnEvent extends PlayerEvent {
|
||||
public static class RespawnEvent extends PlayerEvent implements IPlayerEvent.RespawnEvent {
|
||||
public RespawnEvent(IPlayer player) {
|
||||
super(player);
|
||||
}
|
||||
}
|
||||
|
||||
public static class ChangedDimension extends PlayerEvent {
|
||||
public static class ChangedDimension extends PlayerEvent implements IPlayerEvent.ChangedDimension {
|
||||
public final int fromDim;
|
||||
public final int toDim;
|
||||
|
||||
@@ -128,19 +209,31 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
this.fromDim = fromDim;
|
||||
this.toDim = toDim;
|
||||
}
|
||||
|
||||
public int getFromDim() {
|
||||
return fromDim;
|
||||
}
|
||||
|
||||
public int getToDim() {
|
||||
return toDim;
|
||||
}
|
||||
}
|
||||
|
||||
public static class TimerEvent extends PlayerEvent {
|
||||
public static class TimerEvent extends PlayerEvent implements IPlayerEvent.TimerEvent {
|
||||
public final int id;
|
||||
|
||||
public TimerEvent(IPlayer player, int id) {
|
||||
super(player);
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class AttackedEvent extends PlayerEvent {
|
||||
public static class AttackedEvent extends PlayerEvent implements IPlayerEvent.AttackedEvent {
|
||||
public final IDamageSource damageSource;
|
||||
public final IEntity source;
|
||||
public final float damage;
|
||||
@@ -151,10 +244,22 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
this.damage = damage;
|
||||
this.damageSource = NpcAPI.Instance().getIDamageSource(damagesource);
|
||||
}
|
||||
|
||||
public IDamageSource getDamageSource() {
|
||||
return damageSource;
|
||||
}
|
||||
|
||||
public IEntity getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public float getDamage() {
|
||||
return damage;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class DamagedEvent extends PlayerEvent {
|
||||
public static class DamagedEvent extends PlayerEvent implements IPlayerEvent.DamagedEvent {
|
||||
public final IDamageSource damageSource;
|
||||
public final IEntity source;
|
||||
public float damage;
|
||||
@@ -166,17 +271,29 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
this.damage = damage;
|
||||
this.damageSource = NpcAPI.Instance().getIDamageSource(damagesource);
|
||||
}
|
||||
|
||||
public IDamageSource getDamageSource() {
|
||||
return damageSource;
|
||||
}
|
||||
|
||||
public IEntity getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public float getDamage() {
|
||||
return damage;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class LightningEvent extends PlayerEvent {
|
||||
public static class LightningEvent extends PlayerEvent implements IPlayerEvent.LightningEvent {
|
||||
public LightningEvent(IPlayer player) {
|
||||
super(player);
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class SoundEvent extends PlayerEvent {
|
||||
public static class SoundEvent extends PlayerEvent implements IPlayerEvent.SoundEvent {
|
||||
public final String name;
|
||||
public final float pitch;
|
||||
public final float volume;
|
||||
@@ -187,34 +304,54 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
this.pitch = pitch;
|
||||
this.volume = volume;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public float getPitch() {
|
||||
return pitch;
|
||||
}
|
||||
|
||||
public float getVolume() {
|
||||
return volume;
|
||||
}
|
||||
}
|
||||
|
||||
public static class FallEvent extends PlayerEvent {
|
||||
@Cancelable
|
||||
public static class FallEvent extends PlayerEvent implements IPlayerEvent.FallEvent {
|
||||
public final float distance;
|
||||
|
||||
public FallEvent(IPlayer player, float distance){
|
||||
super(player);
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public float getDistance() {
|
||||
return distance;
|
||||
}
|
||||
}
|
||||
|
||||
public static class JumpEvent extends PlayerEvent {
|
||||
public static class JumpEvent extends PlayerEvent implements IPlayerEvent.JumpEvent {
|
||||
public JumpEvent(IPlayer player){
|
||||
super(player);
|
||||
}
|
||||
}
|
||||
|
||||
public static class KilledEntityEvent extends PlayerEvent {
|
||||
public static class KilledEntityEvent extends PlayerEvent implements IPlayerEvent.KilledEntityEvent {
|
||||
public final IEntityLivingBase entity;
|
||||
|
||||
public KilledEntityEvent(IPlayer player, EntityLivingBase entity) {
|
||||
super(player);
|
||||
this.entity = (IEntityLivingBase) NpcAPI.Instance().getIEntity(entity);
|
||||
}
|
||||
|
||||
public IEntityLivingBase getEntity() {
|
||||
return entity;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class DiedEvent extends PlayerEvent {
|
||||
public static class DiedEvent extends PlayerEvent implements IPlayerEvent.DiedEvent {
|
||||
public final IDamageSource damageSource;
|
||||
public final String type;
|
||||
public final IEntity source;
|
||||
@@ -225,10 +362,22 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
this.type = damagesource.getDamageType();
|
||||
this.source = NpcAPI.Instance().getIEntity(entity);
|
||||
}
|
||||
|
||||
public IDamageSource getDamageSource() {
|
||||
return damageSource;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public IEntity getSource() {
|
||||
return source;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class RangedLaunchedEvent extends PlayerEvent {
|
||||
public static class RangedLaunchedEvent extends PlayerEvent implements IPlayerEvent.RangedLaunchedEvent {
|
||||
public final IItemStack bow;
|
||||
public int charge;
|
||||
|
||||
@@ -237,10 +386,18 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
this.bow = NpcAPI.Instance().getIItemStack(bow);
|
||||
this.charge = charge;
|
||||
}
|
||||
|
||||
public IItemStack getBow() {
|
||||
return bow;
|
||||
}
|
||||
|
||||
public int getCharge() {
|
||||
return charge;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class AttackEvent extends PlayerEvent {
|
||||
public static class AttackEvent extends PlayerEvent implements IPlayerEvent.AttackEvent {
|
||||
public final IDamageSource damageSource;
|
||||
public final IEntity target;
|
||||
public float damage;
|
||||
@@ -251,10 +408,22 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
this.damage = damage;
|
||||
this.damageSource = NpcAPI.Instance().getIDamageSource(damagesource);
|
||||
}
|
||||
|
||||
public IDamageSource getDamageSource() {
|
||||
return damageSource;
|
||||
}
|
||||
|
||||
public IEntity getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
public float getDamage() {
|
||||
return damage;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class DamagedEntityEvent extends PlayerEvent {
|
||||
public static class DamagedEntityEvent extends PlayerEvent implements IPlayerEvent.DamagedEntityEvent {
|
||||
public final IDamageSource damageSource;
|
||||
public final IEntity target;
|
||||
public float damage;
|
||||
@@ -265,81 +434,121 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
this.damage = damage;
|
||||
this.damageSource = NpcAPI.Instance().getIDamageSource(damagesource);
|
||||
}
|
||||
|
||||
public IDamageSource getDamageSource() {
|
||||
return damageSource;
|
||||
}
|
||||
|
||||
public IEntity getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
public float getDamage() {
|
||||
return damage;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ContainerClosed extends PlayerEvent {
|
||||
public static class ContainerClosed extends PlayerEvent implements IPlayerEvent.ContainerClosed {
|
||||
public final IContainer container;
|
||||
|
||||
public ContainerClosed(IPlayer player, IContainer container) {
|
||||
super(player);
|
||||
this.container = container;
|
||||
}
|
||||
|
||||
public IContainer getContainer() {
|
||||
return container;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ContainerOpen extends PlayerEvent {
|
||||
public static class ContainerOpen extends PlayerEvent implements IPlayerEvent.ContainerOpen {
|
||||
public final IContainer container;
|
||||
|
||||
public ContainerOpen(IPlayer player, IContainer container) {
|
||||
super(player);
|
||||
this.container = container;
|
||||
}
|
||||
|
||||
public IContainer getContainer() {
|
||||
return container;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class PickUpEvent extends PlayerEvent {
|
||||
public static class PickUpEvent extends PlayerEvent implements IPlayerEvent.PickUpEvent {
|
||||
public final IItemStack item;
|
||||
|
||||
public PickUpEvent(IPlayer player, IItemStack item) {
|
||||
super(player);
|
||||
this.item = item;
|
||||
}
|
||||
|
||||
public IItemStack getItem() {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class DropEvent extends PlayerEvent {
|
||||
public static class DropEvent extends PlayerEvent implements IPlayerEvent.DropEvent {
|
||||
public final IItemStack[] items;
|
||||
|
||||
public DropEvent(IPlayer player, IItemStack[] items) {
|
||||
super(player);
|
||||
this.items = items;
|
||||
}
|
||||
|
||||
public IItemStack[] getItems() {
|
||||
return items;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class TossEvent extends PlayerEvent {
|
||||
public static class TossEvent extends PlayerEvent implements IPlayerEvent.TossEvent {
|
||||
public final IItemStack item;
|
||||
|
||||
public TossEvent(IPlayer player, IItemStack item) {
|
||||
super(player);
|
||||
this.item = item;
|
||||
}
|
||||
|
||||
public IItemStack getItem() {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class InteractEvent extends PlayerEvent {
|
||||
public static class InteractEvent extends PlayerEvent implements IPlayerEvent.InteractEvent {
|
||||
public final int type;
|
||||
public final Object target;
|
||||
public final IEntity target;
|
||||
|
||||
public InteractEvent(IPlayer player, int type, Object target) {
|
||||
public InteractEvent(IPlayer player, int type, IEntity target) {
|
||||
super(player);
|
||||
this.type = type;
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public IEntity getTarget() {
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
||||
public static class UpdateEvent extends PlayerEvent {
|
||||
public static class UpdateEvent extends PlayerEvent implements IPlayerEvent.UpdateEvent {
|
||||
public UpdateEvent(IPlayer player) {
|
||||
super(player);
|
||||
}
|
||||
}
|
||||
|
||||
public static class InitEvent extends PlayerEvent {
|
||||
public static class InitEvent extends PlayerEvent implements IPlayerEvent.InitEvent {
|
||||
public InitEvent(IPlayer player) {
|
||||
super(player);
|
||||
}
|
||||
}
|
||||
|
||||
public static class StartUsingItem extends PlayerEvent {
|
||||
public static class StartUsingItem extends PlayerEvent implements IPlayerEvent.StartUsingItem {
|
||||
public final IItemStack item;
|
||||
public final int duration;
|
||||
|
||||
@@ -349,8 +558,16 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
this.item = NpcAPI.Instance().getIItemStack(item);
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
public IItemStack getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
public int getDuration() {
|
||||
return duration;
|
||||
}
|
||||
}
|
||||
public static class UsingItem extends PlayerEvent {
|
||||
public static class UsingItem extends PlayerEvent implements IPlayerEvent.UsingItem {
|
||||
public final IItemStack item;
|
||||
public final int duration;
|
||||
|
||||
@@ -360,8 +577,16 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
this.item = NpcAPI.Instance().getIItemStack(item);
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
public IItemStack getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
public int getDuration() {
|
||||
return duration;
|
||||
}
|
||||
}
|
||||
public static class StopUsingItem extends PlayerEvent {
|
||||
public static class StopUsingItem extends PlayerEvent implements IPlayerEvent.StopUsingItem {
|
||||
public final IItemStack item;
|
||||
public final int duration;
|
||||
|
||||
@@ -371,8 +596,16 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
this.item = NpcAPI.Instance().getIItemStack(item);
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
public IItemStack getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
public int getDuration() {
|
||||
return duration;
|
||||
}
|
||||
}
|
||||
public static class FinishUsingItem extends PlayerEvent {
|
||||
public static class FinishUsingItem extends PlayerEvent implements IPlayerEvent.FinishUsingItem {
|
||||
public final IItemStack item;
|
||||
public final int duration;
|
||||
|
||||
@@ -382,10 +615,18 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
this.item = NpcAPI.Instance().getIItemStack(item);
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
public IItemStack getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
public int getDuration() {
|
||||
return duration;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class BreakEvent extends PlayerEvent {
|
||||
public static class BreakEvent extends PlayerEvent implements IPlayerEvent.BreakEvent {
|
||||
public final IBlock block;
|
||||
public int exp;
|
||||
|
||||
@@ -394,9 +635,17 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
this.block = block;
|
||||
this.exp = exp;
|
||||
}
|
||||
|
||||
public IBlock getBlock() {
|
||||
return block;
|
||||
}
|
||||
|
||||
public int getExp() {
|
||||
return exp;
|
||||
}
|
||||
}
|
||||
|
||||
public static class UseHoe extends PlayerEvent {
|
||||
public static class UseHoe extends PlayerEvent implements UseHoeEvent {
|
||||
public final IItemStack hoe;
|
||||
public final int x;
|
||||
public final int y;
|
||||
@@ -409,18 +658,38 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
public IItemStack getHoe() {
|
||||
return hoe;
|
||||
}
|
||||
|
||||
public int getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
public int getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
public int getZ() {
|
||||
return z;
|
||||
}
|
||||
}
|
||||
|
||||
public static class WakeUp extends PlayerEvent{
|
||||
public static class WakeUp extends PlayerEvent implements WakeUpEvent {
|
||||
public final boolean setSpawn;
|
||||
|
||||
public WakeUp(IPlayer player, boolean setSpawn) {
|
||||
super(player);
|
||||
this.setSpawn = setSpawn;
|
||||
}
|
||||
|
||||
public boolean setSpawn() {
|
||||
return setSpawn;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Sleep extends PlayerEvent {
|
||||
public static class Sleep extends PlayerEvent implements SleepEvent {
|
||||
public final int x;
|
||||
public final int y;
|
||||
public final int z;
|
||||
@@ -431,18 +700,34 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
public int getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
public int getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
public int getZ() {
|
||||
return z;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Achievement extends PlayerEvent {
|
||||
public static class Achievement extends PlayerEvent implements AchievementEvent {
|
||||
public final String description;
|
||||
|
||||
public Achievement(IPlayer player, String description) {
|
||||
super(player);
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
}
|
||||
|
||||
public static class FillBucket extends PlayerEvent {
|
||||
public static class FillBucket extends PlayerEvent implements FillBucketEvent {
|
||||
public final IItemStack current;
|
||||
public final IItemStack result;
|
||||
|
||||
@@ -451,9 +736,17 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
this.current = NpcAPI.Instance().getIItemStack(current);
|
||||
this.result = NpcAPI.Instance().getIItemStack(result);
|
||||
}
|
||||
|
||||
public IItemStack getCurrent() {
|
||||
return current;
|
||||
}
|
||||
|
||||
public IItemStack getFilled() {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Bonemeal extends PlayerEvent {
|
||||
public static class Bonemeal extends PlayerEvent implements BonemealEvent {
|
||||
public final IBlock block;
|
||||
public final int x;
|
||||
public final int y;
|
||||
@@ -466,9 +759,25 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
public IBlock getBlock() {
|
||||
return block;
|
||||
}
|
||||
|
||||
public int getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
public int getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
public int getZ() {
|
||||
return z;
|
||||
}
|
||||
}
|
||||
|
||||
public static class RangedChargeEvent extends PlayerEvent {
|
||||
public static class RangedChargeEvent extends PlayerEvent implements IPlayerEvent.RangedChargeEvent {
|
||||
public RangedChargeEvent(IPlayer player) {
|
||||
super(player);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user