Package com.ryandw11.structure.schematic
Class SchematicHandler
java.lang.Object
com.ryandw11.structure.schematic.SchematicHandler
Handles schematic operations.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
compileOnly(String name, org.bukkit.entity.Player player, org.bukkit.World w)
Only compile a selection into a compiled schematic.static boolean
createSchematic(String name, org.bukkit.entity.Player player, org.bukkit.World w, boolean compile)
Create a schematic and save it to the schematics folder in the CustomStructures plugin.static void
placeSchematic(org.bukkit.Location loc, String filename, boolean useAir, Structure structure)
Handles the schematic.static void
placeSchematic(org.bukkit.Location loc, String filename, boolean useAir, Structure structure, int iteration)
Handles the actual pasting of the structure.
-
Method Details
-
placeSchematic
public static void placeSchematic(org.bukkit.Location loc, String filename, boolean useAir, Structure structure, int iteration) throws IOException, com.sk89q.worldedit.WorldEditExceptionHandles the actual pasting of the structure.This method is to be called on the main Server thread.
- Parameters:
loc
- - The locationfilename
- - The file name. Ex: demo.schematicuseAir
- - if air is to be used in the schematicstructure
- - The structure that is getting spawned.iteration
- - The number of iterations in a structure.- Throws:
com.sk89q.worldedit.WorldEditException
- If world edit has a problem pasting the schematic.IOException
- If an error occurs during file reading.
-
placeSchematic
public static void placeSchematic(org.bukkit.Location loc, String filename, boolean useAir, Structure structure) throws IOException, com.sk89q.worldedit.WorldEditExceptionHandles the schematic.This method is to be called on the main Server thread.
- Parameters:
loc
- - The locationfilename
- - The file name. Ex: demo.schematicuseAir
- - if air is to be used in the schematicstructure
- - The structure that is getting spawned.- Throws:
com.sk89q.worldedit.WorldEditException
- If world edit has a problem pasting the schematic.IOException
- If an error occurs during file reading.
-
createSchematic
public static boolean createSchematic(String name, org.bukkit.entity.Player player, org.bukkit.World w, boolean compile)Create a schematic and save it to the schematics folder in the CustomStructures plugin.- Parameters:
name
- The name of the schematic.player
- The player.w
- The worldcompile
- If the schematic should be compiled.- Returns:
- If the operation was successful.
-
compileOnly
public static boolean compileOnly(String name, org.bukkit.entity.Player player, org.bukkit.World w)Only compile a selection into a compiled schematic.- Parameters:
name
- The name of the schematic.player
- The player.w
- The world- Returns:
- If the operation was successful.
-