PluginBugs / Issues-ItemsAdder

Repository used to keep track of issues of my plugin ItemsAdder
https://itemsadder.devs.beer
54 stars 21 forks source link

Console spam when using new swords to break custom blocks #3837

Closed Koora7334 closed 2 months ago

Koora7334 commented 3 months ago

Terms

Discord tag (optional)

koora_

What happened?

I got an error when trying to swing my new swords, when breaking new blocks.

Steps to reproduce the issue

Just swing your weapon with my config, then try to break new blocks added from ItemsAdder.

Server version

Current Purpur Version: 1.21-2275-82ccc76 (MC: 1.21)*

(Same with latest)

ItemsAdder Version

4.0.2-alpha-test-3

ProtocolLib Version

5.3.0-SNAPSHOT-726

LoneLibs Version

1.0.56

Full server log

No response

Error (optional)

[21:36:28] [Server thread/ERROR]: Could not pass event PlayerArmSwingEvent to ItemsAdder v4.0.2-alpha-test-3
java.lang.IllegalArgumentException: Damage cannot exceed max damage
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:143) ~[guava-32.1.2-jre.jar:?]
    at org.bukkit.craftbukkit.inventory.CraftMetaItem.setDamage(CraftMetaItem.java:1628) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at ItemsAdder.jar/ia.m.nd.k(SourceFile:375) ~[ItemsAdder.jar:?]
    at ItemsAdder.jar/ia.m.eO.e(SourceFile:97) ~[ItemsAdder.jar:?]
    at ItemsAdder.jar/ia.m.eO.f(SourceFile:107) ~[ItemsAdder.jar:?]
    at ItemsAdder.jar/ia.m.eO.a(SourceFile:128) ~[ItemsAdder.jar:?]
    at ItemsAdder.jar/ia.m.eO.a(SourceFile:279) ~[ItemsAdder.jar:?]
    at ItemsAdder.jar/ia.m.eO.a(SourceFile:237) ~[ItemsAdder.jar:?]
    at ItemsAdder.jar/ia.m.eO.a(SourceFile:231) ~[ItemsAdder.jar:?]
    at ItemsAdder.jar/ia.m.cB.fl(SourceFile:196) ~[ItemsAdder.jar:?]
    at ItemsAdder.jar/ia.m.nr.d(SourceFile:110) ~[ItemsAdder.jar:?]
    at ItemsAdder.jar/ia.m.cB.j(SourceFile:193) ~[ItemsAdder.jar:?]
    at ItemsAdder.jar/ia.m.nr.d(SourceFile:110) ~[ItemsAdder.jar:?]
    at ItemsAdder.jar/ia.m.cB.fh(SourceFile:173) ~[ItemsAdder.jar:?]
    at ItemsAdder.jar/ia.m.cB.fe(SourceFile:105) ~[ItemsAdder.jar:?]
    at ItemsAdder.jar/ia.m.cD.b(SourceFile:224) ~[ItemsAdder.jar:?]
    at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:40) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
    at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:1.21-2275-82ccc76]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
    at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.handleAnimate(ServerGamePacketListenerImpl.java:2604) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at net.minecraft.network.protocol.game.ServerboundSwingPacket.handle(ServerboundSwingPacket.java:34) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at net.minecraft.network.protocol.game.ServerboundSwingPacket.handle(ServerboundSwingPacket.java:16) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:56) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1572) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1549) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1542) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1501) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1508) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1353) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:333) ~[purpur-1.21.jar:1.21-2275-82ccc76]
    at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

Problematic items yml configuration file (optional)

info:
  namespace: plutonia

items:
  obsidian_sword:
    display_name: Épée en obsidienne
    permission: obsidian_sword
    durability:
      max_custom_durability: 2000
    attribute_modifiers:
      mainhand:
        attackDamage: 7
    resource:
      material: DIAMOND_SWORD
      generate: true
      textures:
      - item/obsidian_sword.png
  titane_sword:
    display_name: Épée en titane
    permission: titane_sword
    durability:
      max_custom_durability: 2500
    attribute_modifiers:
      mainhand:
        attackDamage: 8
    resource:
      material: DIAMOND_SWORD
      generate: true
      textures:
      - item/titane_sword.png
  topaze_sword:
    display_name: Épée en topaze
    permission: topaze_sword
    durability:
      max_custom_durability: 3000
    attribute_modifiers:
      mainhand:
        attackDamage: 9
    resource:
      material: DIAMOND_SWORD
      generate: true
      textures:
      - item/topaze_sword.png
  mercure_sword:
    display_name: Épée en mercure
    permission: mercure_sword
    durability:
      max_custom_durability: 3500
    attribute_modifiers:
      mainhand:
        attackDamage: 10
    resource:
      material: DIAMOND_SWORD
      generate: true
      textures:
      - item/mercure_sword.png
  plutonium_sword:
    display_name: Épée en plutonium
    permission: plutonium_sword
    durability:
      max_custom_durability: 4000
    attribute_modifiers:
      mainhand:
        attackDamage: 12
    resource:
      material: DIAMOND_SWORD
      generate: true
      textures:
      - item/plutonium_sword.png
  battle_axe:
    display_name: Hache de combat
    permission: battle_axe
    durability:
      max_custom_durability: 4500
    attribute_modifiers:
      mainhand:
        attackDamage: 11
    resource:
      material: DIAMOND_SWORD
      generate: true
      textures:
      - item/battle_axe.png

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)

No response

LoneDev6 commented 2 months ago

Strange, this will be checked.

AshleyFOXXX commented 2 months ago

same issue here. Any solution?

Koora7334 commented 2 months ago

marked as fixed on the latest version

On Mon, Sep 2, 2024 at 12:31 PM AshleyFOXXX @.***> wrote:

same issue here. Any solution?

— Reply to this email directly, view it on GitHub https://github.com/PluginBugs/Issues-ItemsAdder/issues/3837#issuecomment-2324389791, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOJ2RZENTCV4NI4C6HSQUVTZUQ46LAVCNFSM6AAAAABLTB5DDCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRUGM4DSNZZGE . You are receiving this because you authored the thread.Message ID: @.***>