mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-02-03 11:31:21 +01:00
Small cleanup
This commit is contained in:
parent
f193fdd706
commit
a1b4b1aff1
@ -1,9 +1,18 @@
|
||||
package net.Indyuce.mmoitems.api.edition;
|
||||
|
||||
public interface Edition {
|
||||
|
||||
/*
|
||||
* processes the player input; returns true if edition should be closed or
|
||||
* false if it should continue
|
||||
*/
|
||||
public boolean output(String input);
|
||||
|
||||
|
||||
public void enable(String... message);
|
||||
|
||||
|
||||
/*
|
||||
* true if after successful edition, the GUI should go back to the
|
||||
* previously opened GUI or if it should just be ignored
|
||||
*/
|
||||
public boolean shouldGoBack();
|
||||
}
|
||||
|
@ -21,7 +21,8 @@ public abstract class EditionProcess {
|
||||
|
||||
public void input(String input) {
|
||||
if (edition.output(input)) {
|
||||
if(edition.shouldGoBack()) inv.open();
|
||||
if (edition.shouldGoBack())
|
||||
inv.open();
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user