Multiverse-Core

Multiverse-Core

6M Downloads

Cloning world initially applies default properties to cloned world

rti opened this issue ยท 2 comments

commented

Steps to reproduce

  • Create a world named "original"
  • Disallow monsters with mvm set monsters false original
  • Clone the world with mv clone original clone
  • Teleport to the clone with mvtp clone
  • Spawn a zombie with a spawn egg

Expected behaviour

The zombie does not appear in the world "clone", as the world "original" had monsters set to false.

Actual behaviour

The zombie does appear in the world "clone".

Further notes

  • Having a look into worlds.yml directly after cloning verifies that the default properties are set
  • mvinfo clone prints the correct properties, but they are actually not applied
  • Restarting the server fixes the problem

Cause

In WorldManager.java around line 200 the cloned world is added with addWorld(). This creates a set of default properties. After the addWorld() call, the original properties are copied to the properties map of the cloned world, but the cloned world does not apply them.

Fix

I created a patch fixing this problem. Expect the pull request in a couple of minutes.

commented

Can I be of any further help on this topic? I'd really like to see this fix go into 4.2. :)

commented

I'll add this to the milestone :)

Thanks for the PR.