Skip to content

Commit

Permalink
Added FAWE check in /arena generate
Browse files Browse the repository at this point in the history
  • Loading branch information
Devlrxxh committed Feb 26, 2024
1 parent c2a0d43 commit eb9a69d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.bukkit.block.BlockFace;
import org.bukkit.block.Sign;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
import org.bukkit.scheduler.BukkitRunnable;

import java.io.File;
Expand Down Expand Up @@ -271,6 +272,11 @@ public void tp(Player player, String arenaName) {

@Subcommand("generate")
public void generate(Player player) {
Plugin fawe = Practice.getInstance().getServer().getPluginManager().getPlugin("FAWE");
if (!(fawe != null && fawe.isEnabled())) {
player.sendMessage(CC.translate("&4ERROR - &cFAWE isn't installed on the server!"));
return;
}
File schematicsFolder = new File(Practice.getInstance().getDataFolder().getPath() + File.separator + "schematics");

if (!schematicsFolder.exists()) {
Expand Down

0 comments on commit eb9a69d

Please sign in to comment.