-
Notifications
You must be signed in to change notification settings - Fork 19
Sign
Hakan Kargın edited this page Jun 7, 2022
·
5 revisions
With this feature you can easily get inputs from players via sign gui.
public void openSign(Player player) {
HSign sign = HCore.signBuilder(player).type(Material.SIGN_POST).lines("", "^^^^^^^^", "Write your", "friend name").build(); // creates sign
sign.open(); //opens sign to player
sign.whenInputReceived(lines -> { //runs when the player is closed the sign gui
String friend = lines[0]; //gets text from line 0
player.sendMessage("Your friend name is " + friend);// and sends line 0 to players as message
});
}