mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-29 12:37:37 +01:00
Created an UML Class Diagram as a template
This commit is contained in:
parent
d24d61480b
commit
e6293cb480
123
src/main/puml/GameWorld.puml
Normal file
123
src/main/puml/GameWorld.puml
Normal file
@ -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<GameWorld>
|
||||
}
|
||||
}
|
||||
|
||||
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<GameMode, List<GameWorld>>
|
||||
__ Methods __
|
||||
+ registerGameWorld(gameMode:GameMode, gameWorld:GameWorld) : boolean
|
||||
.. Getters ..
|
||||
+ getGameWorldsMap() : Map<GameMode, List<GameWorld>>
|
||||
+ getGameWorldsList() : List<GameWorld>
|
||||
+ getGameWorlds(gameMode:GameMode) : List<GameWorld>
|
||||
+ getGameWorld(name:String) : Optional<GameWorld>
|
||||
+ getGameWorld(world:World) : Optional<GameWorld>
|
||||
.. Multiverse ..
|
||||
+ registerWorldsToMultiverse() : void
|
||||
+ registerWorldToMultiverse(gameWorld:GameWorld) : void
|
||||
}
|
||||
|
||||
BentoBox *-- "1" WorldsManager
|
||||
WorldsManager *-- "*" GameWorld
|
||||
|
||||
class SchemsManager {
|
||||
- schems : List<Clipboard>
|
||||
|
||||
- copySchems(schems:File, name:String) : void
|
||||
- loadSchem(name:String) : boolean
|
||||
+ getSchems() : List<Clipboard>
|
||||
+ paste(island:Island, task:Runnable) : void
|
||||
+ paste(island:Island) : void
|
||||
}
|
||||
|
||||
GameWorld *-- "1" SchemsManager
|
||||
}
|
||||
}
|
||||
|
||||
@enduml
|
Loading…
Reference in New Issue
Block a user