TFM-4.3-Reloaded/src/main/java/me/StevenLawson/TotalFreedomMod/commands/Command_flatlands.java

20 lines
812 B
Java
Raw Normal View History

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)
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-23 23:48:41 +00:00
playerMsg(sender, "Flatlands is currently disabled.");
2022-03-20 12:35:43 +00:00
}
return true;
}
}