1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Removed api method

This commit is contained in:
TheBusyBiscuit 2020-05-09 10:35:21 +02:00
parent f598089826
commit c4026966a2
2 changed files with 2 additions and 37 deletions

View File

@ -110,10 +110,10 @@ public final class ResearchSetup {
register("table_saw", 92, "Table Saw", 4, SlimefunItems.TABLE_SAW);
register("slime_steel_armor", 93, "Slimy Steel Armor", 27, SlimefunItems.SLIME_HELMET_STEEL, SlimefunItems.SLIME_CHESTPLATE_STEEL, SlimefunItems.SLIME_LEGGINGS_STEEL, SlimefunItems.SLIME_BOOTS_STEEL);
register("blade_of_vampires", 94, "Blade of Vampires", 26, SlimefunItems.BLADE_OF_VAMPIRES);
Slimefun.registerResearch(new NamespacedKey(SlimefunPlugin.instance, "digital_miner"), 95, "Lazy Mining", 40, SlimefunItems.DIGITAL_MINER);
register("digital_miner", 95, "Lazy Mining", 40, SlimefunItems.DIGITAL_MINER);
register("water_staff", 96, "Water Staff", 8, SlimefunItems.STAFF_WATER);
register("24k_gold_block", 97, "Golden City", 19, SlimefunItems.GOLD_24K_BLOCK);
Slimefun.registerResearch(new NamespacedKey(SlimefunPlugin.instance, "advanced_digital_miner"), 98, "Advanced Mining 101", 42, SlimefunItems.ADVANCED_DIGITAL_MINER);
register("advanced_digital_miner", 98, "Advanced Mining 101", 42, SlimefunItems.ADVANCED_DIGITAL_MINER);
register("composter", 99, "Composting Dirt", 3, SlimefunItems.COMPOSTER);
register("farmer_shoes", 100, "Farmer Shoes", 4, SlimefunItems.FARMER_SHOES);
register("explosive_tools", 101, "Explosive Tools", 30, SlimefunItems.EXPLOSIVE_PICKAXE, SlimefunItems.EXPLOSIVE_SHOVEL);

View File

@ -4,13 +4,11 @@ import java.util.Optional;
import java.util.logging.Logger;
import org.bukkit.Bukkit;
import org.bukkit.NamespacedKey;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.scheduler.BukkitTask;
import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile;
import io.github.thebusybiscuit.slimefun4.core.researching.Research;
import io.github.thebusybiscuit.slimefun4.implementation.items.VanillaItem;
import me.mrCookieSlime.Slimefun.SlimefunPlugin;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.ItemState;
@ -29,39 +27,6 @@ public final class Slimefun {
return SlimefunPlugin.instance.getLogger();
}
/**
* Registers this Research and automatically binds these ItemStacks to it.
* <p>
* This convenience method spares from doing the code below:
*
* <pre>
* {@code
* Research r = new Research(7, "Glowstone Armor", 3);
* r.addItems(SlimefunItem.getByItem(SlimefunItems.GLOWSTONE_HELMET),
* SlimefunItem.getByItem(SlimefunItems.GLOWSTONE_CHESTPLATE),
* SlimefunItem.getByItem(SlimefunItems.GLOWSTONE_LEGGINGS),
* SlimefunItem.getByItem(SlimefunItems.GLOWSTONE_BOOTS));
* r.register();
* }*
* </pre>
*
* @param research
* the research to register, not null
* @param items
* the items to bind, not null
*/
public static void registerResearch(Research research, ItemStack... items) {
for (ItemStack item : items) {
research.addItems(SlimefunItem.getByItem(item));
}
research.register();
}
public static void registerResearch(NamespacedKey key, int id, String name, int cost, ItemStack... items) {
registerResearch(new Research(key, id, name, cost), items);
}
/**
* Checks if this player can use this item.
*