Files

40 lines
933 B
Markdown

# IScriptEntity — giriş
[← IScriptEntity](index.md) · [← Master](../../wiki.md)
mchorse.mappet.api.scripts.user.entities
Interface IScriptEntity
All Known Subinterfaces:
IScriptEntityItem, IScriptNpc, IScriptPlayer
public interface IScriptEntity
Entity interface.
This interface represents an entity, it could be a player, NPC, or any other entity. IMPORTANT: any method that marks an argument or return as of IScriptEntity type
can return also IScriptPlayer if it's an actual player, or IScriptNpc if it's a Mappet NPC!
function main(c)
{
if (c.getSubject().isPlayer())
{
// Do something with the player...
}
if (c.getSubject().isNpc())
{
// Do something with the NPC...
}
else
{
// Do something with the entity...
}
}
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
Modifier and Type Method and Description