ViaVersion / ViaRewind

ViaBackwards addon to allow 1.8.x and 1.7.x clients on newer server versions.
https://hangar.papermc.io/ViaVersion/ViaRewind
GNU General Public License v3.0
245 stars 79 forks source link

1.7.10 player kicked when clicking specific items in menu on 1.8.8 server #493

Closed jtJava closed 2 months ago

jtJava commented 5 months ago

/viaversion dump Output

https://dump.viaversion.com/f4978ea8ff7887f0a88ed88ac2a056893fe618ac6464f22d5750d9be02fbecc5

Console Error

https://hastebin.skyra.pw/gujiyosovu.prolog
https://mclo.gs/CPI9jnT

Bug Description

Clicking on the following itemstack in a menu causes the client to be disconnected. Colors class is just legacy format coloring

    @Override
    public ItemStack getDisplayedItem(Player player) {
        // If slot is not open we display a barrier block with rank message
        if (!this.openSlot) {
            return new ItemBuilder(Material.BARRIER)
                .name(Colors.GRAY + "Create Custom Difficulty " + (this.difficultyIndex + 1))
                .lore("",
                    Colors.PRIMARY + "Only " + Colors.AQUA + "Premium" + Colors.PRIMARY + " players can",
                    Colors.PRIMARY + "create multiple custom difficulties!")
                .build();
        }

        ArenaProfile profile = Profiles.getProfile(ArenaProfile.class, player);
        BotProperties properties = profile.getCustomDifficultyProperties(this.difficultyIndex);
        if (properties == null) {
            return new ItemBuilder(Material.OAK_SIGN)
                    .name(Colors.PRIMARY + "Create Custom Difficulty " + (this.difficultyIndex + 1))
                    .lore("",
                            Colors.GREEN + Colors.B + "Click to create!").build();
        } else {
            return new ItemBuilder(Material.WRITTEN_BOOK)
                    .name(Colors.PRIMARY + "Custom Difficulty " + Colors.SECONDARY + properties.getNamePrefix())
                    .lore("",
                            Colors.GREEN + Colors.B + "Left-click to play!",
                            Colors.GRAY + Colors.I + "Right-click to edit.",
                            Colors.GRAY + Colors.I + "Shift-click to delete.")
                    .flags()
                    .build();
        }
    }

Steps to Reproduce

  1. Join pvp.land with 1.7.10 client
  2. Join arena server
  3. Open bot menu using gold sword in inventory
  4. Create a custom bot if one does not exist (Click the sign and then click the back button in bottom right)
  5. Left, right, or shift click the custom bot item

Expected Behavior

Player should not be disconnected due to a netty error

Additional Server Info

No response

Checklist

Barvalg commented 5 months ago

Platform: git--PandaSpigot--34%20%28MC%3A%201.8.8%29
ViaVersion (4.9.4-SNAPSHOT): Even with master
ViaRewind(3.0.7-SNAPSHOT): Even with master

Barvalg commented 5 months ago

Platform: git--PandaSpigot--34%20%28MC%3A%201.8.8%29
ViaVersion (4.9.4-SNAPSHOT): Even with master
ViaRewind(3.0.7-SNAPSHOT): Even with master

FlorianMichael commented 2 months ago

Please provide a full server and client log as well as trying to use latest Via* addons