Search in sources :

Example 1 with LobbyFeature

use of com.voxelgameslib.voxelgameslib.api.feature.features.LobbyFeature in project VoxelGamesLibv2 by VoxelGamesLib.

the class LobbyPhase method init.

@Override
public void init() {
    setName("LobbyPhase");
    super.init();
    setAllowJoin(true);
    setAllowSpectate(false);
    MapFeature mapFeature = getGame().createFeature(MapFeature.class, this);
    mapFeature.setShouldUnload(false);
    mapFeature.setType(MapFeature.Type.LOBBY);
    addFeature(mapFeature);
    SpawnFeature spawnFeature = getGame().createFeature(SpawnFeature.class, this);
    addFeature(spawnFeature);
    NoBlockBreakFeature noBlockBreakFeature = getGame().createFeature(NoBlockBreakFeature.class, this);
    addFeature(noBlockBreakFeature);
    NoBlockPlaceFeature noBlockPlaceFeature = getGame().createFeature(NoBlockPlaceFeature.class, this);
    addFeature(noBlockPlaceFeature);
    ClearInventoryFeature clearInventoryFeature = getGame().createFeature(ClearInventoryFeature.class, this);
    addFeature(clearInventoryFeature);
    NoDamageFeature noDamageFeature = getGame().createFeature(NoDamageFeature.class, this);
    addFeature(noDamageFeature);
    HealFeature healFeature = getGame().createFeature(HealFeature.class, this);
    addFeature(healFeature);
    GameModeFeature gameModeFeature = getGame().createFeature(GameModeFeature.class, this);
    gameModeFeature.setGameMode(GameMode.ADVENTURE);
    addFeature(gameModeFeature);
    LobbyFeature lobbyFeature = getGame().createFeature(LobbyFeature.class, this);
    addFeature(lobbyFeature);
    NoHungerLossFeature noHungerLossFeature = getGame().createFeature(NoHungerLossFeature.class, this);
    addFeature(noHungerLossFeature);
    ScoreboardFeature scoreboardFeature = getGame().createFeature(ScoreboardFeature.class, this);
    addFeature(scoreboardFeature);
    BossBarFeature bossBarFeature = getGame().createFeature(BossBarFeature.class, this);
    addFeature(bossBarFeature);
    MobFeature mobFeature = getGame().createFeature(MobFeature.class, this);
    addFeature(mobFeature);
}
Also used : MobFeature(com.voxelgameslib.voxelgameslib.api.feature.features.MobFeature) NoBlockBreakFeature(com.voxelgameslib.voxelgameslib.api.feature.features.NoBlockBreakFeature) GameModeFeature(com.voxelgameslib.voxelgameslib.api.feature.features.GameModeFeature) BossBarFeature(com.voxelgameslib.voxelgameslib.api.feature.features.BossBarFeature) NoDamageFeature(com.voxelgameslib.voxelgameslib.api.feature.features.NoDamageFeature) NoHungerLossFeature(com.voxelgameslib.voxelgameslib.api.feature.features.NoHungerLossFeature) ClearInventoryFeature(com.voxelgameslib.voxelgameslib.api.feature.features.ClearInventoryFeature) MapFeature(com.voxelgameslib.voxelgameslib.api.feature.features.MapFeature) NoBlockPlaceFeature(com.voxelgameslib.voxelgameslib.api.feature.features.NoBlockPlaceFeature) SpawnFeature(com.voxelgameslib.voxelgameslib.api.feature.features.SpawnFeature) HealFeature(com.voxelgameslib.voxelgameslib.api.feature.features.HealFeature) ScoreboardFeature(com.voxelgameslib.voxelgameslib.api.feature.features.ScoreboardFeature) LobbyFeature(com.voxelgameslib.voxelgameslib.api.feature.features.LobbyFeature)

Aggregations

BossBarFeature (com.voxelgameslib.voxelgameslib.api.feature.features.BossBarFeature)1 ClearInventoryFeature (com.voxelgameslib.voxelgameslib.api.feature.features.ClearInventoryFeature)1 GameModeFeature (com.voxelgameslib.voxelgameslib.api.feature.features.GameModeFeature)1 HealFeature (com.voxelgameslib.voxelgameslib.api.feature.features.HealFeature)1 LobbyFeature (com.voxelgameslib.voxelgameslib.api.feature.features.LobbyFeature)1 MapFeature (com.voxelgameslib.voxelgameslib.api.feature.features.MapFeature)1 MobFeature (com.voxelgameslib.voxelgameslib.api.feature.features.MobFeature)1 NoBlockBreakFeature (com.voxelgameslib.voxelgameslib.api.feature.features.NoBlockBreakFeature)1 NoBlockPlaceFeature (com.voxelgameslib.voxelgameslib.api.feature.features.NoBlockPlaceFeature)1 NoDamageFeature (com.voxelgameslib.voxelgameslib.api.feature.features.NoDamageFeature)1 NoHungerLossFeature (com.voxelgameslib.voxelgameslib.api.feature.features.NoHungerLossFeature)1 ScoreboardFeature (com.voxelgameslib.voxelgameslib.api.feature.features.ScoreboardFeature)1 SpawnFeature (com.voxelgameslib.voxelgameslib.api.feature.features.SpawnFeature)1