Skip to content

Commit

Permalink
Merge pull request #2143 from BentoBoxWorld/register_other_worlds
Browse files Browse the repository at this point in the history
Add API to enable gamemodes to register ownership over additional worlds
  • Loading branch information
tastybento authored Jun 21, 2023
2 parents 372f3f1 + c6a8f7c commit d6d86d3
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,16 @@ public boolean isKnownFriendlyWorldName(String name) {
.anyMatch(gm -> gm.getWorldSettings().getFriendlyName().equalsIgnoreCase(name));
}

/**
* Associate a world with a game mode. This enables game modes to register more worlds than just the standard
* overworld, nether, and end worlds.
* @param world world
* @param gameMode game mode
* @since 1.24.0
*/
public void addWorld(World world, GameModeAddon gameMode) {
gameModes.put(world, gameMode);
}

/**
* Adds a GameMode to island world manager
Expand Down

0 comments on commit d6d86d3

Please sign in to comment.