2022-03-20 12:35:43 +00:00
|
|
|
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)
|
2022-03-21 17:29:19 +00:00
|
|
|
@CommandParameters(description = "Goto the flatlands.", usage = "/<command>")
|
2022-03-20 12:35:43 +00:00
|
|
|
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 {
|
2022-03-21 17:29:19 +00:00
|
|
|
playerMsg("Flatlands is currently disabled.");
|
2022-03-20 12:35:43 +00:00
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|