MCPcopy Create free account
hub / github.com/boxbeam/RedLib / importStructure

Method importStructure

src/redempt/redlib/dev/StructureTool.java:160–171  ·  view source on GitHub ↗
(Player player, String filename)

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls 3

getPathMethod · 0.95
createMethod · 0.95
sendMessageMethod · 0.80

Tested by

no test coverage detected