mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 02:37:27 +00:00
Null check for Swing Event
This commit is contained in:
1 parent
19c6c08d75
commit
60dcef2e29
2 files changed
+2
-3
No files matched your search
@@ -227,7 +227,7 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
|
||||
public SwingEvent(ICustomNpc npc, ItemStack itemStack) {
|
||||
super(npc);
|
||||
this.itemStack = (IItemStack)NpcAPI.Instance().getIItemStack(itemStack);
|
||||
this.itemStack = itemStack == null ? null : (IItemStack)NpcAPI.Instance().getIItemStack(itemStack);
|
||||
}
|
||||
|
||||
public String getHookName() {
|
||||
@@ -237,7 +237,6 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
/**
|
||||
* @return Returns the swung item
|
||||
*/
|
||||
@Override
|
||||
public IItemStack getItemStack() {
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user