> For the complete documentation index, see [llms.txt](https://julion-n.gitbook.io/bulb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://julion-n.gitbook.io/bulb/the-game-instance/establishing-key-values.md).

# Establishing key values

At the moment, this should be your game instance class:

```java
public class MyMinigame extends GameInstance<MyPlugin> {
    
    public <K extends GameInstance<MyPlugin>> MyMinigame(MyPlugin plugin, GameManager<K, MyPlugin> manager, String gameName, WorldOption worldOption, boolean prepareOnCreation) {
        super(plugin, manager, gameName, worldOption, prepareOnCreation);
    }
    
}
```

If we check the javadocs, we can see that the GameInstance class has some methods marked with the @MustOverride annotation, these methods are used by the code to obtain key information about the game flow. These methods are:

* **`int getMaxPlayers()`** -> It is used to set the maximum number of players allowed in a game instance.
* **`int getTimeBeforeStart(`)** -> As we have already seen in the [Game Flow](/bulb/the-game-instance/game-flow.md), after the instance is started, the game is prepared to start, this method is used to obtain the time in seconds before the game starts.
* **`int getTimeOfGame()`** -> As we already saw in the [Game Flow](/bulb/the-game-instance/game-flow.md), after the timer before starting the game ends, the game starts, this method marks in seconds how long the playable time should be.
* **`int getTimeBeforeEnd()`** -> As we have already seen in the [Game Flow](/bulb/the-game-instance/game-flow.md), after the game timer ends, it prepares to end the game, this method marks in seconds how long the post-game time should last.

{% hint style="info" %}
Setting any time value to -1 will prevent the timers from starting.
{% endhint %}

At the moment, this should be your game instance class:

```java
public class MyMinigame extends GameInstance<MyPlugin> {
    
    public <K extends GameInstance<MyPlugin>> MyMinigame(MyPlugin plugin, GameManager<K, MyPlugin> manager, String gameName, WorldOption worldOption, boolean prepareOnCreation) {
        super(plugin, manager, gameName, worldOption, prepareOnCreation);
    }
    
    @Override
    public int getMaxPlayers() {
        return <YOUR_VALUE>; 
    }

    @Override
    public int getTimeBeforeStart() {
        return <YOUR_VALUE>;
    }

    @Override
    public int getTimeOfGame() {
        return <YOUR_VALUE>;
    }

    @Override
    public int getTimeBeforeEnd() {
        return <YOUR_VALUE>;
    }
    
}
```
