add action methods for result

This commit is contained in:
jascotty2 2019-09-17 06:46:19 -05:00
parent e9a899db44
commit db3c808311

View File

@ -1,13 +1,16 @@
package com.songoda.core.gui;
import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.gui.methods.Clickable;
import com.songoda.core.nms.CoreNMS;
import com.songoda.core.nms.CustomAnvil;
import com.songoda.core.nms.NmsManager;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Anvil GUI for text prompts
@ -29,6 +32,16 @@ public class AnvilGui extends Gui {
this.player = player;
}
@NotNull
public AnvilGui setAction(@Nullable Clickable action) {
return (AnvilGui) setAction(2, action);
}
@NotNull
public AnvilGui setAction(@Nullable ClickType type, @Nullable Clickable action) {
return (AnvilGui) setAction(2, type, action);
}
public void open() {
anvil.open();
}