This a tutorial which shows you how to make these [Free]-signs like in essentials: Code:java @EventHandlerpublic void onSignCreate(SignChangeEvent e) {if (e.getLine(0).equalsIgnoreCase("[Free]") && !e.getLine(1).isEmpty()) {e.setLine(0, "§1[Free]");}} @EventHandlerpublic void onSignClick(PlayerInteractEvent e) {Player p = e.getPlayer();if (e.getAction()==Action.RIGHT_CLICK_BLOCK) {if (e.getClickedBlock().getType() == Material.WALL_SIGN ||e.getClickedBlock().getType() == Material.SIGN_POST ) {Sign s = (Sign) e.getClickedBlock().getState();if (s.getLine(0).equals("§1[Free]")) {try {int item = Integer.parseInt(s.getLine(1)); Inventory inv = Bukkit.createInventory(null, 27, "§1Free Stuff");for (int slot = 0; slot < inv.getSize(); slot++) {inv.setItem(slot, new ItemStack(item, 64));}p.openInventory(inv);} catch (Exception ex) {}}}} have fun
It's not really a tutorial but ok, maybe add something to check or the ID is really a existing item ID?
FisheyLP change the title to [Snippet], this isnt a tutorial, its a snippet of code that people can use. Also fix the formatting of the code so we can read it
Few things I noticed: You didn't check if the clicked block was null. You could have just checked if (e.getClickedBlock instanceof Sign) instead of checking all the sign states.
He checks that the action is right click block which means that the right clicked block will not be null.