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

[BUG] CosmeticsCore v1.2.2f - Cannot modify immutable location #147

Closed Futodama closed 1 year ago

Futodama commented 1 year ago

Terms

Discord tag (optional)

No response

What happened?

When teleporting to a zone protected by KindomsX, the error "Cannot modify immutable location" appears. This happens in the presence of cosmetics in the form of a balloon.

Steps to reproduce the issue

1) Create a kingdom in KingdomsX. 2) Put a balloon on your character. 3) Teleport to the home of kingdom. Or enter the territory of the kingdom in another way. 4) The error has been reproduced.

Server version

[00:13:19 INFO]: Checking version, please wait... [00:13:19 INFO]: Current: git-Purpur-2005 (MC: 1.20.1)* Previous: git-Purpur-1985 (MC: 1.19.4)

CosmeticsCore Version

[00:14:10 INFO]: CosmeticsCore version 1.2.2f

ProtocolLib Version

[00:14:48 INFO]: ProtocolLib version 5.1.0-SNAPSHOT-660

LoneLibs Version

[00:15:08 INFO]: LoneLibs version 1.0.25

FULL server log

serverlog.txt

Error (optional)

[00:07:11 WARN]: [CosmeticsCore] Task #50750 for CosmeticsCore v1.2.2f generated an exception
java.lang.UnsupportedOperationException: Cannot modify immutable location
    at org.kingdoms.abstraction.ImmutableLocation.modify(ImmutableLocation.kt:10) ~[KingdomsX-1.16.11.1.jar:?]
    at org.kingdoms.abstraction.ImmutableLocation.setX(ImmutableLocation.kt:22) ~[KingdomsX-1.16.11.1.jar:?]
    at org.kingdoms.abstraction.ImmutableLocation.setX(ImmutableLocation.kt:7) ~[KingdomsX-1.16.11.1.jar:?]
    at dev.lone.cosmeticscore.main.u.a(SourceFile:241) ~[CosmeticsCore_1.2.2f.jar:?]
    at dev.lone.cosmeticscore.main.u.b(SourceFile:227) ~[CosmeticsCore_1.2.2f.jar:?]
    at dev.lone.cosmeticscore.main.u.a(SourceFile:268) ~[CosmeticsCore_1.2.2f.jar:?]
    at dev.lone.cosmeticscore.main.j.a(SourceFile:414) ~[CosmeticsCore_1.2.2f.jar:?]
    at dev.lone.cosmeticscore.main.C.a(SourceFile:395) ~[CosmeticsCore_1.2.2f.jar:?]
    at dev.lone.cosmeticscore.main.C.a(SourceFile:482) ~[CosmeticsCore_1.2.2f.jar:?]
    at dev.lone.cosmeticscore.main.az.run(SourceFile:131) ~[CosmeticsCore_1.2.2f.jar:?]
    at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.20.1.jar:git-Purpur-2005]
    at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480) ~[purpur-1.20.1.jar:git-Purpur-2005]
    at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1507) ~[purpur-1.20.1.jar:git-Purpur-2005]
    at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:487) ~[purpur-1.20.1.jar:git-Purpur-2005]
    at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1421) ~[purpur-1.20.1.jar:git-Purpur-2005]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1192) ~[purpur-1.20.1.jar:git-Purpur-2005]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[purpur-1.20.1.jar:git-Purpur-2005]
    at java.lang.Thread.run(Thread.java:1589) ~[?:?]
[00:07:11 WARN]: [CosmeticsCore] Task #51497 for CosmeticsCore v1.2.2f generated an exception
java.lang.StackOverflowError: null
    at org.bukkit.Location.clone(Location.java:1075) ~[purpur-api-1.20.1-R0.1-SNAPSHOT.jar:?]
    at org.kingdoms.abstraction.ImmutableLocation.add(ImmutableLocation.kt:31) ~[KingdomsX-1.16.11.1.jar:?]

CosmeticsCore config.yml

lang: ru
extract_default_assets: true
cosmetics:
  max_equippable:
    body: 3
    balloon: 2
wardrobe_room:
  camera:
    hide_actionbar_texts: true
    rotation:
      enabled: true
    zoom:
      enabled: true
      min: 3
    fade_effect: true
    location:
      world: world
      x: -171.30000001192093
      y: 208.62000000476837
      z: 497.30000001192093
      yaw: 44.401367
      pitch: 0.14322478
  mannequin:
    location:
      world: world
      x: -173.460428178305
      y: 207.0625
      z: 499.35095323173493
      yaw: 179.08301
      pitch: 2.405138
  teleport_area:
    enter:
      world: world
      pos1:
        x: -175.0
        y: 209.0
        z: 502.0
      pos2:
        x: -173.0
        y: 207.0
        z: 502.0
    exit_location:
      world: world
      x: -174.77576253706695
      y: 207.0625
      z: 503.8169403073096
      yaw: 55.198242
      pitch: 3.6388438
  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)

https://drive.google.com/file/d/1uV3wtDXJh0aKTHAOzWfSG7NgUtqinqps/view?usp=drive_link

LoneDev6 commented 1 year ago

Seems something related to KingdomsX and to me seems a bug. No idea why they felt the urge to create a ImmutableLocation class and set it to a player, nonsense to me, this will break multiple plugins not only CosmeticsCore. Contact its developers.