Skip to content

Commit

Permalink
fix: Gradle task runServer now generates resource pack if one doesn't…
Browse files Browse the repository at this point in the history
… currently exist.
  • Loading branch information
ryantheleach committed Mar 3, 2024
1 parent 2c2ca35 commit 8367fda
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
import com.google.common.io.Files;
import java.io.File;
import java.io.IOException;
import java.nio.file.StandardCopyOption;
import java.util.Properties;
import java.util.logging.Level;

import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
Expand Down Expand Up @@ -73,7 +76,11 @@ public ResourcePackDistributor(Context<Core> context) {
public void on_enable() {
if (localDev) {
try {
var pack_output = new File("vane-resource-pack.zip");
File pack_output = new File("vane-resource-pack.zip");
if(!pack_output.exists()) {
get_module().log.info("Resource Pack Missing, first run? Generating resource pack.");
pack_output = get_module().generate_resource_pack();
}
file_watcher = new ResourcePackFileWatcher(this, pack_output);
dev_server = new ResourcePackDevServer(this, pack_output);
dev_server.serve();
Expand Down

0 comments on commit 8367fda

Please sign in to comment.