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 doesn't works and breaks ItemsAdder aswell : java.lang.ExceptionInInitializerError #220

Closed jamydariels closed 6 months ago

jamydariels commented 7 months ago

Terms

Discord tag (optional)

Megadose

What happened?

Hi everyone! I did try to get CosmeticsCore to work, i've did everything that is on the wiki -itemsadder related But it always disables ItemsAdder aswell when i try to make it work It shows this error :

I've tried multiple CosmeticsCore version and aswell newer and older LoneLibs - this error came with last ProtocolLib build and last Lonelibs aswell

Did anyone experience that ? Thanks if anyone got the solution, i'm surprised a such crash arrived

Steps to reproduce the issue

Use Itemsadder 3.6.2c / Last LoneLibs & ProtocolLib / CosmeticsCore 1.2.3d When loading it makes this error

Server version

Purpur-2095 (1.20.2)

CosmeticsCore Version

1.2.3d

ProtocolLib Version

683

LoneLibs Version

1.0.46 (shown as 1.40.45 in /version)

FULL server log

[11:36:57] [Server thread/INFO]: [ItemsAdder] Enabling ItemsAdder v3.6.2c

ItemsAdder 3.6.2c | | | |\/| /` /\ | \ | \ | |) LoneLibs 1.0.45 | | | | | ./ /--\ |/ |__/ |___ | \ Purpur git-Purpur-2095 (MC: 1.20.2)

[11:36:57] [Server thread/ERROR]: Error occurred while enabling ItemsAdder v3.6.2c (Is it up to date?) java.lang.NoClassDefFoundError: Could not initialize class ia.m.G at dev.lone.itemsadder.Main.onEnable(SourceFile:443) ~[ItemsAdder_3.6.2c.jar:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:190) ~[purpur-1.20.2.jar:git-Purpur-2095] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[purpur-1.20.2.jar:git-Purpur-2095] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_20_R2.CraftServer.enablePlugin(CraftServer.java:660) ~[purpur-1.20.2.jar:git-Purpur-2095] at org.bukkit.craftbukkit.v1_20_R2.CraftServer.enablePlugins(CraftServer.java:571) ~[purpur-1.20.2.jar:git-Purpur-2095] at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:632) ~[purpur-1.20.2.jar:git-Purpur-2095] at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:429) ~[purpur-1.20.2.jar:git-Purpur-2095] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:345) ~[purpur-1.20.2.jar:git-Purpur-2095] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1102) ~[purpur-1.20.2.jar:git-Purpur-2095] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[purpur-1.20.2.jar:git-Purpur-2095] at java.lang.Thread.run(Thread.java:833) ~[?:?] [11:36:57] [Server thread/INFO]: [ItemsAdder] Disabling ItemsAdder v3.6.2c

Error (optional)

[11:36:52] [Server thread/INFO]: [CosmeticsCore] Enabling CosmeticsCore v1.2.3d
[11:36:52] [Server thread/INFO]: [NBTAPI] [NBTAPI] Found Spigot: v1_20_R2! Trying to find NMS support
[11:36:52] [Server thread/INFO]: [NBTAPI] [NBTAPI] NMS support 'MC1_20_R2' loaded!
[11:36:52] [pool-116-thread-1/INFO]: [CustomFishing] Update is available: https://polymart.org/resource/2723
[11:36:53] [Server thread/ERROR]: Error occurred while enabling CosmeticsCore v1.2.3d (Is it up to date?)
java.lang.ExceptionInInitializerError: null
    at dev.lone.itemsadder.api.ItemsAdder.areItemsLoaded(SourceFile:39) ~[ItemsAdder_3.6.2c.jar:?]
    at dev.lone.cosmeticscore.main.O.<init>(SourceFile:24) ~[CosmeticsCore_1.2.3d(3).jar:?]
    at dev.lone.cosmeticscore.main.O.af(SourceFile:36) ~[CosmeticsCore_1.2.3d(3).jar:?]
    at dev.lone.cosmeticscore.main.j.b(SourceFile:322) ~[CosmeticsCore_1.2.3d(3).jar:?]
    at dev.lone.cosmeticscore.Main.onEnable(SourceFile:79) ~[CosmeticsCore_1.2.3d(3).jar:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?]
    at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:190) ~[purpur-1.20.2.jar:git-Purpur-2095]
    at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[purpur-1.20.2.jar:git-Purpur-2095]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.v1_20_R2.CraftServer.enablePlugin(CraftServer.java:660) ~[purpur-1.20.2.jar:git-Purpur-2095]
    at org.bukkit.craftbukkit.v1_20_R2.CraftServer.enablePlugins(CraftServer.java:571) ~[purpur-1.20.2.jar:git-Purpur-2095]
    at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:632) ~[purpur-1.20.2.jar:git-Purpur-2095]
    at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:429) ~[purpur-1.20.2.jar:git-Purpur-2095]
    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:345) ~[purpur-1.20.2.jar:git-Purpur-2095]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1102) ~[purpur-1.20.2.jar:git-Purpur-2095]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[purpur-1.20.2.jar:git-Purpur-2095]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "dev.lone.itemsadder.Main.getDataFolder()" because the return value of "dev.lone.itemsadder.Main.a()" is null
    at ia.m.G.<clinit>(SourceFile:100) ~[ItemsAdder_3.6.2c.jar:?]
    ... 17 more
[11:36:53] [Server thread/INFO]: [CosmeticsCore] Disabling CosmeticsCore v1.2.3d

CosmeticsCore config.yml

(default)
lang: en
extract_default_assets: true
cosmetics:
  max_equippable:
    body: 3
    balloon: 2
  hide_during_combat:
    enabled: true
    combat_duration_ticks: 10000
  fix_invisible_nametag: true
  hide_in_vanish: true
  worlds:
  - '*'
wardrobe_room:
  camera:
    hide_actionbar_texts: true
    rotation:
      enabled: true
    zoom:
      enabled: true
      min: 2
    fade_effect: true
    location:
      world: flat
      x: 205
      y: -58.5
      z: 41
      yaw: 359.85
      pitch: 6.6
    use_invisibility_potion: false
  mannequin:
    location:
      world: flat
      x: 204.5
      y: -60
      z: 45.5
      yaw: 180
      pitch: 0
  teleport_area:
    enter:
      world: flat
      pos1:
        x: 167
        y: -61
        z: 42
      pos2:
        x: 167
        y: -57
        z: 37
    exit_location:
      world: flat
      x: 164
      y: -60
      z: 40
      yaw: 98
      pitch: 10
  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: true
  mysql:
    enabled: false
    url: jdbc:mysql://my_url_database_69.com:3306/database_name
    username: username
    password: password
    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)

Thanks for taking the time to answer me ^^

jamydariels commented 7 months ago

More about this: It seems to be config related rather than anything else : I tried loading the server fresh with only the plugins and it seems to work. I'd be happy to discuss about this if you have any idea on where the problem could be when you're feeling better again ^^ I'll check here regularly or you can get to me on Discord : megadose

Gute Besserung <3

EDIT: I forgot to mention i tried to update to 1.20.4 then went back to 1.20.2 version immediatly since server was not even loading correctly.. i know this is dumb but i believed it was not so bad, maybe it is .. x)

LoneDev6 commented 7 months ago

Update ItemsAdder and test

jamydariels commented 6 months ago

The plugin now loads, thank you But SHIFT for leaving doesn't work, outside that it's good. I'm not the only one facing that but i'll see if a solution comes somewhere. Downgrading cosmeticscore wouldn't help right ?