You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first argument should contain the name of the event you want to call. The second argument is a list variable, with each element of the following format: `{list::%type%} = %value%`. The second argument is almost the same, the only difference is that `%type%` is replaced with a string, which is just the index.
98
+
The first argument should contain the name of the event you want to call. The second argument is a list variable, with each element of the following format: `{list::%type%} = %value%`. The third argument is almost the same, the only difference is that `%type%` is replaced with a string, which is just the index.
99
99
The first list variable is for [the event-values](#option-event-values), while the second is for [the extra data](#extra-data).
I understand that the following features are experimental and may change in the future.
62
+
I have read about this at https://skript-mirror.gitbook.io/docs/advanced/experiments
63
+
proxies
64
+
65
+
function do_something():
66
+
broadcast "It does something!"
67
+
68
+
command /proxy:
69
+
trigger:
70
+
# As you can see on https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html
71
+
# the Runnable interface has one method: run
72
+
set {_functions::run} to function reference "do_something"
73
+
set {_proxy} to new proxy instance of Runnable using {_functions::*}
74
+
{_proxy}.run() # will broadcast 'It does something!'
75
+
Bukkit.getScheduler().runTask(Skript.getInstance(), {_proxy}) # also broadcasts 'It does something!'
76
+
```
77
+
{% endcode-tabs-item %}
78
+
{% endcode-tabs %}
79
+
80
+
{% hint style="info" %}
81
+
Class proxies are most useful for more interaction with Java code, for example when methods require some implementation of an interface.
82
+
{% endhint %}
83
+
23
84
## `deferred-parsing`
24
85
25
86
Deferred parsing allows you to prefix any line with `(parse[d] later)` to defer parsing until the first execution of the line. This allows you to circumvent issues where custom syntaxes are used before they are defined.
0 commit comments