Package eu.mhsl.minenet.minigames.instance.game

# Class Game

java.lang.Object
net.minestom.server.instance.Instance
net.minestom.server.instance.InstanceContainer
eu.mhsl.minenet.minigames.instance.MineNetInstance
eu.mhsl.minenet.minigames.instance.game.Game

All Implemented Interfaces:
  `Spawnable`, `net.kyori.adventure.audience.Audience`, `net.kyori.adventure.audience.ForwardingAudience`, `net.kyori.adventure.pointer.Pointered`, `net.minestom.server.adventure.audience.PacketGroupingAudience`, `net.minestom.server.event.EventHandler<net.minestom.server.event.trait.InstanceEvent>`, `net.minestom.server.instance.block.Block.Getter`, `net.minestom.server.instance.block.Block.Setter`, `net.minestom.server.snapshot.Snapshotable`, `net.minestom.server.tag.Taggable`, `net.minestom.server.tag.TagReadable`, `net.minestom.server.tag.TagWritable`, `net.minestom.server.Tickable`, `net.minestom.server.timer.Schedulable`

Direct Known Subclasses:
  `Minigame`

public abstract class Game extends MineNetInstance implements Spawnable

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface net.minestom.server.instance.block.Block.Getter

  `net.minestom.server.instance.block.Block.Getter.Condition`

  ## Nested classes/interfaces inherited from interface net.kyori.adventure.audience.ForwardingAudience

  `net.kyori.adventure.audience.ForwardingAudience.Single`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected boolean`
  `isBeforeBeginning`
  `protected boolean`
  `isRunning`
  `protected final Logger`
  `logger`
  `protected final Random`
  `rnd`

  ### Fields inherited from class net.minestom.server.instance.InstanceContainer

  `srcInstance`

  ### Fields inherited from class net.minestom.server.instance.Instance

  `uniqueId`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Game(net.minestom.server.world.DimensionType dimensionType)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `checkAbandoned()`
  `net.minestom.server.coordinate.Pos`
  `getSpawn()`
  `void`
  `load()`
  Load and start countdown
  `protected void`
  `onBlockBreak(@NotNull net.minestom.server.event.player.PlayerBlockBreakEvent playerBlockBreakEvent)`
  `protected void`
  `onBlockPlace(@NotNull net.minestom.server.event.player.PlayerBlockPlaceEvent playerBlockPlaceEvent)`
  `protected void`
  `onItemDrop(@NotNull net.minestom.server.event.item.ItemDropEvent itemDropEvent)`
  `protected void`
  `onLoad(CompletableFuture<Void> callback)`
  `protected void`
  `onPlayerLeave(net.minestom.server.entity.Player p)`
  Called when Player leaves this instance
  `protected void`
  `onPlayerMove(@NotNull net.minestom.server.event.player.PlayerMoveEvent playerMoveEvent)`
  `protected void`
  `onStart()`
  `protected void`
  `onStop()`
  `protected void`
  `onUnload()`
  `protected void`
  `start()`
  `void`
  `stop()`
  `void`
  `unload()`

  ### Methods inherited from class eu.mhsl.minenet.minigames.instance.MineNetInstance

  `destroy, onPlayerJoin`

  ### Methods inherited from class net.minestom.server.instance.InstanceContainer

  `addSharedInstance, breakBlock, copy, createChunk, enableAutoChunkLoad, generator, getChunk, getChunkLoader, getChunks, getChunkSupplier, getLastBlockChangeTime, getSharedInstances, getSrcInstance, hasEnabledAutoChunkLoad, hasSharedInstances, isInVoid, loadChunk, loadOptionalChunk, placeBlock, refreshLastBlockChangeTime, retrieveChunk, saveChunksToStorage, saveChunkToStorage, saveInstance, setBlock, setChunkLoader, setChunkSupplier, setGenerator, tick, unloadChunk`

  ### Methods inherited from class net.minestom.server.instance.Instance

  `createTimePacket, eventNode, explode, explode, getBlock, getChunkAt, getChunkAt, getChunkEntities, getCreatures, getDimensionType, getEntities, getEntityTracker, getExperienceOrbs, getExplosionSupplier, getInstanceSpace, getNearbyEntities, getPlayers, getTime, getTimeRate, getTimeUpdate, getUniqueId, getWorldAge, getWorldBorder, isChunkLoaded, isChunkLoaded, isRegistered, loadChunk, loadOptionalChunk, pointers, scheduleNextTick, scheduler, sendBlockAction, setChunkGenerator, setExplosionSupplier, setRegistered, setTime, setTimeRate, setTimeUpdate, tagHandler, unloadChunk, updateSnapshot`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface net.kyori.adventure.audience.Audience

  `openBook, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, showTitle, stopSound`

  ### Methods inherited from interface net.minestom.server.instance.block.Block.Getter

  `getBlock, getBlock, getBlock`

  ### Methods inherited from interface net.minestom.server.instance.block.Block.Setter

  `setBlock`

  ### Methods inherited from interface net.kyori.adventure.audience.ForwardingAudience

  `filterAudience, forEachAudience, openBook, playSound, sendMessage, sendPlayerListFooter, sendPlayerListHeader`

  ### Methods inherited from interface net.minestom.server.adventure.audience.PacketGroupingAudience

  `audiences, clearTitle, hideBossBar, playSound, playSound, resetTitle, sendActionBar, sendGroupedPacket, sendMessage, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, stopSound`

  ### Methods inherited from interface net.kyori.adventure.pointer.Pointered

  `get, getOrDefault, getOrDefaultFrom`

  ### Methods inherited from interface net.minestom.server.tag.Taggable

  `getTag, hasTag, removeTag, setTag`

- ## Field Details

  - ### isRunning

    protected boolean isRunning

  - ### isBeforeBeginning

    protected boolean isBeforeBeginning

  - ### rnd

    protected final Random rnd

  - ### logger

    protected final Logger logger

- ## Constructor Details

  - ### Game

    public Game(net.minestom.server.world.DimensionType dimensionType)

- ## Method Details

  - ### load

    public void load()
    Load and start countdown

  - ### start

    protected void start()

  - ### stop

    public void stop()

  - ### unload

    public void unload()

  - ### onLoad

    protected void onLoad(CompletableFuture<Void> callback)

  - ### onStart

    protected void onStart()

  - ### onStop

    protected void onStop()

  - ### onUnload

    protected void onUnload()

  - ### onPlayerMove

    protected void onPlayerMove(@NotNull @NotNull net.minestom.server.event.player.PlayerMoveEvent playerMoveEvent)

  - ### onBlockBreak

    protected void onBlockBreak(@NotNull @NotNull net.minestom.server.event.player.PlayerBlockBreakEvent playerBlockBreakEvent)

  - ### onBlockPlace

    protected void onBlockPlace(@NotNull @NotNull net.minestom.server.event.player.PlayerBlockPlaceEvent playerBlockPlaceEvent)

  - ### onPlayerLeave

    protected void onPlayerLeave(net.minestom.server.entity.Player p)
    Description copied from class: `MineNetInstance`
    Called when Player leaves this instance
    Overrides:
      `onPlayerLeave` in class `MineNetInstance`
    Parameters:
      `p` - player who is leaving

  - ### onItemDrop

    protected void onItemDrop(@NotNull @NotNull net.minestom.server.event.item.ItemDropEvent itemDropEvent)

  - ### checkAbandoned

    protected void checkAbandoned()

  - ### getSpawn

    public net.minestom.server.coordinate.Pos getSpawn()
    Specified by:
      `getSpawn` in interface `Spawnable`