Skip to content

Commit

Permalink
Merge pull request #953 from JWJUN233233/fix/VanillaCrafterListener
Browse files Browse the repository at this point in the history
fix(VanillaCrafterListener): check version
  • Loading branch information
StarWishsama authored Aug 25, 2024
2 parents fdb765c + d414494 commit 438cd0b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package io.github.thebusybiscuit.slimefun4.implementation.listeners.crafting;

import city.norain.slimefun4.SlimefunExtended;
import city.norain.slimefun4.compatibillty.VersionedEvent;
import io.github.bakedlibs.dough.versions.MinecraftVersion;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
import javax.annotation.Nonnull;
Expand All @@ -16,7 +18,8 @@

public class VanillaCrafterListener implements SlimefunCraftingListener {
public VanillaCrafterListener(@Nonnull Slimefun plugin) {
plugin.getServer().getPluginManager().registerEvents(this, plugin);
if (SlimefunExtended.getMinecraftVersion().isAtLeast(MinecraftVersion.parse("1.20.3")))
plugin.getServer().getPluginManager().registerEvents(this, plugin);
}

@EventHandler(ignoreCancelled = true)
Expand Down

0 comments on commit 438cd0b

Please sign in to comment.