1.12.2 About signs menu

Discussion in 'Spigot Plugin Development' started by 5001, Oct 16, 2020.

  1. I have a problem creating the signs menu. How can I create a signs menu?
    use 'Bukkit.createInventory ()' open the signs menu
     
  2. Hi there,
    You sould use the PlayerInteractEvent, check if the clicked block is a sign & if it match with your sign and finaly open the inventory to the who clicked.

    I hope it could help you.
     
  3. How to create the sign menu?
     
  4. A sign menu is not an inventory. You need to send packets to show the sign input dialog to players and listen for their generated packet.

    Somebody in this forum has already written a library for this. Why don’t you just search for it and profit?
     
  5. oh My brother!

    I've been looking for it for two days and still can't find it.

    Can I ask you to help me?
     
  6. Do you know how to use ProtocolLib / NMS?
     
  7. I'm sorry, I read it for a long time, but I still didn't understand it
     
  8. I don't think Bukkit has such a method implemented. You need to use them in order to open a sign menu
     
  9. Yes, I'm looking for a library that has been provided
     
  10. I was talking about the Bukkit API
     
  11. How to create a sign

    “p.openSign();”

    To be honest, my English is not very good
     
  12. You need PacketPlayOutOpenSignEditor:
    Code (Text):
    Location loc = e.getPlayer().getLocation();
    PacketPlayOutOpenSignEditor packet = new PacketPlayOutOpenSignEditor(new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
    ((CraftPlayer)e.getPlayer()).getHandle().playerConnection.sendPacket(packet);
     
  13. Thank you. Now I'm going to give it a try

    Wait for my good news
     
  14. oh Sorry, my brother!

    My skill is really not good

    I use the IDEA to write plug-ins. When writing, the "packet play out open sign editor" is displayed in red! In other words, there are some problems!
     
  15. What do you mean by that?