PluginBugs / Issues-ItemsAdder

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

Could not pass event PlayerInteractEvent to ItemsAdder v3.1.1 #1653

Closed Darcon31 closed 2 years ago

Darcon31 commented 2 years ago

Terms

Discord tag (optional)

No response

What happened?

hello, every time it interacts with a block so that it executes a command it does it for me but I get that error in the console

Steps to reproduce the issue

  1. placed the block
  2. I have right clicked on it
  3. the command is executed on the player
  4. when looking at the console it gives that error

Server version

[19:22:52 INFO]: Checking version, please wait... [19:22:52 INFO]: This server is running Paper version git-Paper-252 (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT) (Git: 2d3e8f7) You are 47 version(s) behind Download the new version at: https://papermc.io/downloads Previous version: git-Paper-216 (MC: 1.18.1)

ItemsAdder Version

19:23:39 INFO: -=[ ItemsAdder ]=- 19:23:39 INFO: Version: 3.1.1

19:23:39 INFO: Path: /plugins/ItemsAdder/data/resource_pack/pack.zip 19:23:39 INFO: Download: http://ca04.vultam.net:25679/pack.zip#4ef40e2128537df0c88342fb24da11b41c7d119e 19:23:39 INFO: Size: 3 MB/100 MB 19:23:39 INFO: Last update: 2022-04-20 15:54:37 19:23:39 INFO: Host type: self-host

19:23:39 INFO: Items: 502 19:23:39 INFO: Items in /ia: 475 19:23:39 INFO: Namespaces: 20 19:23:39 INFO: Materials: 37 19:23:39 INFO: REAL block IDs: 0/191 19:23:39 INFO: REAL_NOTE block IDs: 29/750 19:23:39 INFO: REAL_TRANSPARENT block IDs: 0/63 19:23:39 INFO: REAL_WIRE block IDs: 0/127 19:23:39 INFO: FIRE block IDs: 0/14 19:23:39 INFO: Font images: 618/6608 19:23:39 INFO: Loaded chunks (1587) 19:23:39 INFO: Armorstands: 5 19:23:39 INFO: Mobs: 0

ProtocolLib Version

[19:24:18 INFO]: ProtocolLib v4.8.0 [19:24:18 INFO]: Authors: dmulloy2 and Comphenix [19:24:18 INFO]: Issues: https://github.com/dmulloy2/ProtocolLib/issues

LoneLibs Version

[19:24:33 INFO]: LoneLibs version 1.0.18 [19:24:33 INFO]: Collection of libs used by my plugins [19:24:33 INFO]: Authors: LoneDev and others

LightAPI Version (optional)

No response

LibsDisguises Version (optional)

No response

FULL server log

No response

Error (optional)

[19:17:51 ERROR]: Could not pass event PlayerInteractEvent to ItemsAdder v3.1.1
net.minecraft.ResourceKeyInvalidException: Non [a-z0-9/._-] character in path of location: minecraft:ENTITY.PLAYER.LEVELUP
        at net.minecraft.resources.ResourceLocation.<init>(ResourceLocation.java:37) ~[?:?]
        at net.minecraft.resources.ResourceLocation.<init>(ResourceLocation.java:42) ~[?:?]
        at org.bukkit.craftbukkit.v1_18_R2.entity.CraftPlayer.stopSound(CraftPlayer.java:833) ~[paper-1.18.2.jar:git-Paper-252]
        at dev.lone.itemsadder.main.iV.a(SourceFile:22) ~[ItemsAdder_3.1.1.jar:?]
        at dev.lone.itemsadder.main.eD.a(SourceFile:27) ~[ItemsAdder_3.1.1.jar:?]
        at dev.lone.itemsadder.main.ed.a(SourceFile:39) ~[ItemsAdder_3.1.1.jar:?]
        at dev.lone.itemsadder.main.ed.i(SourceFile:53) ~[ItemsAdder_3.1.1.jar:?]
        at dev.lone.itemsadder.main.eV.j(SourceFile:155) ~[ItemsAdder_3.1.1.jar:?]
        at dev.lone.itemsadder.main.ea.a(SourceFile:644) ~[ItemsAdder_3.1.1.jar:?]
        at dev.lone.itemsadder.main.cc.a(SourceFile:495) ~[ItemsAdder_3.1.1.jar:?]
        at dev.lone.itemsadder.main.eV.a(SourceFile:154) ~[ItemsAdder_3.1.1.jar:?]
        at dev.lone.itemsadder.main.eV.q(SourceFile:134) ~[ItemsAdder_3.1.1.jar:?]
        at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:37) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:git-Paper-252]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:629) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_18_R2.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:544) ~[paper-1.18.2.jar:git-Paper-252]
        at net.minecraft.server.level.ServerPlayerGameMode.useItemOn(ServerPlayerGameMode.java:552) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleUseItemOn(ServerGamePacketListenerImpl.java:1851) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.handle(ServerboundUseItemOnPacket.java:33) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.a(ServerboundUseItemOnPacket.java:9) ~[?:?]
        at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51) ~[?:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.18.2.jar:git-Paper-252]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) ~[?:?]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1399) ~[paper-1.18.2.jar:git-Paper-252]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:188) ~[paper-1.18.2.jar:git-Paper-252]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1376) ~[paper-1.18.2.jar:git-Paper-252]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1369) ~[paper-1.18.2.jar:git-Paper-252]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1347) ~[paper-1.18.2.jar:git-Paper-252]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1229) ~[paper-1.18.2.jar:git-Paper-252]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315) ~[paper-1.18.2.jar:git-Paper-252]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

ItemsAdder config.yml

metrics: true
update-checker: true
disable-plugin-loading-messages_DONT_ASK_ME_FOR_SUPPORT_IF_YOU_SET_TRUE__THANKS: false
resource-pack:
  hosting:
    no-host:
      enabled: false
    auto-external-host:
      enabled: false
    self-host:
      enabled: true
      server-ip: ca04.vultam.net
      pack-port: 25679
    external-host:
      enabled: false
      url: ''
      skip-url-file-type-check___DONT_ASK_HELP_IF_SET_TRUE: false
  apply-on-join: false
  kick-player-on-decline: true
  kick-player-on-fail: true
  delay-ticks: 1
  notify-other-plugins-interfering: true
  title:
    enabled: true
  protect-player:
    black-screen: true
    hide-hud: true
    cancel-movement: true
    lock-player: true
  command:
    usage-cooldown-seconds: 60
  custom-font:
    enabled: false
    name: ipaexg.ttf
    shift: '[0,0]'
    size: 11.0
    oversample: 2.0
  thin-font:
    enabled: false
  zip:
    protect-file-from-unzip:
      enabled: true
      extreme: true
    compress-png-files: true
    compress-json-files: true
    overwrite-vanilla-models: false
    overwrite-vanilla-lang-json: false
    generate-custom-armors-textures:
      vanilla_1_17: true
      optifine: false
    disable-overwrite-leather-armor-layers-textures: false
    fix_transparent_noteblocks__disable-for-more-performance: false
    ignore-files-ext:
    - db
    - yml
    - xcf
    - html
  items:
    CustomModelData-starting-value:
      ALL: 10000
      DIAMOND: 11000
config_files:
  lang: en
  dictionaries-lang: en
  extract-default-items: true
  extract-default-resources: true
blocks:
  light-api: true
  fix-liquids-flow: true
  fix-floating-blocks: true
  fix-glitched-blocks:
    enabled: true
    only-new-chunks: false
    search-also-in-these-biomes:
      enabled: false
      biomes:
      - BEACH
      - BIRCH_FOREST
      - BIRCH_FOREST_HILLS
      - FOREST
      - MOUNTAINS
      - MOUNTAIN_EDGE
      - GRAVELLY_MOUNTAINS
      - PLAINS
      - RIVER
  cancel-break-wrong-tool:
    enabled: true
    send-actionbar: true
  campfire:
    unlit-on-place: true
    allow-any-item: true
  disable-REAL: false
  disable-REAL_TRANSPARENT: false
  disable-REAL_NOTE: false
  disable-REAL_WIRE: true
  disable-FIRE: false
items:
  fix-show-attack-and-damage-as-lore: true
  give_death_location_maps: true
  hide-custom-durability-lore: false
liquids:
  enabled: true
huds:
  enabled: true
mobs:
  disable-MOB-behaviour__DISABLE_AT_YOUR_OWN_RISK: false
font_images:
  chat:
    enabled: true
    doublecheck-permission__disable-for-more-performance: false
    add-hover-suggestion: true
  command:
    enabled: true
    commandblocks: true
    excluded:
    - home
    - sethome
    - tpa
  sign:
    enabled: true
  book:
    enabled: true
  anvil:
    enabled: true
  inventory-title:
    enabled: true
  tab-header-footer:
    enabled: true
  vault-prefix-suffix:
    enabled: true
    update-every-ticks: 1200
  scoreboard-teams:
    enabled: false
    update-every-ticks: 3600
  player-display-name:
    enabled: true
    update-every-ticks: 1200
  replace-in-customitems-name-and-lore: true
effects:
  hide-scoreboard-numbers: false
  text-effects:
    enabled: true
    replace-in-customitems-name-and-lore: true
    chat:
      enabled: true
    sign:
      enabled: true
    book:
      enabled: true
    anvil:
      enabled: true
    tab-header-footer:
      enabled: true
entities:
  max-furniture-vehicles-per-chunk: 30
  allow-removing-old-furnitures_2_3_11: false
  custom-entitites:
    enabled: true
    interval-rendering-packets-ticks: 1
    emotes: true
recipes:
  hide-vanilla-unrecognized-recipe-errors: true
  fix-packet-too-large-kick: false
  custom-recipes:
    unlock:
      all-on-join: false
      on-pickup:
        any: false
        ingredients: true
  remove-vanilla-recipes:
    enabled: true
    list:
      DIAMOND_SWORD: false
      IRON_INGOT: false
debug:
  items:
    log-files-loading: false
    log-items-loading: false
    log-items-loading-disabled: false
    log-font-images-loading: false
    log-huds-loading: false
    log-attribute-modifiers-loading: false
    log-warnings: false
    log-loots-loading: false
    log-loots-loading-disabled: false
    log-armors-loading: false
  recipes:
    log-recipes-loading: false
    log-recipes-loading-disabled: false
    log-recipes-removed-vanilla: false
    log-fix-packet-too-large: false
  resource-pack:
    log-extract-default-resources: false
    log-not-extract-default-resources-already-exist: false
  blocks:
    log-save: false
    log-save-on-unload: false
    log-mined-unknown-blocks: true
  worlds-populators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-populators: false
    log-loading-no-world: true
    log-generation: false
  trees-populators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-populators: false
    log-loading-no-world: true
    log-generation: false
  surface-decorators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-decorators: false
    log-loading-no-world: true
    log-generation: false
  player-stats:
    log-save: false
  performance:
    loading-ms: true
  huds:
    log-triggers: false
  other:
    log-dictionaries-loading: false
    log-liquids-loading: false
    log-minecraft_lang_overwrite-loading: false
  categories:
    log-total-loaded: true
    log-single-loaded: false
    log-single-loaded-overwrite: false
    log-single-skip: false
  entities:
    log-files-loading: false
    log-entities-loading: false
    log-entities-loading-disabled: false
loots:
  allow-loots-drop-from-spawners-using-silk-touch: false

Problematic items yml configuration file (optional)

info:
  namespace: funkos
items:
  funkodarcon:
    display_name: "Funko Darcon"
    permission: funkos.generico
    lore:
    - lore-decorative-item
    resource:
      material: PAPER
      generate: false
      model_path: block/funkodarcon
    events:
      placed_armorstand.interact:
          execute_commands:
            cmd1:
              command: 'say hola'
              as_console: false
              delay: 0
          play_sound:
            name: minecraft:ENTITY.PLAYER.LEVELUP
            delay: 0                   
    behaviours:
      furniture:
        solid: true
        small: true
        placeable_on:
          floor: true
          ceiling: false
          walls: false
        hitbox:
          height: 0.5
        sound:
          place:
            name: block.metal.fall
          break:
            name: block.metal.break

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

orbyfied commented 2 years ago

Looking at the error (it occurs when stopping the sound, and it happens in ResourceLocation.<init>), I think it might have something to do with the minecraft:ENTITY.PLAYER.LEVELUP in your configuration file. Most importantly, ResourceLocations don't accept uppercase letters. It could also be something with the minecraft: that prefixes it.

Try to make everything lowercase first, and if it still doesn't work remove the minecraft: part.

LoneDev6 commented 2 years ago

Without seeing your configuration I can just tell you to make sure to try setting entity.player.levelup as sound value.