Search in sources :

Example 1 with TimeFeature

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

Aggregations

AutoRespawnFeature (com.voxelgameslib.voxelgameslib.api.feature.features.AutoRespawnFeature)1 BossBarFeature (com.voxelgameslib.voxelgameslib.api.feature.features.BossBarFeature)1 ClearInventoryFeature (com.voxelgameslib.voxelgameslib.api.feature.features.ClearInventoryFeature)1 DoubleJumpFeature (com.voxelgameslib.voxelgameslib.api.feature.features.DoubleJumpFeature)1 GameModeFeature (com.voxelgameslib.voxelgameslib.api.feature.features.GameModeFeature)1 JumpPadFeature (com.voxelgameslib.voxelgameslib.api.feature.features.JumpPadFeature)1 MapFeature (com.voxelgameslib.voxelgameslib.api.feature.features.MapFeature)1 MobFeature (com.voxelgameslib.voxelgameslib.api.feature.features.MobFeature)1 SpawnFeature (com.voxelgameslib.voxelgameslib.api.feature.features.SpawnFeature)1 TimeFeature (com.voxelgameslib.voxelgameslib.api.feature.features.TimeFeature)1 VoidTeleportFeature (com.voxelgameslib.voxelgameslib.api.feature.features.VoidTeleportFeature)1