Fixed crafting permission

This commit is contained in:
Indyuce 2022-08-01 15:15:31 +02:00
parent d2c65dc3e8
commit 1f83dc26bc
2 changed files with 1 additions and 36 deletions

View File

@ -1,17 +1,9 @@
package net.Indyuce.mmoitems.stat; package net.Indyuce.mmoitems.stat;
import io.lumine.mythic.lib.api.item.ItemTag;
import io.lumine.mythic.lib.version.VersionMaterial; import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem;
import net.Indyuce.mmoitems.stat.data.StringData;
import net.Indyuce.mmoitems.stat.type.GemStoneStat; import net.Indyuce.mmoitems.stat.type.GemStoneStat;
import net.Indyuce.mmoitems.stat.type.StringStat; import net.Indyuce.mmoitems.stat.type.StringStat;
import net.Indyuce.mmoitems.stat.type.TemplateOption; import net.Indyuce.mmoitems.stat.type.TemplateOption;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
public class CraftingPermission extends StringStat implements TemplateOption, GemStoneStat { public class CraftingPermission extends StringStat implements TemplateOption, GemStoneStat {
public CraftingPermission() { public CraftingPermission() {
@ -19,31 +11,4 @@ public class CraftingPermission extends StringStat implements TemplateOption, Ge
new String[]{"The permission needed to craft this item.", "Changing this value requires &o/mi reload recipes&7."}, new String[]{"The permission needed to craft this item.", "Changing this value requires &o/mi reload recipes&7."},
new String[]{"all"}); new String[]{"all"});
} }
public void whenLoaded(@NotNull ReadMMOItem mmoitem) {
throw new RuntimeException("Not supported");
}
/**
* This stat is not saved onto items. This method always returns null
*/
@Nullable
public StringData getLoadedNBT(@NotNull ArrayList<ItemTag> storedTags) {
throw new RuntimeException("Not supported");
}
/**
* This stat is not saved onto items. This method is empty.
*/
public void whenApplied(@NotNull ItemStackBuilder item, @NotNull StringData data) {
throw new RuntimeException("Not supported");
}
/**
* This stat is not saved onto items. This method returns an empty array.
*/
@NotNull
public ArrayList<ItemTag> getAppliedNBT(@NotNull StringData data) {
throw new RuntimeException("Not supported");
}
} }

View File

@ -22,7 +22,7 @@ public interface TemplateOption {
* This stat is not saved onto items. This method is empty. * This stat is not saved onto items. This method is empty.
*/ */
public default void whenLoaded(@NotNull ReadMMOItem mmoitem) { public default void whenLoaded(@NotNull ReadMMOItem mmoitem) {
throw new RuntimeException("Not supported"); // Cannot throw an exception since it will be called
} }
/** /**