Skip to main content
The SchematicManager handles loading, saving, and parsing of island schematics.

Methods

getSchematic

Schematic getSchematic(String name)
Get a schematic by its name.
name
String
required
The name to check
return
Schematic
The schematic with that name or null if not found

getSchematics

List<String> getSchematics()
Get a list of all the schematics.
return
List<String>
List of schematic names

Schematic Parsers

registerSchematicParser

void registerSchematicParser(SchematicParser schematicParser)
Register a new schematic parser. Files will be parsed using the registered parsers. The plugin will attempt to parse the schematic files using each of the parsers in the same order they were registered. If no parsers are available, or no parser could parse the file, the plugin will use the default parser.
schematicParser
SchematicParser
required
The schematic-parser to register

getSchematicParsers

List<SchematicParser> getSchematicParsers()
Get all the registered parsers, in the same order they were registered.
return
List<SchematicParser>
List of registered schematic parsers

Saving Schematics

saveSchematic (Simple)

void saveSchematic(SuperiorPlayer superiorPlayer, String schematicName)
void saveSchematic(SuperiorPlayer superiorPlayer, String schematicName, boolean saveAir)
Save a schematic using the player’s WorldEdit selection.
superiorPlayer
SuperiorPlayer
required
The player who saves the schematic
schematicName
String
required
The schematic name
saveAir
boolean
Whether to save air blocks into the schematic

saveSchematic (With Positions)

void saveSchematic(Location pos1, Location pos2, int offsetX, int offsetY, int offsetZ, String schematicName)
void saveSchematic(Location pos1, Location pos2, int offsetX, int offsetY, int offsetZ, float yaw, float pitch, String schematicName)
void saveSchematic(Location pos1, Location pos2, int offsetX, int offsetY, int offsetZ, String schematicName, Runnable callable)
void saveSchematic(Location pos1, Location pos2, int offsetX, int offsetY, int offsetZ, float yaw, float pitch, String schematicName, @Nullable Runnable callable)
Save a schematic from two positions.
pos1
Location
required
First position for the schematic
pos2
Location
required
Second position for the schematic
offsetX
int
required
The offset x value for the schematic (from minimum location between the two)
offsetY
int
required
The offset y value for the schematic (from minimum location between the two)
offsetZ
int
required
The offset z value for the schematic (from minimum location between the two)
yaw
float
The yaw value of the schematic
pitch
float
The pitch value of the schematic
schematicName
String
required
The new schematic name that will be created
callable
Runnable
A runnable that will be ran after the task is completed (nullable)

saveSchematic (With Options)

void saveSchematic(Location pos1, Location pos2, SchematicOptions schematicOptions)
void saveSchematic(Location pos1, Location pos2, SchematicOptions schematicOptions, @Nullable Runnable callable)
Save a schematic with custom options.
pos1
Location
required
First position for the schematic
pos2
Location
required
Second position for the schematic
schematicOptions
SchematicOptions
required
The options for creating the new schematic
callable
Runnable
A runnable that will be ran after the task is completed (nullable)