Add API to enable gamemodes to register ownership over additional worlds

This commit is contained in:
tastybento 2023-06-20 21:03:47 -07:00
parent 372f3f14c6
commit c6a8f7c095

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