SlimeFun Hook

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

ShaneBee

Supporter +
Addon Developer
Sep 7, 2017
2,247
241
73
Vancouver, Canada
I have been looking for a while for a slime fun hook. I have not found one.
I recently came across SharpSK which has a hook for slime fun research. But I am looking to hook into slimefun items, such as dusts and ingots.

I know nothing about writing java, but based on this code for hooking in slimefun research, would it be easy to hook into items?
Would someone be able to make this add-on?

Here is the code I saw from SharpSk's git

Java:
package me.sharpjaws.sharpSK.hooks.Slimefun;

import javax.annotation.Nullable;

import org.bukkit.entity.Player;

import ch.njol.skript.Skript;
import ch.njol.skript.lang.ExpressionType;
import ch.njol.skript.lang.util.SimpleEvent;
import ch.njol.skript.registrations.EventValues;
import ch.njol.skript.util.Getter;
import me.mrCookieSlime.Slimefun.Events.ResearchUnlockEvent;

public class SlimefunRegistry {
    public static void registerSlimefun() {
        Skript.registerEvent("On slimefun research", SimpleEvent.class, ResearchUnlockEvent.class,
                "[(slimefun|sf)] research [unlock]");
        EventValues.registerEventValue(ResearchUnlockEvent.class, Player.class,
                new Getter<Player, ResearchUnlockEvent>() {
                    @Override
                    @Nullable
                    public Player get(ResearchUnlockEvent e) {
                        Player p = e.getPlayer();
                        return p;
                    }
                }, 0);
        Skript.registerExpression(ExprSlimefunEvtResearch.class, String.class, ExpressionType.SIMPLE, "event-research");

        Skript.registerEffect(EffSlimefunUnlockResearch.class,
                "[sharpsk] [(slimefun|sf)] unlock research %string% for %player%");
        Skript.registerExpression(ExprSlimefunAllResearches.class, String.class, ExpressionType.SIMPLE,
                "[sharpsk] [(slimefun|sf)] all [(of|the)] researches");
    }

}

Please let me know if this could be done, i'd be the FIRST one to download

Thanks
-Shane
 
wym by hook into items? like so you can give people a certain item? yeah thats possible. it would be best for the author of sharpsk to expand his support of the plugin but if he's unwilling i could probably find some time to add it to skuniversal
 
Correct, so I could use the items from slime fun to give to a player thru skript. Such as when a player mines an ore it could drop a slime fun dust.
Ill contact the DEV of SharpSK and let you know what they say.
##EDIT## I forgot, I did put a suggestion on their Git page 3 days ago. No response yet, but I will keep you informed.
Thanks again!
[doublepost=1521329964,1521062344][/doublepost]Hey @Donut I left a suggestion on githut for SharpSK a week ago. So far no response.
If you could do it in SkUniversal that would be amazing.
I would love to see a hook into the slime fun items, for example to give them to player, drop them on certain events, ETC. Also would be amazing if you could possibly add in a hook to ADD items/machines/tools. I know this can be done with Jar files (like i could add in my own tools and machines) I think it would be the most amazing skript hook. I would be the most appreciative person if you could do that.
 
ok i thought the sharpsk dev was active maybe he'll respond on discord but when i get some spare time i can add it