Skip to content

Item Hover config option prevents typing #44

Description

@AlexSlurp

When trying to type a message with hover-item enabled, if you don't have an item in your hand your message fails to send and it prints a console message. For now I'll have it disabled but I'd appreciate it if it gets fixed eventually <3.

[03:54:23 WARN]: [RedisChat] Entity task for RedisChat v5.5.13 generated an exception
java.lang.IllegalArgumentException: ItemStack amount must be between 1 and 99 but was 0
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:302) ~[guava-33.3.1-jre.jar:?]
        at org.bukkit.craftbukkit.inventory.CraftItemFactory.asHoverEvent(CraftItemFactory.java:220) ~[folia-1.21.8.jar:1.21.8-6-612d9bd]
        at org.bukkit.inventory.ItemStack.asHoverEvent(ItemStack.java:720) ~[folia-api-1.21.8-R0.1-SNAPSHOT.jar:?]
        at net.kyori.adventure.text.event.HoverEventSource.asHoverEvent(HoverEventSource.java:56) ~[adventure-api-4.24.0.jar:?]
        at RedisChat-5.5.13.jar/dev.unnm3d.redischat.chat.ComponentProvider.getItemInHandNameComponent(ComponentProvider.java:290) ~[RedisChat-5.5.13.jar:?]
        at RedisChat-5.5.13.jar/dev.unnm3d.redischat.chat.ComponentProvider.getRedisChatTagResolver(ComponentProvider.java:253) ~[RedisChat-5.5.13.jar:?]
        at RedisChat-5.5.13.jar/dev.unnm3d.redischat.chat.ComponentProvider.parseChatMessageContent(ComponentProvider.java:214) ~[RedisChat-5.5.13.jar:?]
        at RedisChat-5.5.13.jar/dev.unnm3d.redischat.channels.ChannelManager.outgoingMessage(ChannelManager.java:165) ~[RedisChat-5.5.13.jar:?]
        at RedisChat-5.5.13.jar/dev.unnm3d.redischat.channels.ChannelManager.handleOutgoingMessageSync(ChannelManager.java:255) ~[RedisChat-5.5.13.jar:?]
        at RedisChat-5.5.13.jar/dev.unnm3d.redischat.channels.ChannelManager.lambda$outgoingMessage$9(ChannelManager.java:219) ~[RedisChat-5.5.13.jar:?]
        at io.papermc.paper.threadedregions.scheduler.FoliaEntityScheduler.lambda$wrap$0(FoliaEntityScheduler.java:33) ~[folia-1.21.8.jar:?]
        at io.papermc.paper.threadedregions.EntityScheduler.executeTick(EntityScheduler.java:243) ~[folia-1.21.8.jar:1.21.8-6-612d9bd]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1660) ~[folia-1.21.8.jar:1.21.8-6-612d9bd]
        at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407) ~[folia-1.21.8.jar:1.21.8-6-612d9bd]
        at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:418) ~[folia-1.21.8.jar:1.21.8-6-612d9bd]
        at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:546) ~[concurrentutil-0.0.3.jar:?]
        at java.base/java.lang.Thread.run(Thread.java:1575) ~[?:?]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions