Search in sources :

Example 1 with ClearInventoryFeature

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

the class EditModePhase method init.

@Override
public void init() {
    setName("EditMode");
    super.init();
    setAllowJoin(true);
    setAllowSpectate(false);
    AutoRespawnFeature autoRespawnFeature = getGame().createFeature(AutoRespawnFeature.class, this);
    addFeature(autoRespawnFeature);
    BossBarFeature bossBarFeature = getGame().createFeature(BossBarFeature.class, this);
    bossBarFeature.setMessage("Edit Mode active");
    bossBarFeature.setColor(BarColor.RED);
    addFeature(bossBarFeature);
    ClearInventoryFeature clearInventoryFeature = getGame().createFeature(ClearInventoryFeature.class, this);
    addFeature(clearInventoryFeature);
    DoubleJumpFeature doubleJumpFeature = getGame().createFeature(DoubleJumpFeature.class, this);
    addFeature(doubleJumpFeature);
    GameModeFeature gameModeFeature = getGame().createFeature(GameModeFeature.class, this);
    gameModeFeature.setGameMode(org.bukkit.GameMode.CREATIVE);
    addFeature(gameModeFeature);
    JumpPadFeature jumpPadFeature = getGame().createFeature(JumpPadFeature.class, this);
    addFeature(jumpPadFeature);
    VoidTeleportFeature voidTeleportFeature = getGame().createFeature(VoidTeleportFeature.class, this);
    addFeature(voidTeleportFeature);
    SpawnFeature spawnFeature = getGame().createFeature(SpawnFeature.class, this);
    addFeature(spawnFeature);
    MapFeature mapFeature = getGame().createFeature(MapFeature.class, this);
    addFeature(mapFeature);
    MobFeature mobFeature = getGame().createFeature(MobFeature.class, this);
    mobFeature.setRemoveExisting(true);
    addFeature(mobFeature);
    TimeFeature timeFeature = getGame().createFeature(TimeFeature.class, this);
    addFeature(timeFeature);
}
Also used : JumpPadFeature(com.voxelgameslib.voxelgameslib.api.feature.features.JumpPadFeature) AutoRespawnFeature(com.voxelgameslib.voxelgameslib.api.feature.features.AutoRespawnFeature) GameModeFeature(com.voxelgameslib.voxelgameslib.api.feature.features.GameModeFeature) VoidTeleportFeature(com.voxelgameslib.voxelgameslib.api.feature.features.VoidTeleportFeature) BossBarFeature(com.voxelgameslib.voxelgameslib.api.feature.features.BossBarFeature) TimeFeature(com.voxelgameslib.voxelgameslib.api.feature.features.TimeFeature) ClearInventoryFeature(com.voxelgameslib.voxelgameslib.api.feature.features.ClearInventoryFeature) MobFeature(com.voxelgameslib.voxelgameslib.api.feature.features.MobFeature) MapFeature(com.voxelgameslib.voxelgameslib.api.feature.features.MapFeature) SpawnFeature(com.voxelgameslib.voxelgameslib.api.feature.features.SpawnFeature) DoubleJumpFeature(com.voxelgameslib.voxelgameslib.api.feature.features.DoubleJumpFeature)

Example 2 with ClearInventoryFeature

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

the class GracePhase method init.

@Override
public void init() {
    setName("GracePhase");
    super.init();
    setAllowJoin(false);
    setAllowSpectate(true);
    setTicks(60 * GameConstants.TPS);
    MapFeature mapFeature = getGame().createFeature(MapFeature.class, this);
    mapFeature.setShouldUnload(false);
    addFeature(mapFeature);
    SpawnFeature spawnFeature = getGame().createFeature(SpawnFeature.class, this);
    addFeature(spawnFeature);
    MapInfoFeature mapInfoFeature = getGame().createFeature(MapInfoFeature.class, this);
    addFeature(mapInfoFeature);
    ScoreboardFeature scoreboardFeature = getGame().createFeature(ScoreboardFeature.class, this);
    addFeature(scoreboardFeature);
    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.SURVIVAL);
    addFeature(gameModeFeature);
    MobFeature mobFeature = getGame().createFeature(MobFeature.class, this);
    addFeature(mobFeature);
    SpectatorFeature spectatorFeature = getGame().createFeature(SpectatorFeature.class, this);
    addFeature(spectatorFeature);
}
Also used : NoBlockBreakFeature(com.voxelgameslib.voxelgameslib.api.feature.features.NoBlockBreakFeature) GameModeFeature(com.voxelgameslib.voxelgameslib.api.feature.features.GameModeFeature) MapInfoFeature(com.voxelgameslib.voxelgameslib.api.feature.features.MapInfoFeature) NoDamageFeature(com.voxelgameslib.voxelgameslib.api.feature.features.NoDamageFeature) ClearInventoryFeature(com.voxelgameslib.voxelgameslib.api.feature.features.ClearInventoryFeature) MobFeature(com.voxelgameslib.voxelgameslib.api.feature.features.MobFeature) SpectatorFeature(com.voxelgameslib.voxelgameslib.api.feature.features.SpectatorFeature) 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)

Example 3 with ClearInventoryFeature

use of com.voxelgameslib.voxelgameslib.api.feature.features.ClearInventoryFeature 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

ClearInventoryFeature (com.voxelgameslib.voxelgameslib.api.feature.features.ClearInventoryFeature)3 GameModeFeature (com.voxelgameslib.voxelgameslib.api.feature.features.GameModeFeature)3 MapFeature (com.voxelgameslib.voxelgameslib.api.feature.features.MapFeature)3 MobFeature (com.voxelgameslib.voxelgameslib.api.feature.features.MobFeature)3 SpawnFeature (com.voxelgameslib.voxelgameslib.api.feature.features.SpawnFeature)3 BossBarFeature (com.voxelgameslib.voxelgameslib.api.feature.features.BossBarFeature)2 HealFeature (com.voxelgameslib.voxelgameslib.api.feature.features.HealFeature)2 NoBlockBreakFeature (com.voxelgameslib.voxelgameslib.api.feature.features.NoBlockBreakFeature)2 NoBlockPlaceFeature (com.voxelgameslib.voxelgameslib.api.feature.features.NoBlockPlaceFeature)2 NoDamageFeature (com.voxelgameslib.voxelgameslib.api.feature.features.NoDamageFeature)2 ScoreboardFeature (com.voxelgameslib.voxelgameslib.api.feature.features.ScoreboardFeature)2 AutoRespawnFeature (com.voxelgameslib.voxelgameslib.api.feature.features.AutoRespawnFeature)1 DoubleJumpFeature (com.voxelgameslib.voxelgameslib.api.feature.features.DoubleJumpFeature)1 JumpPadFeature (com.voxelgameslib.voxelgameslib.api.feature.features.JumpPadFeature)1 LobbyFeature (com.voxelgameslib.voxelgameslib.api.feature.features.LobbyFeature)1 MapInfoFeature (com.voxelgameslib.voxelgameslib.api.feature.features.MapInfoFeature)1 NoHungerLossFeature (com.voxelgameslib.voxelgameslib.api.feature.features.NoHungerLossFeature)1 SpectatorFeature (com.voxelgameslib.voxelgameslib.api.feature.features.SpectatorFeature)1 TimeFeature (com.voxelgameslib.voxelgameslib.api.feature.features.TimeFeature)1 VoidTeleportFeature (com.voxelgameslib.voxelgameslib.api.feature.features.VoidTeleportFeature)1