mirror of
https://github.com/Xiao-MoMi/Custom-Fishing.git
synced 2025-12-31 21:06:47 +00:00
try fixing some hooks
This commit is contained in:
@@ -151,7 +151,6 @@ public class BukkitHookManager implements HookManager, Listener {
|
||||
newLore.add(previous);
|
||||
}
|
||||
wrapped.lore(newLore);
|
||||
|
||||
wrapped.load();
|
||||
return;
|
||||
}
|
||||
@@ -201,6 +200,9 @@ public class BukkitHookManager implements HookManager, Listener {
|
||||
DurabilityItem durabilityItem;
|
||||
if (wrappedHook.hasTag("CustomFishing", "max_dur")) {
|
||||
durabilityItem = new CustomDurabilityItem(wrappedHook);
|
||||
} else if (hookConfig.maxUsages() > 0) {
|
||||
wrappedHook.setTag(hookConfig.maxUsages(), "CustomFishing", "max_dur");
|
||||
durabilityItem = new CustomDurabilityItem(wrappedHook);
|
||||
} else {
|
||||
durabilityItem = new VanillaDurabilityItem(wrappedHook);
|
||||
}
|
||||
|
||||
@@ -177,6 +177,7 @@ public class BukkitItemManager implements ItemManager, Listener {
|
||||
return (String) factory.wrap(itemStack).getTag("CustomFishing", "id").orElse(null);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public ItemStack getItemLoot(@NotNull Context<Player> context, ItemStack rod, FishHook hook) {
|
||||
String id = requireNonNull(context.arg(ContextKeys.ID));
|
||||
|
||||
Reference in New Issue
Block a user