(Player player, String filename)
| 158 | } |
| 159 | |
| 160 | @CommandHook("import") |
| 161 | public void importStructure(Player player, String filename) throws IOException { |
| 162 | Path path = getPath(filename); |
| 163 | if (!Files.exists(path)) { |
| 164 | player.sendMessage(ChatColor.RED + "Could not resolve structure " + path); |
| 165 | return; |
| 166 | } |
| 167 | String contents = new String(Files.readAllBytes(path)); |
| 168 | MultiBlockStructure struct = MultiBlockStructure.create(contents, filename, true, true); |
| 169 | structures.put(player.getUniqueId(), struct); |
| 170 | player.sendMessage(ChatColor.GREEN + "Structure imported!"); |
| 171 | } |
| 172 | |
| 173 | @CommandHook("build") |
| 174 | public void build(Player player, int rotation, boolean mirror) { |
nothing calls this directly
no test coverage detected