Shop does not work with custom model data vehicles #154

Closed
opened 2023-04-16 20:10:26 +00:00 by stijnb1234 · 1 comment
stijnb1234 commented 2023-04-16 20:10:26 +00:00 (Migrated from github.com)

Describe the bug
Shop does not work with custom model data vehicles

To Reproduce
Steps to reproduce the behavior:

  1. Create vehicle with custom model data
  2. Run /vp shop
  3. See error

Expected behavior
Should just open.

Screenshots or Video Recordings

[20:55:04] [Server thread/WARN]: [VehiclesPlusPro] Task #37780 for VehiclesPlusPro v2.4 generated an exception
java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_16_R3.inventory.CraftMetaItem cannot be cast to class org.bukkit.inventory.meta.LeatherArmorMeta (org.bukkit.craftbukkit.v1_16_R3.inventory.CraftMetaItem and org.bukkit.inventory.meta.LeatherArmorMeta are in unnamed module of loader 'app')
	at me.legofreak107.vehiclesplus.gui.vehicles.VehicleShopGUI$1$1.run(VehicleShopGUI.java:87) ~[?:?]
	at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:100) ~[patched_1.16.5.jar:git-Purpur-1171]
	at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:468) ~[patched_1.16.5.jar:git-Purpur-1171]
	at net.minecraft.server.v1_16_R3.MinecraftServer.b(MinecraftServer.java:1503) ~[patched_1.16.5.jar:git-Purpur-1171]
	at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:449) ~[patched_1.16.5.jar:git-Purpur-1171]
	at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1416) ~[patched_1.16.5.jar:git-Purpur-1171]
	at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1142) ~[patched_1.16.5.jar:git-Purpur-1171]
	at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:293) ~[patched_1.16.5.jar:git-Purpur-1171]

Server and Plugin Information

  • Installed plugins: N/a
  • VehiclesPlus Version: 2.4
  • Server Platform and Version [eg: PaperSpigot 1.x.x #xxx]: Spigot 1.16.5
  • Operating System (if applicable): N/a
**Describe the bug** Shop does not work with custom model data vehicles **To Reproduce** Steps to reproduce the behavior: 1. Create vehicle with custom model data 2. Run `/vp shop` 3. See error **Expected behavior** Should just open. **Screenshots or Video Recordings** ``` [20:55:04] [Server thread/WARN]: [VehiclesPlusPro] Task #37780 for VehiclesPlusPro v2.4 generated an exception java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_16_R3.inventory.CraftMetaItem cannot be cast to class org.bukkit.inventory.meta.LeatherArmorMeta (org.bukkit.craftbukkit.v1_16_R3.inventory.CraftMetaItem and org.bukkit.inventory.meta.LeatherArmorMeta are in unnamed module of loader 'app') at me.legofreak107.vehiclesplus.gui.vehicles.VehicleShopGUI$1$1.run(VehicleShopGUI.java:87) ~[?:?] at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:100) ~[patched_1.16.5.jar:git-Purpur-1171] at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:468) ~[patched_1.16.5.jar:git-Purpur-1171] at net.minecraft.server.v1_16_R3.MinecraftServer.b(MinecraftServer.java:1503) ~[patched_1.16.5.jar:git-Purpur-1171] at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:449) ~[patched_1.16.5.jar:git-Purpur-1171] at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1416) ~[patched_1.16.5.jar:git-Purpur-1171] at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1142) ~[patched_1.16.5.jar:git-Purpur-1171] at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:293) ~[patched_1.16.5.jar:git-Purpur-1171] ``` **Server and Plugin Information** - Installed plugins: N/a - VehiclesPlus Version: 2.4 - Server Platform and Version [eg: **PaperSpigot** 1.x.x #xxx]: Spigot 1.16.5 - Operating System (if applicable): N/a
stijnb1234 commented 2023-05-29 17:56:29 +00:00 (Migrated from github.com)

Fixed in v2.4.1

Fixed in v2.4.1
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: SBDevelopment/VehiclesPlus#154
No description provided.