mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-12 18:56:04 +00:00
add message to export command, more cleanup
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user