Skip to content

Island creation changes the home location of previous #2463

@rudde0

Description

@rudde0

Expected behavior

This behavior happens sometimes.

Observed/Actual behavior

I see some warnings in console about it.

[01:19:56 WARN]: [BentoBox] Tried to set a home location Location{world=CraftWorld{name=skyblock},x=1000.5,y=60.0,z=-0.5,pitch=30.0,yaw=180.0} outside of the island. This generally should not happen.
[01:19:56 WARN]: [BentoBox] Island is at Location{world=CraftWorld{name=skyblock},x=1000.0,y=50.0,z=1000.0,pitch=0.0,yaw=0.0}. The island file may need editing to remove this home.
[01:19:56 WARN]: [BentoBox] Please report this issue and logs around this item to BentoBox

I create /island create and I keep spamming it, I quit from the game whilst creation of second island. Home location of island 1 become island 2 home location (island home 2 location is correct).

Steps/models to reproduce

  • Type /is create
  • Type /is create one more and create another island
  • Quit from the game whilst creation
  • Rejoin and check home locations of the islands

BentoBox version

[01:23:35 INFO]: Sunucu PAPER 1.20.4 sürümünde çalışıyor.
[01:23:35 INFO]: (git-Purpur-2176 (MC: 1.20.4))
[01:23:35 INFO]: BentoBox sürümü: 2.4.3-SNAPSHOT-LOCAL
[01:23:35 INFO]: Database: MARIADB
[01:23:35 INFO]: Yüklenen oyun dünyaları:
[01:23:35 INFO]: skyblock (skyblock): Dünya
[01:23:35 INFO]: Yüklenen eklentiler:
[01:23:35 INFO]: Bank 1.7.1-SNAPSHOT-b87
[01:23:35 INFO]: Border 4.3.0-SNAPSHOT-b205
[01:23:35 INFO]: BSkyBlock 1.18.0-SNAPSHOT-b763
[01:23:35 INFO]: ExtraMobs 1.13
[01:23:35 INFO]: Level 2.15.0-SNAPSHOT-LOCAL
[01:23:35 INFO]: Likes 2.4.0-SNAPSHOT-b102
[01:23:35 INFO]: Limits 1.21.0
[01:23:35 INFO]: MagicCobblestoneGenerator 2.5.2-SNAPSHOT-LOCAL
[01:23:35 INFO]: Visit 1.7.0-SNAPSHOT
[01:23:35 INFO]: Warps 1.15.0-SNAPSHOT-b362

Plugin list

No response

Other

idk internal much but

plugin.getIslands().setHomeLocation(user, island.getSpawnPoint(Environment.NORMAL));
using style of this method is can be related with this problem?
---edit---
I changed the L232 with

if (island != null) {
      plugin.getIslands().setHomeLocation(island, island.getSpawnPoint(Environment.NORMAL), "");
} else {
      plugin.getIslands().setHomeLocation(user, island.getSpawnPoint(Environment.NORMAL));
}

and this is solved my problem, I guess.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions