Add SWAnvilInv.defaultText
Dieser Commit ist enthalten in:
Ursprung
7562a307ff
Commit
3a26c30ae8
@ -32,11 +32,17 @@ public class SWAnvilInv {
|
|||||||
|
|
||||||
private final AnvilGUI.Builder builder;
|
private final AnvilGUI.Builder builder;
|
||||||
private final Player player;
|
private final Player player;
|
||||||
|
private final String defaultText;
|
||||||
|
|
||||||
private Consumer<String> callback;
|
private Consumer<String> callback;
|
||||||
|
|
||||||
public SWAnvilInv(Player p, String t) {
|
public SWAnvilInv(Player p, String t) {
|
||||||
builder = new AnvilGUI.Builder().plugin(Core.getInstance()).title(t).text("»").onComplete(this::onResult);
|
this(p, t, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
public SWAnvilInv(Player p, String t, String defaultText) {
|
||||||
|
builder = new AnvilGUI.Builder().plugin(Core.getInstance()).title(t).text("»" + defaultText).onComplete(this::onResult);
|
||||||
|
this.defaultText = defaultText;
|
||||||
player = p;
|
player = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,7 +59,7 @@ public class SWAnvilInv {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setItem(Material m, byte meta, List<String> lore, boolean e) {
|
public void setItem(Material m, byte meta, List<String> lore, boolean e) {
|
||||||
builder.itemLeft(new SWItem(m, meta, "»", lore, e, null).getItemStack());
|
builder.itemLeft(new SWItem(m, meta, "»" + defaultText, lore, e, null).getItemStack());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCallback(Consumer<String> callback) {
|
public void setCallback(Consumer<String> callback) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren