diff --git a/src/content/docs/reference/game-modules/ActionBarModule.md b/src/content/docs/reference/game-modules/ActionBarModule.md new file mode 100644 index 0000000..ac0bb8c --- /dev/null +++ b/src/content/docs/reference/game-modules/ActionBarModule.md @@ -0,0 +1,32 @@ +--- +title: ActionBarModule +--- +`ActionBarModule` provides a standard way of displaying information in the player's action bar. When multiple messages want to be displayed, they will all appear, with a separator between them. + +## Usage +Import the module: +```kotlin +import com.bluedragonmc.server.module.gameplay.ActionBarModule +``` +Use the module in your game's `initialize` function: +```kotlin +use(ActionBarModule(interval = 2, separator = Component.text(" | ", NamedTextColor.DARK_GRAY))) +``` +The `interval` parameter defines the delay between each action bar update, in ticks. + +Now, from any module, you can listen for the `ActionBarModule.CollectActionBarEvent` to add a message to the action bar. +```kotlin +eventNode.addListener(ActionBarModule.CollectActionBarEvent::class.java) { event -> + // Adding both these items will display "Hello World! | Hello World 2!" in the action bar + event.addItem( + Component.text("Hello World!") + ) + event.addItem( + Component.text("Hello World 2!") + ) + // You can also use event.player to get the specific player +} +``` + +## Considerations +- Games are not required to use `ActionBarModule`. If you are creating a module that is not specific to a single game, it is recommended to check if the module is present, falling back to `player.sendActionBar` if not. \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/AnvilFileMapProviderModule.md b/src/content/docs/reference/game-modules/AnvilFileMapProviderModule.md new file mode 100644 index 0000000..d3a15db --- /dev/null +++ b/src/content/docs/reference/game-modules/AnvilFileMapProviderModule.md @@ -0,0 +1,3 @@ +--- +title: AnvilFileMapProviderModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/AwardsModule.md b/src/content/docs/reference/game-modules/AwardsModule.md new file mode 100644 index 0000000..92ca46f --- /dev/null +++ b/src/content/docs/reference/game-modules/AwardsModule.md @@ -0,0 +1,3 @@ +--- +title: AwardsModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/ChestLootModule.md b/src/content/docs/reference/game-modules/ChestLootModule.md new file mode 100644 index 0000000..e56a1ec --- /dev/null +++ b/src/content/docs/reference/game-modules/ChestLootModule.md @@ -0,0 +1,3 @@ +--- +title: ChestLootModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/ChestModule.md b/src/content/docs/reference/game-modules/ChestModule.md new file mode 100644 index 0000000..078c7f5 --- /dev/null +++ b/src/content/docs/reference/game-modules/ChestModule.md @@ -0,0 +1,3 @@ +--- +title: ChestModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/CombatZonesModule.md b/src/content/docs/reference/game-modules/CombatZonesModule.md new file mode 100644 index 0000000..fbcf1c1 --- /dev/null +++ b/src/content/docs/reference/game-modules/CombatZonesModule.md @@ -0,0 +1,3 @@ +--- +title: CombatZonesModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/ConfigModule.md b/src/content/docs/reference/game-modules/ConfigModule.md new file mode 100644 index 0000000..7a0bd88 --- /dev/null +++ b/src/content/docs/reference/game-modules/ConfigModule.md @@ -0,0 +1,4 @@ +--- +title: ConfigModule +--- +`ConfigModule` loads game configuration from .yml files. Configuration data can be loaded from both the game's JAR file and the map folder. This way, it is possible to change in-game values based on the map. \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/CosmeticsModule.md b/src/content/docs/reference/game-modules/CosmeticsModule.md new file mode 100644 index 0000000..e18d13c --- /dev/null +++ b/src/content/docs/reference/game-modules/CosmeticsModule.md @@ -0,0 +1,3 @@ +--- +title: CosmeticsModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/CountdownModule.md b/src/content/docs/reference/game-modules/CountdownModule.md new file mode 100644 index 0000000..06391ee --- /dev/null +++ b/src/content/docs/reference/game-modules/CountdownModule.md @@ -0,0 +1,17 @@ +--- +title: CountdownModule +--- +`CountdownModule` provides a visual countdown that is automatically displayed before the game starts. All of BlueDragon's minigames use it to handle the pregame state. The countdown starts automatically when enough players have joined, and stops automatically if enough players leave during the countdown to go below the minimum threshold. + +## Usage +Import the module: +```kotlin +import com.bluedragonmc.server.module.minigame.CountdownModule +``` +Use the module in your game's `initialize` function: +```kotlin +use(CountdownModule(threshold = 2, allowMoveDuringCountdown = true, countdownSeconds = 10)) +``` +Now, when the player count matches or exceeds the `threshold`, a countdown will automatically begin that lasts `countdownSeconds` seconds. If `allowMoveDuringCountdown` is `false`, players will not be able to move during the countdown, but they will still be able to look around. + +When the countdown reaches 0, the module will call `GameStartEvent`, change the game state to `INGAME`, and display a "GO!" title on the screen. \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/CustomGeneratorInstanceModule.md b/src/content/docs/reference/game-modules/CustomGeneratorInstanceModule.md new file mode 100644 index 0000000..46723f7 --- /dev/null +++ b/src/content/docs/reference/game-modules/CustomGeneratorInstanceModule.md @@ -0,0 +1,3 @@ +--- +title: CustomGeneratorInstanceModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/CutsceneModule.md b/src/content/docs/reference/game-modules/CutsceneModule.md new file mode 100644 index 0000000..676ca0f --- /dev/null +++ b/src/content/docs/reference/game-modules/CutsceneModule.md @@ -0,0 +1,3 @@ +--- +title: CutsceneModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/DoorsModule.md b/src/content/docs/reference/game-modules/DoorsModule.md new file mode 100644 index 0000000..6ea8547 --- /dev/null +++ b/src/content/docs/reference/game-modules/DoorsModule.md @@ -0,0 +1,3 @@ +--- +title: DoorsModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/DoubleJumpModule.md b/src/content/docs/reference/game-modules/DoubleJumpModule.md new file mode 100644 index 0000000..fca0fb7 --- /dev/null +++ b/src/content/docs/reference/game-modules/DoubleJumpModule.md @@ -0,0 +1,3 @@ +--- +title: DoubleJumpModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/FallDamageModule.md b/src/content/docs/reference/game-modules/FallDamageModule.md new file mode 100644 index 0000000..75b936c --- /dev/null +++ b/src/content/docs/reference/game-modules/FallDamageModule.md @@ -0,0 +1,3 @@ +--- +title: FallDamageModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/FireworkRocketModule.md b/src/content/docs/reference/game-modules/FireworkRocketModule.md new file mode 100644 index 0000000..168805c --- /dev/null +++ b/src/content/docs/reference/game-modules/FireworkRocketModule.md @@ -0,0 +1,3 @@ +--- +title: FireworkRocketModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/GlobalCosmeticModule.md b/src/content/docs/reference/game-modules/GlobalCosmeticModule.md new file mode 100644 index 0000000..8d4c35a --- /dev/null +++ b/src/content/docs/reference/game-modules/GlobalCosmeticModule.md @@ -0,0 +1,3 @@ +--- +title: GlobalCosmeticModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/GuiModule.md b/src/content/docs/reference/game-modules/GuiModule.md new file mode 100644 index 0000000..c356ff3 --- /dev/null +++ b/src/content/docs/reference/game-modules/GuiModule.md @@ -0,0 +1,3 @@ +--- +title: GuiModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/InstanceContainerModule.md b/src/content/docs/reference/game-modules/InstanceContainerModule.md new file mode 100644 index 0000000..92080ec --- /dev/null +++ b/src/content/docs/reference/game-modules/InstanceContainerModule.md @@ -0,0 +1,3 @@ +--- +title: InstanceContainerModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/InstanceModule.md b/src/content/docs/reference/game-modules/InstanceModule.md new file mode 100644 index 0000000..00ec4c9 --- /dev/null +++ b/src/content/docs/reference/game-modules/InstanceModule.md @@ -0,0 +1,3 @@ +--- +title: InstanceModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/InstanceTimeModule.md b/src/content/docs/reference/game-modules/InstanceTimeModule.md new file mode 100644 index 0000000..62f18a9 --- /dev/null +++ b/src/content/docs/reference/game-modules/InstanceTimeModule.md @@ -0,0 +1,3 @@ +--- +title: InstanceTimeModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/InstantRespawnModule.md b/src/content/docs/reference/game-modules/InstantRespawnModule.md new file mode 100644 index 0000000..761f434 --- /dev/null +++ b/src/content/docs/reference/game-modules/InstantRespawnModule.md @@ -0,0 +1,3 @@ +--- +title: InstantRespawnModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/InventoryPermissionsModule.md b/src/content/docs/reference/game-modules/InventoryPermissionsModule.md new file mode 100644 index 0000000..61e77a9 --- /dev/null +++ b/src/content/docs/reference/game-modules/InventoryPermissionsModule.md @@ -0,0 +1,3 @@ +--- +title: InventoryPermissionsModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/ItemDropModule.md b/src/content/docs/reference/game-modules/ItemDropModule.md new file mode 100644 index 0000000..47fb309 --- /dev/null +++ b/src/content/docs/reference/game-modules/ItemDropModule.md @@ -0,0 +1,3 @@ +--- +title: ItemDropModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/ItemPickupModule.md b/src/content/docs/reference/game-modules/ItemPickupModule.md new file mode 100644 index 0000000..5e5186c --- /dev/null +++ b/src/content/docs/reference/game-modules/ItemPickupModule.md @@ -0,0 +1,3 @@ +--- +title: ItemPickupModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/KitsModule.md b/src/content/docs/reference/game-modules/KitsModule.md new file mode 100644 index 0000000..23339a3 --- /dev/null +++ b/src/content/docs/reference/game-modules/KitsModule.md @@ -0,0 +1,3 @@ +--- +title: KitsModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/MOTDModule.md b/src/content/docs/reference/game-modules/MOTDModule.md new file mode 100644 index 0000000..ea28284 --- /dev/null +++ b/src/content/docs/reference/game-modules/MOTDModule.md @@ -0,0 +1,3 @@ +--- +title: MOTDModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/MapZonesModule.md b/src/content/docs/reference/game-modules/MapZonesModule.md new file mode 100644 index 0000000..2fca807 --- /dev/null +++ b/src/content/docs/reference/game-modules/MapZonesModule.md @@ -0,0 +1,3 @@ +--- +title: MapZonesModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/MaxHealthModule.md b/src/content/docs/reference/game-modules/MaxHealthModule.md new file mode 100644 index 0000000..801412b --- /dev/null +++ b/src/content/docs/reference/game-modules/MaxHealthModule.md @@ -0,0 +1,3 @@ +--- +title: MaxHealthModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/NPCModule.md b/src/content/docs/reference/game-modules/NPCModule.md new file mode 100644 index 0000000..49e1a3d --- /dev/null +++ b/src/content/docs/reference/game-modules/NPCModule.md @@ -0,0 +1,3 @@ +--- +title: NPCModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/NaturalRegenerationModule.md b/src/content/docs/reference/game-modules/NaturalRegenerationModule.md new file mode 100644 index 0000000..e03088a --- /dev/null +++ b/src/content/docs/reference/game-modules/NaturalRegenerationModule.md @@ -0,0 +1,3 @@ +--- +title: NaturalRegenerationModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/OldCombatModule.md b/src/content/docs/reference/game-modules/OldCombatModule.md new file mode 100644 index 0000000..ac32caa --- /dev/null +++ b/src/content/docs/reference/game-modules/OldCombatModule.md @@ -0,0 +1,19 @@ +--- +title: OldCombatModule +--- +`OldCombatModule` is a reimplementation of Minecraft combat features. It handles damage and knockback similar to vanilla Minecraft. It does not include most of the newer 1.9+ combat mechanics, such as shields and the attack cooldown. However, it does include the increased axe damage found in newer versions. + +## Parameters +- `allowDamage`: Set to `false` to make all hits deal no damage. +- `allowKnockback`: Set to `false` to make all hits deal no knockback. + +## Usage +Import the module: +```kotlin +import com.bluedragonmc.server.module.combat.OldCombatModule +``` +In your game's `initialize` function, include the module like this: +```kotlin +use(OldCombatModule(allowDamage = true, allowKnockback = true)) +``` +Combat will be enabled once the module is used. \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/PlayerResetModule.md b/src/content/docs/reference/game-modules/PlayerResetModule.md new file mode 100644 index 0000000..ff5a445 --- /dev/null +++ b/src/content/docs/reference/game-modules/PlayerResetModule.md @@ -0,0 +1,3 @@ +--- +title: PlayerResetModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/SharedInstanceModule.md b/src/content/docs/reference/game-modules/SharedInstanceModule.md new file mode 100644 index 0000000..d3a622f --- /dev/null +++ b/src/content/docs/reference/game-modules/SharedInstanceModule.md @@ -0,0 +1,3 @@ +--- +title: SharedInstanceModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/ShopModule.md b/src/content/docs/reference/game-modules/ShopModule.md new file mode 100644 index 0000000..ac4444f --- /dev/null +++ b/src/content/docs/reference/game-modules/ShopModule.md @@ -0,0 +1,3 @@ +--- +title: ShopModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/SidebarModule.md b/src/content/docs/reference/game-modules/SidebarModule.md new file mode 100644 index 0000000..96dd058 --- /dev/null +++ b/src/content/docs/reference/game-modules/SidebarModule.md @@ -0,0 +1,3 @@ +--- +title: SidebarModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/SpawnpointModule.md b/src/content/docs/reference/game-modules/SpawnpointModule.md new file mode 100644 index 0000000..3704cbc --- /dev/null +++ b/src/content/docs/reference/game-modules/SpawnpointModule.md @@ -0,0 +1,3 @@ +--- +title: SpawnpointModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/SpectatorModule.md b/src/content/docs/reference/game-modules/SpectatorModule.md new file mode 100644 index 0000000..7c10fba --- /dev/null +++ b/src/content/docs/reference/game-modules/SpectatorModule.md @@ -0,0 +1,3 @@ +--- +title: SpectatorModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/StatisticsModule.md b/src/content/docs/reference/game-modules/StatisticsModule.md new file mode 100644 index 0000000..1d09760 --- /dev/null +++ b/src/content/docs/reference/game-modules/StatisticsModule.md @@ -0,0 +1,3 @@ +--- +title: StatisticsModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/TeamModule.md b/src/content/docs/reference/game-modules/TeamModule.md new file mode 100644 index 0000000..0ec8f83 --- /dev/null +++ b/src/content/docs/reference/game-modules/TeamModule.md @@ -0,0 +1,3 @@ +--- +title: TeamModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/TimedRespawnModule.md b/src/content/docs/reference/game-modules/TimedRespawnModule.md new file mode 100644 index 0000000..542308e --- /dev/null +++ b/src/content/docs/reference/game-modules/TimedRespawnModule.md @@ -0,0 +1,3 @@ +--- +title: TimedRespawnModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/VoidDeathModule.md b/src/content/docs/reference/game-modules/VoidDeathModule.md new file mode 100644 index 0000000..4c246ea --- /dev/null +++ b/src/content/docs/reference/game-modules/VoidDeathModule.md @@ -0,0 +1,3 @@ +--- +title: VoidDeathModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/WeatherModule.md b/src/content/docs/reference/game-modules/WeatherModule.md new file mode 100644 index 0000000..162ed96 --- /dev/null +++ b/src/content/docs/reference/game-modules/WeatherModule.md @@ -0,0 +1,3 @@ +--- +title: WeatherModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/WinModule.md b/src/content/docs/reference/game-modules/WinModule.md new file mode 100644 index 0000000..a467044 --- /dev/null +++ b/src/content/docs/reference/game-modules/WinModule.md @@ -0,0 +1,3 @@ +--- +title: WinModule +--- \ No newline at end of file diff --git a/src/content/docs/reference/game-modules/WorldPermissionsModule.md b/src/content/docs/reference/game-modules/WorldPermissionsModule.md new file mode 100644 index 0000000..c8e9c3a --- /dev/null +++ b/src/content/docs/reference/game-modules/WorldPermissionsModule.md @@ -0,0 +1,3 @@ +--- +title: WorldPermissionsModule +--- \ No newline at end of file