run another plugin's function

  • 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 community!

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
how to run any plugin's function?

simmilar like skellett custom event, but i need run part of function from some .class
You can execute a command:
code_language.skript:
Execute console command "/kill %player%"
 
not command, is trigger other plugin's API

i think API maybe more easy understand
 
not command, is trigger other plugin's API

i think API maybe more easy understand
You can do it with Skellett and WolvSK, for example, you want set the flying state of a player, you would do (with Skellett):
code_language.skript:
invoke method "setFlying" from player with parameters true
Or use a specific function from a plugin such as LuckPerms:
code_language.skript:
#the first argument has to be a player uuid
function getGroup(lookup: text) :: string:

    #gets a LuckPermsApi object
    set {_API} to method "getApi" from "me.lucko.luckperms.LuckPerms"
   
    #gets an UUID object to lookup
    set {_UUID} to method "fromString" from "java.util.UUID" with parameters {_lookup}

    #Gets an User object from the UUID object with the API
    set {_user} to method "getUser" from {_API} with parameters {_UUID}

    #Gets the primary group from the early set User object and returns
    return method "getPrimaryGroup" from {_user}
^ I actually don't know if it works but you get the idea.
 
You can do it with Skellett and WolvSK, for example, you want set the flying state of a player, you would do (with Skellett):
code_language.skript:
invoke method "setFlying" from player with parameters true
Or use a specific function from a plugin such as LuckPerms:
code_language.skript:
#the first argument has to be a player uuid
function getGroup(lookup: text) :: string:

    #gets a LuckPermsApi object
    set {_API} to method "getApi" from "me.lucko.luckperms.LuckPerms"
 
    #gets an UUID object to lookup
    set {_UUID} to method "fromString" from "java.util.UUID" with parameters {_lookup}

    #Gets an User object from the UUID object with the API
    set {_user} to method "getUser" from {_API} with parameters {_UUID}

    #Gets the primary group from the early set User object and returns
    return method "getPrimaryGroup" from {_user}
^ I actually don't know if it works but you get the idea.
how about get essentials geoip player's country?
i have abit confuse..
maybe @LimeGlass can help?
 
Last edited by a moderator:
Status
Not open for further replies.