add message to export command, more cleanup

This commit is contained in:
dfsek
2021-01-07 09:45:40 -07:00
parent c6ff808cce
commit e47b3f0397
5 changed files with 5 additions and 27 deletions

View File

@@ -95,27 +95,7 @@ public class ExportCommand extends PlayerCommand {
/*
Structure structure;
try {
structure = new Structure(l1, l2, args[0]);
} catch(InitializationException e) {
sender.sendMessage(e.getMessage());
return true;
}
try {
File file = new File(getMain().getDataFolder() + File.separator + "export" + File.separator + "structures", args[0] + ".tstructure");
//noinspection ResultOfMethodCallIgnored
file.getParentFile().mkdirs();
//noinspection ResultOfMethodCallIgnored
file.createNewFile();
structure.save(file);
LangUtil.send("command.structure.export", sender, file.getAbsolutePath());
} catch(IOException e) {
e.printStackTrace();
}
*/
sender.sendMessage("Exported structure to " + file.getAbsolutePath());
return true;
}

View File

@@ -10,7 +10,6 @@ import com.dfsek.terra.api.util.FastRandom;
import com.dfsek.terra.api.world.tree.Tree;
import com.dfsek.terra.bukkit.world.BukkitAdapter;
import com.dfsek.terra.config.base.ConfigPack;
import com.dfsek.terra.debug.Debug;
import com.dfsek.terra.registry.TreeRegistry;
import org.bukkit.Material;
import org.bukkit.TreeType;
@@ -54,7 +53,6 @@ public class EventListener implements Listener {
block.setType(Material.AIR);
TreeRegistry registry = c.getTreeRegistry();
Tree tree = registry.get(TREE_TYPE_STRING_TRANSFORMER.translate(e.getSpecies()));
Debug.info("Overrode tree type: " + e.getSpecies());
org.bukkit.Location location = e.getLocation();
if(!tree.plant(new Location(bukkit, location.getX(), location.getY(), location.getZ()), new FastRandom())) block.setBlockData(data);
}