Class NPCExpressionContext

java.lang.Object
net.citizensnpcs.npc.ai.tree.NPCExpressionContext

public class NPCExpressionContext extends Object
Factory for creating expression scopes with NPC-related bindings.
  • Constructor Details

    • NPCExpressionContext

      public NPCExpressionContext()
  • Method Details

    • createChild

      public static ExpressionScope createChild(ExpressionScope parent)
      Creates a child scope with additional custom variables.
      Parameters:
      parent - the parent scope
      Returns:
      a child scope
    • createFor

      public static ExpressionScope createFor(NPC npc)
      Creates an expression scope with lazy bindings for NPC properties.
      Parameters:
      npc - the NPC to bind
      Returns:
      a scope with NPC bindings