PluginBugs / Issues-ItemsAdder

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

Minor bug of command `/iainfo` #2146

Closed Akiranya closed 1 year ago

Akiranya commented 1 year ago

Terms

Discord tag (optional)

Nailm#9364

What happened?

If I type /iainfo I will get this error:

image

From the console:

[22:01:55 INFO]: Nailm issued server command: /iainfo
[22:01:55 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'iainfo' in plugin ItemsAdder v3.3.0-beta-r9
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_19_R1.CraftServer.dispatchCommand(CraftServer.java:962) ~[purpur-1.19.2.jar:git-Purpur-1848]
        at org.bukkit.craftbukkit.v1_19_R1.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[purpur-1.19.2.jar:git-Purpur-1848]
        at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264) ~[purpur-1.19.2.jar:?]
        at net.minecraft.commands.Commands.performCommand(Commands.java:313) ~[?:?]
        at net.minecraft.commands.Commands.performCommand(Commands.java:297) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2386) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$21(ServerGamePacketListenerImpl.java:2340) ~[?:?]
        at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.19.2.jar:git-Purpur-1848]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1368) ~[purpur-1.19.2.jar:git-Purpur-1848]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:185) ~[purpur-1.19.2.jar:git-Purpur-1848]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1345) ~[purpur-1.19.2.jar:git-Purpur-1848]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1338) ~[purpur-1.19.2.jar:git-Purpur-1848]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1316) ~[purpur-1.19.2.jar:git-Purpur-1848]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1204) ~[purpur-1.19.2.jar:git-Purpur-1848]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:310) ~[purpur-1.19.2.jar:git-Purpur-1848]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "dev.lone.itemsadder.main.hO.e()" because "<local16>" is null
        at dev.lone.itemsadder.main.hj.onCommand(SourceFile:65) ~[ItemsAdder_3.3.0-beta-r9.jar:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        ... 23 more

Steps to reproduce the issue

Type /iainfo and I will get this error.

Server version

Current: git-Purpur-1848 (MC: 1.19.2)* Previous: git-Purpur-1842 (MC: 1.19.2) You are 6 version(s) behind Download the new version at: https://purpurmc.org/downloads

ItemsAdder Version

3.3.0-beta-r9

ProtocolLib Version

ProtocolLib version 5.0.0-SNAPSHOT-b602

LoneLibs Version

LoneLibs version 1.0.19

LightAPI Version (optional)

No response

LibsDisguises Version (optional)

No response

FULL server log

No response

Error (optional)

No response

ItemsAdder config.yml

metrics: true
update-checker: false
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: false
      server-ip: 127.0.0.1
      pack-port: 8163
    external-host:
      enabled: true
      url: https://mimaru.oss-cn-zhangjiakou.aliyuncs.com/assets/default.zip
      skip-url-file-type-check___DONT_ASK_HELP_IF_SET_TRUE: false
  apply-on-join: false
  kick-player-on-decline: false
  kick-player-on-fail: false
  delay-ticks: 20
  notify-other-plugins-interfering: true
  title:
    enabled: true
  protect-player:
    black-screen: false
    hide-hud: false
    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:
      protection_1: true
      protection_2: true
    compress-png-files: true
    compress-json-files: true
    generate-custom-armors-textures:
      vanilla_1_17: true
      optifine: true
    disable-overwrite-leather-armor-layers-textures: false
    ignore-files-ext:
    - db
    - yml
    - xcf
    - psd
    - html
    - gz
    - rar
    - zip
    - 7z
    - bbmodel
    - iaentitymodel
    fix_transparent_noteblocks: false
    contents-folders-priority:
    - _vanilla
    - _iainternal
    extract_internal_utility_assets: true
  items:
    CustomModelData-starting-value:
      ALL: 10000
      DIAMOND: 11000
config_files:
  lang: zh_cn
  dictionaries-lang: zh_cn
  extract-default-resources: false
  force-sync-loading: false
blocks:
  light-api: true
  fix-glitched-blocks:
    enabled: true
    only-new-chunks: false
  cancel-break-wrong-tool:
    enabled: true
    send-actionbar: true
  campfire:
    unlit-on-place: false
    allow-any-item: false
  disable-REAL: false
  disable-REAL_TRANSPARENT: false
  disable-REAL_NOTE: false
  disable-REAL_WIRE: false
  disable-FIRE: false
  fix-liquids-flow: true
  fix-floating-blocks: true
  convert-vanilla-blocks:
    enabled: false
    only-new-chunks: true
items:
  fix-show-attack-and-damage-as-lore: true
  give_death_location_maps: false
  hide-custom-durability-lore: true
liquids:
  enabled: true
huds:
  enabled: true
loots:
  allow-loots-drop-from-spawners-using-silk-touch: false
mobs:
  disable-MOB-behaviour__DISABLE_AT_YOUR_OWN_RISK: false
font_images:
  chat:
    enabled: false
    doublecheck-permission__disable-for-more-performance: false
    add-hover-suggestion: false
  command:
    enabled: false
    commandblocks: false
    excluded: []
  sign:
    enabled: false
  book:
    enabled: false
  anvil:
    enabled: false
  inventory-title:
    enabled: true
  vault-prefix-suffix:
    enabled: true
    update-every-ticks: 3600
  scoreboard-teams:
    enabled: false
    update-every-ticks: 3600
  player-display-name:
    enabled: false
    update-every-ticks: 3600
  replace-in-customitems-name-and-lore: true
chat-preview: false
effects:
  hide-scoreboard-numbers: true
  text-effects:
    enabled: false
    replace-in-customitems-name-and-lore: true
    chat:
      enabled: false
    sign:
      enabled: false
    book:
      enabled: false
    anvil:
      enabled: false
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
    optimized-packets: 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: false
    list:
      IRON_INGOT: false
      DIAMOND_SWORD: false
  show-no-permission-popup-in-recipebook: true
  show-no-permission-chat-message: 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
    log-recipes-unknown-item: false
  resource-pack:
    log-extract-default-resources: true
    log-not-extract-default-resources-already-exist: true
  blocks:
    log-save: false
    log-save-on-unload: false
    log-mined-unknown-blocks: true
    log-convert-vanilla-blocks: false
  worlds-populators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-populators: true
    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
    log-icon-failed-load: false
  entities:
    log-files-loading: false
    log-entities-loading: false
    log-entities-loading-disabled: false
  cave-decorators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-decorators: false
    log-loading-no-world: true
    log-generation: false
ignore-server-compatibility-check: 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)

No response

LoneDev6 commented 1 year ago

Post the full server log. For some reason you have a misconfigured item in a GUI category. Previous log lines might contain info about it.

Akiranya commented 1 year ago

Hi LoneDev, this is the full server startup log: https://mclo.gs/3JlgANX

Akiranya commented 1 year ago

Looks like the server log contains a lot of weird symbols...

This is the log if I type iareload on the console, should be cleaner:

> iareload                                                                                                                                           
[20:17:41 INFO]: [!] Reloading...                                                                                                                    
[20:17:41 INFO]: [!] [Host] Started self-host webserver on port: 8163                                                                                
[20:17:42 INFO]: [!] [Pack] Extracting internal contents from .jar       
[20:17:42 INFO]: [!] [Pack] DONE extracting internal contents from .jar
[20:17:42 INFO]: [!] Loaded 1302 items   
[20:17:42 INFO]: [!] Used 0/188 REAL block IDs            
[20:17:42 INFO]: [!] Used 32/750 REAL_NOTE block IDs
[20:17:42 INFO]: [!] Used 3/63 REAL_TRANSPARENT block IDs                                                                                            
[20:17:42 INFO]: [!] Used 88/127 REAL_WIRE block IDs                                                                                                 
[20:17:42 INFO]: [!] Used 0/14 FIRE block IDs                                                                                                        
[20:17:42 INFO]: [!] Used 343/6608 font_images                                                                                                       
[20:17:42 INFO]: [!] [Init] Loaded 36 categories                                                                                                     
[20:17:42 INFO]: [!] [Init] Loaded 1302 items and stuff in 931ms
[20:17:42 INFO]: [!] [Pack] Checking resourcepack url...               
[20:17:43 INFO]: [!] [Pack] Resourcepack URL (self-host): http://127.0.0.1:8163/generated.zip                                                                               
[20:17:43 INFO]: [PlaceholderAPI] Successfully registered expansion: img [1.0.1]                                                                                            
[20:17:43 INFO]: [PlaceholderAPI] Successfully registered expansion: iaplayerstat [1.0.1]                                                                                   
[20:17:43 INFO]: [MMOItems] Successfully reloaded the crafting stations..
[20:17:43 INFO]: [MMOItems] - 7 Crafting Stations   
[20:17:43 INFO]: [MMOItems] - 161 Recipes      
[20:17:43 INFO]: [MMOItems] Successfully reloaded recipes.
[20:17:43 INFO]: [MMOItems] - 0 Recipes               
[20:17:43 INFO]: [helper] Mob summon item loaded: [rpgitems:summon_deathknight -> boss_deathknight]                                                                         
[20:17:43 INFO]: [helper] Mob summon item loaded: [rpgitems:summon_savage_leader -> 野人族长]                                                                               
[20:17:43 INFO]: [helper] Mob summon item loaded: [rpgitems:summon_toro_serpent -> toro_serpent]                                                                            
[20:17:43 INFO]: [helper] Mob summon item loaded: [rpgitems:summon_toro_golem -> toro_golem]                                                                                
[20:17:43 INFO]: [BetonQuest] There are 46 conditions, 116 events, 2 objectives and 35 conversations loaded from 21 packages.                                               
[20:17:43 INFO]: [BetonQuest] Reloaded 1 menus          
[20:17:43 INFO]: [!] Reloading ItemsAdder Custom Entities Citizens NPCs
[20:17:43 INFO]: [Mythic] Reloading plugin...         
[20:17:43 INFO]: [MythicMobs] Mythic beginning reload procedure...
[20:17:43 INFO]: [MythicMobs] Loading Packs...          
[20:17:43 INFO]: [MythicMobs] Loading Items...              
[20:17:43 INFO]: [MythicMobs] Loading Item Groups...                                  
[20:17:43 INFO]: [MythicMobs] Loading Skills...                                       
[20:17:44 INFO]: [MythicMobs] Loading Drop Tables...                                  
[20:17:44 INFO]: [MythicMobs] Loading Random Spawns...                                
[20:17:44 INFO]: [MythicMobs] Loading Spawn Blocks...                                 
[20:17:44 INFO]: [MythicMobs] ✓ Loaded 68 mobs.                                       
[20:17:44 INFO]: [MythicMobs] ✓ Loaded 4 vanilla mob overrides.                       
[20:17:44 INFO]: [MythicMobs] ✓ Loaded 0 mob stacks.                                  
[20:17:44 INFO]: [MythicMobs] ✓ Loaded 241 skills.                                    
[20:17:44 INFO]: [MythicMobs] ✓ Loaded 37 random spawns.                              
[20:17:44 INFO]: [MythicMobs] ✓ Loaded 0 mythic items.                                
[20:17:44 INFO]: [MythicMobs] ✓ Loaded 36 drop tables.                                
[20:17:44 INFO]: [MythicMobs] ✓ Loaded 0 mob spawners.                                
[20:17:44 INFO]: [Mythic] Mythic has finished reloading!                              
[20:17:44 INFO]: [MythicMobs] Mythic has finished reloading!
Akiranya commented 1 year ago

The bad news is that the server log looks fine to me (or I missed something?).

The good news is that I have located the misconfigured config by exclusion method. I'm finding where the misconfigured part exactly is

Akiranya commented 1 year ago

image

Ok I got this error. This is due to the fact that IDs under the items list must be prefixed with a namespace otherwise it would cause the error of iainfo. However, this misconfiguration would neither be exposed in the server log at all, nor in /ia, which is the actual issue tbh.

Btw thanks for pointing me to the right direction so that I can find the misconfiguration lol otherwise I bet I will never find it

LoneDev6 commented 1 year ago

Perfect! I will allow items without namespace also in this category to avoid mistakes.