Merge pull request #2143 from BentoBoxWorld/register_other_worlds

Add API to enable gamemodes to register ownership over additional worlds
This commit is contained in:
tastybento 2023-06-20 21:06:14 -07:00 committed by GitHub
commit d6d86d39d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,6 +143,16 @@ public class IslandWorldManager {
.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