diff --git a/src/main/puml/GameWorld.puml b/src/main/puml/GameWorld.puml new file mode 100644 index 000000000..d94cd25bd --- /dev/null +++ b/src/main/puml/GameWorld.puml @@ -0,0 +1,123 @@ +@startuml + +note as N1 + This UML Class Diagram introduces the + GameWorlds and GameModes concepts that + are introduced in 1.0. + + This diagram is not meant to be updated + alongside modifications that could be done + to GameWorlds and GameModes: it is meant + to serve as a template, and hopefully to keep + track of what we had in mind when we started + to work on this API. + + - Poslovitch, @BentoBoxWorld + December 24th, 2018. +end note + +package world.bentobox.bentobox { + + class BentoBox << (M,orchid) Main >> { + - addonsManager : AddonsManager + - worldsManager : WorldsManager + + getAddons() : AddonsManager + + getWorlds() : WorldsManager + } + + package api { + package addons { + abstract class Addon + + abstract class GameMode extends Addon { + Specific Addon implementation allowing to register GameWorlds. + + + registerGameWorld(gameWorld:GameWorld) : void + + getGameWorlds() : List + } + } + + package worlds { + interface WorldSettings + + class GameWorld { + Represents a set of three Worlds + (Overworld, Nether, End) which is + registered by a GameMode addon and + managed by BentoBox. + It features its own implementation + of WorldSettings and provides + Islands and Schems managers. + __ Fields __ + - name : String + - friendlyName : String + - overWorld : World + - netherWorld : World + - endWorld : World + - worldSettings : WorldSettings + .. Managers .. + - islandsManager : IslandsManager + - schemsManager : SchemsManager + __ Methods __ + + createWorlds() : boolean + + inWorld(location:Location) : boolean + .. Getters .. + + getName() : String + + getFriendlyName() : String + + getOverWorld() : World + + getNetherWorld() : World + + getEndWorld() : World + + getSettings() : WorldSettings + + getIslands() : IslandsManager + + getSchems() : SchemsManager + } + + GameWorld *-- "1" WorldSettings + + GameMode *-- "*" GameWorld + } + } + + + package managers { + class AddonsManager + + BentoBox *-- "1" AddonsManager + AddonsManager *-- "*" Addon + + class WorldsManager { + Manages GameWorlds that are registered by GameMode addons. + It basically replaces IslandWorldManager. + __ Fields __ + - gameWorlds : Map> + __ Methods __ + + registerGameWorld(gameMode:GameMode, gameWorld:GameWorld) : boolean + .. Getters .. + + getGameWorldsMap() : Map> + + getGameWorldsList() : List + + getGameWorlds(gameMode:GameMode) : List + + getGameWorld(name:String) : Optional + + getGameWorld(world:World) : Optional + .. Multiverse .. + + registerWorldsToMultiverse() : void + + registerWorldToMultiverse(gameWorld:GameWorld) : void + } + + BentoBox *-- "1" WorldsManager + WorldsManager *-- "*" GameWorld + + class SchemsManager { + - schems : List + + - copySchems(schems:File, name:String) : void + - loadSchem(name:String) : boolean + + getSchems() : List + + paste(island:Island, task:Runnable) : void + + paste(island:Island) : void + } + + GameWorld *-- "1" SchemsManager + } +} + +@enduml