feat(anvil): set interactable slots
This commit is contained in:
parent
9b840ee53f
commit
8c59dae6ae
1 changed files with 3 additions and 0 deletions
|
@ -40,6 +40,7 @@ public class AnvilManager {
|
||||||
return new AnvilGUI.Builder()
|
return new AnvilGUI.Builder()
|
||||||
.plugin(NickoBukkit.getInstance())
|
.plugin(NickoBukkit.getInstance())
|
||||||
.itemLeft(getLeftItem(false))
|
.itemLeft(getLeftItem(false))
|
||||||
|
.interactableSlots(AnvilGUI.Slot.OUTPUT)
|
||||||
.onComplete((completion) -> {
|
.onComplete((completion) -> {
|
||||||
if (MojangUtils.isUsernameInvalid(completion.getText())) {
|
if (MojangUtils.isUsernameInvalid(completion.getText())) {
|
||||||
return Collections.singletonList(AnvilGUI.ResponseAction.replaceInputText("Invalid username!"));
|
return Collections.singletonList(AnvilGUI.ResponseAction.replaceInputText("Invalid username!"));
|
||||||
|
@ -56,6 +57,7 @@ public class AnvilManager {
|
||||||
return new AnvilGUI.Builder()
|
return new AnvilGUI.Builder()
|
||||||
.plugin(NickoBukkit.getInstance())
|
.plugin(NickoBukkit.getInstance())
|
||||||
.itemLeft(getLeftItem(false))
|
.itemLeft(getLeftItem(false))
|
||||||
|
.interactableSlots(AnvilGUI.Slot.OUTPUT)
|
||||||
.onComplete((completion) -> {
|
.onComplete((completion) -> {
|
||||||
if (MojangUtils.isUsernameInvalid(completion.getText())) {
|
if (MojangUtils.isUsernameInvalid(completion.getText())) {
|
||||||
return Collections.singletonList(AnvilGUI.ResponseAction.replaceInputText("Invalid username!"));
|
return Collections.singletonList(AnvilGUI.ResponseAction.replaceInputText("Invalid username!"));
|
||||||
|
@ -72,6 +74,7 @@ public class AnvilManager {
|
||||||
return new AnvilGUI.Builder()
|
return new AnvilGUI.Builder()
|
||||||
.plugin(NickoBukkit.getInstance())
|
.plugin(NickoBukkit.getInstance())
|
||||||
.itemLeft(getLeftItem(true))
|
.itemLeft(getLeftItem(true))
|
||||||
|
.interactableSlots(AnvilGUI.Slot.OUTPUT)
|
||||||
.onComplete((completion) -> {
|
.onComplete((completion) -> {
|
||||||
if (MojangUtils.isUsernameInvalid(completion.getText())) {
|
if (MojangUtils.isUsernameInvalid(completion.getText())) {
|
||||||
return Collections.singletonList(AnvilGUI.ResponseAction.replaceInputText("Invalid username!"));
|
return Collections.singletonList(AnvilGUI.ResponseAction.replaceInputText("Invalid username!"));
|
||||||
|
|
Loading…
Reference in a new issue