Package net.runelite.api
Interface ScriptEventBuilder
-
public interface ScriptEventBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ScriptEventbuild()Build theScriptEventObject[]getArguments()Arguments passed to the script.intgetOp()Gets the menu op of the eventWidgetgetSource()Gets the widget theScriptEvent.WIDGET_IDandScriptEvent.WIDGET_INDEXargs are substituted withWidgetgetTarget()Gets theWidgettarget.ScriptEventBuildersetArguments(Object[] arguments)Arguments passed to the script.ScriptEventBuildersetOp(int op)Set the menu op of the eventScriptEventBuildersetSource(Widget widget)Sets the widget theScriptEvent.WIDGET_IDandScriptEvent.WIDGET_INDEXargs are substituted with.ScriptEventBuildersetTarget(Widget target)Sets theWidgettarget.
-
-
-
Method Detail
-
getArguments
Object[] getArguments()
Arguments passed to the script. Index 0 is the script being run and is not an argument.- Returns:
-
setArguments
ScriptEventBuilder setArguments(Object[] arguments)
Arguments passed to the script. Index 0 is the script being run and is not an argument.- Returns:
-
getSource
Widget getSource()
Gets the widget theScriptEvent.WIDGET_IDandScriptEvent.WIDGET_INDEXargs are substituted with
-
setSource
ScriptEventBuilder setSource(Widget widget)
Sets the widget theScriptEvent.WIDGET_IDandScriptEvent.WIDGET_INDEXargs are substituted with. This is useful for running widget listeners- See Also:
Widget.getOnLoadListener()
-
getTarget
@Nullable Widget getTarget()
Gets theWidgettarget. This is only used for the drag complete listener- Returns:
- See Also:
Widget.setOnDragCompleteListener(Object...)
-
setTarget
ScriptEventBuilder setTarget(Widget target)
Sets theWidgettarget. This is only used for the drag complete listener.- Parameters:
target-- Returns:
- See Also:
Widget.setOnDragCompleteListener(Object...)
-
getOp
int getOp()
Gets the menu op of the event- Returns:
- the menu op
-
setOp
ScriptEventBuilder setOp(int op)
Set the menu op of the event- Parameters:
op-
-
build
ScriptEvent build()
Build theScriptEvent
-
-