Events are defined statically in normal classes and added handler for extensions to add their built-ins
This commit is contained in:
1 parent
815c75b827
commit
3105d5bb71
11 files changed
+126
-113
No files matched your search
@@ -1154,7 +1154,7 @@ public class EntityValue extends Value
|
||||
|
||||
public void setEvent(CarpetContext cc, String eventName, FunctionValue fun, List<Value> args)
|
||||
{
|
||||
EntityEventsGroup.EntityEventType event = EntityEventsGroup.EntityEventType.byName.get(eventName);
|
||||
EntityEventsGroup.Event event = EntityEventsGroup.Event.byName.get(eventName);
|
||||
if (event == null)
|
||||
throw new InternalExpressionException("Unknown entity event: " + eventName);
|
||||
((EntityInterface)entity).getEventContainer().addEvent(event, cc, fun, args);
|
||||
|
||||
Reference in new issue
Block a user