Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ oraxen = "1.190.0"
mythiclib = "1.7.1-SNAPSHOT"
mmoitems = "6.10-SNAPSHOT"
papi = "2.11.6"
score = "4.24.3.5"
score = "5.25.3.9"
sig = "1.5.0"
bstats = "3.1.0"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package com.extendedclip.deluxemenus.hooks;

import com.extendedclip.deluxemenus.cache.SimpleCache;
import com.ssomar.score.api.ExecutableBlocksAPI;
import com.ssomar.score.api.executableblocks.ExecutableBlocksAPI;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;

import com.ssomar.score.api.executableblocks.config.ExecutableBlockInterface;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;
Expand All @@ -20,9 +23,9 @@ public ItemStack getItem(@NotNull String... arguments) {
}

final ItemStack item = cache.computeIfAbsent(arguments[0], (id) -> {
final ItemStack result = ExecutableBlocksAPI.getExecutableBlock(arguments[0]);
final Optional<ExecutableBlockInterface> result = ExecutableBlocksAPI.getExecutableBlocksManager().getExecutableBlock(arguments[0]);

return (result == null) ? null : result.clone();
return result.map(executableBlockInterface -> executableBlockInterface.buildItem(1, Optional.empty())).orElse(null);
});

return (item == null) ? new ItemStack(Material.STONE) : item.clone();
Expand Down
Loading