mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-21 16:12:17 +00:00
Fixed some scripted item events, and fixed positioning of scripted items.
This commit is contained in:
1 parent
747730face
commit
11cc46b48f
20 files changed
+231
-146
No files matched your search
@@ -20,11 +20,11 @@ public class ItemEvent extends CustomNPCsEvent {
|
||||
}
|
||||
|
||||
public static class UpdateEvent extends ItemEvent {
|
||||
public IPlayer player;
|
||||
public IEntity entity;
|
||||
|
||||
public UpdateEvent(ScriptCustomItem item, IPlayer player) {
|
||||
public UpdateEvent(ScriptCustomItem item, IEntity entity) {
|
||||
super(item);
|
||||
this.player = player;
|
||||
this.entity = entity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,13 +76,13 @@ public class ItemEvent extends CustomNPCsEvent {
|
||||
public static class AttackEvent extends ItemEvent {
|
||||
public final int type;//1: Hit, 2: Whiff //TODO: Implement type 2
|
||||
public final Object target;
|
||||
public IPlayer player;
|
||||
public IEntity swingingEntity;
|
||||
|
||||
public AttackEvent(ScriptCustomItem item, IPlayer player, int type, Object target) {
|
||||
public AttackEvent(ScriptCustomItem item, IEntity swingingEntity, int type, Object target) {
|
||||
super(item);
|
||||
this.type = type;
|
||||
this.target = target;
|
||||
this.player = player;
|
||||
this.swingingEntity = swingingEntity;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user