Skip to content
Hakan Kargın edited this page Jun 7, 2022 · 5 revisions

How To Use

Sign System

With this feature you can easily get inputs from players via sign gui.

Example

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
    });
}
Clone this wiki locally