Can I use this in a java Plugin

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Vyrrex

Member
Apr 14, 2020
3
0
0
33
Is it possible to use this in a java addon so I can create particles with that plugin?
If not is there a possibilitie to create a method (dont know how this is called in a skript) and call this via my plugin?
 
fetchimage
 
Is it possible to use this in a java addon so I can create particles with that plugin?
If not is there a possibilitie to create a method (dont know how this is called in a skript) and call this via my plugin?

My guess he wants to make a class in the skript language and call the methods of it trough java. Now i am not gonna say no i am pretty shure its a no, but have seen allot of crazy stuff beeing created with skript lately.
 
Uhm sry I thought that this is only a page for the skdragon minecraft addon and I wanted to ask if I can create a "method" in a skript and call it via a java class. Sorry for confusing you.
 
Uhm sry I thought that this is only a page for the skdragon minecraft addon and I wanted to ask if I can create a "method" in a skript and call it via a java class. Sorry for confusing you.
Pretty sure you can execute Skript functions through java. I've seen someone do it before, but I don't remember how.

Check out the `ch.njol.skript.lang.function.Functions` class in the Skript source code.

I believe Pikachu was the original maker of this, but here is code of executing functions in scripts. You can probably convert it to java for your needs.
code_language.skript:
import:
    ch.njol.skript.lang.function.Functions
    ch.njol.skript.lang.ExpressionList
    ch.njol.skript.lang.function.FunctionEvent

effect call function[s] %strings% [with argument[s] %-objects%]:
  trigger:
    loop (...(raw expr-2).getExpressions()) if raw expr-2 is an instance of ExpressionList otherwise raw expr-2:
      add loop-value.getArray(event) to {_params::*}
    loop expressions 1:
      set {_function} to Functions.getFunction(loop-value)
      try {_function}.execute(new FunctionEvent(null), [{_params::*}] if {_params::*} is set otherwise null)
 
Last edited: