ModsJava
GameSenseLib
Java mod listed for Minecraft 1.13–1.19. Download on the author's site.
⬇ Download on SpigotGameSenseLib
Build your own Minecraft minigame with flexible, extensible, and modular API.
Build your game with a simple style API with some built-in modules:
Or, try a more complex, flexible style:
Getting Started
Please read the https://github.com/shaokeyibb/GameSenseLib/wiki for more information.
(It's not finish yet, but maybe you can follow the javadoc to get more information :<)
License
GameSenseLib is licensed under the Apache License 2.0.
Build your own Minecraft minigame with flexible, extensible, and modular API.
Build your game with a simple style API with some built-in modules:
Code (Java):
public
class ExampleGame
{
public static AbstractGame simpleGame ( ) {
GameTemplate. of (plugin )
. withWaitingRoom (
1, // min player
2, // max player
Duration. ofSeconds ( 10 ), // waiting duration
new Location (Bukkit. getWorld ( "game_world" ), 0, 64, 0 ) // waiting room spawn location
)
. withBroadcastMessagePlayerJoinAndQuit (
player -> "Player Join the game: " + player. getName ( ),
player -> "Player Quit the game: " + player. getName ( )
)
. setRemovePlayerOnQuit ( true )
. setTeleportPlayerOnQuit ( true )
. setQuitCommand ( "quit" )
. setJoinCommand ( "join" )
. addPhase (
0, // priority
( ) -> Phase. builder ( )
. onStart ( (it ) -> Bukkit. broadcastMessage ( "Game Start!" ) )
. build ( )
)
. world (Bukkit. getWorld ( "game_world" ) )
. build ( ) ;
}
}
public static AbstractGame simpleGame ( ) {
GameTemplate. of (plugin )
. withWaitingRoom (
1, // min player
2, // max player
Duration. ofSeconds ( 10 ), // waiting duration
new Location (Bukkit. getWorld ( "game_world" ), 0, 64, 0 ) // waiting room spawn location
)
. withBroadcastMessagePlayerJoinAndQuit (
player -> "Player Join the game: " + player. getName ( ),
player -> "Player Quit the game: " + player. getName ( )
)
. setRemovePlayerOnQuit ( true )
. setTeleportPlayerOnQuit ( true )
. setQuitCommand ( "quit" )
. setJoinCommand ( "join" )
. addPhase (
0, // priority
( ) -> Phase. builder ( )
. onStart ( (it ) -> Bukkit. broadcastMessage ( "Game Start!" ) )
. build ( )
)
. world (Bukkit. getWorld ( "game_world" ) )
. build ( ) ;
}
}
Code (Java):
public
class ExampleGame
extends AbstractGame
{
public ExampleGame (Plugin plugin ) {
super (plugin ) ;
}
@Override
public void init ( ) {
super. init ( ) ;
Bukkit. broadcastMessage ( "Game Created..." ) ;
installModule ( new ExampleModule ( this ) ) ;
// do your own stuff...
}
@Override
protected FlowManager. FlowManagerBuilder generateFlowManager ( ) {
FlowManager. FlowManagerBuilder builder = FlowManager. builder ( ) ;
builder. addPhase (
0, // priority
( ) -> Phase. builder ( )
. onStart ( (it ) -> Bukkit. broadcastMessage ( "Game Start!" ) )
. build ( )
) ;
PhaseAndModule <PhaseBlockingModule > blockingModule = ExtraPhases. blockingPhase ( ) ;
builder. addPhase (
1,
blockingModule ::getPhase
) ;
builder. addPhase (
1,
( ) -> Phase. builder ( )
. onStart ( (it ) -> Bukkit. broadcastMessage ( "Waiting for game end..." ) )
. build ( )
) ;
builder. addPhase (
2,
( ) -> Phase. builder ( )
. onStart ( (it ) -> Bukkit. broadcastMessage ( "Game end!" ) )
. build ( )
) ;
return builder ;
}
}
public ExampleGame (Plugin plugin ) {
super (plugin ) ;
}
@Override
public void init ( ) {
super. init ( ) ;
Bukkit. broadcastMessage ( "Game Created..." ) ;
installModule ( new ExampleModule ( this ) ) ;
// do your own stuff...
}
@Override
protected FlowManager. FlowManagerBuilder generateFlowManager ( ) {
FlowManager. FlowManagerBuilder builder = FlowManager. builder ( ) ;
builder. addPhase (
0, // priority
( ) -> Phase. builder ( )
. onStart ( (it ) -> Bukkit. broadcastMessage ( "Game Start!" ) )
. build ( )
) ;
PhaseAndModule <PhaseBlockingModule > blockingModule = ExtraPhases. blockingPhase ( ) ;
builder. addPhase (
1,
blockingModule ::getPhase
) ;
builder. addPhase (
1,
( ) -> Phase. builder ( )
. onStart ( (it ) -> Bukkit. broadcastMessage ( "Waiting for game end..." ) )
. build ( )
) ;
builder. addPhase (
2,
( ) -> Phase. builder ( )
. onStart ( (it ) -> Bukkit. broadcastMessage ( "Game end!" ) )
. build ( )
) ;
return builder ;
}
}
Please read the https://github.com/shaokeyibb/GameSenseLib/wiki for more information.
(It's not finish yet, but maybe you can follow the javadoc to get more information :<)
License
GameSenseLib is licensed under the Apache License 2.0.
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.13, 1.14, 1.15
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
GameSenseLib is a free Minecraft Java mod. Compatible with Minecraft 1.13, 1.14, 1.15, 1.16 and newer. Downloaded 147 times (via Spigot). Download it and open it directly in the game.