mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-26 20:55:41 +01:00
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:
commit
d6d86d39d2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user