dumbo-the-developer / Duels

GNU General Public License v3.0
8 stars 9 forks source link

Teleport to arena failing if world was loaded after the plugin #1

Closed dentatar closed 3 months ago

dentatar commented 6 months ago

Hello. First of all i'm realizing that this issue is coming from my world manager plugin, and was resolved by just updating it. However i think arenas loading/teleporting mechanism could be improved to be more robust. Now i will try to describe the problem i randomly faced: I've got a bunch of arenas in a different world, i've tested them and everything was working fine until i restarted the server. The world manager plugin i'm currently using was loading world too late and arenas world was loaded after duels plugin. This somehow breaks all arenas as teleporting fails for both players with [Duels] Teleport: Could not teleport Venom_Lightning! Location is null. And adding new arenas will wipe out spawn positions for all previous arenas (glad i had a backup). This behavior could be mitigated by issuing /duels reload after server fully started.

I think the following could improve user experience and counteract potential issues:

  1. No reason for teleport to fail, since world is clearly loaded. And if it's not, just cancel the duel.
  2. No reason to erase all spawn points if world wasn't loaded, maybe just set arenas to "disabled": true?

Software versions:

Steps to reproduce:

  1. Create world with PhantomWorlds
  2. Setup arena there
  3. Restart the server
  4. Try to duel

I will understand if you ignore all of it and just tell me to use better world manager tho xD Anyway thanks!

dumbo-the-developer commented 3 months ago

i suggest using multiverse core (latest version from their GitHub for world management)