mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-22 04:37:42 +01:00
Fixed a bug where version below 1.16 would fail to load
This commit is contained in:
parent
fd93308ea3
commit
f4a20057d0
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.Indyuce</groupId>
|
||||
<artifactId>MMOItems</artifactId>
|
||||
<version>6.2.0</version>
|
||||
<version>6.2.1</version>
|
||||
<name>MMOItems</name>
|
||||
<description>A great item solution for your RPG server.</description>
|
||||
|
||||
|
@ -5,6 +5,7 @@ import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.Indyuce.mmoitems.MMOItems;
|
||||
import net.mmogroup.mmolib.MMOLib;
|
||||
|
||||
public class RecipeBookUtil {
|
||||
private static boolean amounts = false;
|
||||
@ -26,6 +27,7 @@ public class RecipeBookUtil {
|
||||
public static void refresh(Player player) {
|
||||
if(!enabled) return;
|
||||
|
||||
if (MMOLib.plugin.getVersion().isStrictlyHigher(1, 16)) {
|
||||
for (NamespacedKey key : player.getDiscoveredRecipes())
|
||||
if (key.getNamespace().equals("mmoitems")
|
||||
&& !MMOItems.plugin.getRecipes().getNamespacedKeys().contains(key))
|
||||
@ -34,6 +36,12 @@ public class RecipeBookUtil {
|
||||
for (NamespacedKey recipe : MMOItems.plugin.getRecipes().getNamespacedKeys())
|
||||
if (!player.hasDiscoveredRecipe(recipe))
|
||||
player.discoverRecipe(recipe);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
for (NamespacedKey recipe : MMOItems.plugin.getRecipes().getNamespacedKeys())
|
||||
player.discoverRecipe(recipe);
|
||||
}
|
||||
|
||||
public static void refreshOnline() {
|
||||
|
Loading…
Reference in New Issue
Block a user