Open TristinCodingham opened 1 week ago
Changing the world would indeed result in issues like this. I agree that cloning should support multiple worlds. The npcs should remain in the npcs.yml file, even if the world is invalid. It will print a nasty message to the config, but that ist mostly for show, and the plugin still works fine. The one problem with the /npc clone world <old_world> <new_world>
is the validation. Additionally, where would the npc be positioned? Your current location, but in the new world? Or what about the npc's location in the new world. As you can probably see, there is a lot of ambiguity.
You can use the /npc clone
command on to clone an NPC from an already existing world, but as I just tested it, it is a little janky, and doesn't quite work as intended.
Additionally, it seems like you might be looking for a command to fix broken configs, which seems like a useful feature. It might work like /npc fixconfig
. In which it would prompt the user to select which world to set the NPCs to.
Yeah I agree, there is a lot of ambiguity. I was in the mindset of knowing that in my situation both worlds are identical so cloning the world over should just use whatever positioning system the npcs currently use, but I see now this isn't a long term solution or even a good one.
In the event that I request a feature such as /npc fixconfig
, would this also need to follow the assumption that the world the user will input would need to be identical to the world the NPC was already in? otherwise the positioning ambiguity still remains.
No the world would not have to be identical, that would be an unnecessary burden on the plugin. It would be difficult to very the worlds are the same. It may create some challenges where npcs can be floating for in the ground. I think that the /npc fixconfig
would not change anything unless the user specifies a conversion "factor". Ie, an extra argument like ENSURE_SAFE, meaning the npc wouldn't be floating or in the ground. But by default it would keep the npc's position the same.
Describe the bug Renaming world's folder removes all NPCs for that world completely out of existence yet their configuration still remains inside npcs.yml. Also going into the npcs.yml file and changing each NPC's
world
to match the updated world's name does nothing (Rightfully so since editing the npcs.yml manually is discouraged).To Reproduce Steps to reproduce the behavior:
/npc create
/npc goto
and notice the auto complete also does not know of it's existenceworld
set to the old world's nameExpected behavior Have a command such as
/npc clone world <old_world_name> <new_world_name>
that can be used after renaming a world that contained NPCs, they should automatically update theirworld
property and be ported to the new world without changing any of their other properties.Screenshots Wouldn't really help in this scenario
Server(please complete the following information):
Additional context Add any other context about the problem here.