PluginBugs / Issues-CosmeticsCore

Repository used to keep track of issues of my plugin CosmeticsCore
https://lonedev.gitbook.io/cosmeticscore/
0 stars 0 forks source link

CosmeticsCore Color Menu Broken #259

Open MattDeWeerd opened 1 month ago

MattDeWeerd commented 1 month ago

Terms

Discord tag (optional)

matt_ow

What happened?

Trying to change the color of a cosmetic causes the gui to bug out and an error to log in the console.

Users in the discord said it could possibly be due to the latest PlaceholderAPI (2.11.6), but I have not confirmed.

Steps to reproduce the issue

  1. Open the wardrobe
  2. Right click an item that is tintable

Server version

Purpur-1.21.1-2304-dee41bc (1.21.1)

CosmeticsCore Version

1.3.0-RELEASE-2

ProtocolLib Version

5.3.0-SNAPSHOT-723

LoneLibs Version

1.0.58

FULL server log

latest.log

Error (optional)

[04:32:47 ERROR]: Could not pass event InventoryClickEvent to LoneLibs v1.0.58
java.lang.NullPointerException: Cannot invoke "java.util.List.size()" because "<local6>" is null
        at CosmeticsCore_1.3.0-release-2.jar/dev.lone.cosmeticscore.main.q.a(SourceFile:146) ~[CosmeticsCore_1.3.0-release-2.jar:?]
        at CosmeticsCore_1.3.0-release-2.jar/dev.lone.cosmeticscore.main.q.a(SourceFile:134) ~[CosmeticsCore_1.3.0-release-2.jar:?]
        at CosmeticsCore_1.3.0-release-2.jar/dev.lone.cosmeticscore.main.q.aS(SourceFile:109) ~[CosmeticsCore_1.3.0-release-2.jar:?]
        at CosmeticsCore_1.3.0-release-2.jar/dev.lone.cosmeticscore.main.o.a(SourceFile:364) ~[CosmeticsCore_1.3.0-release-2.jar:?]
        at LoneLibs_1.0.58.jar/fr.mrmicky.fastinv.FastInv.handleClick(FastInv.java:316) ~[LoneLibs_1.0.58.jar:?]
        at LoneLibs_1.0.58.jar/fr.mrmicky.fastinv.FastInvManager$1.onInventoryClick(FastInvManager.java:50) ~[LoneLibs_1.0.58.jar:?]
        at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:40) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:1.21.1-2304-dee41bc]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.21.1.jar:1.21.1-2304-dee41bc]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[purpur-1.21.1.jar:1.21.1-2304-dee41bc]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:630) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3298) ~[purpur-1.21.1.jar:1.21.1-2304-dee41bc]
        at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:69) ~[purpur-1.21.1.jar:1.21.1-2304-dee41bc]
        at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:33) ~[purpur-1.21.1.jar:1.21.1-2304-dee41bc]
        at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:56) ~[purpur-1.21.1.jar:1.21.1-2304-dee41bc]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.21.1.jar:1.21.1-2304-dee41bc]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[purpur-1.21.1.jar:1.21.1-2304-dee41bc]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[purpur-1.21.1.jar:1.21.1-2304-dee41bc]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1574) ~[purpur-1.21.1.jar:1.21.1-2304-dee41bc]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[purpur-1.21.1.jar:1.21.1-2304-dee41bc]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[purpur-1.21.1.jar:1.21.1-2304-dee41bc]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1551) ~[purpur-1.21.1.jar:1.21.1-2304-dee41bc]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1544) ~[purpur-1.21.1.jar:1.21.1-2304-dee41bc]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[purpur-1.21.1.jar:1.21.1-2304-dee41bc]
        at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1503) ~[purpur-1.21.1.jar:1.21.1-2304-dee41bc]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1510) ~[purpur-1.21.1.jar:1.21.1-2304-dee41bc]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1355) ~[purpur-1.21.1.jar:1.21.1-2304-dee41bc]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:334) ~[purpur-1.21.1.jar:1.21.1-2304-dee41bc]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

CosmeticsCore config.yml

lang: en
extract_default_assets: true
cosmetics:
  max_equippable:
    body: 3
    balloon: 2
  hide_during_combat:
    enabled: true
    combat_duration_ticks: 600
  fix_invisible_nametag: false
  hide_in_vanish: true
  worlds:
  - '*'
wardrobe_room:
  camera:
    hide_actionbar_texts: true
    use_invisibility_potion: false
    rotation:
      enabled: true
    zoom:
      enabled: true
      min: 2
    fade_effect: true
    location:
      world: Spawn
      x: 134.5
      y: 43.5
      z: -39.5
      yaw: -62.293255
      pitch: 21.490583
  mannequin:
    location:
      world: Spawn
      x: 137.5
      y: 41
      z: 41
      yaw: 180
      pitch: 0
  teleport_area:
    enter:
      world: Spawn
      pos1:
        x: 139.0
        y: 43.0
        z: -34.0
      pos2:
        x: 141.0
        y: 41.0
        z: -35.0
    exit_location:
      world: Spawn
      x: 140.5
      y: 41.0
      z: -32.5
      yaw: -0.09639077
      pitch: -1.5820593
  gui:
    cursor_default: fermented_spider_eye:9000001
    cursor_rotate: fermented_spider_eye:9000002
    cursor_pointer: fermented_spider_eye:9000003
    dyeing_pointer: fermented_spider_eye:9100003
    tutorial_gui: fermented_spider_eye:9100004
    tutorial_gui_checked: fermented_spider_eye:9100005
    slots:
      colors:
        not_owned: 195,147,57
        owned: 56,67,100
        wearing: 57,70,195
        wearing_preview: 195,120,57
        max_amount_reached: 111,111,111
      add_item_in_blank_slots:
        # This is useful only for some expert users that need to do some crazy stuff.
        # Do not enable it if you don't know what you are doing.
        enabled: false
        type: PAPER
        custom_model_data: 1337666
send_creative_hidden_hat_message: true
save:
  # Use only one at a time
  file:
    enabled: false
  mysql:
    enabled: true
    url: jdbc:mysql://xxxxxx/s4_cosmeticscore
    username: xxxxxx
    password: xxxxxxx
    table: cosmeticscore_saved
debug: false

Problematic items yml configuration file (optional)

No response

Other files, you can drag and drop them here to upload. (optional)

No response

Screenshots/Videos (you can drag and drop files or paste links)

https://imgur.com/a/JQxnJBg image

Kimsch05n commented 1 month ago

Did you solve this issue by any chance? I have the same issue with the same plugin version settings in 1.20.1.

MattDeWeerd commented 1 month ago

No, I am still waiting for @LoneDev6 to look into this.

LoneDev6 commented 1 month ago

Can you test the plugin on 1.20.4? Let me know if it has the same issue. Thanks

MattDeWeerd commented 1 month ago

Can you test the plugin on 1.20.4? Let me know if it has the same issue. Thanks

@LoneDev6 CosmeticsCore does not load on 1.20.4

[16:18:44] [ServerMain/INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[16:18:46] [ServerMain/INFO]: Loaded 1174 recipes
[16:18:46] [ServerMain/INFO]: Loaded 1271 advancements
[16:18:47] [Server thread/INFO]: Starting minecraft server version 1.20.4
[16:18:47] [Server thread/INFO]: Loading properties
[16:18:47] [Server thread/INFO]: This server is running Purpur version git-Purpur-2176 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 6b1ee98 on HEAD)
[16:18:48] [Server thread/INFO]: Server Ping Player Sample Count: 12
[16:18:48] [Server thread/INFO]: Using 4 threads for Netty based IO
[16:18:48] [Server thread/INFO]: [ChunkTaskScheduler] Chunk system is using 1 I/O threads, 4 worker threads, and gen parallelism of 4 threads
[16:18:48] [Server thread/WARN]: [Pufferfish] Will not enable SIMD! These optimizations are only safely supported on Java 17 through Java 21.
[16:18:48] [Server thread/INFO]: Default game type: SURVIVAL
[16:18:48] [Server thread/INFO]: Generating keypair
[16:18:48] [Server thread/INFO]: Starting Minecraft server on *:25565
[16:18:49] [Server thread/INFO]: Using default channel type
[16:18:49] [Server thread/INFO]: Paper: Using Java compression from Velocity.
[16:18:49] [Server thread/INFO]: Paper: Using Java cipher from Velocity.
[16:18:49] [Server thread/INFO]: [ProtocolLib] Loading server plugin ProtocolLib v5.3.0-SNAPSHOT-732
[16:18:49] [Server thread/INFO]: [LoneLibs] Loading server plugin LoneLibs v1.0.59
[16:18:49] [Server thread/INFO]: [spark] Loading server plugin spark v1.10.109
[16:18:49] [Server thread/INFO]: [CosmeticsCore] Loading server plugin CosmeticsCore v1.3.0-release-2
[16:18:49] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
[16:18:49] [Server thread/INFO]: [ProtocolLib] Enabling ProtocolLib v5.3.0-SNAPSHOT-732
[16:18:49] [Server thread/INFO]: [LoneLibs] Enabling LoneLibs v1.0.59
[16:18:49] [Server thread/INFO]: Preparing level "world"
[16:18:50] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[16:18:51] [Server thread/INFO]: Time elapsed: 1240 ms
[16:18:51] [Server thread/INFO]: Preparing start region for dimension minecraft:the_nether
[16:18:51] [Server thread/INFO]: Time elapsed: 115 ms
[16:18:51] [Server thread/INFO]: Preparing start region for dimension minecraft:the_end
[16:18:51] [Server thread/INFO]: Time elapsed: 17 ms
[16:18:51] [Server thread/INFO]: [spark] Enabling spark v1.10.109
[16:18:51] [Server thread/INFO]: [spark] Using Paper ServerTickStartEvent for tick monitoring
[16:18:52] [Server thread/INFO]: [spark] Starting background profiler...
[16:18:52] [Server thread/INFO]: [spark] The async-profiler engine is not supported for your os/arch (windows11/amd64), so the built-in Java engine will be used instead.
[16:18:52] [Server thread/INFO]: [CosmeticsCore] Enabling CosmeticsCore v1.3.0-release-2
[16:18:52] [Server thread/INFO]: [NBTAPI] [NBTAPI] Found Minecraft: v1_20_R3! Trying to find NMS support
[16:18:52] [Server thread/INFO]: [NBTAPI] [NBTAPI] NMS support 'MC1_20_R3' loaded!
[16:18:52] [Server thread/INFO]: [NBTAPI] [NBTAPI] Using the plugin 'LoneLibs' to create a bStats instance!
[16:18:53] [Server thread/ERROR]: Error occurred while enabling CosmeticsCore v1.3.0-release-2 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "lonelibs.dev.lone.fastnbt.nms.nbt.IDataComponents.setCustomName(org.bukkit.inventory.ItemStack, String)" because "lonelibs.dev.lone.fastnbt.nms.nbt.NBT.dataComponents" is null
    at lonelibs.dev.lone.fastnbt.nms.nbt.NItem.setCustomName(NItem.java:182) ~[LoneLibs.jar:?]
    at dev.lone.cosmeticscore.main.aB.b(SourceFile:58) ~[CosmeticsCore_1.3.0-release-2.jar:?]
    at dev.lone.cosmeticscore.main.aB.a(SourceFile:44) ~[CosmeticsCore_1.3.0-release-2.jar:?]
    at dev.lone.cosmeticscore.b.d(SourceFile:124) ~[CosmeticsCore_1.3.0-release-2.jar:?]
    at dev.lone.cosmeticscore.Main.onEnable(SourceFile:60) ~[CosmeticsCore_1.3.0-release-2.jar:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:287) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
    at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:188) ~[purpur-1.20.4.jar:git-Purpur-2176]
    at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[purpur-1.20.4.jar:git-Purpur-2176]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugin(CraftServer.java:653) ~[purpur-1.20.4.jar:git-Purpur-2176]
    at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugins(CraftServer.java:564) ~[purpur-1.20.4.jar:git-Purpur-2176]
    at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:675) ~[purpur-1.20.4.jar:git-Purpur-2176]
    at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:435) ~[purpur-1.20.4.jar:git-Purpur-2176]
    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:346) ~[purpur-1.20.4.jar:git-Purpur-2176]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1146) ~[purpur-1.20.4.jar:git-Purpur-2176]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[purpur-1.20.4.jar:git-Purpur-2176]
    at java.lang.Thread.run(Thread.java:1570) ~[?:?]
[16:18:53] [Server thread/INFO]: [CosmeticsCore] Disabling CosmeticsCore v1.3.0-release-2
[16:18:53] [Server thread/INFO]: Running delayed init tasks
[16:18:53] [Server thread/INFO]: Done (5.589s)! For help, type "help"
MattDeWeerd commented 1 month ago

@LoneDev6 is there anything else I can do to help with this?

Futodama commented 2 days ago

On 1.21.1 This problem also occurs.