package me.StevenLawson.TotalFreedomMod.commands;

import me.StevenLawson.TotalFreedomMod.config.ConfigurationEntry;
import me.StevenLawson.TotalFreedomMod.world.FlatlandsWorld;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;

@CommandPermissions(level = AdminLevel.ALL, source = SourceType.ONLY_IN_GAME)
public class Command_flatlands extends FreedomCommand {
    @Override
    public boolean run(CommandSender sender, org.bukkit.entity.Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) {
        if (ConfigurationEntry.FLATLANDS_GENERATE.getBoolean()) {
            FlatlandsWorld.getInstance().sendToWorld(sender_p);
        } else {
            playerMsg(sender, "Flatlands is currently disabled.");
        }
        return true;
    }
}
