mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 06:29:41 +00:00
Implemented several more events for players, including a click event, key event, fall event, and the basic entity living hurt, killed, and kills events, among others.
This commit is contained in:
1 parent
6c8c7671b8
commit
6752f8baec
38 files changed
+763
-249
No files matched your search
@@ -1,7 +1,6 @@
|
||||
package noppes.npcs.scripted.roles;
|
||||
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.roles.JobGuard;
|
||||
import noppes.npcs.roles.JobHealer;
|
||||
import noppes.npcs.scripted.ScriptLivingBase;
|
||||
import noppes.npcs.scripted.constants.JobType;
|
||||
@@ -14,7 +13,7 @@ public class ScriptJobHealer extends ScriptJobInterface{
|
||||
}
|
||||
|
||||
public void heal(ScriptLivingBase entity, float amount){
|
||||
job.heal(entity.getMinecraftEntity(), amount);
|
||||
job.heal(entity.getMCEntity(), amount);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,11 +19,11 @@ public class ScriptRoleFollower extends ScriptRoleInterface{
|
||||
* @param player Player who is set as the owner. If null given everything resets
|
||||
*/
|
||||
public void setOwner(ScriptPlayer player){
|
||||
if(player == null || player.getMinecraftEntity() == null){
|
||||
if(player == null || player.getMCEntity() == null){
|
||||
role.setOwner(null);
|
||||
return;
|
||||
}
|
||||
EntityPlayer mcplayer = (EntityPlayer) player.getMinecraftEntity();
|
||||
EntityPlayer mcplayer = (EntityPlayer) player.getMCEntity();
|
||||
role.setOwner(mcplayer);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user