Skip to content

Cloning world initially applies default properties to cloned world #2378

Description

@rti

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: ConfirmedIssue/problem with the software.Resolution: AcceptedMV-Team is aware of the issue/PR and will be looking into it.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions