Resource SignMenu [1.15.2] - Get Player Sign Input!

Discussion in 'Spigot Plugin Development' started by FrostedSnowman, Jun 19, 2017.

  1. It's working on 1.8, just need to change something in "String[] text = packet.getStringArrays().read(0);" on sign close. Help? I don't know match about packets. In the error, it prints the parameters and the lines are in "b", any way to get it out? Because it's there...
  2. For some reason i cant compile it. I get this error message:
    Code (Text):
    ERROR][93,58] cannot access
    [ERROR] class file for not found
  3. FrostedSnowman

    Resource Staff

    I will be updating this to recent 1.13 builds in the next couple days.
  4. Well, it can't find the class in 1.12 either
  5. Hi, im new in this toppic. How do I use this? Am I allowed to copy the sourcecode and paste it in my code?
  6. Of course you can’t the BlockData API doesn’t exist in 1.12.2.
  7. And why does this API, which was tested in 1.12 needs that Class?
  8. This API using ProtocolLib to get an instance of WrappedBlockData. It could be that your version of ProtocolLib is buggy.
  9. FrostedSnowman

    Resource Staff

    This will be updated to latest 1.13 builds, tomorrow, most likely.
  10. FrostedSnowman

    Resource Staff

    Updated to the recommended 1.13 Build.

    Changelog (v2.0)
    • Removed several opening methods, and condensed to one; doesn't make sense to have multiple.
    • Removed array copying, moved to list implementations.
    • Removed double map lookups.
    • Sign locations now cached and removed when input is finished.
    • Sign input now uses Java 8 BiConsumer over custom interface.
    • Player::sendBlockChange is now used over manual packet creation for fake sign.
    • 1.13 Materials now used. SIGN_POST -> WALL_SIGN.
    #30 FrostedSnowman, Nov 11, 2018
    Last edited: Nov 11, 2018
  11. Unable to get this to work on 1.13 or 1.13.2, every time I attempt to display the GUI the player client crashes with the following error log:
    Code (Text):

    The game crashed whilst rendering screen
    Error: java.lang.IllegalArgumentException: Cannot get property blv{name=facing, clazz=class ep, values=[north, south, west, east]} as it does not exist in Block{minecraft:air}

    ---- Minecraft Crash Report ----
    // Don't be sad, have a hug! <3

    Time: 3/6/19 7:20 PM
    Description: Rendering screen

    java.lang.IllegalArgumentException: Cannot get property blv{name=facing, clazz=class ep, values=[north, south, west, east]} as it does not exist in Block{minecraft:air}
       at bkr.c(SourceFile:95)
       at cli.a(SourceFile:117)
       at ctn.a(SourceFile:792)
       at cfi.c(SourceFile:847)
       at cfi.a(SourceFile:392)
       at net.minecraft.client.main.Main.main(SourceFile:144)

    A detailed walkthrough of the error, its code path and all known details is as follows:

    -- Head --
    Thread: Client thread
       at bkr.c(SourceFile:95)
       at cli.a(SourceFile:117)

    -- Screen render details --
       Screen name: cli
       Mouse location: Scaled: (213, 120). Absolute: (427.000000, 240.000000)
       Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2.000000

    -- Affected level --
       Level name: MpServer
       All players: 1 total; [csy['insanj'/312, l='MpServer', x=-213.30, y=74.00, z=92.36]]
       Chunk stats: MultiplayerChunkCache: 441, 441
       Level seed: 0
       Level generator: ID 00 - default, ver 1. Features enabled: false
       Level generator options: {}
       Level spawn location: World: (-224,74,96), Chunk: (at 0,4,0 in -14,6; contains blocks -224,0,96 to -209,255,111), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
       Level time: 470700 game time, 56045 day time
       Level dimension: 0
       Level storage version: 0x00000 - Unknown?
       Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
       Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
       Forced entities: 83 total; [csy['insanj'/312, l='MpServer', x=-213.30, y=74.00, z=92.36], ajw['Pig'/130, l='MpServer', x=-207.49, y=89.00, z=25.45], ajn['Chicken'/131, l='MpServer', x=-218.59, y=87.00, z=21.70], akb['Sheep'/132, l='MpServer', x=-218.45, y=85.00, z=43.55], anj['Skeleton'/133, l='MpServer', x=-217.50, y=9.00, z=111.50], anq['Witch'/134, l='MpServer', x=-221.49, y=29.00, z=100.28], anj['Skeleton'/135, l='MpServer', x=-209.50, y=51.00, z=108.50], anj['Skeleton'/136, l='MpServer', x=-223.29, y=48.00, z=100.50], aph['Minecart with Chest'/137, l='MpServer', x=-215.50, y=14.06, z=129.50], anj['Skeleton'/138, l='MpServer', x=-209.50, y=39.00, z=147.86], ajp['Cow'/145, l='MpServer', x=-214.58, y=87.00, z=18.78], ajp['Cow'/146, l='MpServer', x=-215.20, y=88.00, z=35.50], ajw['Pig'/147, l='MpServer', x=-206.55, y=91.00, z=30.79], ajp['Cow'/148, l='MpServer', x=-207.77, y=90.00, z=27.48], ajn['Chicken'/149, l='MpServer', x=-194.88, y=84.00, z=44.52], akb['Sheep'/150, l='MpServer', x=-202.40, y=90.00, z=34.31], ajp['Cow'/151, l='MpServer', x=-207.48, y=91.00, z=34.41], akb['Sheep'/152, l='MpServer', x=-193.25, y=86.00, z=36.45], anj['Skeleton'/153, l='MpServer', x=-206.72, y=51.00, z=107.52], aph['Minecart with Chest'/154, l='MpServer', x=-193.89, y=6.00, z=120.51], akb['Sheep'/155, l='MpServer', x=-196.83, y=67.50, z=125.34], akb['Sheep'/156, l='MpServer', x=-197.55, y=67.45, z=122.64], ajn['Chicken'/157, l='MpServer', x=-193.45, y=67.51, z=123.72], anj['Skeleton'/164, l='MpServer', x=-184.53, y=21.00, z=100.29], anj['Skeleton'/165, l='MpServer', x=-181.46, y=20.00, z=115.71], aji['Bat'/166, l='MpServer', x=-179.51, y=15.86, z=113.99], ans['Zombie'/167, l='MpServer', x=-190.45, y=41.00, z=116.25], amp['Creeper'/168, l='MpServer', x=-176.70, y=11.00, z=131.30], ami['Egg'/169, l='MpServer', x=-191.38, y=70.00, z=141.13], ajp['Cow'/170, l='MpServer', x=-179.80, y=70.00, z=165.46], amp['Creeper'/184, l='MpServer', x=-171.50, y=16.00, z=47.50], amp['Creeper'/185, l='MpServer', x=-163.50, y=14.00, z=61.50], anm['Spider'/186, l='MpServer', x=-172.50, y=16.00, z=48.50], amp['Creeper'/187, l='MpServer', x=-173.50, y=16.00, z=52.50], amp['Creeper'/188, l='MpServer', x=-171.50, y=16.00, z=49.50], amp['Creeper'/189, l='MpServer', x=-175.50, y=16.00, z=49.50], ans['Zombie'/190, l='MpServer', x=-162.50, y=18.00, z=91.27], aji['Bat'/191, l='MpServer', x=-162.25, y=16.10, z=89.75], akb['Sheep'/192, l='MpServer', x=-170.74, y=66.00, z=94.49], anj['Skeleton'/64, l='MpServer', x=-289.50, y=28.00, z=47.50], aji['Bat'/193, l='MpServer', x=-169.51, y=12.10, z=99.25], anj['Skeleton'/194, l='MpServer', x=-173.55, y=30.00, z=110.75], ans['Zombie'/195, l='MpServer', x=-165.49, y=18.00, z=88.71], amp['Creeper'/67, l='MpServer', x=-289.45, y=35.00, z=143.86], amp['Creeper'/196, l='MpServer', x=-162.50, y=18.00, z=108.50], anj['Skeleton'/197, l='MpServer', x=-171.70, y=11.00, z=127.70], ans['Zombie'/69, l='MpServer', x=-286.58, y=28.00, z=54.74], anj['Skeleton'/198, l='MpServer', x=-175.49, y=28.00, z=121.28], anm['Spider'/70, l='MpServer', x=-277.50, y=72.00, z=84.50], ajp['Cow'/199, l='MpServer', x=-167.55, y=79.00, z=127.55], anm['Spider'/71, l='MpServer', x=-283.24, y=72.00, z=90.98], anm['Spider'/72, l='MpServer', x=-273.50, y=72.00, z=86.50], ajn['Chicken'/200, l='MpServer', x=-159.10, y=76.00, z=120.44], akb['Sheep'/73, l='MpServer', x=-281.79, y=72.00, z=100.65], ajp['Cow'/74, l='MpServer', x=-286.58, y=71.00, z=137.78], akb['Sheep'/76, l='MpServer', x=-277.73, y=73.00, z=164.49], anj['Skeleton'/211, l='MpServer', x=-147.50, y=19.00, z=105.72], akb['Sheep'/84, l='MpServer', x=-261.55, y=71.00, z=55.45], ans['Zombie'/212, l='MpServer', x=-156.50, y=56.00, z=101.50], ajp['Cow'/213, l='MpServer', x=-146.75, y=62.53, z=100.17], ajn['Chicken'/85, l='MpServer', x=-260.62, y=81.00, z=150.87], aph['Minecart with Chest'/214, l='MpServer', x=-159.50, y=14.06, z=116.50], amp['Creeper'/215, l='MpServer', x=-145.80, y=34.00, z=116.47], ajp['Cow'/216, l='MpServer', x=-167.19, y=76.00, z=119.50], aph['Minecart with Chest'/217, l='MpServer', x=-152.50, y=13.06, z=151.50], ans['Zombie'/218, l='MpServer', x=-157.25, y=23.00, z=145.53], amp['Creeper'/219, l='MpServer', x=-154.50, y=23.00, z=155.15], ajp['Cow'/220, l='MpServer', x=-149.13, y=75.00, z=157.81], ajp['Cow'/94, l='MpServer', x=-244.50, y=74.00, z=83.65], ajp['Cow'/95, l='MpServer', x=-242.57, y=72.00, z=118.20], ako['Llama'/224, l='MpServer', x=-143.10, y=77.00, z=37.36], aph['Minecart with Chest'/226, l='MpServer', x=-138.50, y=8.06, z=133.50], aji['Bat'/228, l='MpServer', x=-138.58, y=47.10, z=130.75], ajw['Pig'/109, l='MpServer', x=-220.64, y=87.00, z=24.23], ans['Zombie'/110, l='MpServer', x=-230.19, y=42.00, z=30.45], ans['Zombie'/111, l='MpServer', x=-226.26, y=44.00, z=28.60], akb['Sheep'/113, l='MpServer', x=-225.49, y=87.00, z=19.81], ajw['Pig'/114, l='MpServer', x=-226.19, y=86.00, z=18.55], ajw['Pig'/115, l='MpServer', x=-231.06, y=74.00, z=49.52], ajw['Pig'/243, l='MpServer', x=-138.57, y=71.00, z=170.74], amp['Creeper'/116, l='MpServer', x=-225.50, y=37.00, z=68.50], anj['Skeleton'/117, l='MpServer', x=-225.50, y=26.00, z=101.50], aji['Bat'/118, l='MpServer', x=-236.44, y=48.90, z=107.41]]
       Retry entities: 0 total; []
       Server brand: CraftBukkit
       Server type: Non-integrated multiplayer server
       at cqv.a(SourceFile:427)
       at cfi.b(SourceFile:1811)
       at cfi.a(SourceFile:400)
       at net.minecraft.client.main.Main.main(SourceFile:144)

    -- System Details --
       Minecraft Version: 1.13
       Operating System: Windows 10 (amd64) version 10.0
       Java Version: 1.8.0_51, Oracle Corporation
       Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
       Memory: 239927296 bytes (228 MB) / 603979776 bytes (576 MB) up to 2147483648 bytes (2048 MB)
       JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
       Launched Version: 1.13
  12. There needs to be a sign at that location.
  13. @FrostedSnowman I'm using it on 1.13.2 but it shows an empty sign to the user and it can't be edited.

    EDIT: It seems the BlockPosition must be set to current coordinate in order to work.
    BlockPosition blockPosition = new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ());
    #33 YellowZaki, Mar 12, 2019
    Last edited: Mar 12, 2019
  14. Hmm, even though I put a list of four filled strings in for the argument for newmenu, the player gets a sign with no lines
  15. FrostedSnowman

    Resource Staff

    Will update it for 1.13.2 shortly
  16. FrostedSnowman

    Resource Staff

    Updated to the recommended 1.13.2 Build.

    Changelog (v3.0)
    • more OOP from it, you're welcome. (Menu object is now returned)
    • Removed BiConsumer, now using BiPredicate for input failure detection
    • Fixed issue with no text appearing on the sign
    • Ability to automatically reopen the menu if desired conditions aren't met in either the text or the player
    • Null checking for player & sign text
    • New usage for menu creation (see main page)
  17. same problem, @FrostedSnowman how to fix it?
  18. FrostedSnowman

    Resource Staff

    what version are you using
  19. Thanks a lot! Maybe I'll use it one day :D
  20. Minecraft 1.13.2
    Code v2.0
    Solved problem:
    - Add api-version in plugin.yml
    #40 takahatashun, Jun 15, 2019
    Last edited: Jun 17, 2019