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

[Ci skip] Minor design change

This commit is contained in:
TheBusyBiscuit 2020-02-08 02:55:49 +01:00
parent 71dcb17d25
commit f68d110a43
2 changed files with 2 additions and 11 deletions

View File

@ -190,16 +190,6 @@ public class SlimefunRegistry {
return geoResources; return geoResources;
} }
public GEOResource getGEOResource(String namespace, String key) {
for (GEOResource resource : geoResources.values()) {
if (resource.getKey().toString().equals(namespace + ":" + key)) {
return resource;
}
}
return null;
}
@Deprecated @Deprecated
public Map<Integer, List<GuideHandler>> getGuideHandlers() { public Map<Integer, List<GuideHandler>> getGuideHandlers() {
return guideHandlers; return guideHandlers;

View File

@ -5,6 +5,7 @@ import java.util.List;
import java.util.OptionalInt; import java.util.OptionalInt;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
@ -35,7 +36,7 @@ public abstract class OilPump extends AContainer implements RecipeDisplayItem {
public OilPump(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { public OilPump(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
super(category, item, recipeType, recipe); super(category, item, recipeType, recipe);
oil = SlimefunPlugin.getRegistry().getGEOResource("slimefun", "oil"); oil = SlimefunPlugin.getRegistry().getGEOResources().get(new NamespacedKey(SlimefunPlugin.instance, "oil")).orElse(null);
new BlockMenuPreset(getID(), getInventoryTitle()) { new BlockMenuPreset(getID(), getInventoryTitle()) {