mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 21:05:06 +00:00
get the name of the player who spawned this npc with soulstone
This commit is contained in:
1 parent
b7ad0ce29b
commit
9fef65b194
4 files changed
+26
-2
No files matched your search
@@ -862,6 +862,14 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
|
||||
npc.stats.canDespawn = canDespawn;
|
||||
npc.stats.playerSetCanDespawn = canDespawn;
|
||||
}
|
||||
|
||||
public boolean spawnedFromSoulStone() {
|
||||
return npc.advanced.soulStonePlayerName != null;
|
||||
}
|
||||
|
||||
public String getSoulStonePlayerName() {
|
||||
return npc.advanced.soulStonePlayerName;
|
||||
}
|
||||
|
||||
public void giveItem(IPlayer player, IItemStack item){
|
||||
npc.givePlayerItem((EntityPlayer) player.getMCEntity(), item.getMCItemStack());
|
||||
|
||||
Reference in new issue
Block a user