Skip to content

Commit

Permalink
fix self.
Browse files Browse the repository at this point in the history
  • Loading branch information
portlek committed Nov 22, 2024
1 parent e26780a commit 04a7972
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
package net.infumia.frame.element;

import java.time.Duration;
import java.util.function.BooleanSupplier;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import net.infumia.frame.context.element.ContextElementClick;
import net.infumia.frame.context.element.ContextElementItemClick;
import net.infumia.frame.context.element.ContextElementItemRender;
import net.infumia.frame.context.element.ContextElementItemUpdate;
import net.infumia.frame.context.element.ContextElementRender;
import net.infumia.frame.state.State;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public interface ElementItemBuilder extends ElementBuilder {
@NotNull
Expand Down Expand Up @@ -48,6 +51,14 @@ ElementItemBuilder renderWith(
@Override
ElementItemBuilder updateOnClick();

@NotNull
ElementItemBuilder interactionDelay(@Nullable Duration interactionDelay);

@NotNull
ElementItemBuilder onInteractionDelay(
@NotNull Consumer<ContextElementClick> onInteractionDelay
);

@NotNull
@Override
ElementItemBuilder updateOnStateChange(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package net.infumia.frame.element;

import java.time.Duration;
import java.util.function.BooleanSupplier;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import net.infumia.frame.context.ContextBase;
import net.infumia.frame.context.element.ContextElementClick;
import net.infumia.frame.context.element.ContextElementItemClick;
import net.infumia.frame.context.element.ContextElementItemRender;
import net.infumia.frame.context.element.ContextElementItemUpdate;
Expand Down Expand Up @@ -127,6 +129,22 @@ public ElementItemBuilder updateOnClick() {
return this;
}

@NotNull
@Override
public ElementItemBuilder onInteractionDelay(
final @NotNull Consumer<ContextElementClick> onInteractionDelay
) {
super.onInteractionDelay(onInteractionDelay);
return this;
}

@NotNull
@Override
public ElementItemBuilder interactionDelay(final @Nullable Duration interactionDelay) {
super.interactionDelay(interactionDelay);
return this;
}

@NotNull
@Override
public ElementItemBuilder cancelOnClick(final boolean cancelOnClick) {
Expand Down

0 comments on commit 04a7972

Please sign in to comment.